HackerNews Digest

August 09, 2026

My server is a phone now

The author replaced a low‑cost Hetzner VPS with a CMF Phone 1 (ARM64, 8 GB RAM, 5G, Wi‑Fi 6, battery) to host personal services. An initial attempt to flash a full Linux distro failed due to broken Wi‑Fi, Bluetooth, GPU, and power‑management drivers, so the phone was restored to stock Android. Termux runs as the host environment, providing OpenSSH, runit, Caddy, Cloudflared, and Tailscale. A persistent wake lock and exclusion from Android’s background restrictions keep the device active. Applications are deployed as OCI ARM64 images; early versions used proot‑distro for a Debian‑like filesystem, but latency‑sensitive Chrome‑based Surf required a rooted chroot to bypass proot overhead. Ansible manages the entire state: versioned OCI digests, atomic symlinks, runit services, health checks, and encrypted secrets via Vault. Ingress is handled by Cloudflare Tunnel (outbound only) and Tailscale for admin access; Surf’s TLS is tunneled inside a WebSocket to preserve end‑to‑end encryption. A lightweight observability service aggregates metrics and logs into a Vue dashboard. The setup offers low power consumption, UPS‑style battery backup, and reproducible deployment, suitable for modest personal infrastructure when a rooted ARM64 phone is available.

Read full article →

Comments reflect a mixed view of repurposing phones as home servers. Participants note technical hurdles such as bootloader unlocking, rooting, limited kernel support, and difficulty binding to ports, which can affect performance and reliability. Concerns about battery safety and flash‑storage durability are common, while some praise the hobbyist appeal and potential for niche uses like sensor data collection. Alternatives including modest desktop PCs, NUCs, or fanless Linux boxes are frequently cited as more practical, cost‑effective, and easier to maintain for continuous service.

Read all comments →

Os8088: A powerful Mac-like OS for the IBM XT, 286, 386

os8088 is a hobby‑developed operating system that boots directly from a floppy’s first sector into a graphical desktop without DOS or a command line. The 512‑byte bootloader loads a 40 KB kernel, which detects the display adapter, switches to graphics mode, adopts the video card’s 8×8 character set, and renders a Macintosh‑style UI: draggable windows with rubber‑band outlines, pull‑down menus, close/minimize boxes, floppy‑drive icons, and a bottom dock showing tiles for running programs. Applications are loaded from a second floppy and run as first‑class processes, with pre‑emptive or cooperative scheduling selectable via the Control Panel. The system supports multiple concurrent programs (e.g., Notepad, Clock, Bounce, Task Manager, Minesweeper) and provides a file manager, CPU usage graph, and RAM usage indicator. All functionality fits within 256 KB of RAM on an Intel 8086/8088 CPU. The source consists of 112,792 lines of NASM assembly, intended for study and modification.

Read full article →

The comments collectively express admiration for the technical achievement of a real‑mode 8086 operating system written in assembly, noting its similarity to historic systems like Visi On and Atari GOS and appreciating the creativity required. Several remarks highlight the role of AI in generating the code, acknowledging both its impressive demonstration and the broader discourse on AI‑produced software. Viewers also discuss hardware constraints, potential feature extensions such as networking or additional applications, and the nostalgic appeal of running a Mac‑like desktop on vintage hardware.

Read all comments →

Improving Heuristics for A* Pathfinding

Improving A* performance can be achieved by replacing simple distance heuristics with a landmark‑based “differential” heuristic derived from the triangle inequality. For each selected landmark L, pre‑compute the shortest‑path cost from every node to L (using Dijkstra or BFS on reversed edges). The heuristic for a node X relative to start B becomes

h(B,X) = max { |cost(L_i,B) − cost(L_i,X)| }

