Text of gist.github.com › graydon as Styx crawled it on Nov 21, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

graydon’s gists · GitHub

Skip to content Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Instantly share code, notes, and snippets. 💭 objecting to features Graydon Hoare graydon 💭 objecting to features 8k followers · 500 following Vancouver, BC View GitHub Profile Recently created Least recently created Recently updated Least recently updated 1 file 0 forks 0 comments 0 stars graydon / opus-writes-about-technology-scaling.md Created December 13, 2025 22:12 Humanity's greatest technological leaps: 50 advances ranked by improvement magnitude The semiconductor industry's exponential progress is frequently cited as a benchmark for technological advancement, but this framing obscures a crucial insight: Moore's Law represents just one point in a remarkably wide distribution of improvement rates .

Some technologies have improved by factors exceeding a trillion, while others—despite being critical to modern life—have advanced by less than tenfold over comparable periods. This analysis ranks 50 technologies by their total improvement magnitude, revealing which domains experienced the most dramatic sustained progress and which approached physical or economic limits far earlier. The trillion-fold champions lead the list At the pinnacle of technological improvement stand communication and precision measurement technologies, with undersea cable capacity achieving the most extreme advancement in human history—approximately 10¹² improvement (one trillion-fo 1 file 0 forks 0 comments 2 stars graydon / filc overhead rough tests Created November 7, 2025 00:46 filc overhead rough tests: - mg /usr/share/dict/words - yolo: 10MB maxrss / 101m insn / 54m cycle - filc: 30MB maxrss / 370m insn / 176m cycle - filc/yolo: 3x mem / 3.66x insn - xzcat optfil-0.674-linux-x86_64.tar.xz >/dev/null - yolo: 9.7MB maxrss / 40.4bn insn / 32.7bn cycle / 9.42s real / 9.32s user / 0.09s sys - filc: 33.2MB maxrss / 77.5bn insn / 42.8bn cycle / 12.29s real / 12.16s user / 0.14s sys 1 file 0 forks 0 comments 0 stars graydon / chacha.html Last active August 29, 2025 20:32 chacha This is a small note about a delightful function.

Not cryptography advice or serious commentary. Just amusement. A couple years back I had occasion to read in slightly more detail than I had before about the state of the art in cryptographically secure PRNGs (CSPRNGs). These are PRNGs we trust to have additional properties beyond the speed and randomness requirements of normal ones -- inability for an attacker to reveal internal state, mainly, so you can use them to generate secrets.

If you look, you'll find a lot of people recommending something based on one of Dan Bernstein's algorithms: <a href="https://en.wikipedia.org/wiki/Salsa20">Salsa20 or ChaCha (or even more obscurely "Snuffle")</a>. All the algorithms we're discussing here are very similar in design, and vary only in minor details of interest only to cryptographers. If you follow that link though, you'll notice it's a description of a (symmetric) stream cipher.

Not a CSPRNG at all! But that's ok! Because it turns out that people have long known 1 file 0 forks 0 comments 0 stars graydon / retroboot.html Created June 16, 2025 20:27 retrobootstrapping rust for some reason Elsewhere I've been asked about the task of replaying the bootstrap process for rust. I figured it would be fairly straightforward, if slow. But as we got into it, there were < em > just </ em > enough tricky / non-obvious bits in the process that it's worth making some notes here for posterity. < h3 > context </ h3 > Rust started its life as a compiler written in ocaml, called < b > rustboot </ b > .

This compiler did < em > not </ em > use LLVM, it just emitted 32-bit i386 machine code in 3 object file formats (Linux PE, macOS Mach-O, and Windows PE). We then wrote a < em > second </ em > compiler < em > in Rust </ em > called < b > rustc </ b > that < em > did </ em > use LLVM as its backend (and which, yes, is the genesis of today's rustc) and ran rustboot on rustc to produce a so-called "stage0 rustc". Then stage0 rustc was fed the sources of rustc again, producing a stage1 rustc.

Successfully executing this stage0 - > stage1 step (rather than just crashing mid-compilation) is what we're going to call "bootstrapping". There's also a third step: runnin 1 file 0 forks 0 comments 1 star graydon / talon-cheat.txt Last active June 11, 2024 09:11 talon cheatsheet # this file isn't a full/complete grammar or even # a correct one, but it contains the phrase chunks # that I've found useful to practice / focus on # while learning talon, I keep it open on screen # alphabet air bat cat drum each fine gust harp sit jury krunch look made near odd pit 1 file 0 forks 0 comments 0 stars graydon / polyvariants.ml Created May 2, 2024 03:15 polymorphic variants in ocaml (* The magic of ocaml polymorphic variants: * * - subsystem A produces an error `NSaServ * - subsystem B checks for error `SaupDOF * - both exist in a world with some extra variant `Common * * the two odd symbols _hash to the same representation_ in ocaml's * implementation of polymorphic variant tagging. *) 1 file 0 forks 0 comments 5 stars graydon / move.rs Created January 18, 2024 23:07 Ownership passing vs. borrowing // This is just an elaboration of an off-hand toot I made earlier today // concerning a coding pattern I find myself doing whenever possible: passing // and returning owned values instead of borrowing references. // // I find it works well for long-lived values especially since the resulting // composite objects have no lifetime qualifiers, so I don't have to plumb // lifetimes through to all the code that uses them. // Assumption: assume we have a few objects like this: a network connection, a // database, some commands, etc. and we want to make a session type that uses 2 files 1 fork 0 comments 13 stars graydon / LLM.md Created March 29, 2023 03:59 — forked from rain-1/LLM.md LLM Introduction: Learn Language Models Purpose Bootstrap knowledge of LLMs ASAP.

With a bias/focus to GPT. Avoid being a link dump. Try to provide only valuable well tuned information. Prelude Neural network links before starting with transformers. 1 file 0 forks 0 comments 0 stars graydon / bel-eve-vr.md Created January 27, 2020 23:06 — forked from wtaysom/bel-eve-vr.md A Review of Paul Graham's Bel, Chris Granger's Eve, and a Silly VR Rant Hello Friends, This elf begging to climb onto the web for Christmas began as a personal email, a review of Paul Graham's little Lisp Bel .

He sprouted arms, legs, and in gingerstyle ran away. Arms for symbols, legs for conses: these primitives are the mark a Lisp — even more so than the parenthesis. What do we get when we remove these foundation stones: naming and pairing? No pairs. No cons. No structure. Unordered. Chaos. Eve , a beautifully incomplete aspect oriented triple store. No need for legs when you can effortlessly transport to your destination.

Lazy. Pure. Here and now, a retrospective. No symbols. No names. No variables. Combinators. Forth. No need for arms when you can effortlessly push and pop your stack. No words. A world without words. Virtual worlds. Virtual reality. Space. Time. Motion. Action. Kinetic Programming, a proposal. I apologize in advance. Checking my pocketwatch, I see I haven't t 1 file 0 forks 0 comments 0 stars graydon / devanagari.txt Created April 6, 2019 05:28 — forked from Manishearth/devanagari.txt devanagari breakdown common stuff ----------- Basic consonants(32): कखगघङचछजझटठडढणतथदधनपफबभमयरलवशषसह Weirdo that only is used in ligatures, but necessary(1) ञ Newer Older You can’t perform that action at this time.