Lurker News
What are you learning right now? My last side project was recently derailed and I am curious to hear what other people are spending their time studying/learning about.

Comments (876) 381 threads

Show all comments

Showing thread 78 of 381

_hardwaregeek2 replies#
I'm learning the ins and outs of WebAssembly. I just picked back up writing my compiler to WASM for my toy programming language (think JS crossed with ML). Right now I'm getting a feel for writing stack based bytecode and implementing basic features like local variables and control flow. It's not much, but I just got factorial to compile in my language which felt totally awesome.
enos_feedler1 reply#
This sounds really neat. Do you have an open source repo for this? Would love to check it out. What framework are you using to write the compiler itself? LLVM, or something else?
_hardwaregeek#
Here's the repo: https://github.com/nicholaslyang/saber Fair warning, the code is quite gnarly.

I'm not using any frameworks. Took a bit to figure out code generating wasm, but once I got the basic emitter/IR working it got a little easier. Plus you start being able to read the binary format after a bit of practice.

cjbprime1 reply#
Nice! FWIW I've been solving some wasm challenges in infosec Capture The Flag events and it's a nice way to learn the bytecode.
_hardwaregeek1 reply#
Cool! So far I've been reading the spec and looking at the output of wat2wasm.
cjbprime#
I really like using Firefox's debugger -- you can step through bytecode as if it was JS.