over all landmarks L_i, optionally combined with a base Manhattan/Euclidean estimate. This provides a tighter lower bound than raw Euclidean distance, directing A* toward the goal and reducing explored nodes. Landmark placement is critical: a landmark should lie “past” typical goal locations; multiple landmarks increase coverage. Placement can be automated by sampling many random start‑goal paths and selecting nodes that improve the bound for many pairs, ensuring spatial dispersion. Updating landmark costs when edge weights change is required to avoid overestimation. Empirical tests on Dragon Age, Cogmind, and maze maps show substantial blue‑area reductions (nodes no longer searched) with only modest code changes.

Read full article →

The comments express strong approval of the article and the author’s persistence, highlighting Red Blob Games as a valuable source and rating the post highly. Readers show enthusiasm for A* and related concepts, suggesting deeper exploration of landmark bounds, heuristic quality, and potential performance guarantees. A typographical error is noted as confusing, and some expected coverage of jump‑point search was missing. Overall, the feedback is positive, appreciative, and eager for more technical detail on path‑finding heuristics.

Read all comments →

Fastmail offers EU data region

Fastmail now lets users designate the European Union as the primary residency for their email data, stored on Fastmail‑owned servers in Amsterdam. The EU primary copy is encrypted at rest and accessed by desktop, web, and mobile apps; if unavailable, traffic falls back to US sites. A resilient replica of EU data currently resides in a US location, while US accounts keep primary and replica copies in Philadelphia or St Louis, with fallback between those sites. All users have emergency encrypted backups in Philadelphia and shared metadata (email addresses, file storage, linked services) replicated across regions. System logs and third‑party service integrations remain US‑based. Incoming mail is routed preferentially to the region matching the user’s domain or Fastmail regional domain. Users can switch regions via account settings; Fastmail pre‑migrated accounts with European billing addresses to the EU region, while others may request migration. Fastmail, an Australian company, remains subject to Australian law for all data, regardless of location.

Read full article →

Comments show mixed reactions to the introduction of EU‑focused data regions. Many express skepticism, noting that the arrangement offers no legal guarantee that data remains solely in the EU and that U.S.‑based jurisdiction, the Cloud Act, and comparable foreign statutes still permit access to user information. Some users appreciate the symbolic step and the option to keep data geographically closer, while others argue that jurisdiction matters more than physical location and that end‑to‑end encryption, not storage locality, is the true privacy safeguard. Overall, sentiment leans toward cautious acknowledgement of limited practical benefit.

Read all comments →

Shopify replaced Redis with MySQL for inventory reservations–and it scaled

Shopify replaced its Redis‑based inventory‑reservation system with a MySQL implementation that scales to Black‑Friday‑level traffic.

  • Problem: Guarantees during checkout that inventory is neither oversold nor undersold. Redis stored a quantity key per item; DECR/INCR operations were fast but could not be atomically combined with the MySQL inventory ledger, causing consistency gaps and lacking multi‑location awareness.

  • MySQL design: Leveraged MySQL 8 SKIP LOCKED and a “one row per sellable unit” model. A bounded pool of up to 1,000 rows per item/location is kept; reservations select and lock rows with SKIP LOCKED, and a replenishment transaction refills the pool when empty.

  • Key technical choices:
    – Composite primary key (shop_id, inventory_item_id, inventory_group_id, id) to reduce row locks.
    – READ COMMITTED isolation to avoid gap locks during empty‑table selects.
    – Consistent lock ordering across reserve and claim paths to eliminate deadlocks.
    – UNION ALL batching of multi‑item reservations to cut round‑trips.

  • Bottleneck discovery: Monitoring connection usage (via SQL comment tags and ProxySQL aggregation) revealed that non‑reservation checkout code exhausted MySQL connections, not CPU or query latency. Optimizing those paths and raising InnoDB thread concurrency removed the ceiling.

  • Migration: Ran Redis and MySQL in parallel (“shadow mode”) with dual writes, validated correctness under production load, then switched MySQL to be the source of truth via a staged rollout.

Result: MySQL now handles peak reservation throughput with CPU headroom, preserving ACID guarantees and eliminating the need for a separate Redis cluster.

