Biome of Ideas

Projects

Here's a showcase of things I've built:

Pratt Calc

Available on GitHub.

A programming language in Python, demoing the Pratt parsing algorithm.

Some example code:

/* Set 'x' to 1.*/
x <- 1

/* Set 'block' to some code which should be executed later. */
block <- {
    x {
        print("hello")
    }
    
    (x - 1) {
        print("goodbye")
    }
}

/*
This executes the code referenced by 'block'. Since 'x' has a
non-zero value, the first inner code block executes,
while the second one is ignored.
*/
call block

/* Decrement the value of 'x' by one. */
x <- x - 1

/*
Reinvoke the block, which now sees x == 0 and so the first
inner block is skipped while the second one executes.
*/
call block