freenode/#lisp - IRC Chatlog
Search
15:09:44
Success
sorry for the repost but i really don't know what i'm doing. how do i get the gdp per capita out of this? https://gist.github.com/Announcement/3adb64d1742ab69aa78e4e0dc5553369
15:17:36
beach
Success: Your question is hard to answer because you haven't told us what operations are allowed. I mean, I could give you a bunch of CARs and CDRs that together will access the correct data, but you can probably do that yourself.
15:18:30
beach
Success: I am also wondering whether ($ $) and (. .) indicate that some information was not printed.
15:19:20
beach
Success: How can you be doing Common Lisp if you don't even know what CAR and CDR do?
15:21:49
beach
Then just take either the CAR or the CDR of the expression, and if the information is in the result, you chose the right operation.
15:37:07
devon
latest QL in latest CCL on MacOS 10.11 bombs compiling gsll-quicklisp-dd2e7673-git/init/init.lisp
15:43:54
devon
Probably lacking some binary or library, eof reading some string, probably output of some attempt to run some program. No biggie, just wanted a 1st order histogram of some really strange data out of curiosity.
15:54:03
Josh_2
You can clone it from git and then add it to local projects in your quicklisp install folder, then it should work
16:35:54
devon
Any other ways to do (let ((count 5)) (format t "~v,,,'*A~%" count "") (princ (make-string count :initial-element #\*)))
16:42:01
dwts
jackdaniel: it's clear that C's version offered an improvement. I'm not experienced enough to decide if "importing" it to lisp is an improvement but the example looks quite similar
20:01:37
jackdaniel
smurfrobot: sbcl is a cmucl fork. sbcl goals were to clean up bootstrapping process and some internals as well as to get rid of some contribs
20:02:10
jackdaniel
sbcl is more popular and has more developers, yet cmucl is still developed as well
20:03:11
jackdaniel
sbcl compiler comes from python (cmucl compiler). if you want to compare how similar they are I advise to examine source code. they are probably different in details but still similar in general design (just guessing)
20:04:13
jackdaniel
if you are interested in relation between various common lisp compilers, check out this graph I've made: https://twitter.com/dk_jackdaniel/status/698157022483771392
20:04:47
jackdaniel
whoman: python is a name of the cmucl compiler. it's not the same thing as python the programming language
20:05:29
jackdaniel
smurfrobot: other implementations channels on freenode I'm aware of: #ecl, #ccl, #clasp, #abcl
20:06:49
jackdaniel
(some information about python: https://www.common-lisp.net/project/cmucl/doc/cmu-user/compiler.html)
20:18:37
jackdaniel
thanks, it got updated slightly (I've got it somewhere in ECL website resources) but I didn't bother to look for it
20:20:14
jackdaniel
https://common-lisp.net/project/ecl/static/quarterly/img/vol4/all-hierarchy.png here
20:20:22
koenig
Are you the developer (a developer) of ECL? I've never been able to completely understand your relationship to ECL just from channel context.
20:21:29
White_Flame
and things like TI explorer and Genera have non-CL shared heritage, which might be nice to include
20:21:36
jackdaniel
White_Flame: another idea was to put pre-CL predecessors - I had no idea how to fit it nicely
20:22:01
koenig
Thanks for your work on ECL, then. I have enjoyed using it in a couple different places. I have a hare-brained idea of making ECL into a WeeChat plugin "when I have some free time".
20:49:37
whoman
one of us was using ECL to enhance one of the Quake 3 engines, too. may have been aeth
20:50:34
Somelauw
I'm actually interested in emacs-lisp, but since clos is more of a common lisp thing, I'll ask here. How to make private variables and methods and how to modify the constructor?
20:50:36
jackdaniel
have it got enhanced? I bet his missle bazooka stopped aiming correctly because of that ;-)
20:51:22
jackdaniel
Somelauw: you don't make them private. You may skip providing accessor for them, or name it %foo (% means, that operator is internal)
20:51:42
jackdaniel
regarding constructor, you may define method initialize-instance specialized on your class
20:52:54
jackdaniel
if you really want to make it private, you could use uninterned symbols for slots I suppose, but that would be awkward and requires some work to add ways to access the slot
20:53:20
Somelauw
jackdaniel: so for variables, the style is to user get-attribute, set-attribute - never slot-value? What about private methods?
20:53:27
nyef
... And doesn't actually stop someone with a metaobject protocol from going in and opening things up anyway.
20:55:13
Somelauw
ah, so in common lisp you explicitly export get/set/accesor methods to make them public?
20:57:09
jackdaniel
if it is internal, then accessing it requries extra double colon like package::foo (while exported symbol may be accessed like package:bar)
20:58:55
jackdaniel
namespaces and packages are different things. I think you should do some research on your own about common lisp package system
20:59:51
jackdaniel
right, if you are interested in the topic, it might be worth reading about it on published resources
20:59:55
minion
Somelauw: have a look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
21:00:30
uint
I just want to note :: should be generally avoided since it's for accessing internals of a package from outside of it
21:02:26
jackdaniel
Somelauw: fact that this book is still actual proves, how solid common lisp standard is ;-) no go and read some, it is a perfect resource to learn about programming in CL
21:02:27
uint
: is for accessing the interface (exported symbols) of a package, :: is for accessing any symbols within the package
21:03:05
mfiano
whoman: if you're inside a package and want to access its symbols, you don't need any package qualifier, single or double colon.
21:05:54
smurfrobot
I guess maybe i should read the cmucl compiler code b4 the sbcl it seems to have clearer comments. there is a lot of stuff in the sbcl that are FIXME type comments.
21:06:14
Somelauw
i seem to have already read some chapters of that book, by googling(duckduckgo) "common lisp ...", but never in full and didn't even realise it
21:08:12
Xach
smurfrobot: it has a peculiar idea about the worthwhile parts of CL. and it gets the performance model wrong.
21:09:35
smurfrobot
practical common lisp looks pretty good from what i have read might buy a tree copy.
21:12:57
Somelauw
I have secretely learned a lot about "scheme", "emacs-lisp" and "clojure" instead of common lisp.
21:13:35
Younder
For the more advanced reader Eddi Weitz book Common Lisp recipes is a good reference work.
21:16:20
Younder
ML is a bit old, most people today use OCAML. It a purer functional programming language than Lisp which is more multi paradigm.
21:18:39
smurfrobot
how different is ocaml from ml? my understanding is the type system isn't quite the same.
21:21:30
mfiano
It looks like the printing press is 2 hours from me, so I just received my Cyber Monday PCL and CLR books I ordered. Best $25 I probably ever spent - $105 saved.
21:28:20
mfiano
Common Lisp Recipes. All Apress books _were_ $12.50usd from Friday until yesterday. Deal's over.
21:28:22
jackdaniel
common lisp recipes, new book written by Edmund Weitz (very good one, I have it on my shelf)
21:46:40
jmercouris
I've read a little bit, but it's not clear to me what purpose they serve? to implement an algol like language on top of lisp?
21:47:48
Shinmera
Early on it was believed that an M-expression syntax would be more "natural" and generally better than s-expressions.
21:49:57
Xach
jmercouris: http://www-formal.stanford.edu/jmc/recursive.pdf explains them. (that is the original lisp paper)
21:51:06
jmercouris
From first glance this a surprisingly easy to read paper, I guess they had to explain literally everything as there was no background knowledge about programming tht one could assume back then
21:59:23
jmercouris
Any bindings/libs that utilize CFFI are essentially just convenience wrappers to make something easier to use in CL, or is my understanding incorrect? e.g. something like this: https://github.com/crategus/cl-cffi-gtk is using CFFI to make a more lisp friendly interface to GTK
22:00:14
jmercouris
Someone wrote the bindings right? So you should be able to write your own bindings theoretically
22:00:32
jmercouris
cl-cffi-gtk does not actually implement CFFI, so anything possible in cl-cffi-gtk should be possible using just CFFI right?
22:01:01
jmercouris
Ok, I just wanted to clarify the point that there was nothing inherently special about the bindings, maybe something I didn't know, thanks
22:01:39
Shinmera
Bindings libraries usually do one or two things: 1) implement the, well, bindings to all the C functions and structs that the foreign system exposes and 2) implement a high-level wrapper to make the library "feel at home" in Lisp.
22:01:43
jmercouris
More or less I am thinking about this because the GTK bindings for gtk+ webkit appear outdated, and I will probably need to write some myself
22:02:29
Shinmera
The first part is usually boring and tedious unless you use something like cl-autowrap to generate it for you.
22:02:32
jmercouris
Also, the bindings should still be valid for an old piece of software as long as the foreign interface doesn't change correct?
22:04:13
Shinmera
Like for instance here's a really small library: https://github.com/Shirakumo/libflac/blob/master/src/flac.h which translates to these bindings: https://github.com/Shirakumo/cl-flac/blob/master/low-level.lisp
22:04:46
Shinmera
and this high-level interface: https://github.com/Shirakumo/cl-flac/blob/master/wrapper.lisp
22:07:12
Shinmera
I have more complicated bindings libraries, but it's usually mostly the same stuff, just.. well. More.
22:07:43
jmercouris
Xach: Is there a way I can see which packages you've removed release to release?
22:08:43
Shinmera
jmercouris: When you do a dist update it'll also show you the removed and added systems.
22:09:11
jmercouris
I'm afraid doing a dist update will break my software, as one of my users is complaining that something does not exist in quicklisp anymore :|
22:10:25
jmercouris
I'm not sure if that's true or not, I looked through october and august, and it doesn't appear to be removed
22:12:07
Xach
It says (roughly) that the api of cl-string-match is not the same as what next expects.
22:18:35
Xach
i like not interning keywords because they show up in searches in ways i don't really like.
22:22:48
Xach
The keyword is used as a stand-in for a string - it's converted to one almost immediately.