Latest articles

431 new today · 7,328 articles · from 241 blogs

Preshing on Programming··Jeff Preshing

Using Quiescent States to Reclaim Memory

AI summaryThis article demonstrates how to protect a shared data structure with concurrent readers and writers in C++ without using a read-write lock, by storing an atomic pointer to the current version and letting writers publish private modified copies. To safely delete old copies that threads may still be using, it introduces quiescent state-based reclamation (QSBR), where a MemoryReclaimer invokes deletion callbacks only after every participating thread has called onQuiescentState, grouping callbacks into intervals. The author notes the technique is related to userspace RCU and was used in the Junction library to implement a scalable resizable concurrent map.

Elixir Blog··José Valim

Announcing GenStage

GenStage is a new Elixir behaviour for exchanging events with back-pressure between Elixir processes. In this blog post we will cover the background that led us to GenStage, some example use cases, and what we are exploring for future relea

Sara Soueidan··Sara Soueidan

Mimic Relative Positioning Inside an SVG with Nested SVGs

AI summaryUnlike HTML elements, SVG elements lack a CSS box model and are positioned absolutely relative to the SVG viewport's single coordinate system, which makes positioning one SVG element relative to another a challenge. The article explains how nesting elements can be used to create grouping, new coordinate systems, and separate 'layers' for responsive effects, and introduces the concept of bounding boxes as a way to compensate for the missing box model. By retrieving an element's bounding box properties (x, y, width, height) via getBBox(), an inner can be visually placed over another element to establish a positioning context around it, effectively mimicking relative positioning.

Elixir Blog··José Valim

Elixir v1.3 released

Elixir v1.3 brings many improvements to the language, the compiler and its tooling, specially Mix (Elixir's build tool) and ExUnit (Elixir's test framework).

Andrej Karpathy·

Deep Reinforcement Learning: Pong from Pixels

AI summaryThis blog post explains reinforcement learning (RL) and argues that recent breakthroughs like ATARI game playing and AlphaGo stem more from increased compute, data, and infrastructure than from fundamentally new algorithms. The author walks through how Policy Gradients—a simple yet preferred alternative to Q-Learning—can train a small 2-layer neural network to play Pong from raw pixels in about 130 lines of Python, while discussing challenges like the credit assignment problem and how RL differs from supervised learning.

Lea Verou··Lea Verou

Introducing Multirange: A tiny polyfill for HTML5.1 two-handle sliders

AI summaryWhile reviewing recent HTML specifications, the author discovered that several slider features, such as tick labels, vertical sliders, and two-handle range sliders, are poorly or not at all implemented across browsers. Most excited about two-handle sliders enabled by the multiple attribute, they experimented with overlaying two sliders and created a tiny JavaScript polyfill called Multirange, available on GitHub. The polyfill uses CSS variables for simpler, more elegant, and customizable code, and dropped its original Bliss dependency to keep the script minimal.

Sara Soueidan··Sara Soueidan

Making the Switch Away from Icon Fonts to SVG: Converting Font Icons to SVG

AI summaryThis article is a practical guide to switching from icon fonts to an SVG icon system, walking through how to extract icons from icon font files (e.g., generated with Fontello) and convert them into SVG icons using tools like the Icomoon web app or the font-blast command-line tool. It then covers next steps such as combining the icons into an SVG sprite, embedding them in pages, and styling or animating them, while pointing to further reading on why SVG is superior to icon fonts.

Preshing on Programming··Jeff Preshing

Leapfrog Probing

AI summaryThe article introduces leapfrog probing, a new hash table probing strategy developed for the Junction library and inspired by hopscotch hashing, which stores two delta values per cell to form explicit probe chains for each bucket, reducing average search length compared to linear probing at a cost of only 12.5–25% extra memory. It describes how insertion works by following the probe chain, then linearly searching for a free cell and linking it to the chain, and how the concurrent Leapfrog map handles racing operations by reserving cells via CAS and linking them with relaxed atomic stores. Benchmarks showed Leapfrog was the fastest concurrent map tested up to a modest number of CPU cores, partly due to low write contention and resizing based on failed inserts rather than tracked population.

Sara Soueidan··Sara Soueidan

SVG Style Inheritance and the ‘Flash Of Unstyled SVG’

