schism - scheme to wasm compiler

98 views
Skip to first unread message

Neil Van Dyke

unread,
Sep 15, 2019, 12:06:21 PM9/15/19
to Racket-Users List
FYI, a proof-of-concept of compiling a good subset of Scheme to WebAssembly:

https://github.com/google/schism

It relies on two experimental(?) Wasm features, one of them for PITCH:

https://github.com/google/schism#schism-uses-experimental-webassembly-features

via https://news.ycombinator.com/item?id=20976927

caleb

unread,
Sep 21, 2019, 11:27:13 AM9/21/19
to Neil Van Dyke, Racket-Users List
This is awesome.

I'm a bit of a Racket noob--how extensive of a project is it to get
Racket running on x R6RS scheme?
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/2e5b2277-c9e5-9dd2-66b5-ecddb1368b3b%40neilvandyke.org.

Hendrik Boom

unread,
Sep 21, 2019, 12:37:49 PM9/21/19
to Racket-Users List
On Sat, Sep 21, 2019 at 09:27:04AM -0600, caleb wrote:
> This is awesome.
>
> I'm a bit of a Racket noob--how extensive of a project is it to get
> Racket running on x R6RS scheme?

If you mean running R6RS scheme on Racket,
I suspect it's as simple as starting with
#lang r6rs
instead of
#lang racket

Anyone know better?

-- hendrik

>
> Neil Van Dyke <ne...@neilvandyke.org> writes:
>
> > FYI, a proof-of-concept of compiling a good subset of Scheme to WebAssembly:
> >
> > https://github.com/google/schism
> >
> > It relies on two experimental(?) Wasm features, one of them for PITCH:
> >
> > https://github.com/google/schism#schism-uses-experimental-webassembly-features
> >
> > via https://news.ycombinator.com/item?id=20976927
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/2e5b2277-c9e5-9dd2-66b5-ecddb1368b3b%40neilvandyke.org.
>
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/877e61acvr.fsf%40caleb.dev.

Neil Van Dyke

unread,
Sep 21, 2019, 4:56:53 PM9/21/19
to Racket-Users List
caleb wrote on 9/21/19 11:27 AM
> I'm a bit of a Racket noob--how extensive of a project is it to get Racket running on x R6RS scheme?

I think there's a number of ways to do that, and to scope it, and I want
to just put some initial thoughts out there, rather than propose
requirements and particular approach...

I mentioned the Schism thing as proof-of-concept, and to point people at
Wasm standards questions they might want to get involved in.

If you're asking out of the idea of using a Racket layer/transplant over
Scism specifically, I'd guess that's a ton of work.  I think it would be
a ton of work even atop an R6RS, and Schism is still missing a lot of
work to get to R6RS.

More generally, there are a variety of ways that one could plausibly
bring Racket and other Schemes back together.  The
technically-attractive approaches that come to mind would probably need
funding, or someone who could afford to volunteer a programmer-year or
more.  (If you instead wanted to distribute the work among multiple
volunteers, you might need a very lucky matching of volunteers, or a
manager-year just to try to coordinate that.)

(Software/Internet open standards development seems to tend to be hugely
difficult.  In Schemes, there's very little money complicating things,
and there's a nice historical willingness by most Scheme implementations
to conform to the eventual standard. But going through all the
interaction, especially broad academic and hobbyist community input, and
very little production input, to get to the standard, and have it be a
great standard wrt some goals of the standard and/or of yourself, seems
likely to be a ton of work.)

(In some standards and open source projects (e.g., Web, Linux, other),
those with the most funding tend to have more influence than others,
because they can invest the most work in standards questions, and/or
they do the most open source development that becomes de facto
standards.  That dynamic can be better than some alternatives, such as
things people need never getting done, because people are deadlocked in
debate or don't have the funding, though of course it has risks or
downsides, too.  Usually, the best-funded party is moderated by a desire
for buy-in from other participants, who have other options.)

I'm not discouraging work like the above -- and I would like to see
Racket and other Scheme implementations/descendants reunited in a good
way -- only saying I think it's probably a ton of work, so don't assume
it's something you can do in a month of evenings and weekends.  Unless
you find a way to scope it to a smaller problem that still satisfies
your particular hard requirements.

For people preferring to write in Racket, but who have a hard
requirement to target Wasm, adding a Wasm backend to Racket might be the
quickest viable way.  Or give up on the Racket requirement, see which
Scheme implementations come out with Racket backends (or make your own),
and start porting/adapting Racket features you need/want atop those
implementations (and/or atop RnRS, but RnRS alone might not be
sufficient primitives for what you need, to do it well).

Neil Van Dyke

unread,
Sep 21, 2019, 5:16:51 PM9/21/19
to Racket-Users List
Correction: "see which Scheme implementations come out with *Wasm* backends"


Reply all
Reply to author
Forward
0 new messages