>
> 2. Just use the same namespace as eval-example.rkt
>
I had tried this, but it evals not just the example language but
Racket+example (i.e. Racket forms also eval, and the example language has
to be compatible with Racket).
1. Keep the new namespace, but use namespace-attach-module to
You've mentioned that you want to "define a custom language" and evaluate it.
But so far I don't see any sign that you're using Racket's dedicated facilities
for doing this (especially `#%module-begin` and `module`). If this is a
deliberate choice, carry on. If not, consider investigating them,
On Fri, Nov 16, 2018 at 12:43 PM Andrew Wilcox wrote:
>
> I'd like to be able to eval a custom language from inside a module... without
> instantiating modules multiple times.
>
> With the help of Matthew Butterick, I've gotten this far:
>
> ; runtime.rkt
> #lang racket
>
>
> (printf "This is
I'd like to be able to eval a custom language from inside a module...
without instantiating modules multiple times.
With the help of Matthew Butterick, I've gotten this far:
; runtime.rkt
#lang racket
(printf "This is runtime.rkt~n")
; example.rkt
#lang racket
(require "runtime.rkt")
4 matches
Mail list logo