Examples

Programs to read and run

Every example in the language repository, from one line to a scheduler that builds with no garbage collector. Each page shows what zeno run printed.

hello.zenoThe whole program. No main(), no imports, no semicolons2 linestour.zenoA sketch of what Zeno might look like. Nothing here is final123 linesstyles.zenoOne small job, written four ways99 linesprimes.zenoA program small enough for zeno build to compile today46 linesshapes.zenoClasses, enums, lists and match, in a program that45 linessensor.zenoValues that may be missing, errors, and functions as values99 linesgenerics.zenoOne piece of code for many types134 linespacket.zenoSized whole numbers and bit operators105 linessignal.zenoA traffic light on three pins, written as a state machine71 linesblink.zenoThe same language on a microcontroller16 linesbuffer.zenoOwned values: memory that is given back at a line you can point to92 linesmemory.zenoA program that makes far more than it keeps58 lineslabels.zenoText that is kept: names for channels, and a log of what happened73 lineswords.zenoLists that nobody keeps77 linesscheduler.zenoA small scheduler: tasks that run every so many ticks100 lines