latest soggy/cotton / docs / cotton.1
COTTON(1) General Commands Manual COTTON(1)

cotton — a tiny stack machine for the cot programming language

cotton file.cot

cotton is a small stack machine for the cot(5) programming language (inspired by Lua, Forth and Uxntal) written in C99

cotton's internals consist of 7 files (as of cotton 0.1) which are:

main.c
Reads each .cot file from head to toe and then hands each read line to the loom, then, it returns the results
Handles the core operations of cotton: initializing the state, and, pushing and popping the stack
Has the Cotton struct, contains the cog types, opcode definitions and the specs for Cotton
Has the builtin and runtime keycogs
Declares the keycogs so they can be used elsewhere inside of Cotton
For the compiler and the runtime for Cotton
Where cotton_compile and cotton_run are declared to be used in loom.c

as of now it only compiles cot programs, but, i do intend to add the option to compile cot programs to uxntal in the future (IF i ever figure that out and IF i still have that goal by then) :P

cot(5)

September 2026 cotton 0.1