chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] chicken-spock and 'load'


From: Sudarshan S Chawathe
Subject: Re: [Chicken-users] chicken-spock and 'load'
Date: Sun, 27 Dec 2015 18:23:41 -0500

> From: John Cowan <address@hidden>
 
> Scheme `load` is a procedure; that is, it is executed at run time.
> Spock is an offline compiler, so there is no way to load Scheme code
> (as opposed to JavaScript code) into a running Spock program.  As far
> as I know, Spock doesn't implement `include` either, which would be a
> compile-time action.

The 'load' not working makes sense now; thanks for the reminder!  It
seems odd that 'include' or something similar isn't available.

> > (What I'm hoping to do is, for example, use portable SRFI
> > implementations within my code destined for Javascript via
> > chicken-spock.)
> 
> All I can suggest is that you compile them separately and then concatenate
> the resulting JavaScript files.  However, if the SRFIs include macros,
> those macros won't be available to your code.

Thanks for the suggestion. I think I'll try to cobble soemthing together
using the procedural interface to spock (instead of just relying on the
command-line compile-spock, as I have been doing so far).  The 'spock'
procedure includes an 'import' option, but so far I haven't figured out
how to use it for the above purposes.  I'll have to dig a bit deeper
there.

Regards,

-chaw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]