Software

Deep in the cavernous lair I inhabit, there is software a-brewing. Some of it, sometimes, reaches the surface to confront the daylight. Here you’ll find programmed artifacts that I do not categorize as games, as those have their own page.

run-to-completion protothreads

repository: rtcproto

rtcproto.h

A single-header ANSI C library that depends on C99 for fixed-width integer types and POSIX.1-2001 for clock and time functions. It implements a run-to-completion scheduler on top of the concept of protothreads, making their otherwise stackless threads stateful. Then, it provides convenient mechanisms for cooperation with the scheduler, letting protothreads yield after a timepoint has passed.

This provides another way of deferring computation into the future, and executing it whenever it is convenient for the processor, letting it return to other tasks in the meantime without any concept of simultaneous concurrency. While many coroutine libraries prefer more nuclear solutions (which come with their own drawbacks), this library tries to see just what it can get away with using a portable toolset.

cells-rtcproto

repository: cells-rtcproto

A demonstration program for the rtcproto (run-to-completion protothreads) library. The program aims to visually and temporally demonstrate the point of scheduling protothreads cooperatively based on ending timestamps issued by the scheduler. In the background, a predator-prey cellular automata is running at a few steps per second. If you feed a new line on standard input by pressing Enter, a protothread will be queued that will take many thousands of steps, taking the simulation to a very distant point.

suckless-merge

suckless-merge.sh

A shell script automating my workflow for patching suckless programs, in which the master branch is left untouched, a config branch contains the changes to config.h, and every patch has a branch of its own where only that patch is applied, but sometimes with small changes to ensure that it merges together with every other patch/branch without conflicts.

proquint-parse

proquint-parse.tal

A piece of uxntal code to parse a single proquint to a short. It checks for five characters in a-z, and each must be a character that is valid in a proquint. Just like the reference implementation in C, it is not sensitive to the ordering of consonants and vowels.

created

modified