Dirk
ddv.tools
Dirk
@ddv.tools
Backends & tooling. Working on a JS runtime, Maligator, for learning purposes.
GH: @dirkdev98
I've also taken a few shortcuts already, by using the bigint, string and number representation from the host JS runtime. We mostly abuse this for number to string conversions and vice versa. We still try to implement all edge-cases, around -0 for example, our selves.
January 5, 2026 at 7:04 AM
Speed ain't the goal here, so we just run a tree-walking interpreter, built w/ TypeScript running on Node.js. For now we just have to implement more language features until we can start running Test262 to really verify what we have done so far.
January 5, 2026 at 7:04 AM
All that work for an incomplete calculator whaha. However, doing the grunt work to, for example, implementing all operations on numbers and bigints before getting any code running, made sure that when it was time to get code running, it was really straight-forward to do so.
January 5, 2026 at 7:04 AM
And finally with the last evening of procrastination, I added global values like `global.globalThis`, `global.undefined` (although unusable for now), added equality support (1 == '1') up to ("str" === "nope") and logical operators (false && true).
January 5, 2026 at 7:04 AM
Figured it was time to get code running, so dove straight in to environment records, realms and execution context. For parsing, we just use Meriyah for now.
So with all that prep work, implementing binary expressions (1 + "foo") was really straight-forward.
January 5, 2026 at 7:04 AM
I started with just implementing the language value types (undefined, null, number, string, symbol, object). Implementing their operations. Next came abstract ops for type conversions and type comparisons. With that some operations around ordinary objects are needed, so got a few of them implemented
January 5, 2026 at 7:04 AM