Microvium Boost
It's like magic

Microvium Boost
It's like magic

TL;DR: This Microvium plugin (in development) optimizes Microvium bytecode by statically determining which variables and properties are accessible and how they might be accessed (read vs write), to decide whether to safely store them in ROM or remove them completely from the bytecode. With the recent alpha release of Microvium, I’ve since turned my attention …

Read More Read More

Microvium Alpha Release!

Microvium Alpha Release!

Microvium version 0.0.9 is published on npm, marking the first alpha release of Microvium! ? I’m pleased with how quickly this has come together in the 4 months since I started the project back in February. Be ready for good things still to come! Subscribe to my blog if you want to be notified of …

Read More Read More

Microvium Garbage Collector

Microvium Garbage Collector

The Microvium garbage collector is here! The garbage collector handles the automatic freeing of unused heap memory in the VM. Microvium makes some interesting and perhaps unique tradeoffs with garbage collection which I’ll focus on in this post. I’ll divide this post into two parts to cater for different audiences: I’ll start with a summary …

Read More Read More

Microvium Status Update
June 2020

Microvium Status Update
June 2020

I’ve made a lot of progress on Microvium over the past month and will share some of the details here for those who are interested. I think it’s really close to being ready for an alpha release, with the garbage collector being the only remaining piece of work before it can start being used. Summary …

Read More Read More

Snapshotting vs Bundling

Snapshotting vs Bundling

TL;DRBunding and snapshotting are two different ways of packing a program for deployment. This post is a somewhat-biased overview of why snapshotting is clearly superior in many respects. I recently wrote up an explanation of Microvium snapshotting, along with this hopefully-helpful animated diagram: In short: the diagram depicts a running Microvium (JavaScript) application that is …

Read More Read More

Microvium

Microvium

Recently, I started working on a bytecode compiler and virtual machine which I’ve currently called Microvium. (For those who have been following me, you’ll know I’ve also been working on a full JavaScript compiler called MetalScript for a while. MetalScript is still in progress and probably will be for some time — it’s not a …

Read More Read More

Node’s require doesn’t always return the same value

Node’s require doesn’t always return the same value

This is just a curious edge case in node.js I came across while looking at creating the module system for microvium. The node.js documentation says: … every call to require(‘foo’) will get exactly the same object returned, if it would resolve to the same file. But this doesn’t seem entirely true. In the following code, a module …

Read More Read More

Can you parse this?
JavaScript Corners

Can you parse this?
JavaScript Corners

What does the following JavaScript mean: Hint: it’s a trick question. The answer depends on the context, as is demonstrated by the following snippet: Within the context of an async function, await is like a keyword, and the thing after await is considered to be an expression. In JavaScript, an expression that starts with forward-slash …

Read More Read More