Stripboard

Streck.ai

Stripboard

A C99 library for scheduling, threads, networking, and notifications — the same source on macOS, Linux, and Windows — with a tutorial book and six complete example programs.

Version 1.1 · about 4,900 lines of C99 · about 80 pages · macOS, Linux, Windows

Most programs worth writing have more than one thing going on at once. Stripboard is a small C99 library, the same source on macOS, Linux, and Windows, assembled out of four mechanisms that work better together than apart: notifications let the parts of a program talk to each other by posting under names; a cooperative scheduler lets each activity be written as a plain sequential function that parks and resumes; kernel event queues wait for the outside world through the kernel’s own queue so that idle programs cost nothing; and threads add parallelism under one rule that keeps them out of each other’s memory.

The book is a manual, not a commentary. It shows you what to call, what each call promises, and six complete programs that put them to work.

In the library

Notifications

Post and observe messages by name, with no coupling between senders and receivers. Example: a thermostat where a sensor, heater, display, and logger meet by name.

Cooperative scheduler

Contexts that park and resume so each activity reads as a straight line of code. Example: a blinker that keeps two lights and a prime count running on one thread.

Kernel event queues

Non-blocking I/O through the kernel’s own event queue — name resolution, page fetching, file copying, and sockets. Examples: a web-page harvester, a TCP client and server, a file mirror.

Threads

Worker threads with one rule to keep them out of each other’s memory. Example: a web server with an acceptor, a pool of workers, and a scheduler and queue per connection.

Building

$ unzip Stripboard-1.1.zip
$ cd Stripboard-source
$ ./macos.zsh          # or ./linux.bash or ./windows.ps1

Compiles with any C99 compiler, no external dependencies. Each example is a single file that compiles, runs, and checks its own results.