HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Lightbeam wasm compiler: Jack Fransham @ Parity

Team Spacemesh · Youtube · 101 HN points · 0 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Team Spacemesh's video "Lightbeam wasm compiler: Jack Fransham @ Parity".
Youtube Summary
This video was filmed at the Wasm workshop in Berlin. For more info, please visit
https://avive.github.io/wasm_on_the_blockchain/#/
and
https://spacemesh.io/
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Feb 24, 2020 · 99 points, 15 comments · submitted by nonsince
feniv
If you can't watch the video, there's a blog post writeup of Lightbeam by the presenter here - http://troubles.md/posts/lightbeam/
tom_mellior
> but for a streaming compiler... you just don't have liveness analysis

I understand that streaming compilation wants to start compiling before the entire module has been read, but is it really that important to start compiling functions before their entire definition has been read? Seems like a huge artificial hurdle.

snek
functions are the part you compile, everything else is just runtime data
tom_mellior
The question was why one would want to start compiling a function before all of its code is available.
Groxx
Purely guessing, but: gigantic generated funcs are A Thing™, and pretty often I'd expect that you don't even need to know the full contents of a func to being executing it. Some structures would require it, sure, but not all. You could treat it as speculative execution up to the point where you can't, and then you just wait and continue-or-error when you know more.
nonsince
Author here: you got here before me but this is precisely the right answer, although it’s more about not needing the full contents to start _compiling_, rather than executing necessarily. Supporting streaming execution parallel to compilation is absolutely possible, but a tougher challenge that isn’t necessarily for our purposes.
jacobush
Why not... you could "just" during compilation split it into several functions and daisy-chain them if it came to that, by letting one calling the other with whatever state is needed to transfer. I'd bet it could even be part of a simple optimization pass. Single assign semantics help with eliminating useless scope and all that.
karavelov
Nowdays merged into wasmtime: https://github.com/bytecodealliance/wasmtime
jeltz
Do you know how wasmtime comapres to wasmer?
syrusakbary
Hi, I'm Syrus (founder of Wasmer [0]).

First things first: we have the deepest appreciation for Jack and the people behind the effort at lightbeam. They did a lot of amazing work on that space that inspired our work in the Singlepass compiler (similar design principles as lightbeam).

On that sense, Wasmer is built to support any kind of compiler backend. We currently support Singlepass (streaming compiler), Cranelift and LLVM (for super optimal environments). [1] We also support ARM [2] chipsets and sponsored the work on the dynasm Rust project to enable it.

Wasmer runtime is also highly pluggable via middlewares. For example, we added ultra-optimal "gas metering" as a part of it.

If you are curious about runtime speed (tldr: we are ahead ;) ), here are some other articles [3] [4]

Hope this is useful!

[0]: https://github.com/wasmerio/wasmer

[1]: https://medium.com/wasmer/a-webassembly-compiler-tale-9ef37a...

[2]: https://medium.com/wasmer/running-webassembly-on-arm-7d365ed...

[3]: https://00f.net/2019/10/22/updated-webassembly-benchmark/

[4]: https://medium.com/@leonardas103/experimenting-with-webassem...

skavi
I was looking that up myself and came across a reddit thread [1] with a Wasmer employee seemingly equitably laying out the general differences.

This, however, elicited a response from a Mozilla employee claiming it wasn’t telling “the whole story.”

Does anyone know what the differences in perspective are here?

[1]: https://www.reddit.com/r/rust/comments/cx4nj3/comment/eykkie...

snek
wasmer used a large amount of wasmtime code without proper attribution. I'm not sure this is a problem anymore but habits die hard and the owner of the company has not been shown to be the best person (won't go into that here since it's not as tech related)
peter998
Following up on the "large" amount of code. We took an 20-line implementation of a memmap which is also reflected in our attributions :)

https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS....

syrusakbary
We used the mmap implementation (20 lines of code) which is also reflected in our attributions :)

https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS....

Perhaps I'm missing something. Were you referring to some other code I'm not aware of?

snek
Yeah I think you're missing the part where you only added that file after being called out on twitter lol. The only reason I say "habits die hard" is because you consistently refuse to acknowledge that this ever happened.
jacobush
Ok, but is it cool and why? I was hoping for more comments here. :)
Jun 27, 2019 · 1 points, 0 comments · submitted by ngaut
Jun 26, 2019 · 1 points, 0 comments · submitted by nonsince
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.