<energizer>
tonyg: i suppose there's a theory of this kind of thing, involving language levels, functors, whatever....any idea where i can read about these issues from a PLT perspective?
<tonyg>
energizer: i'm not sure about that. it's pretty much just a syntax design issue.
<tonyg>
energizer: for the language-levels stuff, you might enjoy the 80s research on metacircular interpreters
<energizer>
like, it's a little bit magical that numbers pop out of quotes. in some sense there should be a (quote-harder 42) that evaluates to (quote-harder 42) so that the language that the metalanguage's 42 is different from the language's 42, if you get what i mean
<bremner>
it seems to be common to racket, elisp, and common lisp
<tonyg>
rudybot: eval (quote 123)
<rudybot>
tonyg: your sandbox is ready
<rudybot>
tonyg: ; Value: 123
<tonyg>
rudybot: eval (quote x)
<rudybot>
tonyg: ; Value: 'x
<tonyg>
Ah. So what's happening here is the *printer* is being magical
<tonyg>
In a just world, that'd result in "Value: x"
<tonyg>
rudybot: eval (quote "x")
<rudybot>
tonyg: ; Value: "x"
<tonyg>
energizer: it's not the evaluator or quote mechanism at all: it's the printer!
<tonyg>
rudybot: eval (display (quote 123))
<rudybot>
tonyg: ; stdout: "123"
<tonyg>
rudybot: eval (display (quote x))
<rudybot>
tonyg: ; stdout: "x"
<tonyg>
rudybot: eval (display (quote "x"))
<rudybot>
tonyg: ; stdout: "x"
<tonyg>
er
<tonyg>
rudybot: eval (write (quote 123))
<rudybot>
tonyg: ; stdout: "123"
<tonyg>
rudybot: eval (write (quote x))
<rudybot>
tonyg: ; stdout: "x"
<tonyg>
rudybot: eval (write (quote "x"))
<rudybot>
tonyg: ; stdout: "\"x\""
<tonyg>
there.
<energizer>
rudybot: eval ''1
<rudybot>
energizer: your sandbox is ready
<rudybot>
energizer: ; Value: ''1
<tonyg>
rudybot: eval (write ''1)
<rudybot>
tonyg: ; stdout: "(quote 1)"
<tonyg>
yuck. the printer is being too clever, printing out the datum in a form that evaluates to the underlying datum rather than as the datum itself