5 ms·
That is awesome! Thanks! Does anybody know the easiest way to compile to JVM bytecode? I have a Scheme interpreter written in Kotlin, what is the best way to c
by kovrik 9y ago
That is awesome! Thanks!
Does anybody know the easiest way to compile to JVM bytecode?
I have a Scheme interpreter written in Kotlin, what is the best way to compile it, instead of interpreting? Where do I start?
- jcdavis 9y agoThe most widely used library for dynamic bytecode generation is asm: http://asm.ow2.org/ http://asm.ow2.org/
- tomp 9y agoAnother possibility is using Truffle & Graal.
- deleted 9y ago[deleted]
- pjmlp 9y agoAnother alternative to jcdavis answer, is to just output bytecode in text format and use jasmin to compile it. http://jasmin.sourceforge.net/ http://jasmin.sourceforge.net/ Or have a lookt at Kawa. https://www.gnu.org/software/kawa/ https://www.gnu.org/software/kawa/
- doall 9y agoExamples of Lisp-2 compiler using Java and ASM: Shen to JVM bytecode compiler in Java 6 https://github.com/otabat/shen-jvm https://github.com/otabat/shen-jvm Shen to JVM bytecode compiler in Java 8 with indy https://github.com/hraberg/Shen.java https://github.com/hraberg/Shen.java
- bjpbakker 9y agoFor one thing Clojure comes to mind: https://github.com/clojure/clojure https://github.com/clojure/clojure
- UncleEntity 9y agoI was poking around* with this yesterday, has two different simple implementation of a lispkit compiler: http://www.cs.ncl.ac.uk/publications/trs/papers/129.pdf http://www.cs.ncl.ac.uk/publications/trs/papers/129.pdf *by "poking around" I mean I typed the code into a text editor for further study: code: https://pastebin.com/6pAkqE2R https://pastebin.com/6pAkqE2R