PureBasic
1 program
Added 2025-10-22T12:11:42Z
Model: anthropic/claude-3.5-sonnetTemp: 0.4
Evidence
Report issue
View issues
Aliases: pb
Provenance: commit 95da577c28 · authored 2025-10-22T14:11:42+02:00 · model anthropic/claude-3.5-sonnet
Sources mentioning this language
7 sources · pl_id:
pl/purebasicWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | structured · imperative · procedural |
|---|---|
| Designed by | Fantaisie Software |
| First appeared | 1998 |
| License | Trialware |
| Homepage | http://www.purebasic.com |
Extensions claimed by this language
6 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 |
|---|---|---|---|
.pb | linguist | primary | 5.3M files |
.pbi | linguist | secondary | 602.8K files |
.pb | wikipedia | proposed | 5.3M files |
.pbf | wikipedia | proposed | 62.0M files |
.pbi | wikipedia | proposed | 602.8K files |
.pbp | wikipedia | proposed | 10.4K 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 95da577c28 · authored 2025-10-22T14:11:42+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
Structure TSnake
x.i
y.i
dx.i
dy.i
length.i
List segments.TPoint()
EndStructure
Structure TPoint
x.i
y.i
EndStructure
#CELL_SIZE = 10
#GRID_WIDTH = 40
#GRID_HEIGHT = 30
Global snake.TSnake
Global food.TPoint
Procedure InitGame()
snake\x = #GRID_WIDTH / 2
snake\y = #GRID_HEIGHT / 2
snake\dx = 1
snake\dy = 0
snake\length = 3
ClearList(snake\segments())
food\x = Random(#GRID_WIDTH - 1)
food\y = Random(#GRID_HEIGHT - 1)
EndProcedure
Procedure OpenWindow()
OpenWindow(0, 0, 0, #GRID_WIDTH * #CELL_SIZE, #GRID_HEIGHT * #CELL_SIZE, "Snake", #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
EndProcedure
InitGame()
OpenWindow()
Repeat
event = WaitWindowEvent(10)
If event = #PB_Event_KeyDown
Select EventKey()
Case #PB_Key_Left
If snake\dx = 0
snake\dx = -1
snake\dy = 0
EndIf
Case #PB_Key_Right
If snake\dx = 0
snake\dx = 1
snake\dy = 0
EndIf
EndSelect
EndIf
snake\x + snake\dx
snake\y + snake\dy
StartDrawing(WindowOutput(0))
Box(0, 0, WindowWidth(0), WindowHeight(0), RGB(0, 0, 0))
Circle(food\x * #CELL_SIZE + #CELL_SIZE/2, food\y * #CELL_SIZE + #CELL_SIZE/2, #CELL_SIZE/2, RGB(255, 0, 0))
ForEach snake\segments()
Box(snake\segments()\x * #CELL_SIZE, snake\segments()\y * #CELL_SIZE, #CELL_SIZE, #CELL_SIZE, RGB(0, 255, 0))
Next
StopDrawing()
Until event = #PB_Event_CloseWindow