Is the design debate public? I'd imagine it would make great reading.
3,994 karma · joined July 17, 2016
Is the design debate public? I'd imagine it would make great reading.
There are hierarchies of numbers (quantities) in mathematics, just as there are hierarchies of patterns (formal languages) in computer science, based on how difficult these objects are to describe. The most widely accepted hierarchy is actually the same in math and CS: rational, algebraic, transcendental.
In math, a rational number is one that can be described by dividing two integers. In CS, a rational pattern is one that can be described by a regular expression (regex). This is still "division": Even when we can't do 1-x or 1/x, we can recognize the pattern 1/(1-x) = 1 + x + x^2 + x^3... as "zero or more occurrences of x", written in a regex as x*.
In math, an algebraic number is one can be found as a root of a polynomial with integer coefficients. The square root of 2 is the poster child, solving x^2 - 2 = 0, and "baby's first proof" in mathematics is showing that this is not a fraction of two integers.
In CS, an algebraic pattern is one that can be described using a stack machine. Correctly nested parentheses (()(())) is the poster child here; we throw plates on a stack to keep track of how deep we are. The grammars of most programming languages are algebraic: If the square root of math is like nested parentheses, then roots of higher degree polynomials are like more complicated nested expressions such as "if then else" statements. One needs lots of colors of plates, but same idea.
In math, everything else (e, Pi, ...) is called trancendental. CS has more grades of eggs, but same idea.
One way to organize this is to take a number x and look at all expressions combining powers of x. If x^3 = 2, or more generally if x is the root of any polynomial, then the list of powers wraps around on itself, and one is looking at a finite dimensional space of expressions. If x is transcendental, then the space of expressions is infinite.
So where were the Greeks in all this? Figuring out where two lines meet is linear algebra, but figuring out where a line meets a circle uses the quadratic formula, square roots. It turns out that their methods could reach some but not all algebraic numbers. They knew how to repeatedly double the dimension of the space of expressions they were looking at, but for example they couldn't triple this space. The cube root of 2 is one of the simplest numbers beyond their reach. And "squaring the circle" ? Yup, Pi is transcendental. Way out of their reach.
When you have a hammer you see nails. When you have a circle you see doubling.
Yes, this is all Galois theory.
Cambridge, MA but still ... unexpected.
If someone hands you a blank board representing the complex numbers, and offers to tell you either the sum or the product of any two places you put your fingers, you can work out most of the board rather quickly. There remains which way to flip the board, which way is up? +i and -i both square to -1.
This symmetry is the camel's nose under the tent of Galois theory, described in 1831 by Évariste Galois before he died in a duel at age twenty. This is one of the most amazing confluences of ideas in mathematics. It for example explains why we have the quadratic formula, and formulas solving degree 3 and 4 polynomials, but no general formula for degree 5. The symmetry of the complex plane is a toggle switch which corresponds to a square root. The symmetries of degree 3 and 4 polynomials are more involved, but can all be again translated to various square roots, cube roots... Degree 5 can exhibit an alien group of symmetries that defies such a translation.
The Greeks couldn't trisect an angle using a ruler and compass. Turns out the quantity they needed exists, but couldn't be described in their notation.
Integrating a bell curve from statistics doesn't have a closed form in the notation we study in calculus, but the function exists. Statisticians just said "oh, that function" and gave it a new name.
Roots of a degree 5 polynomial exist, but again can't be described in the primitive notation of square roots, cube roots... One needs to make peace with the new "simple group" that Galois found.
This is arguably the most mind blowing thing one learns in an undergraduate math education.
https://en.wikipedia.org/wiki/False_sharing
Rather than incrementing each counter by one, dither the counters to reduce cache conflicts? So what if the dequeue becomes a bit fuzzy. Make the queue a bit longer, so everyone survives at least as long as they would have survived before.
Or simply use a prime length queue, and change what +1 means, so one's stride is longer than the cache conflict concern. Any stride will generate the full cyclic group, for a prime.
I once toured a dairy farm that had been a pioneer test site for Lasix. Like all good hippies, everyone I knew shunned additives. This farmer claimed that Lasix wasn't a cheat because it only worked on really healthy cows. Best practices, and then add Lasix.
I nearly dropped out of Harvard's mathematics PhD program. Sticking around and finishing a thesis was the hardest thing I've ever done. It didn't take smarts. It took being the kind of person who doesn't die on a mountain.
There's a legendary Philadelphia cook who does pop-up meals, and keeps talking about the restaurant he plans to open. Professional chefs roll their eyes; being a good cook is a small part of the enterprise of engineering a successful restaurant.
(These are three stool legs. Neurodivergents have an advantage using AI. A stool is more stable when its legs are further apart. AI is an association engine. Humans find my sense of analogy tedious, but spreading out analogies defines more accurate planes in AI's association space. One doesn't simply "tell AI what to do".)
Learning how to use AI effectively was the hardest thing I've done recently, many brutal months of experiment, test projects with a dozen languages. One maintains several levels of planning, as if a corporate CTO. One tears apart all code in many iterations of code review. Just as a genius manager makes best use of flawed human talent, one learns to make best use of flawed AI talent.
My guess is that programmers who write bad code with AI were already writing bad code before AI.
Best practices, and then add AI.
Their 1978 second edition works in exactly the memory needed to store the answer, by simulating my algorithm in a first pass but only saving the occupancy counts.
Oh, and thanks (I guess). I really didn't expect to ever be reading FORTRAN code again. One learned to program at Swarthmore that year by punching cards, crashing our IBM 1130, and bringing the printout to my supervisor shift. I'd find the square brackets and explain how you'd overwritten your array. I even helped an economics professor Frederic Pryor (the grad student in the "Bridge of Spies" cold war spy swap) this way, when I made an ill-advised visit to the computer center on a Saturday night. Apparently I could still find square brackets.
He claimed that choosing a subset of k integers at random from {1..n} should have a log in its complexity, because one needs to sort to detect duplicates. I realized that if one divided [1..n] into k bins, one could detect duplicates within each bin, for a linear algorithm. I chose bubble sort because the average occupancy was 1, so bubble sort gave the best constant.
I described this algorithm to him around 5pm, end of his office hours as he was facing horrendous traffic home. I looked like George Harrison post-Beatles, and probably smelled of pot smoke. Understandably, he didn't recognize a future mathematician.
Around 10pm the dorm hall phone rang, one of my professors relaying an apology for brushing me off. He got it, and credited me with many ideas in the next edition of his book.
Of course, I eventually found all of this and more in Knuth's books. I was disillusioned, imagining that adults read everything. Later I came to understand that this was unrealistic.
For example, one can generally check out early. We had followed a hotel reservation from locals in Nagoya, and found ourselves in a stodgy "classic" hotel. We were able to pivot to possibly the nicest corner suite in the entire city, at a steep last minute discount.
I did get trapped once, not realizing that my Hiroshima hotel became nonrefundable several days before check-in. With a phone call they moved my reservation to a few days later as a courtesy. The web page then let me cancel.
Of course, considering finite fields of prime power order, one might leap to the conclusion "a quarter of the time". One can adjoin "i" for prime powers p^n for half the primes and odd n.
Alas, this be wrong, for an amusing reason.
Alas, one can completely remove Sharpie writing from metal with 99% isopropyl alcohol. Did they make a better choice? This looks like Sharpie writing to me.
One could embed an invisible security cable, but then...
C++ 100 19.57s
Rust 96 20.40s
F# 95 20.52s
Nim 75 26.04s
Julia 64 30.40s
Ocaml 48 41.07s
Haskell 41 47.64s
Chez 39 49.53s
Swift 33 58.46s
Lean 7 278.88s
Tarjan, n = 10
Nyx - Apple M4 Max - 12 performance and 4 efficiency cores
n! * 2^n = 3,715,891,200 signed permutations
score = gops normalized so best language averages 100
time = running time in seconds
This had me briefly smitten with F#, till I realized the extent that rusty .NET bed springs were poking through. Same as the JVM and Clojure, or Erlang and Elixir. The F# JIT compiler is nevertheless pretty amazing.I nearly settled on OCaml. After AI warning me that proper work-stealing parallelism is a massive, sophisticated project to code properly, the 40 lines of OCaml code I wrote that beat available libraries is my favorite code file in years.
Nevertheless, once one understands lazy evaluation in Haskell, it's hard to use any other language. The log slowdown for conventional use of a functional data structure becomes a linear speedup once one exploits persistence.
I also set the combination to all zeroes, to scramble my combination after locking. Easier getting in and out with fixed muscle memory, and easy to confirm this is my locker. No one else does this.
<https://www.vintagecomputer.net/cisc367/Radio%20Electronics%...>
Here is the full text, for discussing with agents:
https://archive.org/stream/RadioElectronics195701/Radio%20El...
This is a subject dear to my heart. I'm a mathematician who routinely uses symmetry in counting problems. As a kid I remember writing out a tic tac toe game tree in about ten pages. I must have used symmetry, and I must have only mapped a winning strategy, not all 765 game states up to symmetry.
So my first reaction to now reading that Bertie the Brain used "addition tubes" was "Really? Can't you do that with relays?" And the reality is that Bertie the Brain was a solution looking for a problem, a demo project for these tubes, not an attempt at the simplest way to implement such a machine.
Still, looking at the numbers, I'm impressed that Relay Moe managed multiple levels of game play using only 90 relays. The design exploited symmetry.
The "artificial sun" created at Hiroshima, the early-stage plasma fireball at 1 ms, is estimated to have been 5 to 10 meters across.
He asked me to explain my work on card shuffling, so we traded. He taught me about altitude sickness, for which he was the foremost expert. I then read his books before my own mountaineering, and his advice worked for me.
In a nutshell, where you sleep matters. 7,000' is free, and a conservative pace is to sleep 1,000' feet higher each night. (Good luck finding a Kilimanjaro ascent that climbs that slowly, but have you met anyone who was comfortable at the summit?)
My wife's brother lives at 10,000'. As it happens the last hotel is at 8,500'. One night does the trick for her.
Your picture is a great geometric way to think about riffle shuffling. Your n-simplex represents a sorted deck of n cards. Choosing a point uniformly at random in this simplex makes the needed choices all at once to predetermine an arbitrary number of riffle shuffles. Think of k riffle shuffles as a single 2^k shuffle (as if you had 2^k hands); we can now study an "a-shuffle". Scale the n-simplex by a factor of a. Where does our random point end up? Either view all of space as tiled by your n-cubes, or reduce all coordinates mod 1. Either way the random point ends up in some n-simplex described by a different (or the same) order (mod 1) of the coordinates. That's your shuffle.
For a single shuffle of two cards, doubling the 2-simplex ("up-triangle") covers three up-triangles and one down-triangle, so the odds of reversing the cards is 1 in 4. This makes sense if you imagine two "stowaway" cards face up, placed at random in a face-down deck. Shuffling the deck, to reverse these cards they can't both be in the same packet, and being in different packets only reverses them half the time.
Increasing "a" for two cards, one sees the up and down-triangle counts converge to a 1:1 ratio. The error "fringe" looks like a numerical integration error.
I have a $200/month Anthropic Max subscription that I use for help in exploring and coding my math research. As of now no AI model can compete with Opus 4.1 for helping me with my most challenging tasks. I try every one I can. Gemini 2.5 Pro is great for code review and a second opinion, but drives off the road when it takes the wheel.
I tried a $100/monthly plan and spent $20 in an hour the first time I went over; an API key is not a practical way to use Opus 4.1.
There are plenty of concerns using Clause Code in a terminal, that Zed could address. Mainly, I can't "see over AI's shoulder" so I need to also test. The most careful extension I coded was terminal sessions we could share as equal participants. Nevertheless, as a rule I'd attribute my relative success to just living with shortcomings, as if a "partner that snores". AI loses track of the current directory all the time, or forgets my variable naming and comment conventions? Just keep going, fix it later.
How can I get equivalent value to my Max plan, using Claude Code Opus 4.1 with Zed?
It has long been a problem in math research to distinguish between "no one has had this idea" and "one person has had this idea". This used to take months. With the internet and MathSciNet, ArXiv online it took many iterations of guessing keywords. Now, I've spent six months learning how to coax rare responses from AI. That's not everyone's use case.
What complicates this is AI's ability to generalize. My best paper, we imagined we were expressing in print what everyone was thinking, when we were in fact connecting the dots on an idea that was latent. This is an interesting paradox: People see you as most original when you're least original, but you're helping them think.
With the right prompts AI can also "connect the dots".
The scenario that concerns me is that Claude learns unpublished research ideas from me as we chat and code. Claude then suggests these same ideas to someone else, who legitimately believes this is now their work.
Clearly commercial accounts use AI to assist in developing intellectual product, and privacy is mandatory. The same can apply to individuals.
Computers were so slow that one couldn't consider every word in the dictionary as a potential guess. He decided empirically on a sample size that played well enough.
I became a mathematician. From this childhood exposure, entropy was the first mathematical "concept" beyond arithmetic that I understood.
Grading a stack of blue books is a "just kill me now" brutal experience. A majority of cognitive effort is just finding the page for the next problem to grade, with finding the answer another delay; any programming language with this kind of access latency would stay a "one bus" language. So of course professors rely on disinterested grad students to help grade. They'll make one pass through the stack, getting the hang of the problem and refining the point system about twenty blue books in, but never going back.
With stapled exams one problem per page one can instead sort into piles for scores 0-6 (if you think your workplace is petty, try to imagine a sincere conversation about whether an answer is worth 14 or 15 points out of 20), and it's easy to review piles.
When I had 200 linear algebra exams to grade at once, I'd scan everything, and use my own software to mark and bin one question at a time, making review passes a pleasure. I could grade a 10 question final in one intense sitting, with far more confidence in the results than team grading ever gave me.
I'm escaping the black hole of Haskell. If one can code in Chez Scheme, one can code without parametrized modules, as much as I admire them. And there are also F# additions OCaml could admire.
I held back for all of your reasons, and finally caved. I never saw myself in the .NET ecosystem, but prejudices are a funny thing.
"Examples of functional programming languages include OCaml, Erlang, Clojure, Haskell, Scala, and Common Lisp."
F# and OCaml are close cousins, and for me F# is even cleaner syntax and twice as fast (M4 Mac Studio).
It was a struggle for me to overcome my partisan preference for OCaml.
News flash! It's not so your neighbor's child can cheat in school, or her father can render porn that looks like gothic anime.
It's also not so some coder on a budget can get AI help for $20 a month. I frankly don't understand why the major players bother. It's nice PR, but like a restaurant offering free food out the back door to the homeless. This isn't what the push is about. Apple is hemorrhaging money on their Headset Pro, but they're in the business of realizing future interfaces, and they have the money. The AI push is similarly about the future, not about now.
I pay $200 a month for MAX access to Claude Opus 4.1, to help me write code as a retired math professor to find a new solution to a major math problem that stumped me for decades while I worked. Far cheaper than a grad student, and far more effective.
AI used to frustrate me too. You get what you pay for.
I'm surprised Bezier-rs is all about curves. Sure, fonts, but I can't be alone here in seeing curves as a special case.
It's easy as a pure mathematician to write off Bezier theory as "specialized" but it's simply the right way to work with polynomials on a simplex.