[Haskell-cafe] A Java bytecode interpreter written in Haskell
erik.dominikus71 at gmail.com
Wed May 25 17:21:54 UTC 2016
Yes, it does it "live". No compilation, just interpretation.
Honestly, there was no strong reason for me to make a JVM, and I don't
have a plan. I just needed some ego boost over my fellow programmers.
So yes, it was just an involved and commendable exercise. You saw
through me... LOL...
(But it's licensed under BSD3 in case someone finds something
interesting to do.)
Interesting idea. Yes, in principle we could implement a JVM where all
java.lang.Thread instances are green threads, and all IO operations
are nonblocking, just like GHC runtime, and this will allow Java
programmers to write code in the easiest way (just new Thread()
everywhere) without performance penalty.
On Wed, May 25, 2016 at 3:25 PM, Victor Nazarov
<asviraspossible at gmail.com> wrote:
> On Tue, May 24, 2016 at 8:43 PM, Erik Dominikus <erik.dominikus71 at gmail.com>
>> (Please keep expectations low for now; this is just a weekend project.)
>> I have written, in Haskell, something that aspires to be a Java
>> Virtual Machine (but I don't call it a JVM yet as it doesn't fully
>> comply with the spec). The code is available here:
>> This is similar to Frege , but while Frege aims to run a variant of
>> Haskell on Java, this project tries the other direction: running a
>> subset of Java on Haskell.
> I think it can be really interesting for Java community if you implement
> Java-runtime directly the same way GHC-runtime is implemented, i.e.
> Java-threads as GHC's IO-threads (i. e. green threads) and Java-I/O as GHC's
> input-output (which is asynchronous internally to support green-threading
> Victor Nazarov
>> Some related stuffs:
>>  https://github.com/MateVM/MateVM
>>  https://hackage.haskell.org/package/hs-java
>>  https://github.com/Frege/frege
>>  https://github.com/levans/Open-Quark
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe