Weblogs


for scoping

2021-01-22

I stumbled on a new gem yesterday. I'm not sure if I knew this when I was writing Tenko but I certainly forgot about it until Preval was showing unexpected errors for it. The case in point is the special scope in the header of a "for" statement. T...


Normalizing patterns

2020-12-30

One of the more treacherous syntax in modern JS are patterns. On the surface they look benign, easy to work with, and definitely have their usages. But dig deeper and some ugly truths come out. Especially when you mix-and-match arrays with objects, s...


Preval prologue

2020-12-14

I'm going to start a new project. It's probably best described as "something like prepack". The name I picked is kind of a homage to it; "Preval". A combination of "Prepack" and "eval" (surprise). The project is meant to be some kind of code reductio...


Mope experiment

2020-11-27

A while back I was working with Flow and TS and wondered whether there wasn't an easier way of doing all of this. The typing offered by Flow and TS look simple on the surface and look nice in example projects but before you know it you'll be entangle...


Hardware choices

2020-04-26

I had been holding off on buying a bunch of things and in the past six months have finally gotten around buying them. Some out of necessity, some out of opportunity, some out of ... well, just because. This post describes what I was looking for, my d...


Tenko Retro

2020-03-15

About three years ago I started writing on what ended up becoming Tenko. A JavaScript parser written in JavaScript. I had written a JS parser before; ZeParser. That was only for the old version of JS; "ES5". Since I wanted to write tooling based on "...


Ménière

2019-11-13

I was diagnosed with Ménière's disease over ten years ago. While I was initially told this was my new permanent state of being, that turned out to be almost correct and the problem went away after a few months. It did return later, with a frequency...


Pack token types in 32bit

2019-09-29

I've been writing a JS parser for over two years now. In this particular post I want to highlight a bit packing trick I'm applying to a core data structure of the parser as a whole: the token type. In general, the way a parser works is that it doe...