Show HN: I wrote a book about WebAssembly
410 pointsHey HN!
I've been working on a book about WebAssembly over the last few months, and it's finally available at http://levelupwasm.com!
Why a book on WebAssembly you ask? Well... WebAssembly is awesome (obviously ) but it's certainly not the easiest thing to learn. So I wrote this book as a practical intro to using WebAssembly in your web apps.
I would appreciate any feedback!
Comments (88) 32 threads
Earlier commentsIs it because no interest from the publishers? Or is it because you think the royalty percentage from publishers is too low? Or you don't have any particular reason? It's just feel natural to do self-publishing.
Also, do you hire editors?
This is actually my second self-published book (first one was about wrangling data on the command line with bash), so it does feel natural to self-publish at this point!
Webassembly for genomics sounds cool :)
And for a sample of the writing, here's the section on compiling the CLI tool jq to WebAssembly: http://levelupwasm.com/sample-jq.pdf (though note that it builds on previous material so it doesn't re-explain everything)
Edit: Also, if you're curious about using WebAssembly in genomics, check out https://github.com/robertaboukhalil/aioli/ and https://github.com/robertaboukhalil/fastq.bio, a tool to get a preview of DNA sequencing quality that uses WebAssembly to speed up the analysis portions.
https://chromatic.nci.nih.gov/
Basically all the work is done in the browser : gzip decompression, custom parsing of sequencing alignment, png generation, etc. Lots of data are pushed to the client at load time like gene location information for genome build "hg38" (the latest). Server only provides reference sequence and sample genomic alignment "slices" for the region of interest. So, all the state is handled in the browser, server only provides trivial "wget" requests.
It is mostly wasm (source is C compiled with emcc). The front page is the requisite html/javascript start page. Pages are created in wasm code and pushed to JS for updating the DOM. Lots of calls to emscripten_run_script("your javascript here"). DOM manipulation straight from Rust/Go/C would be cool but it is not here yet.
Upside is server simplicity and security ... and no downloading and setting up complicated software.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5987889/
Code is done by the government so it's public domain. (Your tax dollars at work !)
Continue this thread — 1 reply
If I don't know any C++ (and never plan to) but am learning Rust, do you think there is value here? Or is really focusing on the C++ -> WASM experience?
Most of the time, we treat C/C++ libraries as black boxes that we compile to WASM, though in some cases like Pacman, we do have to modify the original code, but you should be able to infer what we're doing from the context and the text.
All comments shown.
Couldn't load more comments. Check your connection and try again.