What does HackerNews think of Metascala?

A JVM written in Scala

Language: Scala

Also https://github.com/lihaoyi/Metascala for a JVM implemented in Scala running on the JVM.
On the topic of toy JVMs, my Metascala project is a JVM implemented in ~4000 lines of Scala that is complete enough to interpret itself!

- https://github.com/lihaoyi/Metascala

Interpreting code in Metascala is about 100x slower than just running it, and interpreting code in Metascala interpreted by Metascala is about 10,000x slower than just running it. Not going to win any performance benchmarks, but it's a cool demonstration of how a JVM works.

All the runtime data structures, memory allocation and garbage collection, method dispatch logic, stack trace management, exceptions, inheritance, object layouts, etc. are all implemented in a relatively small amount of relatively simple code.

For example, here is the implementation of the heap, which allocates the VM's objects inside a big byte array and has a simple copying semispace garbage collector to clean them up:

- https://github.com/lihaoyi/Metascala/blob/master/src/main/sc...

This is the closest that I could find - https://github.com/lihaoyi/Metascala

Need to find some time to look more and actually try and work thru it.

Scala can also host the JVM (well, a subset of it, enough to run itself): https://github.com/lihaoyi/Metascala