Anyway, like the sibling comment mentioned. It is not really a full runtime. You're using deno. The title made it seem like you had a Js runtime independent of an existing.
To be fair to the author, this project shows how to do IO with the wrapper. It binds filesystem and web request APIs, so they work. This doesn't just evaluate pure JavaScript functions using Deno.
But yes, from the title, I was hoping for some insanely succinct lexer, parser, and eval loop.
If this is a JS runtime in 100 lines of code, a file with 'node\n' would be a single line JS runtime, just start it with 'sh runtime.sh' and make sure you have the nodejs executable in your path...
And here's the accompanying graphics environment for my Lisp dialect (with a couple of mini-games as an example):
https://github.com/rpasta42/skomakare
12 comments
[ 2.4 ms ] story [ 39.7 ms ] threadIt appears Js runtime is the new Hello world!.
Anyway, like the sibling comment mentioned. It is not really a full runtime. You're using deno. The title made it seem like you had a Js runtime independent of an existing.
You are basically using deno's runtime. So it's not totally yours.
This is just a wrapper.
I have to admit that before opening this link i thought that it could be a kind of wrapper or using the V8 engine or something else.
To be fair to the author, this project shows how to do IO with the wrapper. It binds filesystem and web request APIs, so they work. This doesn't just evaluate pure JavaScript functions using Deno.
But yes, from the title, I was hoping for some insanely succinct lexer, parser, and eval loop.
Node is a distribution of v8. Deno is a distribution of v8. Bun is a distribution of JSC. And so on.
Here's my Lisp interpreter in a couple of lines of Rust: https://github.com/rpasta42/LambdaOxide
And here's the accompanying graphics environment for my Lisp dialect (with a couple of mini-games as an example): https://github.com/rpasta42/skomakare
This is what I call "writing your own runtime"
Deno relies on V8, which I'd wager is on the order of a million or more lines..
Here you go: