Brat

1 program Added 2026-02-09T09:25:42Z Agent: claude-codeModel: opusWebSearch: enabled Evidence Report issue View issues
Aliases: —
Provenance: commit 60e3772066 · authored 2026-02-09T10:26:21+01:00 · agent claude-code · model opus

Sources mentioning this language

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

Related languages

Bracmat (0.50)Braid (0.30)Brain (0.30)Brachylog (0.21)Brainfork (0.21)

LLM-contributed programs

Balanced Brackets

Provenance: commit 60e3772066 · authored 2026-02-09T10:26:21+01:00 · agent claude-code · model opus · WebSearch enabled
code.brat · license: GFDL-1.2 · added: 2026-02-09T09:25:42Z
string.prototype.balanced? = {
  brackets = []
  balanced = true

  my.dice.each_while { c |
    true? c == "["
      { brackets << c }
      { true? c == "]"
        { last = brackets.pop
          false? last == "["
          { balanced = false }
        }
      }

    balanced
  }

  true? brackets.empty?
    { balanced }
    { false }
}

generate_brackets = { n | (n.of("[") + n.of("]")).shuffle.join }

1.to 10 { n |
  test = generate_brackets n

  true? test.balanced?
    { p "#{test} is balanced" }
    { p "#{test} is not balanced" }
}

Contribute — propose a file extension

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