Odin
1 program
Added 2025-10-22T10:08:02Z
Model: anthropic/claude-3.5-sonnetTemp: 0.4
Evidence
Report issue
View issues
Aliases: odin-lang
Provenance: commit 9157db4fc9 · authored 2025-10-22T12:08:02+02:00 · model anthropic/claude-3.5-sonnet
Sources mentioning this language
6 sources · pl_id:
pl/odinExtensions claimed by this language
2 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.odin | linguist | primary | 117.7K files |
.odin | pygments | primary | 117.7K files |
Related languages
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.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Simple Snake Game
Provenance: commit 9157db4fc9 · authored 2025-10-22T12:08:02+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
package snake
import "core:fmt"
import "core:math/rand"
import "vendor:sdl2"
WINDOW_WIDTH :: 800
WINDOW_HEIGHT :: 600
TILE_SIZE :: 20
Direction :: enum {
UP,
DOWN,
LEFT,
RIGHT,
}
Snake :: struct {
x, y: i32,
dx, dy: i32,
direction: Direction,
length: i32,
tail_x: [100]i32,
tail_y: [100]i32,
}
main :: proc() {
sdl2.Init(sdl2.INIT_VIDEO)
window := sdl2.CreateWindow("Snake", sdl2.WINDOWPOS_CENTERED, sdl2.WINDOWPOS_CENTERED, WINDOW_WIDTH, WINDOW_HEIGHT, sdl2.WINDOW_SHOWN)
renderer := sdl2.CreateRenderer(window, -1, sdl2.RENDERER_ACCELERATED)
snake := Snake{
x = WINDOW_WIDTH/2,
y = WINDOW_HEIGHT/2,
dx = TILE_SIZE,
dy = 0,
direction = .RIGHT,
length = 1,
}
food_x := rand.int31_max(WINDOW_WIDTH/TILE_SIZE) * TILE_SIZE
food_y := rand.int31_max(WINDOW_HEIGHT/TILE_SIZE) * TILE_SIZE
game_over := false
for !game_over {
event: sdl2.Event
for sdl2.PollEvent(&event) {
#partial switch event.type {
case .QUIT:
game_over = true
case .KEYDOWN:
#partial switch event.key.keysym.sym {
case .UP:
if snake.direction != .DOWN {
snake.direction = .UP
snake.dx = 0
snake.dy = -TILE_SIZE
}
}
}
}
}
}
Disambiguation rules
Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
| Rule | Ext | Kind | Predicates (truncated) |
|---|---|---|---|
h/linguist/.odin/1 | .odin | predicates | [{"kind": "any", "regexes": ["package\\s+\\w+|\\b(?:im|ex)port\\s*\"[\\w:./]+\"|\\w+\\s*::\\s*(?:proc|struct)\\s*\\(|^\\s*//\\s"]}] |