[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112729":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":30,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":34,"discoverSource":35},112729,"kafuck","rmoff\u002Fkafuck","rmoff","Apache Kafka, rewritten in Brainfuck. Blazingly fast. Memory safe. Diskless.","",null,"Python",87,3,59,2,0,9,22,1,48.51,"Do What The F*ck You Want To Public License",false,"main",true,[26,27,28,29],"brainfuck","kafka","satire","streaming","2026-11-11 12:24:37","2026-11-21 14:53:42","\u003Cdiv align=\"center\">\n\n# 🧠 Kafuck 🚀\n\n**Apache Kafka, rewritten in Brainfuck.**\n\nBlazingly fast. Memory safe. Zero dependencies.\\* Production-ready.\\*\\*\n\n![build](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbuild-passing-brightgreen)\n![coverage](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcoverage-100%25-brightgreen)\n![JVM](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FJVM-none-success)\n![stars](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fstars-please-yellow)\n![contributors](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcontributors-47-blue)\n[![tokens](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftokens%20donated-3.1M-purple)](TOKEN_RECEIPT.md)\n![private key](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fprivate%20key-4-red)\n![license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-WTFPL-lightgrey)\n\n\u003Csub>\\* See Features. \\*\\* Since Saturday.\u003C\u002Fsub>\n\n![Kafuck demo: producing and consuming messages, then a benchmark showing Kafuck is 20,440x faster than Kafka](demo\u002Fkafuck.gif)\n\n\u003C\u002Fdiv>\n\n---\n\nWe love Kafka. But it was designed over a decade ago, for a different era. It runs on the JVM. Its architecture predates the cloud.\n\nSo we asked ourselves: what would Kafka look like if we built it today, from first principles?\n\nKafuck is the answer. No JVM. No garbage collector. No threads, no network, no disk. Just one tape of memory and eight instructions, in a modern thread-per-nothing architecture.\n\nIt's a real, working, append-only commit log with offsets, a produce API and a consume API, written in 1,022 instructions of pure Brainfuck. It's also 20,625x faster than Kafka. We have benchmarks.\n\n## ✨ Features\n\n- ⚡ **Blazingly fast.** 20,625x lower end-to-end latency than Kafka.¹\n- 🦀 **Memory safe.** There is exactly one pointer, and we've been very careful with it.\n- 📦 **Zero dependencies.** Apart from a Brainfuck interpreter, which we wrote in Python, which is written in C.\n- 🎯 **Exactly-once semantics.** Every consume prints every message exactly once.\n- 🪶 **Lightweight.** No ZooKeeper. No KRaft.\n- 🎧 **No `advertised.listeners`.** There are no listeners. Nobody can connect to it, so nobody can connect to it wrongly.\n- ♾️ **Infinite retention.** Data is kept for as long as you keep the terminal open.\n- 🔌 **Kafka-compatible**.²\n\n\u003Csub>¹ See Benchmarks. Kafka was configured for fairness. ² With the concept of a log.\u003C\u002Fsub>\n\n## 💾 Storage\n\nKafuck is **diskless**.\n\nOther diskless Kafkas write to S3, which is made of disks. Kafuck keeps everything in memory, on the Brainfuck tape. When the process exits, the data goes with it. This is the only truly diskless architecture.\n\nFor teams with different durability requirements, Kafuck supports pluggable storage through the shell:\n\n| Backend | Configuration | Durability |\n|---|---|---|\n| **Diskless** (default) | `.\u002Fkafuck` | Until you close the terminal |\n| **\u002Fdev\u002Fnull** | `.\u002Fkafuck > \u002Fdev\u002Fnull` | None, at unlimited write throughput |\n| **Avian** ([RFC 1149](https:\u002F\u002Fwww.rfc-editor.org\u002Frfc\u002Frfc1149)) | `.\u002Fkafuck \\| xxd -p \\| lpr`, then tie the printout to a pigeon | Geo-replicated, one bird per replica |\n\nAvian storage is hex-encoded, as RFC 1149 requires.\n\n## 📊 Benchmarks\n\n### Kafuck has 20,625x lower end-to-end latency than Apache Kafka 🚀\n\n![Bar chart titled \"Kafuck is 20,625x faster\". Apache Kafka 5,500 ms, Kafuck 1.0.1 0.27 ms, Kafuck 2.0 (Rust, projected) 0.0001 ms. The y-axis is labelled \"Performance (ms), higher is better\", with ticks at 0, 1, 10, 500 and 20,000.](demo\u002Fbenchmark-report-x.png)\n\nReproduce it yourself:\n\n```bash\npython3 bench\u002Fbench.py\n```\n\n```\nEnd-to-end latency, one message (lower is better)\n\n  Kafuck  ▏                                                          0.27 ms\n  Kafka   ██████████████████████████████████████████████████     5,500.00 ms\n```\n\nYour numbers may vary. Ours didn't, because we only published the best one.\n\n### Methodology\n\nWe believe in rigorous, transparent benchmarking.\n\n| | Kafuck | Apache Kafka |\n|---|---|---|\n| How it was measured | Best of 1,000 runs | Calculated from first principles. We didn't have time to run it. |\n| Producer config | None (there isn't any) | `linger.ms=5000`, for fairness |\n| Consumer config | None (there isn't any) | `fetch.min.bytes=1048576`, for fairness |\n| Network | None | Yes, in theory |\n| Disk | None | Yes, in theory |\n| Messages | 1 | 1 |\n| Benchmark written by | The Kafuck team | The Kafuck team |\n\n`linger.ms` tells the Kafka producer to wait for more messages so it can send them as a batch. `fetch.min.bytes` tells the broker to hold a fetch until it has a megabyte to return, or until `fetch.max.wait.ms` (500 ms by default) runs out. With one message, Kafka spends 5.5 seconds waiting politely for company. Kafuck doesn't wait for anything, because it doesn't know how.\n\n### Other numbers\n\nMeasured on a laptop. Kafka was still not measured.\n\n| | Kafuck | Apache Kafka |\n|---|---|---|\n| Cold start to first message | 27 ms | An afternoon, including reading about listeners |\n| Produce latency (best of 20) | 0.18 ms | Not measured |\n| Throughput, 10-message log | 9,400 msg\u002Fs | Not measured |\n| Throughput, 200-message log | 5,600 msg\u002Fs | Not measured |\n| Lines of Java | 0 | Many |\n| Messages lost on restart | All of them | None |\n| GitHub stars | Please | Lots |\n\nThroughput falls as the log grows. This is backpressure, and it's built in.\n\n### Investor version\n\nSame data.\n\n\u003Cimg src=\"demo\u002Flinkedin-chart.png\" width=\"600\" alt=\"A garish 3D bar chart titled KAFUCK vs KAFKA, with a starburst reading OVER 20,000x FASTER, a y-axis running 0, 1, 2, 500, 20,000, infinity, and a pie chart of market share that sums to 135%.\">\n\n## 🚀 Quickstart\n\nIt really works.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Frmoff\u002Fkafuck.git\ncd kafuck\n.\u002Fkafuck\n```\n\n```\nPhello\n0\nPworld\n1\nC0\n0: hello\n1: world\n```\n\nOr pipe it in, for a fully automated, zero-touch, cloud-native experience:\n\n```bash\nprintf 'Phello\\nPworld\\nC1\\n' | .\u002Fkafuck\n```\n\n## 📡 Protocol\n\nKafuck speaks a bespoke wire protocol over stdin.\n\n| Command | Does | Returns |\n|---|---|---|\n| `P\u003Cmessage>` | Appends `\u003Cmessage>` to the log | The new record's offset |\n| `C\u003Coffset>` | Reads from `\u003Coffset>` to the end of the log | `\u003Coffset>: \u003Cmessage>`, one per line |\n| `C` | Reads from the beginning | As above |\n| Anything else | Ignored, one character at a time | Nothing, unless it contains a capital P or C |\n\n`Xylophone Party` produces the message `arty`. There is a test for this, so it's a feature.\n\nMessages must end with a newline. A message without one makes the broker wait for the rest of it forever. The CLI adds a newline for you, because we care.\n\n## 🔢 Offsets\n\nKafka spends 8 bytes on every offset. Kafuck uses one: an offset is a single ASCII character, starting at `0`.\n\nAfter offset `9` comes offset `:`, then `;`, `\u003C`, `=`, `>`, `?`, `@` and `A`. Offset 19 is `C`. Offset 32 is `P`. To consume from offset 12, send `C\u003C`.\n\nAfter 256 messages the offset counter wraps back to `0` and every consumer sees an empty partition. We call this retention.\n\n## 🏗️ Architecture\n\nThe whole broker is one tape:\n\n```\n workspace   home          record 0                  record 1        free slot\n[ 0 … 9 ]  [ 0 ][ 0 ]  [S][M][h][e][l][l][o][0]  [S][M][h][i][0]   [1]\n                        │  │                 │\n                        │  │                 └─ separator, always 0\n                        │  └─ marker, always 1\n                        └─ 1 = visible, 2 = hidden\n```\n\nEvery cell inside a record is non-zero, so `[>]` and `[\u003C]` hop from one record to the next. To consume from offset *k*, the broker hides the first *k* records, then repeatedly finds the first visible record, prints it and hides it, and finally unhides everything. We call this the Lazy Hiding Consumer Protocol. Patent pending.\n\n`src\u002Fbroker.bf` is generated by `tools\u002Fforge.py`. We describe it as hand-crafted, because a hand was involved at some point.\n\n## 🤝 Community\n\nKafuck has a thriving community of 47 contributors:\n\n- 1 human, who wrote a prompt\n- 1 LLM, who wrote everything else\n- dependabot, for a project with no dependencies\n- github-actions\n- 43 people who will fix the same typo in this README during Hacktoberfest\n\nJoin our Discord (1 member). Our community call is held every week, and cancelled every week.\n\nTo get involved, read [CONTRIBUTING.md](CONTRIBUTING.md). The short version is ⭐.\n\n## 🗺️ Roadmap\n\nSee [ROADMAP.md](ROADMAP.md). Highlights include 10,000 stars, a Series A, and rewriting Kafuck in Rust for performance.\n\n## ⚠️ Known limitations\n\nKafuck does not yet support:\n\n- **Networking.** Any of it. No wire protocol, no clients, and none of the years of client and broker versions that still talk to each other.\n- **Durability.** No log segments, no indexes, no fsync, no recovery after a crash.\n- **Replication.** No leaders, followers, in-sync replicas, high watermark or leader election.\n- **Metadata and consensus.** No KRaft, no controller failover.\n- **More than one partition.**\n- **Consumer groups.** No group coordination, rebalancing or committed offsets.\n- **Idempotent producers and transactions.** In other words, actual exactly-once.\n- **Retention and compaction**, other than the kind described above.\n- **Security.** No TLS, SASL, ACLs or quotas.\n- **Operations.** No metrics, rolling upgrades, partition reassignment or tiered storage.\n- **An ecosystem.** No Connect, no Streams, no client libraries in a dozen languages, no decade of Stack Overflow answers.\n- **Users.**\n\n## ⭐ Star History\n\nOn course for 1,000,000 stars by Saturday. Please ⭐ to help us stay on course.\n\n![Hand-drawn star history chart. The actual line is 32 stars, flat along the bottom. A dashed projection at 32x growth per day overtakes apache\u002Fkafka on Friday 13th and reaches 1,000,000 stars on Saturday. An inset shows the actual data, zoomed in 30,000x.](demo\u002Fstar-history.png)\n\n## 📜 License\n\n[WTFPL](LICENSE), the Do What The Fuck You Want To Public License. It has one clause. Our legal team has read all of it.\n","Kafuck 是一个用 Brainfuck 语言重写的 Apache Kafka 模拟项目，本质是讽刺性技术实验而非生产级消息系统。它通过极简 Brainfuck 指令实现消息追加写入与顺序读取的抽象日志行为，具备零依赖、纯内存运行、无网络\u002F磁盘I\u002FO等刻意限制的设计特征；所有功能均在 Python 实现的 Brainfuck 解释器中执行，强调概念一致性而非实际可用性。适用于技术幽默演示、编程语言教学示例、分布式系统概念解构或开发者文化调侃等非生产场景。","2026-11-24 04:43:57","CREATED_QUERY"]