I’m currently going down the rabbit hole on Scheme-to-Python.
It turns out that making a Scheme-to-Python transpiler is more difficult than making a Scheme-to-Javascript transpiler.
Python is a higher level language than Scheme. Python has more restricted control structures and severe restrictions on how lambda can be used.
Javascript does not have the same restrictions and is essentially Lisp with a less-regular syntax.
Scheme-to-anything is an exercise in trying to reverse-engineer the original code (prolog.scm) and then writing a transpiler.
It has become apparent that writing a transpiler is much simpler than the reverse-engineering task.
Transpiling a high level language down to a lower level language is “easy”. Transpiling from a lower level language to a higher level language is harder.
So, I’m playing with rewriting prolog.scm into a higher level version prolog.scn to capture my reverse-engineering of the code. I’m using a syntax that my gut feel says can be transpiled into just about any existing language, Python, Javascript, Scheme, Common Lisp, etc.
See Also
References: https://guitarvydas.github.io/2024/01/06/References.html
Blog: https://guitarvydas.github.io/
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/Jjx62ypR
Leanpub: https://leanpub.com/u/paul-tarvydas
Gumroad:
https://tarvydas.gumroad.com
Twitter: @paul_tarvydas