Scheme To Javascript Demo
2025-07-23
The code repository for a Scheme-to-Javascript converter demo is at: p6.
Videos to support the demo are overview and demo and details for tojs.
In the demo, I concentrate on converting Nils Holm’s prolog6.scm code, which contains the meat of a Prolog engine. I don’t try to convert all of Scheme, just enough to port the code from Scheme to Javascript.
I imagine that it would be straight-forward to repurpose this code to emit Python, WASM, Odin, whatever, but, I haven’t spent the time to do so.
[If doing the port to other languages is of interest to anyone, contact me, I would be glad to discuss and hand-hold].
The details video discusses only the bulk of the transpiler - code generation and peepholing, which are stages 5 & 6 of the pipeline. I hope to discuss the front end stages (2, 3, 4) in future videos and articles. These front-end stages are much simpler than the code generation stage.
See Also
Email: ptcomputingsimplicity@gmail.com
References: https://guitarvydas.github.io/2024/01/06/References.html
Blog: guitarvydas.github.io
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/65YZUh6Jpq
Leanpub: [WIP] https://leanpub.com/u/paul-tarvydas
Twitter: @paul_tarvydas
Substack: paultarvydas.substack.com

