16 comments

[ 3.5 ms ] story [ 49.3 ms ] thread
This is a piece of art. Look at the c runtime for the core.
Thank you! Sad this post got no traction. I wonder if Hacker News allows posting again in a future.
@dang will sometimes boost a post later on.
Reposting is allowed, and this looks incredible; you should definitely repost some time soon. I've kinda put off getting into Haskell... this feels like I've waited long enough to catch the next big thing.
If you do a repost, I think might be a sensible idea to make the repost into a "Show HN" post.

And then also just to post the abstract from Readme.md as a comment to the post.

I think it creates more engagement when people see immediately that the creator is present in the thread.

PS. Really cool project!

Ok, maybe stupid: why the core is in C and not Rust? Easy to targeting?
(comment deleted)
(comment deleted)
That's so cool Victor. I will probably waste some time implementing something using your runtime. So happy to be part of this.
I honestly can't believe I'm having the chance to contribute with this right from the start
If you read the how.md it mentions the key insight was to introduce an operation into the language that allowed temporary violation of 'sensical rules' that the author calls superposition. Then computing or applying one of these super imposed clones collapses down to a final result obeying the rules. Being that the lambda calculus is core to computing information, I can't help but think, what if this is actually an insight into something profound about how our universe works?
Besides reusing the name superposition I don’t think I see a connection to our universe.

Actually though you might find this interesting: there’s a fundamental disconnect between our universe and the von neumann architecture, which is that the rules of our universe appear to be reversible. By which I mean, if there are two possible unique states the universe can be in at time T, there will be exactly two possible unique states the universe can be in at time T+1. This is counter to how an AND gate works, where the result is the same for multiple states (0 AND 1 = 0 as well as 1 AND 0 and 0 AND 0) - one bit of information is lost.

This means that the extra bit must be converted into heat, which puts a lower bound on the amount of heat an AND gate can produce during its operation. There are reversible models of computation (that are not turing complete) which could theoretically run without producing any heat.

I wish I could eventually use Haskell libraries with this/ Kind.
Excellent work. Stuff like this is why I read HN.
HVM is the ultimate conclusion to years of optimal evaluation research. I've been a great enthusiast of optimal runtimes. Until now, though, my most efficient implementation had barely passed 50 million rewrites per second. It did beat GHC in cases where optimality helped, like λ-encoded arithmetic, but in more real-world scenarios, it was still far behind. Thanks to a recent memory layout breakthrough, though, we managed to reach a peak performance of *2.5 billion* rewrites per second, on the same machine. That's a ridiculous 50x improvement.

That is enough for it to enjoy roughly the same performance of GHC in normal programs, and even outperform it when automatic parallelism kicks in, if that counts! Of course, there are still cases where it will perform worse (by 2x at most usually, but remember it is a 1-month prototype versus the largest functional compiler in the world). I'm confident HVM's current design is able to scale and become the fastest functional runtime in the world, because I believe the optimal algorithm is inherently superior.

I'm looking for partners! Check the notes at the end of the repository's README if you want to get involved.