Joel, This sounds like an extremely interesting (but very ambitious!) project, which I would like to get involved with if I have the time. However, wouldn't it be rather difficult, given that there doesn't seem to be a publicly available specification for the Erlang VM or the BEAM file format -- according to this email thread on the erlang-questions list: http://www.nabble.com/VM---BEAM-Specs-t4215515.html Perhaps it would be interesting to look at a slightly more constrained problem: can Erlang's message passing model (including distributed messaging across a network) and process monitoring facilities be replicated in Haskell? In other words, can we build OTP in Haskell? Regards, Neil On 8/16/07, Joel Reymont <joelr1@gmail.com> wrote:
Folks,
I would like to write an Erlang VM in Haskell. I first thought of OCaml but Haskell has SMP and lazy evaluation may come in handy. Plus, I'll need help in this project like in no other and support from the Haskell community has always been outstanding.
I'm doing this to learn more about the Erlang internals and to acquire some skills in the process. I'm also hoping to be at least as fast as the existing Erlang VM (written in C) and to be able to extend the VM in a functional language.
With C you can implement a threaded VM using GCC labels or switch- style [1]. What is the most efficient approach in Haskell?
I'm thinking using CPS and building up a chain of closures. Would this work well? Any other suggestions?
The Haskell repo for the initial HEM (Haskell Erlang Machine) is at http://darcs.haskell.org/hem. A much improved HAW implementation will follow in the not so near future.
Thanks, Joel
[1] http://www.complang.tuwien.ac.at/forth/threaded-code.html
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe