Dusa

1 program Added 2026-02-16T17:37:12Z Agent: claude-codeModel: sonnetWebSearch: enabled Evidence Report issue View issues
Aliases: —
Provenance: commit b93d99c990 · authored 2026-02-16T18:38:15+01:00 · agent claude-code · model sonnet

Sources mentioning this language

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

Related languages

Dyna (0.20)Elsa (0.20)Mesa (0.20)Balsa (0.18)Bossa (0.18)

LLM-contributed programs

Rock Paper Scissors

Provenance: commit b93d99c990 · authored 2026-02-16T18:38:15+01:00 · agent claude-code · model sonnet · WebSearch enabled
code.dusa · added: 2026-02-16T17:37:12Z
# Rock, paper, scissors

# We can play the regular version...
outcome rock crushes scissors.
outcome scissors cuts paper.
outcome paper covers rock.

# ...or choose to play the expanded variant
variant is { normal, expanded }.
outcome rock crushes lizard :- variant is expanded.
outcome lizard poisons spock :- variant is expanded.
outcome spock smashes scissors :- variant is expanded.
outcome scissors decapitates lizard :- variant is expanded.
outcome lizard eats paper :- variant is expanded.
outcome paper disproves spock :- variant is expanded.
outcome spock vaporizes rock :- variant is expanded.

player player1.
player player2.
move Move :- outcome Move _ _.

#builtin INT_PLUS plus.
round 1.
plays P N is? Move :- round N, player P, move Move.

# If the players make the same move, we go to the next round
round (plus Round 1) :-
  plays player1 Round is Move,
  plays player2 Round is Move.

# If the players make different moves, outcomes tells us who won.
# The "wins" and "round" constants are just a cheap hack to make
# the result look like a sentence without string concatenation.
eventually Winner "wins in round" Round "when" Move1 Defeats Move2 :-
  outcome Move1 Defeats Move2,
  plays Winner Round is Move1,
  plays _ Round is Move2.

# Only return games where there are three or more rounds
#demand round 3.

Contribute — propose a file extension

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