Hacker News with Generative AI: Algorithms

Bluesky is ushering in a pick-your-own algorithm era of social media (newscientist.com)
More than 20 million people have joined Bluesky, a social network that gives you fine-grained control over what you see and who you interact with. I think it is the future of social media, says Chris Stokel-Walker
AAA – Analytical Anti-Aliasing (frost.kiwi)
Today’s journey is Anti-Aliasing and the destination is Analytical Anti-Aliasing. Getting rid of rasterization jaggies is an art-form with decades upon decades of maths, creative techniques and non-stop innovation. With so many years of research and development, there are many flavors.
Understanding the BM25 full text search algorithm (emschwartz.me)
BM25, or Best Match 25, is a widely used algorithm for full text search. It is the default in Lucene/Elasticsearch and SQLite, among others. Recently, it has become common to combine full text search and vector similarity search into "hybrid search". I wanted to understand how full text search works, and specifically BM25, so here is my attempt at understanding by re-explaining.
Understanding the BM25 full text search algorithm (emschwartz.me)
BM25, or Best Match 25, is a widely used algorithm for full text search. It is the default in Lucene/Elasticsearch and SQLite, among others. Recently, it has become common to combine full text search and vector similarity search into "hybrid search". I wanted to understand how full text search works, and specifically BM25, so here is my attempt at understanding by re-explaining.
Bit-twiddling optimizations in Zed's Rope (zed.dev)
A couple of weeks ago I came across one of Antonio's PRs, titled "Speed up point translation in the Rope" — now who doesn't stop to take a closer look at a PR with that title?
Phonetic Matching (smoores.dev)
Just as heads up: This post starts out somewhat technical and includes a discussion of interesting algorithmic topics, like forced alignment and phonetic matching. But it ends by delving into some deeper social and human topics that might not be what everyone is looking for in a blog that’s mostly about software.
ChibiHash: Small, Fast 64 bit hash function (nrk.neocities.org)
If you need a small and fast 64 bit hash function that can be copy-pasted easily, then here's one that I cooked up in an hour or so: chibihash64.h.
ChibiHash: Small, Fast 64 bit hash function (nrk.neocities.org)
If you need a small and fast 64 bit hash function that can be copy-pasted easily, then here's one that I cooked up in an hour or so: chibihash64.h.
Tiling with Three Polygons Is Undecidable (arxiv.org)
We prove that the following problem is co-RE-complete and thus undecidable: given three simple polygons, is there a tiling of the plane where every tile is an isometry of one of the three polygons (either allowing or forbidding reflections)? This result improves on the best previous construction which requires five polygons.
Histogramming Bytes with Positional Popcount (blogspot.com)
A while ago, after some back and forth on twitter/X with @corsix, I dropped some implementation of byte histogramming without explaining anything. This post aims to rectify that lack of explanation.
Show HN: Stretch My Time Off – An Algorithm to Optimize Your Vacation Days (stretchmytimeoff.com)
In , there are 0 public holidays in 2024. Let's stretch your time off from 0 days to 0 days (how?)
Is the UK's liver transplant matching algorithm biased against younger patients? (aisnakeoil.com)
Predictive algorithms are used in many life-or-death situations. In the paper Against Predictive Optimization, we argued that the use of predictive logic for making decisions about people has recurring, inherent flaws, and should be rejected in many cases.
The CVM Algorithm (buttondown.com)
Everything you need to know about query planning can be understood from this query:
How Chordcat works – a chord naming algorithm (s20n.dev)
chordcat is a chord-naming application and a pet project of mine. It is written in C++ and SFML.
The Postage Stamp Problem (johndcook.com)
I recently stumbled upon the Postage Stamp Problem. Given two relatively prime positive numbers a and b, show that any sufficiently large number N, there exists positive integers x and y such that
Diffusion models are evolutionary algorithms (gonzoml.substack.com)
Authors: Yanbo Zhang, Benedikt Hartl, Hananel Hazan, Michael Levin Paper: https://arxiv.org/abs/2410.02543 Code: https://github.com/Zhangyanbo/diffusion-evolution
Turing kicked us out of Heaven (2023) (buttondown.com)
The halting problem is "undecidable": there's no algorithm which can tell you if an arbitrary program with an arbitrary input will halt or not. IE, if you give me a proposed "halt-detector", I can inspect it and come up with a program and input for which it would give the wrong answer.
Languages ... by finite semigroups [generalised to] trees and graphs (2020)[pdf] (mimuw.edu.pl)
Question Sets and All Paths (andrewpwheeler.com)
I was nerd-sniped with a question at work the other day. The set up was like this, imagine a survey where all of the questions have yes-no answers. Some of the answers are terminating, so if you answer No to a particular question, the questions stop. But some if you reach that part of the tree will keep going.
The Monkey and the Coconuts: An Introduction to the Extended Euclidean Algorithm (github.com/WinVector)
Consistently faster and smaller compressed bitmaps with Roaring (2016) (arxiv.org)
Compressed bitmap indexes are used in databases and search engines.
Demystifying the regular expression that checks if a number is prime (2016) (illya.sh)
A while back I was researching the most efficient way to check if a number is prime. This lead me to find the following piece of code:
How to Correctly Sum Up Numbers (cedardb.com)
One of the first examples for loops in probably every programming language course is taking a list of numbers and calculating the sum of them.
Sorting for Rendering (linebender.org)
Many rendering algorithms (including a proposed sparse strip technique for path rendering, and also Gaussian Splatting) rely on sorting. Because the GPU has a different architecture to the CPU, programs running on the GPU have different performance characteristics, and this changes which sorting algorithms are optimal for a particular context. In particular, sorting algorithms that exploit parallelism tend to be more suited to the GPU.
Show HN: Super Simple CRC32 Implementation (github.com/dch82)
super simple crc32 calculator written by dch82
Nested Loops Revisited Again (2023) (ieee.org)
Grokking Algorithms: An illustrated guide for programmers and curious people [pdf] (anarcho-copy.org)
Can a Rubik's Cube be brute-forced? (stylewarning.com)
When I was about 13, while still a middle-schooler, I became fascinated with the Rubik’s Cube1. I never got terribly good at solving it, maybe eventually getting into the 30 to 40 seconds range. While I didn’t have a penchant for memorizing move sequences, I was drawn into how we find these move sequences.
Amanatides and Woo's fast voxel traversal (m4xc.dev)
In this article we will dive deep into Amanatides and Woo's fast voxel traversal algorithm. Designed for, however not limited to, ray tracing voxel grids.
Happy Ending Problem (wikipedia.org)