Weblogs


Factini

2024-03-01

I wrote a game. In Rust. In html5 canvas through WASM. It's pretty cool and I figured I should write a couple of blog posts about it before releasing it because I tried to have as few dependencies as possible and no unsafe/unstable code etc. But that...


Neural Chess

2024-01-21

I've been trying to train a neural network to play chess. A few weeks ago I got nerd sniped, nay, inspired by this video titled "AI plays pokemon". It's a lovely exhibit on reinforcement learning and in particular a showcase of codin...


Road to 1500 elo

2023-12-29

About two months ago I started a challenge for myself: achieve a 1500 elo rating in chess. I have no training or history in chess whatsoever. I knew the common rules before I started, but not the nitty gritty about castling and en passant. Let alone ...


Elimination of continue

2023-12-29

I got back into working on my Preval project this year. The first step of Preval is to break down JS constructs into other constructs and eliminate variance in code. In a way it's an attempt to reduce JS to a MISC (a Minimal Instruction Set Computer)...


Normy JS IR AST

2021-09-02

Too many abbreviations there, sorry bout that. The IR, or "Intermediate Representation", AST that Preval uses is currently very similar to the regular EStree form. However, the IR kind of evolved out of nowhere without a concrete plan and while that ...


Normy JS p3

2021-08-27

The main thing left to discuss in the first phase are expressions. These are also the most versatile since there are many different ways of achieving the same goal. This pots will describe the expressions in some detail and how to get them to a norma...


Normy JS p2

2021-08-23

Let's start with looking at how we normalize all the statements. In this post I'll cover all the valid statements in normalized code except for the expressions. We'll see what their normalized form is considered to be and how to get there in a few ca...


Normy JS p1

2021-08-21

When normalizing JS there are a few high level phases to consider. The first one would be a purely syntactical normalization. Things like eliminating one statement in favor of another or making sure branching statements always have a block for a body...


Simpler JS

2021-08-18

When I started Preval I wanted to create this pseudo compiler that would take arbitrary JS and spit out the same program, but faster. It would eliminate useless code artifacts that only served the developer and added overhead to the runtime. This pro...