Harmony

1 program Added 2026-02-28T12:07:03Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 47666a430f · authored 2026-02-28T13:07:29+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Hexagony (0.27)Hare (0.25)Harlan (0.21)HardCaml (0.19)Harbor (0.17)

LLM-contributed programs

Peterson's Algorithm

Provenance: commit 47666a430f · authored 2026-02-28T13:07:29+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.hny · license: BSD-3-Clause · added: 2026-02-28T12:07:03Z
in_cs = 0
invariant in_cs in { 0, 1 }

sequential flags, turn
flags = [ False, False ]
turn = choose({0, 1})

def thread(self):
    while choose({ False, True }):
        # Enter critical section
        flags[self] = True
        turn = 1 - self
        await (not flags[1 - self]) or (turn == self)

        atomically in_cs += 1
        # Critical section
        atomically in_cs -= 1

        # Leave critical section
        flags[self] = False

spawn thread(0)
spawn thread(1)

Contribute — propose a file extension

Tell us where to find evidence about Harmony (mapped to pl/harmony). 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/Harmony/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Harmonity HARSH →