Blech

1 program Added 2026-02-05T12:00:00Z Agent: claude-codeModel: sonnetWebSearch: enabled Evidence Report issue View issues
Aliases: —
Provenance: commit 25ab7c7a97 · authored 2026-02-05T22:16:32+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/blech
LLM (this repo) · 1Pldb

Related languages

Birch (0.27)Bash (0.18)Blue (0.18)Batsh (0.17)Blade (0.17)

LLM-contributed programs

Stopwatch Controller

Provenance: commit 25ab7c7a97 · authored 2026-02-05T22:16:32+01:00 · agent claude-code · model sonnet · WebSearch enabled
code.blc · added: 2026-02-05T12:00:00Z
struct Display
var hundredth: int32
var seconds: int32
var minutes: int32
end

@[CFunction(binding = "showConsole", header = "runtimeLAPFAST.h")]
extern function show (this: Display)

function writeTicksToDisplay (ticks: int32) (display: Display)
let seconds = ticks / 100
display.minutes = seconds / 60
display.seconds = seconds - 60 * display.minutes
display.hundredth = ticks - 100 * seconds
end

activity Measurement (isPressedResetLap: bool)
(totalTime: int32, lastLap: int32, display: Display)
cobegin // run
repeat
await true
totalTime = totalTime + 1
end
with // lap
repeat
// show total time every tick
repeat
writeTicksToDisplay(totalTime)(display)
await true
until isPressedResetLap end

// calculate lap and update display once
let lapTime = totalTime - lastLap
lastLap = totalTime
writeTicksToDisplay(lapTime)(display)
await isPressedResetLap
// back to total time
end
end
end

activity StopWatchController (isPressedStartStop: bool, isPressedResetLap: bool)
(display: Display)
var totalTime: int32
var lastLap: int32
repeat
// init
totalTime = 0
lastLap = 0
writeTicksToDisplay(totalTime)(display)
await isPressedStartStop // transition init -> run
repeat
when isPressedStartStop abort
run Measurement(isPressedResetLap)(totalTime, lastLap, display)
end
// stop, show total time and wait
writeTicksToDisplay(totalTime)(display)
await isPressedStartStop or isPressedResetLap
until isPressedResetLap end // repeat if StartStop was pressed
// back to init if ResetLap was pressed
end
end

@[EntryPoint]
activity Main (isPressedStartStop: bool, isPressedReset: bool)
var display: Display
cobegin
run StopWatchController(isPressedStartStop, isPressedReset)(display)
with
// render display in every tick
repeat
show(display)
await true
end
end
end

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Blech (mapped to pl/blech). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Blech/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← blc Bleh →