libera/#commonlisp - IRC Chatlog
Search
21:11:23
pjb
skeemer__: not at all. He's Xah Lee, (not Xach). Our Xach who wrote quicklisp is Zach Beane https://www.xach.com
21:12:38
skeemer__
pjb, i was wondering if the book "land of lisp" illustrates also how to do games with graphics
21:13:32
pjb
skeemer__: I've not read it, but the echoes I've had from it, don't reflet it as a very good CL book. It seems to be full of personal idiosyncrasies.
21:15:45
pjb
skeemer__: for student, toy projects, I'd propose pgl https://cliki.net/pgl but there's a ton of options: https://cliki.net/GUI
21:16:35
pjb
Because there's a lot of choices that will depend on your implementations and on the target platform, and on the application, and the portability level you want.
21:18:22
pjb
On linux you could use plain X11, but it's a little raw. So often people will prefer to use some graphic/GUI library, but this means you will use it thru FFI.
21:18:38
pjb
(plain X11 has the advantage that you can talk to the X11 server using sockets directly from lisp).
21:19:25
pjb
Let's say that in general you will have other constraints that will direct your choice.
21:20:11
pjb
So, apart from McCLIM, since the AI winter and the fall of the lisp machines, we haven't had any native lisp graphic system.
21:21:02
pjb
Even if eg. X11 was prototyped in lisp originally (hence the X11 keysym = key symbol represented as 29-bit integers (ie. fixnums with 3 tag bits!)).
21:22:50
pjb
For games, there are a lot of different games with different requirements for graphics. From 3D real-time fist-person shooters where you'd want to run stuff on the GPU, down to games like Hangman: https://cliki.net/com.informatimago.hangman where the graphical aspect is only a cherry on the cake, and could be implemented with any means.
21:23:32
skeemer__
pjb, i would have liked something similar to racket 2htdp/image or 2htdp/universe to create animations and stuff like that
21:53:57
danirukun[m]
I setup SLIME in Emacs, but for the life of me can't remember how to get autocomplete to work in Lisp buffers, which seems like something SLIME would just do out of the box.
21:59:53
danirukun[m]
JeromeLon: I see, but is it possible to also get it as an interactive dropdown with candidates at point, like it is in this one completion box package (can't remember the name)
22:17:36
random-nick
skeemer__: there are a bunch of different options parsing libraries https://cliki.net/command-line%20options%20parser
6:55:20
pjb
Common Lisp to JavaScript Compiler https://github.com/jscl-project/jscl https://cliki.net/JSCL
7:15:54
kagevf
hi, lisp123 ... I wrote a macro to define a simple class and another one to populate it: https://gist.github.com/johnhilts/3a48e03872b7946d5773335c4fe490ce
7:20:21
hayley
Could you do without the READ-FROM-STRING? It makes the list structure being generated harder to guess.
7:21:48
hayley
And what's the point of the extra list nesting in (car `((setf ,(car expression) ,(cadr expression))))?
7:23:16
hayley
`(setf (,(alexandria:format-symbol t "~A-~A" name slot) ,name) ,slot) seems to do the same thing.
7:25:24
kagevf
hayley: READ-FROM-STRING ... yeah, I guess I'm over-relying on strings ... I'll try to figure out how to refine it
7:26:10
kagevf
hayley: the extra listing ... I think I was having trouble templating the expression I wanted, so that's what I ended up with
7:38:52
beach
I mean, you wouldn't write (defun f (character) (car character)) or (defun g (list) (sin (cos list)))
7:41:11
kagevf
beach: do you think it would have been better if I had wrote (labels ((make-slot (name value) ... ?
7:47:55
hayley
Yes, I would suggest calling the symbols "slot names". Though, having seen DEFCLASS on SBCL take a DIRECT-SLOTS argument, I'm somehow desensitized to CLASS-SLOTS.
7:54:22
beach
"The :DIRECT-SLOTS argument is a list of canonicalized slot specifications". Not so great in my opinion.
7:59:57
scymtym
beach: variable (and parameter) names must balance multiple constraints: 1) uniqueness 2) reasonable conciseness 3) a description of the role of the variable in its context 4) a description of the value and probably more. i think you might be overemphasizing 4) over 3)
8:02:54
beach
Well, let me put it this way then. When I saw the parameter name SLOT, I immediately assumed it was a slot metaobject. Then when I saw (STRING SLOT) my mental model fell apart. And it is usually the case that I am not unique in any way, so it seems likely that other people will have the same reaction. So it is not doing the person reading the code a favor to write SLOT when the name of a slot is meant.
8:08:33
scymtym
beach: i agree in that case, but for :DIRECT-SLOTS, emphasizing the direct part, that is the role in the given context, instead of :SLOT-SPECIFIERS seems fair to me. going for both with something like :SLOT-SPECIFIERS-FOR-DIRECT-SLOTS or :SPECIFIERS-FOR-DIRECT-SLOTS is probably getting too long
8:09:40
beach
I would much prefer :SLOT-SPECIFIERS. Since you don't have specifiers for effective slots, it has to be for direct slots.
8:13:56
beach
In fact, they must have changed it for the standard, because the AMOP claims that the parameter for DEFCLASS is called DIRECT-SLOTS.