Thanks for the help, a couple more quick questions: On Wednesday, July 26, 2017 at 9:15:12 AM UTC-4, Matthew Flatt wrote: > You don't have to populate the top-level environment with > `racket/base`. You could instead use > > scheme_namespace_require(scheme_intern_symbol("my-lang")) > > where "my-lang" is your language's main module to populate the > environment from there. Still, this isn't really the right direction.
I actually tried this without much success, but I might still have been missing something. > Overall, I think you want to `scheme_dynamic_require` instead of > `scheme_load`, just as Shu-Hung suggests. Using > `scheme_dynamic_require` corresponds to what `racket` does where you > provide it a file on the command line, and it avoids the top-level > environment and `load`. Just tried this, and it worked great, thanks! I was having a little trouble getting the `scheme_eval` variant that constructed a `dynamic-require` form manually to work correctly, so knowing about `scheme_dynamic_require` is helpful. > I can see how the "Inside Racket" example lead you astray by showing a > traditional REPL, where `eval` and `load` come into play, and I'll look > at ways to improve the docs. But if your goal is to run modules, then > you can avoid all that trouble. Thanks! One more thing: in terms of repeatedly executing scripts, does it make sense to set up and tear down the interpreter every time? Or just swap in a fresh namespace? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.