Show HN: NES Contra (1987) port (ASM –> C and then C –> WebAssembly)
A browser-based port of the 1987 NES game Contra converts its assembly code to C and then WebAssembly. It supports solo play and online two-player games. (epoyraz.github.io)
Gravity is the JIT query engine introduced in pgrust v0.4-beta, built to turn analytical SQL into machine code close to the hardware’s practical speed limit. Rather than incrementally tuning an existing executor, its developers first established a ceiling: hand-optimized, multithreaded Rust programs running directly over pgrust’s columnar storage. Those programs ran about four times faster than existing analytical databases, becoming a performance target for the engine. Gravity’s runtime compiler aims to come within 20% of that baseline while retaining Postgres’s SQL dialect and type system.
Compilation proceeds from a standard Postgres plan through a pipeline graph and a Lisp-like intermediate representation to target assembly. Pipelines fuse scans, filters, projections, and aggregation, while the IR lets the compiler apply query-specific optimizations such as inlining, late materialization, and register allocation. The engine compiles queries in under a millisecond and, across analytical workloads, runs within 10-20% of the hand-written Rust baseline. On ClickBench it reaches up to three times ClickHouse’s speed; against pgrust’s Volcano row executor on the same data, it is 102 times faster cold and 499 times faster hot. Because optimizations can fail on less obvious query forms or types, the team catalogued them and built a fuzzer to check that they apply across varied query shapes and Postgres types.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
A browser-based port of the 1987 NES game Contra converts its assembly code to C and then WebAssembly. It supports solo play and online two-player games. (epoyraz.github.io)
PostgreSQL’s TOAST storage made the table much smaller, and counting or scanning rows was faster than with the larger uncompressed table. But reading a field inside every toasted value required far more buffer reads, showing that TOAST can trade space savings for slower access to large values. (pgedge.com)
Large GROUP BY hash tables cause frequent slow RAM accesses, leaving CPUs stalled even when monitoring shows 100% usage. Processing data in smaller chunks can improve cache use and speed up aggregation, even if it requires more CPU work. (pivotlake.io)
Enlightenment 0.28 adds initial NetBSD support, a NetworkManager module, and native PipeWire mixer support while retaining PulseAudio compatibility. The release also improves window management, display handling, and X11 and Wayland support, alongside numerous fixes and code cleanups. (phoronix.com)
Nonna is a TypeScript dependency-injection framework and ahead-of-time compiler that avoids reflection and runtime dependencies. It supports Node.js, Deno, Bun, edge runtimes, and major frontend frameworks, with request scoping and deterministic lifecycle hooks. (nonna.nodeboot.io)
Jepsen found 96 bugs in ParticleDB versions 1.1.4 through 1.1.18.11.rc-22, including crashes, data loss, and serious transaction anomalies. Most issues were fixed, but committed writes could still disappear and serializable transactions still had anomalies; Orkes says a later release resolves the remaining problems. (jepsen.io)
Today's best Hacker News stories, summarized and screenshotted, one email a day.