[parenscript-devel] in-package and Parenscript compilation

Vladimir Sedach vsedach at gmail.com
Sat Nov 6 23:57:10 UTC 2010


I just pushed a patch that adds IN-PACKAGE and USE-PACKAGE. Alessio is
right - PS-COMPILE-STREAM needs to change a bit in order for
IN-PACKAGE to have the correct effect on the reader. Hopefully what
I've done does the right things wrt *PACKAGE* and the reader (I've
added one short test that seems to confirm IN-PACKAGE does, but I
haven't tested USE-PACKAGE).

Vladimir

2010/8/26 Red Daly <reddaly at gmail.com>:
> I bet a few of us have in-package implemented in user libraries.  Mine
> is in paren-util.  I don't see the harm in including
> in-package/use-package in Parenscript proper.
>
> If you deal with Parenscript files a lot, you might want to take a
> look at my paren-files library, which will compile Parenscript and
> Javascript files into a single string with appropriate dependencies.
> http://github.com/gonzojive/paren-files
>
> Red
>
> On Thu, Aug 26, 2010 at 2:43 PM, Alessio Stalla <alessiostalla at gmail.com> wrote:
>> Greetings,
>>
>> I'm approaching Parenscript and I must say I'm really impressed by
>> this library. Kudos to the developers! But I find one thing missing:
>> the Parenscript stream/file compiler does not understand in-package
>> forms like the CL file compiler does; rather, it reads all the forms
>> in the package which is current at the time it gets called. This makes
>> it slightly inconvenient to compile Lisp files which need to be read
>> in a certain package, and completely impossible to handle files which
>> change *package* mid-file (which is generally not a good idea, but
>> still it's possible in CL).
>>
>> I'm attaching a patch against src/compilation-interface.lisp to make
>> the compiler behave like the CL one; comments are welcome.
>>
>> Regards,
>> Alessio Stalla
>>
>> _______________________________________________
>> parenscript-devel mailing list
>> parenscript-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>>
>>
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>




More information about the parenscript-devel mailing list