This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: GSOC | Extending Common Lisp support
On Jun 7, 2012, at 1:20 PM, Charles Turner wrote:
On 7 June 2012 17:20, Jamison Hope <jrh@theptrgroup.com> wrote:
Anyway, I don't expect syntax-case to get much use from Common Lisp
(though I see no reason why that should be prohibited), so let's not
spend too much time on that right now.
I was only working on it because Helmut has done a lot of work making
that LOOP implementation in Scheme.
Understood. Just had to put my GSOC Mentor Gotta Keep Student Focused
hat on for a minute. :-)
Had I implemented LOOP in CL, I
would have wanted it to be usable from Scheme also (it's a kick-ass
macro :-D), so I see no reason why the reverse shouldn't be true,
maybe Per can throw his disassembler at the syntax-case problem as
well :-)
Perhaps!
Note the special (i.e. dynamic variable) *PACKAGE*:
http://www.lispworks.com/documentation/lw50/CLHS/Body/v_pkg.htm
which needs to be consulted when looking up symbols. I'm not entirely
sure how that should change the existing Environment searching.
What would need to change? Would you not just perform a
LispPackage#lookup in the current package (Namespace), which will
first search the symbols exported in *PACKAGE*, and then it will
search the inheritance (perhaps that word is bit strong for whats
going on here...) chain created by DEFPACKAGE?
Sounds right, but nothing uses LispPackage yet AFAICT. I guess what I
meant isn't that the Environment search itself needs modification, just
that we need to make sure that the Environment ends up seeing the
right Symbol. CLTL2 says on page 14 "The parser recognizes symbols by
looking up character sequences in the current package." But I think
right now there are a number of places (e.g. in LispReader) which assume
the empty namespace is the package (look at ReadTable#makeSymbol).
Chapter 21 of Practical Common Lisp might help:
http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html
Thanks!
Per probably Just Knew, but I looked at the output of
--debug-print-final-expr,
[...]
I appreciate the battle stories, I've learned several new tricks which
hopefully I can apply to the next bug :-)
:-)
I'm working on packages now, I've added nickname support in
LispPackage, and now I'm starting to write interpreter entries to the
functions already open-coded from the compiler.
Awesome!
Regards,
Charles.
--
Jamison Hope
The PTR Group
www.theptrgroup.com