AI summaryThe article explains the 'Flash Of Unstyled SVG' (FOUSVG) problem, where SVGs lacking width and height attributes scale to fill the entire viewport width when CSS fails to load, making pages appear broken. The solution is to keep the width and height presentation attributes on the SVG (for example, by not checking Illustrator's 'Responsive' export option) and instead control dimensions via CSS, since SVG presentation attributes act as low-level author styles that are overridden by any other style declarations and thus serve as fallbacks. The author also emphasizes never removing the viewBox attribute, which is essential for proper SVG scaling, and notes that presentation attributes are useful for providing default styles when reusing elements with and CSS custom properties.

Kottke··Jason Kottke

Bad Doors Are Everywhere

AI summaryThis post highlights the prevalence of bad door design, referencing a video collaboration between Vox and 99% Invisible about doors that people commonly pull when they should push. The author reflects on how Don Norman's book 'The Design of Everyday Things,' read early in their design career, profoundly shaped their approach to designing for the web. The piece is a vintage post originally published in February 2016.

Preshing on Programming··Jeff Preshing

A Resizable Concurrent Map

AI summaryThe article describes the Linear map from the Junction project, a concurrent hash map that improves on the earlier 'Crude' lock-free hash table by supporting both deletion and resizing. It explains how resizing works by atomically replacing a root pointer with a new, larger table and safely migrating entries using Redirect markers to prevent concurrent updates from being lost, along with a jobCoordinator that lets multiple threads participate in migrations. The author notes that Junction's Leapfrog and Grampa maps build on the same design, and shares the implementation as an educational example of concurrent programming.

Josh W. Comeau··Josh W. Comeau

Animating the Unanimatable

An in-depth look at the surprisingly complicated problem of animating the transition when two items in a list swap positions. Keep reading.

Andrew Kelley·

Introduction to the Zig Programming Language

AI summaryThis article introduces Zig, a new programming language created by the author as a more pragmatic alternative to C, built around the priorities of pragmatism, optimal runtime performance, safety, and readability. It explains key design decisions including widely diverging debug and release builds, complete C ABI compatibility with @cImport for direct C interop, and the use of optional types instead of null pointers. The article also details Zig's error handling strategy using error sets and error unions, along with constructs like catch, try, orelse, defer, and errdefer that keep code both safe and concise.

Preshing on Programming··Jeff Preshing

New Concurrent Hash Maps for C++

AI summaryThe article announces Junction, a BSD-licensed C++ library offering several new concurrent hash maps—Linear, Leapfrog, and Grampa—whose fastest variants outperform all other concurrent maps tested on the author's hardware. These maps support atomic operations such as get, assign, exchange, and erase from multiple threads without locks, relying on quiescent state-based memory reclamation (QSBR) for safe memory management while requiring users to handle object lifetimes manually. The code is experimental alpha software, and the author invites feedback, bug reports, and contributions such as porting the Turf dependency library to additional platforms.

Elixir Blog··José Valim

Elixir v1.2 released

Elixir v1.2 brings enhancements, bug fixes, performance improvements and more into Elixir.

Lea Verou··Lea Verou

My positive experience as a woman in tech

AI summaryThe author shares her positive experience as a woman in tech, arguing that stories like hers deserve to be heard alongside accounts of sexism so the overall picture doesn't become so bleak it scares women away from the field. Across all her roles — student, speaker, author, open source maintainer, W3C participant, and researcher — she never felt unfairly treated because of her gender, even though she remains sensitive to noticing sexism. She attributes this partly to genuine progress in the industry, partly to her preference for not assuming sexist intent, and partly to her confident, assertive personality.

Lea Verou··Lea Verou

Introducing Bliss: A 3KB library for happier Vanilla JS

AI summaryThe author introduces Bliss, a lightweight 3KB helper library for Vanilla JS that evolved from personal helper code (formerly called Utopia) accumulated over eight years and used across many of their open-source projects. After using it in their MIT research project and expecting collaborators who mostly know jQuery, they spent over a week polishing and documenting it. The docs stand out by recommending plain Vanilla JS alternatives where appropriate and including a 'Show Implementation' button, reflecting the philosophy of favoring small, understandable abstractions over big black-box libraries.