This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GSOC | Extending Common Lisp support


On 17 June 2012 19:35, Helmut Eller <eller.helmut@gmail.com> wrote:
> * Charles Turner [2012-06-17 15:06] writes:
>> So then what
>> would export's first parameter be?
>
> The result of (intern "A" "TEST")

Thanks Per & Helmut. I've wasted quite a bit of time having confused
external representations with internal ones, which given last years
project, is rather weird... Ignoring the egregious printer problems, I
have the behaviour I want now:

#|kawa:1|# (make-package 'temp :use nil)
#,(namespace "TEMP")
#|kawa:2|# (use-package 'temp)
t
#|kawa:3|# (intern "TEMP-SYM" 'temp)
{TEMP}:TEMP-SYM ()
#|kawa:4|# (find-symbol "TEMP-SYM")
() ()
#|kawa:5|# (find-symbol "TEMP-SYM" 'temp)
{TEMP}:TEMP-SYM :internal
#|kawa:6|# (multiple-value-bind (s w) (find-symbol "TEMP-SYM" 'temp)
(export s 'temp))
t
#|kawa:7|# (find-symbol "TEMP-SYM")
TEMP-SYM :inherited

I've attached the relevant bits involved in the above example. EXPORT
is currently a bit of monster and may be wrong (but passes test
cases!), I tried to account for the various exceptional situations
mentioned in the hyper spec as well as I could understand them.

>> The symbol 'a whose hashCode would
>> match 'a in test, but not say in an 'a in cl-user?
>
> The hashcode of a symbol should be independent of the package it belongs
> to. ÂInterning/uninterning symbols or renaming/deleting packages should
> not have any effect on the symbols hashcode.

Of course. Apologies for the confusion!

Charles.

Attachment: package.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]