Hi this is my project!<p>I'm giving a talk on this in May for London Clojurians, and I'll also be talking about it at Lambda Days in Krakow in June.<p><a href="https://www.meetup.com/london-clojurians/events/306843409/" rel="nofollow">https://www.meetup.com/london-clojurians/events/306843409/</a><p>The project was initially inspired by Dr John Sturdy's thesis "A Lisp through the Looking Glass" which is all about interpreter towers and the ability to modify them in both directions.<p>This is all just for fun, I've yet to think of anything truly useful you can do with this. If you have any cool ideas please let me know, they might even make it into my talk!
In Common Lisp, at least, it's pretty typical for the compiler or interpretter to have packages for interacting with its internals. For example, `sb-c`, `sb-vm`, and `sb-ext` packages in SBCL; and the `ccl` package with Clozure Common Lisp, etc.<p>That ability also shows up in the inspector - it's possible to inspect types, classes, functions, etc. and inspect the internal data structures the compiler uses to represent them.<p>With SBCL it's even possible to modify the "virtual ops" the compiler uses, and emit assembly code that SBCL doesn't support out of the box.<p>It's a really convenient feature, and it would be nice if to see other languages pick it up.
I haven't read any of the code to see how it compares, but this work reminds me of research from Nada Amin & Tiark Rompf on "towers of interpreters", where a stack of meta-circular interpreters uses some explicit staging operations that make it possible to specialize for the interpreter code in a way that removes overhead.<p><a href="https://www.cs.purdue.edu/homes/rompf/papers/amin-popl18.pdf" rel="nofollow">https://www.cs.purdue.edu/homes/rompf/papers/amin-popl18.pdf</a>
Isn't having access to the interpreter (and scanner, and parser, and compiler) kind of what makes something Lisp rather than something else with a lot of parentheses?
You can actually get completely stupid with this in Common Lisp using something called a "Reader Macro" which lets you temporarily take complete control over the interpreter.<p>For example, I have this joke project that defines a DSL for fizzbuzz:<p><a href="https://github.com/DanielKeogh/fizzbuzz" rel="nofollow">https://github.com/DanielKeogh/fizzbuzz</a>
Lisp take on generating an embedded VM at runtime/ad hoc basis (vs. polymorphic coding)?<p>How would use the most recent 'trie of lisp git diffs' differ from command to do a system call fork of lisp / duplicate lisp lists / apply 'diffs' to forked system call of lisp?<p>Perhaps, lisp concurrency support without a system()/debugger.[1]<p>(humor) To bad iLisp would be confused with other brand name(s).<p>[1] : Evil Scheduler: Mastering Concurrency Through Interactive Debugging : <a href="http://aoli.al/blogs/deadlock-empire/" rel="nofollow">http://aoli.al/blogs/deadlock-empire/</a>
These "inter-lingual" examples such as <a href="https://github.com/Kimbsy/autology/blob/main/resources/examples/inter-lingual-4.atl" rel="nofollow">https://github.com/Kimbsy/autology/blob/main/resources/examp...</a> are pretty cool. What is the use-case of this or why would one want to do this? Just trying to bounce off ideas.
I was working on something similar to this a while ago, but the goal of it was experimenting with what a language that could modify it's own syntax would look like. I was going to write something as basic as possible and then have example scripts on transforming the syntax to other languages. I was probably just going to do brainfuck and c in the end, but I wanted something like that to be possible. I couldn't figure out how to make a language modify a tree structure for tweaking the ast of the interpreter, but I guess lisp fits the bill there.
Mind blown when you write better language using the language itself. Why I wasted so much time in assembly?
Then you remember there are certain restrictions as regards to time travel.
I think CosmicOS had the same idea [1] to seamlessly introduce special forms without defining the implicit interpreter in advance.<p>[1] <a href="https://cosmicos.github.io/message.html#section18" rel="nofollow">https://cosmicos.github.io/message.html#section18</a>
so it's hot code reloading on steroids? really neat idea, I'm working on a similar Lisp-style language and will probably adopt this idea (and cite you of course). In my language, you can redefine any symbol, even numbers, so (def 10 12) is valid code (so is (def def 42), which breaks `def`!).<p>I wonder what use cases there are for such extreme flexibility, aside from funs and games!