freenode/#lisp - IRC Chatlog
Search
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.
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).