Stream: ideas

Topic: Roc Interpreter


view this post on Zulip Luke Boswell (Dec 03 2024 at 01:34):

Do we have an interpreter for mono? Would something like this make sense?

I don't fully understand how this might work so I'm asking here, but the general idea in my head is for an online playground that runs all in the client's browser. It has a WASM module that can take a roc app and runs it in an interpreter and then returning the results for the mainForHost.

view this post on Zulip Luke Boswell (Dec 03 2024 at 01:35):

This idea, as a simpler alternative to compiling to WASM bytecode and then running that as a standalone thing.

view this post on Zulip Luke Boswell (Dec 03 2024 at 01:58):

Found some relevant discussion https://roc.zulipchat.com/#narrow/channel/304641-ideas/topic/Compile.20time.20computation/near/409294769

view this post on Zulip Luke Boswell (Dec 03 2024 at 01:58):

@Brendan Hansknecht talks about an IR interpreter

view this post on Zulip Brendan Hansknecht (Dec 03 2024 at 02:05):

We do not have one

view this post on Zulip Brendan Hansknecht (Dec 03 2024 at 02:05):

We probably want one for simple compile time evaulation

view this post on Zulip Brendan Hansknecht (Dec 03 2024 at 02:06):

I don't think the interpreter would work with effects, so you probably want a different solution

view this post on Zulip Luke Boswell (Dec 03 2024 at 02:39):

I think another challenge is that the compiler assumes we have a filesystem for loading and working with modules. So we probably would need to abstract that out before the above could work.

view this post on Zulip Richard Feldman (Dec 03 2024 at 05:14):

I think the web repl already deals with the lack of filesystem

view this post on Zulip Richard Feldman (Dec 03 2024 at 05:14):

I'm not sure if it knows how to load modules other than builtins though


Last updated: Jun 16 2026 at 16:19 UTC