Recap Around this time last year I wrote about my experience writing a WebAssembly VM in C (for fun). At that point in time it was effectively a prototype. It could decode the WebAssembly binary format and execute some simple hello world programs. I've continued to work on the project in my free time, and I'm happy to share that it has come far enough that it passes the full WebAssembly 2.0 core…
For the last 6 months, I've been spending my (limited) free time on evenings and weekends writing a WebAssembly VM in C. After repeatedly throwing away small side-projects, this was an extremely productive experience for me as an engineer. I'm writing this in order to put together some take-aways and organize my thoughts on what I learned. What is WebAssembly? WebAssembly is a standardized…
A common strategy to implement infinite-scroll is to place a marker element at the end of a scroll container. When the user scrolls to the bottom of the container, the marker element becomes visible and triggers an IntersectionObserver callback, at which point you can fetch the next page of data. <ul> <li>One</li> <li>Two</li> ... <li>Fifty</li> <div id="loadMore"></div> </ul> const target =…
I'm going to begin by defining a simple language that can be used to specify term rewriting systems . We'll start with the syntax and semantics of the language, and then move on to some interesting examples. An implementation of this language can be found on Github . Syntax The atomic unit of our language is a symbol -- which is a utf8 string of any characters except whitespace, parentheses, or…