hi, chicken-users,
i've been using chicken scheme for quite a while now, and would like
to request a feature (or at least a hint on doing something roughly
equivalent).
most, if not all common lisp implementations provide the 'compile-
file and 'compile functions.
these are very useful for implementing domain-specific languages
(among other tasks).
having 'compile available at runtime makes it possible to compile
these languages into lisp code, which,
when it is run, executes at the same speed as everything else in the
running image.
in scheme, since 'compile is not provided, i'd be building an
interpreter or, even worse,
use eval.
as chicken is a scheme-to-C compiler, 'compile, if it were available
would probably return a string of C code (and should therefore be
called 'compile-to-c).
the output of 'compile-to-c could be written to a temporary file,
which in turn could be
compiled/linked by an external c compiler (assuming it's presence,
libtcc?) and loaded back into the running user program as a shared
library.
example from dsl background (compilation might improve speed if some-
long-list is really really long):
(define dl (dsl-code->lambda-form (quote ..... )))
(map (compile dl) some-long-list)
a penny for your thoughts....
felix
_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users