Re: Quasiquote and Comma symbols
Thank you all for your information and advice. I was hoping it would be a bit more trivial to use the symbols; but the introspection techniques are quite enlightening. I’ll use some of those to dig around and see what I can find.
Burton
> On Aug 3, 2017, at 5:26 AM, 73budden . <budden73@gmail.com> wrote:
>
> Hi!
>
> As other people said here, those details are not standardized, and are
> not documented. There are libraries for implementation of quasiquoting
> which (I think) can be made portable. Original implementaiton of
> quasiquote is in CLTL2
> (http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node367.html#SECTION003600000000000000000
> )
>
> You can use the original library and/or deduce which structures which
> represent quasiquoted data from the source. If you don't want to go
> this way, you can try further deducing details from the
> implementation.
>
> I made the following experiment in SBCL:
>
> 507 CL-USER>(setf *print-pretty* nil)
> NIL
> 508 CL-USER>'``(foo ,(bar ,baz))
> (SB-INT:QUASIQUOTE (SB-INT:QUASIQUOTE (FOO #S(SB-IMPL::COMMA :EXPR
> (BAR #S(SB-IMPL::COMMA :EXPR BAZ :KIND 0)) :KIND 0))))
>
> So, you might need nested quasiquote to learn something essential. We
> see there are some structures which represent quasiquotes. In an
> open-source implementation
> you can go to the source of the reader (start from the read function
> and the result of (get-macro-character #\`) in your open-source
> implementation).
>
> I currently have no Lispworks at hand, but you can try similar
> experiments until you can deduce what the exact structure is. You have
> no source codes, but you can use the result of printer output. If
> Lispworks does not show you the unleashed internal structure, try
> using inspector on the data Lispworks creates for you.
>
> 2017-08-03 6:36 GMT+03:00, BusFactor1 Inc. <busfactor1@gmail.com>:
>> Hello,
>>
>> Sometimes I have lists that would be easier to build using the actual
>> symbols (like quote) rather than the quote (‘), backquote (`) and comma (,)
>> characters. I’m wondering what the names are for the quasi quote and comma
>> symbols expanded by the parser in Lispworks. A search of the documentation
>> has lead to nothing.
>>
>> Burton
>>
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html