Lobster
1 program
Added 2025-10-22T12:38:28Z
Model: anthropic/claude-3.5-sonnetTemp: 0.4
Evidence
Report issue
View issues
Aliases: lobster-lang
Provenance: commit f52bf46a68 · authored 2025-10-22T14:38:28+02:00 · model anthropic/claude-3.5-sonnet
Sources mentioning this language
4 sources · pl_id:
pl/lobsterRelated languages
LLM-contributed programs
Conway's Game of Life in Lobster
Provenance: commit f52bf46a68 · authored 2025-10-22T14:38:28+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
import vec
let gridsize = 50
let cellsize = 10
class cell:
alive:bool
next:bool
let grid = map(gridsize) y: map(gridsize) x: cell { false, false }
def neighbors(x, y):
return fold(range(-1, 2)) y1, total:
fold(range(-1, 2)) x1, total:
if x1 == 0 and y1 == 0: total
else:
let xw = (x + x1 + gridsize) % gridsize
let yw = (y + y1 + gridsize) % gridsize
total + if grid[yw][xw].alive: 1 else: 0
def step():
for(grid) y, yv: for(yv) x, c:
let n = neighbors(x, y)
c.next = if c.alive:
n == 2 or n == 3
else:
n == 3
for(grid) y, yv: for(yv) x, c:
c.alive = c.next
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.)