Draft
Conversation
- src/arc/eval.gleam: eval(source) runs the full parse → compile → VM pipeline - src/arc_ffi.erl: Erlang FFI to read all of stdin - src/arc.gleam: if stdin has content, eval it; otherwise print banner - examples/server.ts: Bun HTTP server with Chrome DevTools-style console UI echo "1 + 2" | gleam run → 3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The same dict of standard globals (NaN, Infinity, undefined, Object, etc.) was duplicated in eval.gleam, test262_exec.gleam, and compiler_test.gleam. Move it to a single pub fn globals() in builtins.gleam. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
alii
reviewed
Feb 23, 2026
| function parseGleamOutput(exitCode: number, stdout: string, stderr: string) { | ||
| const result = stdout.trim(); | ||
| // Filter out gleam's own build output from stderr | ||
| const appErrors = stderr |
Owner
There was a problem hiding this comment.
To merge this we should do something better than spawning a gleam subprocess per request. We should have an actor that consumes Arc as a library and maybe over websockets we send/receive messages to it. Reki would be good fit to implement that actor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/arc/eval.gleam: Publiceval(source)that runs parse → compile → VM with standard globalssrc/arc_ffi.erl: Erlang FFI to read stdinsrc/arc.gleam: Reads stdin on start — evals if present, otherwise prints bannerexamples/server.ts: Bun HTTP server with Chrome DevTools-style console UIUsage
Test plan
gleam buildcompiles cleanecho "1 + 2" | gleam run→3echo "var x = 'hello'; x.toUpperCase()" | gleam run→"HELLO"echo "Math.sqrt(144)" | gleam run→12echo "invalid @@@ syntax" | gleam run→SyntaxError: ...cd examples && bun run server.ts→ interactive REPL at localhost:3000🤖 Generated with Claude Code