libera/#commonlisp - IRC Chatlog
Search
14:42:40
jcowan
When I need a unique object, I usually use (copy-seq "End of file object"), which is self-documenting but guaranteed unique, even if the compiler merges identical string literals.
14:51:26
jcowan
This actually isn'tt realistic in Scheme, because Scheme has a distinguished eof-object which you can gett a hold of by calling (eof-object) and can be tested for with (eof-object? obj).
14:52:43
jcowan
It has the advantage of being of a distinguished type. So you could in CL declare a struct and call itts constructor once.
16:07:32
phoe
TIL that the reader macro for #\( cannot call READ-DELIMITED-LIST directly but must instead call something that handles the consing dot properly
16:38:03
pjb
jcowan: copy-seq is also suspicious. Try: (cons 'eof nil) or (list 'eof) as unique tokens.
16:39:20
pjb
I don't remember it in scheme. It's called copy-sequence in emacs lisp. (if you don't require 'cl)
16:40:44
pjb
nothing in r5rs ressembling copy-seq: https://groups.csail.mit.edu/mac/ftpdir/scheme-reports/r5rs-html/r5rs_14.html#SEC88 there's only string-copy.
16:41:24
pjb
Have a look at (intersection common-lisp emacs-lisp scheme) http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/