freenode/#clasp - IRC Chatlog
Search
14:44:37
kpoeck
scymtym I have another question regarding the backquote/unquote handling in Eclector
14:44:37
Colleen
kpoeck: drmeister said 20 hours, 38 minutes ago: We can change the order files are built - or take functions out and move them around to improve the situation.
14:47:39
kpoeck
If I look at https://github.com/s-expressionists/Eclector/blob/master/code/reader/macro-functions.lisp#L321 in sems that within #' backqouote/unquote are not allowed
14:49:16
kpoeck
Effectively when I try to compile foundation.lsp in clasp I get an error caught ERROR: Splicing unquote is illegal in the function reader macro.
14:50:26
kpoeck
When I modify sharpsign-single-quote to use (with-forbidden-quasiquotation ('sharpsign-single-quote nil nil) .)
14:52:47
kpoeck
To the question. Is a form like "(fset 'cons-cdr #'(lambda (def env) `(cdr ,(cadr def))) t)" really acceptable?
15:15:41
kpoeck
I should have started with a summary: I can't compile "foundation.lsp" in clasp using latest eclector
15:15:44
drmeister
You are trying to do this in foundation.lsp - right? It's difficult to think about because it's really early in the bootstrapping and the capabilities are very primitive.
15:16:02
scymtym
kpoeck: i had a hard time extracting the rules for backquote and unquote from the spec. it is possible that some of my interpretations are not optimal. i need to gather some context before replying properly
15:17:16
drmeister
And this code was already there - it's that the new eclector doesn't handle it...
15:17:16
drmeister
https://github.com/clasp-developers/clasp/blob/dev/src/lisp/kernel/lsp/foundation.lsp#L321
15:17:57
kpoeck
so (fset 'cons-cdr #'(lambda (def env) `(cdr ,(cadr def))) t) throws ERROR: Splicing unquote is illegal in the function reader macro.
15:19:02
scymtym
drmeister: i believe you can ignore clasp and its bootstrapping for the question at hand. the question is whether (eclector.reader:read-from-string "#'(lambda () `(,bar))") should signal an error
15:20:21
scymtym
drmeister: yes, i changed the rules from "backquote is forbidden unless allowed" to "backquote is allowed unless forbidden" to accommodate custom reader macros that interoperate with backquote (i.e. iterate's #L)
15:20:45
scymtym
all that said, (eclector.reader:read-from-string "#'(lambda () `(,@bar))") doesn't signal an error for me
15:21:48
drmeister
Here's what I know about implementing backquote - (1) tricky, tricky, tricky. (2) I implemented clasp's by slavishly copying what was in the appendix of "Common Lisp The Language" by Guy Steele. (3) Fare has many thoughts on implementing backquote and he has a very sophisticated implementation somewhere.