Back to browse
GitHub Repository
1 starsShell

Database Queries from Brainfuck

by tradrich·Mar 8, 2026·2 points·1 comment

AI Analysis

●●●BangerWizardryBig BrainRabbit Hole

SQLite queries in Brainfuck via raw bytes and Linux pipes, no C helpers.

Strengths
  • Wire-protocol-level approach means zero SQLite modification; reads/writes go straight to .db files.
  • Genuinely inventive constraint: proves minimal languages can do database work through pure system plumbing.
  • Real implementation with schema walking, table scans, SELECT projection, and INSERT/UPDATE/DELETE, not toy demo.
Weaknesses
  • Scope is deliberately narrow: single-table, no WHERE, no joins, no indexing; not a practical tool.
  • Brainfuck compilation size issue (gcc failure) hints at fragility; not clear how far this scales.
Target Audience

Language designers, constraint enthusiasts, AI/automation researchers, esoteric programming hobbyists

Post Description

Experiment: interacting with SQLite databases from Brainfuck, without modifying SQLite or writing C helpers.

The idea is to see how far a deliberately minimal language can be pushed using only core Linux primitives (pipes, dd, file operations) and direct interaction with SQLite database files.

Brainfuck was chosen because it is intentionally extreme. Even compiling the generated code turned into an adventure: the Brainfuck compiler emits C, and the output was so large that gcc couldn't compile it, though clang could.

This is the sort of project no sane developer would normally attempt. With AI assistance, however, it became feasible to explore in part of a Saturday.

Similar Projects

Data●●●Banger

SlothDB is a super fast embedded SQL database

1.3MB WASM database beats DuckDB 5x on 10M row analytics, runs in Cloudflare Workers.

WizardryBig BrainZero to One
souravroy78
221mo ago
Productivity●●Solid

Search for Apple Messages

Finally searches iMessage properly by reading the database Apple won't expose.

Solve My ProblemCozy
dmd
303mo ago