Re: State of Scheme in the Browser Lassi Kortela 31 Jul 2019 16:36 UTC

Thanks for the great survey Amirouche! I haven't tried Spock either. If
Peter is reading, maybe he knows about its current status?

Would it be worth specifying a version of Scheme without tail calls and
continuations (I know..) that maps easily to JavaScript? Various Scheme
compilers could emit this restricted form of Scheme, which would then be
simple to translate to JS. Hash-table support could also be modified so
that Scheme hash-tables map easily to JavaScript objects.

On 31.07.2019 19.20, Amirouche Boubekki wrote:
> I made some progress around my experiences in the browser, this lead
> me to write a Scheme-to-JavaScript compiler that is incomplete but can
> do some stuff.
>
> # Chicken
>
> I still did not try Chicken's Spock egg.
>
> ref: http://wiki.call-cc.org/eggref/4/spock
>
> # BiwaScheme
>
> This is an interpreter written in JavaScript that doesn't support
> tail-call optimization.
>
> demo: https://hyperdev.fr/defunct-forward.scm/
> repo: https://github.com/amirouche/defunct-forward.scm
>
> # Gambit JavaScript backend
>
> It is still a work in progress. It prolly support tail-call
> optimization but requires some work. With the build I tested,
> tail-call factorial gives an error.
>
> demo: https://scheme-live.github.io/scheme-fuss/
> repo: https://github.com/scheme-live/scheme-fuss
>
> # Schism
>
> This is the most promising stuff. It is a self-hosted
> Scheme-to-WebAssembly compiler. The two things that are missing are
> some kind of call/cc support and I don't know how to yield the control
> back to JavaScript.
>
> repo: https://github.com/google/schism/
>
> # Chibi Scheme WebAssembly build
>
> It works most of the time on Firefox but it crash on Windows Chrome.
>
> Also, dependency is somewhat big.
>
> repo: https://github.com/scheme-live/ff.scm
> demo: https://scheme-live.github.io/ff.scm/
>
> # Ruse Scheme
>
> This is my work-in-progress compiler that targets JavaScript and not
> WebAssembly.
>
> repo: https://github.com/scheme-live/ruse-scheme/
> demo: https://scheme-live.github.io/ruse-scheme/demo/counter/
>
>
> Thanks!