Recent stories
Each story's summary, with the places it was discussed.
Summaries are written by AI from the linked sources. Open the source for full context.
Sorting networks, like Batcher's bitonic sort and the vectorized djbsort, provide data-oblivious execution to prevent timing side-channel attacks in cryptography.
By using a fixed sequence of operations independent of input values, these algorithms ensure security and often outperform traditional data-dependent sorts like quicksort through SIMD optimization and inherent parallelism.
The article explains how monoids turn seemingly sequential computations—including Horner rule and Boyer-Moore majority voting—into efficient map-reduce operations.
Observable and vertically composed monoids support nested grouping and aggregation directly on raw, deserialized data, with arbitrary partitioning across cores. Multicore OCaml and OpenMP examples demonstrate race-free, scalable parallel execution while separating algorithms from execution strategy.
The post derives the bitap (shift-and) string-matching algorithm from naive and streaming approaches.
It represents active pattern-matching states as a bitset, shifting and masking it for each input character. Bitap is elegant and efficient for patterns shorter than a machine word, but offers limited gains for longer patterns or one-off searches due to preprocessing.
miniKanren is an influential family of embedded domain-specific languages (EDSLs) specifically designed for logic and relational programming.
Originally implemented in Scheme, it has been ported to over 40 different host languages including Clojure, Haskell, Python, and Rust. The core language is notably minimalistic, consisting of only three logical operators and one interface operator, yet it supports powerful extensions like Constraint Logic Programming and probabilistic logic. The ecosystem encompasses numerous research papers, academic theses, and community-driven projects such as Barliman for program synthesis and core.logic for Clojure. It serves as a vital tool for exploring advanced programming language concepts like relational interpreters, unification algorithms, and automated theorem proving.
Pratt parsing transforms shunting yard’s explicit operator stack into implicit call-stack recursion, making expression parsers easier to extend.
The demonstrated C parser uses binding powers to decide when recursion enters or returns from subexpressions, while prefix handling and operator-specific code support parentheses and more complex operators. Unlike conventional recursive descent, it avoids a function layer for every precedence level. Operator rules can combine binding power with prefix and postfix subroutines, keeping the core parser small.
Experiments replaying 17 Rust project builds suggest Cargo’s scheduling can be improved by a simple b-level heuristic that prioritizes tasks nearest the critical path.
It reduces makespan by a median 8% at four CPUs and 2% at 16, remains effective with noisy or one-bit duration estimates, and is close to pseudo-optimal schedules; graph depth is a viable fallback.
The author explores steganography techniques using Lehmer codes to hide data within the order of elements in files, APIs, and physical objects.
By reordering items like Exif tags, CSS rules, or JSON fields, researchers can embed hidden information. This method, while creative, highlights potential security risks like data exfiltration or hidden payloads in seemingly benign digital sequences.
Value numbering is a compiler optimization technique that identifies and eliminates redundant instructions by determining if expressions produce the same value at runtime.
By mapping instructions to unique values and utilizing hash-consing or global analysis via dominator trees, compilers like Maxine VM reduce repeated computations, ultimately improving execution performance in both static and dynamic environments.
In this post, the author revisits Donald Knuth's 1989 paper regarding the conversion of 16-bit fixed-point binary fractions into shortest decimal fractions.
The narrative commemorates Knuth's 88th birthday by offering a more comprehensible proof for the program P2, which Knuth himself once deemed non-simple. By utilizing the Ivy programming language, the author decomposes the problem into incremental steps, starting with a trivial solution and transforming it into Knuth's optimized logic. The analysis also explores historical alternatives, such as the Schubfach algorithm and Taranto's earlier work, while reflecting on how evolving programming languages and hardware constraints shape software architecture and mathematical proofs. Ultimately, the piece argues that modern tooling allows for better isolation of optimizations from fundamental correctness proofs.
Sing-song is a draft reversible encoding for arbitrary bytes using 64 CV syllables, each representing 6 bits.
It is canonical, self-sizing, and prefix-stable; optional variants use SHAKE-256 XOR but provide no confidentiality or checksum. The design trades written density for speakability and can generate readable, non-unique Nostr usernames from public-key prefixes. A Python reference implementation is included.
FreeBSD’s GUS (Global Unbounded Sequences) provides safe memory reclamation for lock-free data structures using unbounded per-CPU sequences instead of bounded epochs.
CPUs publish sequences while pinned; polling finds the minimum across CPUs, allowing retired memory to be reused after all readers pass the relevant point. Its integration with UMA’s bucketed allocator amortizes polling across batches. Apple’s XNU uses a related design with preemptible read sections and recirculation depots. GUS is simpler and can reduce reuse latency, but fences and polling remain costly.
Philip Zucker introduces lambda-microegg, an open-source e-graph with scoped, alpha-aware binders, Miller patterns, higher-order application, lifting/thinning, and capture-avoiding substitution.
Built on microegg, it supports rewrite-based reasoning over lambda terms, including beta reduction and algebraic identities. Early benchmarks approach egg performance, while future work targets richer patterns, proofs, scalability, and integration with theorem proving.
TurboCrypt is replacing Base91 with Base84 to encode encrypted filenames safely across Unix, macOS, and Windows.
Base84 excludes characters forbidden or problematic on Windows and avoids hidden or reserved names. Its five-character groups efficiently pack 31–32 bits, yielding 25.2% average expansion and fitting up to 197 input bytes within a 255-character filename; Unix-only users can use Base91.
Storyteller automatically aligns ebooks with audiobooks despite reordered or missing chapters, skipped passages, and wording differences.
It uses MMS and Wav2Vec 2.0 CTC emissions, greedy decoding and RANSAC-based n-gram boundary search, then anchor-split CTC Viterbi alignment to generate EPUB Media Overlays for sentence-level immersive reading.
The article critiques Rust’s RangeFrom iterator for inconsistent overflow behavior across types: it may omit the maximum value, wrap, panic, or saturate, violating intuitive range and monotonicity expectations.
It argues this creates safety footguns, questions zip-based use cases, and proposes returning None via checked_forward at bounded-type limits, with enumerate_with as an alternative indexing mechanism.
RE# has been rewritten in Rust, transitioning from .
NET to a standalone library using symbolic derivatives instead of classical Brzozowski derivatives. The new engine supports unrestricted lookaheads and handles UTF-8 bytes directly. While trailing behind in SIMD-heavy literal matching, it significantly outperforms traditional engines on case-insensitive dictionary searches and complex intersection patterns.
Andrew Kensler’s `permute()` generates a pseudorandom permutation of array indices without storing the permutation.
It combines a seed-dependent invertible hash with cycle-walking to map any index into an arbitrary-length array, enabling unique sampling and parallel random access in average constant time. Iterating over k of n items therefore uses O(k) time and O(1) memory, unlike Fisher-Yates’ O(n) storage and time. It is not cryptographically secure and works well only up to roughly 2^27-sized domains.
Dynamic-language runtimes optimize object attributes by replacing per-object hash tables with immutable maps (shapes or hidden classes) that assign compact offsets and describe layouts.
Maps support inline storage and pointer-identity checks, while inline caches remember a map/index pair to turn repeated string lookups into fast indexed loads. Attribute insertion order and field count affect cache behavior, and objects of different classes can share shapes. Python and C++ sketches connect this design to storage strategies, typed attributes, and class versioning.
Gleam’s compiler validates case expressions for exhaustiveness and unreachable clauses, then reports precise missing patterns.
Its checker builds optimized decision trees from branch checks, drawing on pattern-matching research while extending it for guarded string prefixes, bit arrays, and type narrowing based on known values. Compile-time Fail nodes produce witness patterns by tracing dead ends backward, while imported names and formatting are preserved in diagnostics. This combines correctness, performance, and unusually detailed user feedback.
An article shows how resharp uses extended regular expressions, labeled DFA state machines, and lazy compilation for deterministic entity categorization.
Precomputing patterns enables low-energy scanning at up to 1.92 GB/s, vastly exceeding spaCy’s NER benchmark. Intersection, complement, Boolean algebra, and language-set analysis support exact date validation, overlap checks, and disjoint enum labels.