尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Nine classic demoscene effects in thirteen languages, from C and Rust to SQL, Perl and x86 assembly, running live in your browser and drawing exactly the same pixels.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗How do you make a plasma in Perl? A tunnel in SQL? A fire in raw WebAssembly?
Nine classic demoscene effects — starfield, tunnel, plasma, rotozoom, metaballs, synthwave grid, fire, Mandelbrot, a logo card — written in thirteen languages and run live, side by side, in your browser. Every pixel is computed on the CPU, and every port draws the same pixels as the C reference, bit for bit. Babel for the languages, "-tro" for the intro.
Live: https://babeltro.storagebits.workers.dev
The point is not which language wins. It is what each one makes you write to produce the same image: float widths, fused multiply-adds, float-to-int conversion, bounds checks, evaluation order, the maths library — and, for some, the absence of a maths library.
| Language | Directory | How it gets into the browser | Effects |
|---|---|---|---|
| Go | go/ | wasm, Go's own backend | 9 |
| TinyGo | ports/tinygo/ | the same Go files, compiled through LLVM | 9 |
| C | ports/c/ | clang + wasi-libc — the reference | 9 |
| C++ | ports/cpp/ | clang + libc++, C++23 | 9 |
| Rust | ports/rust/ | wasm32-unknown-unknown, no dependencies | 9 |
| Zig | ports/zig/ | wasm32-freestanding, comptime tables | 9 |
| AssemblyScript | ports/assemblyscript/ | asc, no imports | 9 |
| Raw WebAssembly | ports/wat/ | written directly in WAT, no compiler; its own sin/atan2/exp, 14.5 KB | 9 |
| x86 assembly | ports/x86/ | NASM machine code on a tiny 386+SSE emulator in wasm | 9 |
| JavaScript | ports/js/ | plain ES modules, Math.fround everywhere | 9 |
| Python | ports/python/ | CPython + NumPy in wasm (Pyodide) | 9 |
| Perl | ports/perl/ | Perl 5.42 in wasm (zeroperl) | 9 |
| SQL | ports/sql/ | SQLite in wasm (sql.js), one query per frame | 9 |
Every effect a port implements is byte-identical to the reference at every size and rung tested. The one exception is by design: the finale spells the language's name, and its layout follows the name's width.
A few things the ports found:
sin. The raw WAT port computes its sine table
with a Cody-Waite reduction and a Taylor series: all 8193 entries match
Go's bit for bit.unpack 'f', pack 'f' after every
float32 operation, a third of its frame time.Each port's NOTES.md says what it does differently, effect by effect.
cd web
npm install
../scripts/build-all.sh # builds every wasm port into web/public/wasm
npm run dev
The ports need their toolchains (LLVM with wasi-libc, Rust, Zig, TinyGo,
AssemblyScript, wabt); the Perl port fetches its interpreter with
ports/perl/fetch.sh. Python, Perl and SQL bring their interpreters as
wasm and need nothing to build.
Keys: Space pause, ←/→ effect, . one frame, R restart, D
differences (ladders), Esc home.
node tools/check.mjs go rust js # every effect against C
node tools/check.mjs --scene 2 --step 1 python # one rung of a ladder
node tools/check.mjs --png /tmp/diff --size 160x90 perl
How it was made: the prompts are in PROMPTS.md and every
decision is in DECISIONS.md. The contract every port
follows, and how to add a language, is spec/ABI.md. What could come next is in
docs/ROADMAP.md. go/ also still builds the original
native demo (a window, a HUD, a worker pool): see go/README.md.
MIT — see LICENSE.