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)
The profiling method measures disk activity at the Linux block layer rather than tracking every time a thread is switched off the CPU. eBPF hooks record a request’s submitting process and user-space stack, then match its completion to calculate I/O time. This captures synchronous and asynchronous operations, including libaio, io_uring, page-cache misses, direct I/O, and fsyncs. Each stack is associated with three measures: time spent on I/O, bytes read, and bytes written. Together, they distinguish a slower device from an application doing more disk work, and show which functions are responsible. Because the data uses the existing CPU-profile storage format, it adds little storage cost.
To limit overhead, the profiler takes at most one stack sample per CPU per millisecond and uses that sample to estimate nearby requests’ counts, bytes, and latency. Totals remain accurate, while attribution is approximate; kernel writeback performed on an application’s behalf is not attributed to the original writer. Tests found negligible impact on PostgreSQL workloads and high-rate fio, with roughly 1 MB of additional agent memory. A retention job on a MySQL cluster demonstrates the diagnostic value: deleting old rows increased disk activity, doubled query latency, and slowed a service by about 20%. Flame graphs separated the writer’s DELETE work from replica appliers and traced reads to cold pages fetched during index scans and row deletion. The profiles can be compared with a pre-incident period and linked to volume charts.
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.