MoofTCP – A modern replacement for MacTCP on 68k Macs
MoofTCP is a drop-in replacement for Apple’s MacTCP networking software on System 6 and 68000-based Macs. The open-source project is hosted on GitHub under the MIT license. (github.com)
A Rust-based chess analysis service began taking minutes to insert roughly 40,000 JSON records into SQLite, despite storage normally being expected to take milliseconds. The CPU-bound slowdown appeared only in Linux builds: SQLite was compiled using Zig’s cross-platform C compiler, while the developer’s Mac build did not use Zig. The cause was a rewrite of several C string functions in Zig’s standard-library replacement. In particular, the rewritten strspn measured the full remaining string length each time it was called. SQLite’s tokenizer repeatedly calls such functions as it advances through text, so each step rescanned a shrinking suffix. Tokenizing a 1.2 MB input was about 12,000 times slower, and the cost grew quadratically with input size.
The problem illustrates the “Shlemiel the Painter” trap: a locally simple operation becomes ruinously expensive when repeated, because it redoes work instead of carrying forward useful state. Similar issues affect rewrites of strcspn, strpbrk, and strstr. The developer first reduced the cost by stripping whitespace from JSON before passing it to SQLite, then moved Linux builds to Linux containers to avoid the affected toolchain. The account emphasizes that performance failures can hide in basic library routines and emerge only under realistic workloads; profiling exposed the unexpected bottleneck. It also recalls an earlier Firefox string-concatenation problem, where repeated allocation and copying hurt benchmark performance until buffer over-allocation reduced the repeated work. The broader lesson is that fundamental algorithmic complexity still matters, even in modern tools and seemingly trivial code.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
MoofTCP is a drop-in replacement for Apple’s MacTCP networking software on System 6 and 68000-based Macs. The open-source project is hosted on GitHub under the MIT license. (github.com)
Declarative Dragging lets developers define which application states a draggable element can reach, then automatically generates drop zones and animations. The Dragology library implements this model-driven, composable approach for SVG web interfaces, reducing the effort needed to build rich drag-and-drop interactions. (declarative-dragging.github.io)
A gym member reverse-engineered the gym’s Flutter app to isolate its changing check-in QR code from an unwanted social feed. They found the app could generate valid codes offline and used code-inspection tools and AI assistants to investigate how it worked. (shayon.work)
Window Sweaters is a macOS menu-bar app that adds knitted borders to desktop windows. The open-source project is built for desktop customization and window management. (github.com)
FastBCP 1.6 exports SQL Server tables directly from .bak backups to Parquet without restoring them or running SQL Server. On a 320 GB backup, it exported a 175-million-row table in 29.6 seconds using 24 threads. (blog.arpe.io)
A smarter output buffer can display complete lines promptly while batching writes for much better performance than traditional line buffering. This avoids slow per-line output in tools such as archive extractors without hiding their progress. (nullprogram.com)
Today's best Hacker News stories, summarized and screenshotted, one email a day.