Read full article →

The comments express mixed reactions to the inventory‑reservation design. Several users question the practicality of maintaining a bounded pool of 1,000 rows per item/location, citing scaling concerns and suggesting simpler alternatives such as a single row per cart‑SKU or deducting reservations within a transaction with background cleanup. Opinions are split on the use of Redis versus MySQL, with some viewing the approach as unnecessarily complex while others acknowledge performance gains from reduced reads and transactions. Additional remarks note the blog’s AI‑generated tone and occasional unrelated criticism of Shopify’s leadership.

Read all comments →

Dithered QR Codes

QR codes consist of fixed function patterns for detection and mutable data modules that store encoded bytes. Since data modules are read after alignment, they can be altered to embed low‑resolution images. A common technique subdivides each module into a 3×3 block, using the central cell for data and surrounding cells for a one‑bit picture. Simple thresholding yields harsh noise; ordered dithering (e.g., Bayer) adds a chequerboard pattern, while Floyd‑Steinberg error‑diffusion distributes quantisation error to neighboring undecided pixels, improving tonal representation and producing irregular, less noticeable noise.

To further hide the QR‑induced “salt‑and‑pepper” artefacts, a two‑pass error‑diffusion is applied: the first pass forces the known colours of data modules and diffuses the resulting error to adjacent pixels; the second pass runs standard diffusion on the image. This reduces visual noise without compromising scannability, provided error‑correction capacity remains sufficient. Generator tools can rotate the code, adjust encoding settings, and optionally modify a few high‑error data modules (as with logo‑embedded QR codes). Successful deployment requires adequate quiet zones and appropriate scaling to avoid browser blur; excessive aesthetic alteration reduces robustness on low‑quality prints or poor lighting.

Read full article →

The comments express enthusiasm for experimental QR‑code techniques, highlighting recent demonstrations of animated, colored, and even game‑like content encoded within QR symbols. They reference related puzzle projects and a discussion thread, indicating a broader interest in creative uses of QR technology. The tone is appreciative toward the write‑up, noting its quality and suggesting additional playful variations such as a Rick Astley‑themed code, while also noting curiosity about visual details.

Read all comments →

Unexpected events and prosocial behavior: the Batman effect

The study examined whether an unexpected stimulus—a person dressed as Batman—affects prosocial behavior in a public‑transport setting. Passengers exposed to the Batman figure were more likely to offer their seat to a confederate posing as a pregnant woman than those in a control condition. The authors interpret the “Batman effect” as a disruption of routine that heightens situational awareness, analogous to mindfulness‑related increases in prosociality, but note alternative mechanisms such as prosocial priming, attentional “pique” effects, or social contagion of attention. Limitations include confinement to a single transit system, reliance on observer‑estimated sex and age, and the use of a positively valenced superhero which may confound symbolic influences. The authors recommend replication with varied unexpected figures, controlled laboratory manipulations of emotional valence, and broader behavioral measures to delineate boundary conditions and underlying cognitive mechanisms. Potential applications involve integrating brief, non‑threatening disruptions into public spaces to promote cooperation.

Read full article →

The comments collectively highlight a lighthearted tip about traveling while pregnant, emphasizing the benefit of having a supportive companion, humorously noted as a friend dressed as Batman. The overall tone is playful and informal, focusing on personal experience rather than detailed advice. There is no serious disagreement or controversy, and the discussion centers on the novelty of the suggestion and its perceived comfort during pregnancy travel.

Read all comments →

_for-sale DNS records

