freenode/#lisp - IRC Chatlog
Search
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.
22:23:16
jmercouris
However, putting "some-special-incantation" is a magical string, no matter how you slice it
22:25:26
jmercouris
Well, theres the wiki definition, and then theres the one that everyone in the world uses
22:26:10
jmercouris
one might argue that Roles.Customer will be instantly evalued to "Customer" or that it's the same notion, but it kind of is, kind of isn't
22:27:37
jmercouris
If you took it as a jab at you, don't, I was just expressing a preference against strings with special values
22:28:34
_death
I think the point behind defining such constants is that if you have a typo when referencing them, you'll get a compile time error.. when it comes to ql:quickload, you'll get a runtime error if you have a typo in the string or keyword.. with a keyword you may use completion, but it's unlikely to happen in this particular scenario
22:29:18
Shinmera
I've never heard of magic strings, but I have of magic numbers. The "magic" is because it is not apparent where the number comes from or how it's determined. This is not at all the case here, because it's a name. It denotes what you mean in itself, so there's no magic to it.
22:30:42
jmercouris
Unless of course all the symbols were included as part of quicklisp as soon as quicklisp loads, but that's probably not desirable
22:30:44
_death
Shinmera: well, another point to these constants is that they let you distinguish things that happen to be represented as the same string.. but again this isn't relevant to the ql:quickload scenario
23:08:30
pjb
minion: memo for jmercouris: http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/index.html.in
23:18:18
pmc_
Anyone know why a character string is not considered to be a simple vector? (simple-vector-p "abc") returns NIL.
23:22:26
pjb
pmc_: there are some libraries written by sbcl'ers (not lispers), that expect some overly specific vector types. This is bad. Don't use them.
23:22:37
pmc_
I noticed (svref "abc" 0) doesn't work on strings... so I was interested in simple vectors. :)
23:23:54
pjb
if the compiler can determine at compilation time that the sequence is a simple vector or a string, then it'll be smart enough to replace aref by svref or char, and otherwise, you will do want aref, to be able to handle any vector type you'll get at run-time.
23:24:17
pjb
So basically you should never use svref or char or similar overly type-specific function.
23:25:26
Ober
what is it roswell brings to the table being written in C, that a shell script can't easily do in a fraction of this code?
23:29:20
Xach
It's possible that the person who made it is willing to work on it in C, but not willing in another language.
23:39:16
Ober
pjb no more than a link to you asking folks in #linpeople about your hung scsi devices [10/27/00 @ 02:59:57] <pjb> dev/st0 isnt responding
23:40:45
pjb
The only reason I can see, could be for bootstrap reasons. Otherwise, it seems that a lot of C code could have been written better in CL.
23:42:02
pjb
Now of course, you made the bootstrap more complex, since you need to compile and install a C compiler, and for this, you need to have a C compiler already installed (or eventually, when I'll have completed by C->CL compiler, a CL compiler).