|
Not considering them to be Lisp is ridiculous. Picolisp is closer to Lisp 1.5 than CL is. CL took many ideas from Scheme, and vice versa. The claim that CL is The One True Lisp is tenuous at best, and absurdly ridiculous at worst. It's like a Catholic claiming that they're the only true Christian religion (not a great analogy, but not the worst in the world). It also, quite frankly, given how these languages, particularly PicoLisp, fit every definition of Lisp I've heard, takes us straight into No True Scottsman territory. Haggis, anyone? It's good to know that splicing unquote optimizes for that case in Lisp. I wasn't sure, and so assumed the general case. In any case, that's not the reason I didn't use it, as I've explained multiple times now. Yes, I know ir-macro does code traversal. Yes, sc-macros are more elegant. But that's the mechanism we picked, And I have no issue with it. Furthermore, it doesn't traverse all the same code twice. It traverses the inputs and the outputs. >Btw., the code won't win any beauty contests. ...Says the CL user. Actually, I agree, it won't. But it works, it's reasonably clear, and it doesn't do anything obviously stupid. It's okay. ...Unless you're talking about my code. You want me to clean that up? Okay. I will. (define-syntax debug
(ir-macro-transformer
(lambda (x i c)
(let ((exprs (cdr x)))
`(begin
,@(map (lambda (expr)
`(printf "~A: ~A~%" ,'expr ,expr))
exprs))))))
We still have to bind our args by hand, because it's Scheme, but it's not too bad. |
Calling them to be Lisp is wrong.
> Not considering them to be Lisp is ridiculous. Picolisp is closer to Lisp 1.5 than CL is.
How so? CL runs a lot Lisp 1.5 code unchanged.
Picolisp not. The Picolisp evaluator is not compatible with Lisp 1.5. It doesn't even have LAMBDA.
>CL took many ideas from Scheme, and vice versa.
Sure not. The main idea CL took from Scheme was 'lexical binding by default'. Other than that the Scheme influence was minor.
CL is based on Lisp Machine Lisp, NIL, S1 Lisp and Spice Lisp. All coming from Maclisp, which was developed out of Lisp 1.5.
> The claim that CL is The One True Lisp is tenuous at best, and absurdly ridiculous at worst.
I never said that. But it is the most widely used Lisp, and the one I mostly use - minus some minor use of Emacs Lisp.
> It's good to know that splicing unquote optimizes for that case in Lisp. I wasn't sure, and so assumed the general case.
You could have looked it up or tried it, before claiming it. I did it for you.
> Yes, I know ir-macro does code traversal. Yes, sc-macros are more elegant. But that's the mechanism we picked, And I have no issue with it. Furthermore, it doesn't traverse all the same code twice. It traverses the inputs and the outputs.
Yeah, but claiming that the CL code was less efficient. Great move.
I looked that up from the Chicken Scheme sources, to actually see what it does. It traverses inputs and outputs during macro execution. You could have mentioned that.
Sorry, I don't trust your judgements, your claims are simply not backed up by the source and how things actually work.
> Says the CL user
I can't remember seeing such ugly code for macro expansion in a CL implementation.
Take make-er/ir-transformer . That function code is fully obfuscated. It bundles several utility functions, which don't belong there as sub-functions. Some are using access to lexical variables defined several dozen lines above, others don't. The result code is over hundred lines long, even though the basic mechanism could be written down much more compact. Each subfunction can only be understood by referring to the surrounding code, which is above or below. Then it takes a parameter for using two different expansion mechanism. From that, two new closures are created, which then are given to the user in, again, two differently named versions. The code itself contains lots of debug code, which simply outputs intermediate results, and which will overwhelm any human user for any non-trivial macro expansion.