[plt-scheme] changing language without DrScheme
On Mar 2, Dave Griffiths wrote:
> Hi all,
>
> Is there a way to change the current language in a script being run
> by a basic mzscheme interpreter? I know the new version has #lang -
> I'm looking for the 372 form of that I think.
>
> I want to be able to write FrTime programs in the fluxus editor, for
> a livecoding performance.
You just use modules in 372. That's exactly what #lang does:
> (read-accept-reader #t)
> (read (open-input-string "'#lang mzscheme bar baz"))
'(module page mzscheme bar baz)
But that's exactly why it won't work if you intend to enter
expressions and have them evaluated dynamically. For that you'll
probably want to set up a namespace with the frtime bindings.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!