The _for-sale leaf node is a DNS TXT record defined in RFC 10023 (July 2026) to signal that a domain remains operational but is available for purchase. Key points:

  • Record format: mandatory v=FORSALE1; followed by a single tag‑value pair (e.g., furi=https://example.com/for-sale, fval=USD12500, ftxt=Serious offers only). One tag per TXT string; multiple records may share the same RRset.
  • Placement: at the leaf _for-sale.example.com; sub‑leafs (e.g., xyz._for-sale.example.com) are invalid.
  • TTL should be ≤ 3600 seconds; remove the record when the domain is no longer for sale. DNSSEC signing is recommended to prevent forgery.
  • Purpose: provides an externally checkable, non‑browser‑visible signal for brokers and automated availability services, avoiding reliance on WHOIS or page content.
  • Common errors: combining multiple tag‑value pairs in one record, using wildcards, treating the record as a sales commitment, or trusting its content without sanitisation.
  • Verification: dig +short TXT _for-sale.example.com must return a string beginning with v=FORSALE1; and respect TTL and DNSSEC requirements.
Read full article →

Comments converge on skepticism toward the proposed “_for‑sale” DNS record, viewing it as an unnecessary tool that may facilitate domain squatting and further financialize the name system. Many note the lack of practical adoption and question its utility given existing contact methods like hostmaster email. The discussion also highlights legal complexities when trademarks intersect with domain offers, with repeated criticism that easing sales encourages speculative pricing and hampers genuine use. Overall sentiment is largely critical, with few neutral observations about the technical specification.

Read all comments →

The phone book that led us to Assad's spy chief in hiding

The article links a Syrian phone directory to the location of Hussam Luka, identified as President Bashar Assad’s intelligence chief, who was discovered hiding abroad. investigators used the phone‑book entries and associated redactions to trace Luka’s contacts and movements, including a meeting with Assad captured in a photograph. Parallel reporting notes a recent drone‑bomb attack at Leipzig/Halle Airport, suggesting that Russian‑linked proxies not only handled the drones and explosives but also transported them into Germany. Supporting visual material includes images of Luka’s apartment contents, his handshake with Assad, the phone‑book pages, and scenes of related conflict sites in Ukraine and Syria, as well‑as law‑enforcement response equipment at the airport. The piece emphasizes the forensic use of ordinary records to uncover high‑level Syrian intelligence activity and raises the possibility of Russian involvement in the German drone incident.

Read full article →

The comments collectively view the piece as lacking substance, describing it as a non‑story that offers little beyond confirming a known connection between a figure and the Assad regime’s presence in Russia. Readers question how journalists secure interviews with such sources when they are uncooperative, noting the difficulty as an “impressive skill.” There is widespread criticism of the article’s overt bias, with many feeling the reporting is ham‑fisted and overwhelmed by partisan propaganda, leading to frustration and skepticism about its objectivity.

Read all comments →

Incentives Are for Losers

The essay critiques the common view that bad outcomes stem from faulty incentives, arguing that this perspective normalizes reward‑driven behavior and discourages independent moral action. The author likens reliance on incentives to using substandard batting helmets, suggesting that individuals who bring their own “helmets” (personal purpose and values) avoid the pitfalls of external rewards. Citing research on adolescent religiosity (Smith & Denton’s “moralistic therapeutic deism”) and the illusion of explanatory depth, the piece explains that most people possess only a superficial moral framework, which can be easily overridden by incentive structures. Personal anecdotes illustrate how confronting stark social contradictions—such as scholars discussing justice while ignoring homelessness—can trigger a “moral reckoning” that leads some to reject incentives and act on principle, exemplified by historical figures like Senator Charles Sumner. The author concludes that while incentive design should be improved, genuine change requires cultivating personal conviction and “backbone” beyond any reward system.

Read full article →

The comment expresses skepticism toward the notion that incentives should be obeyed or regarded as inherently virtuous, arguing that relying on principled stands often leads to personal loss without systemic change. It emphasizes that individuals who reject prevailing incentives are typically punished and replaced, limiting their impact, and contends that broader transformation requires altering the underlying incentive structures rather than targeting lone actors. Morality is portrayed as another form of incentive, reinforcing the view that incentives, not personal ethics, drive most behavior.

Read all comments →