MINK
Examples

Twelve small programs, all written in MINK.

A web server, a web app, a JSON tool, a search tool, a terminal game and more. Each one was built with the release compiler, run, checked against a reference where there is one, and tested.

BUILD

sitegen

Builds this website from a template and a data file. The code samples on the home page are put in by this program.

Tested: token replacement, HTML escaping, unknown tokens left alone.

CLI

jsonq

Picks a value out of a JSON file, like a small jq: .items[1].name.

551 KB queried in 28 ms. Built in 17 ms. 121 KB program.

CLI

fgrep

Finds text in the files under a folder, with -i and binary-file skipping.

Matched PowerShell Select-String exactly on 3.1 MB of source. 181 ms against 42 ms.

CLI

dupfind

Finds duplicate files by size and SHA-256.

Matched Get-FileHash exactly on 303 files. 1.5 s against 0.2 s.

WEB

serve

A static file server for a folder, with content types and refusal of .. paths.

300 requests, all correct, no leaks. It can serve this site.

WEB

todo

A whole web app in one .exe: a REST API, a SQLite database in a file, and the page itself.

Add, toggle, delete and restart verified over HTTP.

WEB

paste

A tiny pastebin: post text, get a six-character link back.

Newlines, tabs, quotes and backslashes come back byte for byte.

WEB

livelog

Streams a log file to a web page live, with server-sent events.

Last 20 lines on connect, new lines live, ends cleanly.

LANGUAGE

mini

A calculator language with variables and error positions.

177 random expressions matched a Python reference.

APP

snake

The terminal game, with an autopilot mode for tests.

Steering confirmed with a real key press.

APP

widget

A real Windows window with a live clock.

Found by its title while running. Closes cleanly.

SPEED

bench

The same four programs in MINK, Python, Go and Rust.

The numbers and the method are on the Benchmarks page.

Every program ends with exit code 0 and no memory-leak report, and has automated tests. They are small on purpose, so you can read one in a sitting. They also found real bugs in MINK itself (base64 decoding, SQL updates, reading a live log); those fixes ship in 1.0.6. The full list is in the friction log.