freenode/#lisp - IRC Chatlog
Search
23:24:02
jasom
pjb: my question is why sbcl puts spurious || around it and slime highlights it incorrectly. I agree it doesn't terminate the token
23:24:07
pjb
If it was terminating, say, like ', then in foo'bar the quote terminates the foo token, and then a further read will read 'bar ( (quote bar) ).
23:24:31
pjb
jasom: the printing is in part implementation dependent, and in part directed by the *print-…* variables.
23:25:03
jasom
pjb: I'm not saying sbcl is doing something wrong, but the fact that it chooses to escape tokens with # in them make me wonder if I ought to do so in my code
23:27:21
Shinmera
jasom: 22.1.3.3 seems to imply that it's allowed to do this, even if there's no strict need to.
23:28:06
jasom
pjb: I know how print-escape works. I was merely expressing a concern that the sbcl devs know something I don't with regard to internal # in symbol names
23:28:53
pjb
jasom: theorically, they would have to check in the read table whether a character is a terminating macro character or not. Instead if you systematically escape, you can print faster!
23:31:05
jasom
pjb: that makes no sense because it has to check all the alphabetic characters which are much more common
23:32:23
jasom
that would make sense because # is the only non-terminating macro character in the standard readtable
23:52:39
sjl
The first reads as the symbol nil, the second reads as the list (quote nil). When evaluated they result in the same thing, because nil is special and evaluates to itself.
23:59:56
pjb
(defpackage "MY-NULL" (:export "NIL") (:use)) (defconstant my-null:nil 0) (let ((*package* (find-package "MY-NULL"))) (list (eval (read-from-string "'nil")) (eval (read-from-string "nil")))) --> (my-null:nil 0)
0:00:28
pjb
energizer: on the other hand: (let ((*package* (find-package "MY-NULL"))) (list (eval (read-from-string "'()")) (eval (read-from-string "()")))) --> (nil nil)
0:00:28
stacksmith
Nil is special: it's kind of like a keyword - a subtype of symbol that evaluates to itself. It is also considered a list with 0 items (listp nil) => t
0:00:45
pjb
energizer: but in this case, it depends on *readtable* where, the reader macros for ' and ( are defined.
0:01:07
pjb
energizer: you could change those reader macro to read something else than CL:QUOTE and CL:NIL.
0:03:54
stacksmith
form n. 1. any object meant to be evaluated. 2. a symbol, a compound form, or a self-evaluating object. 3. (for an operator, as in ``<<operator>> form'') a compound form having that operator as its first element. ``A quote form is a constant form.''
2:01:41
stylewarning
I’m the one who helped get copyright reverted, and it looks like elsevier might have lost the source
2:43:23
p_l
aeth: we could search, but this is #lisp, the usual answer is "we didn't have mod on hand to update topic with new announcement"
4:25:16
Bike
here is clhs's description of do's syntax: " do ({var | (var [init-form [step-form]])}*) (end-test-form result-form*) declaration* {tag | statement}*"
4:52:29
aeth
Afaik, they're supposed to be interesting examples for implementers, not tutorial examples that build up to complexity.
4:57:34
pierpa
CLHS is good when one knows 99% of what he wants to know and wants to know the remaining 1%
5:00:39
pierpa
it's not uncommon that even very expert long-time implementor misunderstand some things in the CLHS, go figure *learners* of the language.
5:11:39
Zhivago
On the other hand, implementors have incentive to misunderstand things to conform with their long term preconceptions.
9:52:38
phoe
I poke my nose into code that I haven't touched for months and I can quickly remember how it works and edit it.
11:17:27
Xach
scymtym: it takes 1.5 times longer than 1.4.4. i am looking at individual project timings now.
11:19:19
scymtym_
Xach: interesting, thanks. could we continue this conversation in #sbcl so we won't have to repeat everything for the others?