43 ms·
I have been very interested in the HVM since the first time it was posted on Github. One thing that has been sorely missing is a front-end for any realworld lan
by rowanG077 3y ago
I have been very interested in the HVM since the first time it was posted on Github. One thing that has been sorely missing is a front-end for any realworld language. This will allow real comparisons of programs instead of tiny toys rewritten from Haskell to interactions nets.
- LightMachine 3y ago100% agree - we're working on exactly that for the upcoming release in a few months!
- mccoyb 3y agoHi Victor — exciting work! For language designers interested in this system, is there a common reference for e.g. using it (for example, from a language + lowering pipeline in Rust)? (Or perhaps that’s also what you alluded to in the next couple of months)
- LightMachine 3y agoExactly, we're working on a guide for language designers. And while HVM-Core (the repo I posted today) is the lowest IR, I believe most languages should actually compile to HVM-Lang (to be released), which is a higher-level AST that is more familiar and does a lot for you (so you don't need you to write your own conversions from your language to interaction combinators and back).
- wmf 3y agoWait, so "by compiling languages like Python, Haskell, to a new format called Interaction Net" actually means the compiler hasn't been written yet?
- LightMachine 3y agoExactly! Sorry if that sounded to be the case. We're first focusing on making the runtime as fast as possible. Next step is to support some simple toy lang (like a Haskell-like and a Python-like) for people to start using. Only then we can start compiling existing languages, which is a colossal task (due to languages like JS having a bajillion features).
- dkubb 3y agoThis might be a dumb question, but is it possible to take something like WASM and make it run on HVM?
- LightMachine 3y agoYes but wouldn't be great. The problem is that these ultra low level assembly languages actually throw away a lot of information that is useful to parallelism. Recursive functions are great for HVM, but when compiled to assembly, that structure is lost.
- sshine 3y agoI suppose it’s not always lost, but the call graph needs to be inferred, and you might risk applying low-level optimisations that only apply to CPU, which may break the ability to infer the highly parallelizable structure in the high-level language. Compiling to CPU assembly is sort of a step back.
- weatherlight 3y agoyou guys should do erlang/ (or a elixir) pretty simple functional languages that already have a lot of ergonomics around concurrency and parallelism! that would be awesome :)
- LightMachine 3y agoI don't know, does Erlang elaborate to a simple core language?
- weatherlight 3y agoYes! https://www.erlang.org/blog/core-erlang-by-example/ https://www.erlang.org/blog/core-erlang-by-example/ Both elixir and erlang (and all Beam languages elaborate to Core Erlang)