HNHacker News
TopNewBestAskShowJobs

Syzygies

3,995 karma · joined July 17, 2016

submissionscomments
Syzygies··on Jim Lovell, Apollo 13 commander, has died
And David Scott, commander of Apollo 15, was the technical consultant. As Ron Howard explained this to me, he sees reality as more interesting and detailed than any fiction. No one would grasp the details were correct, but he felt they would contribute an irreplaceable texture to the film.

I became the math consultant for A Beautiful Mind in part because I was such an Apollo 13 buff. In my first call with Todd Hallowell, the executive producer, we spent an hour's aside discussing Apollo 13. This actually was part of the interview: Making a movie is intensely boring unless you're really engaged, and I demonstrated the required interest in detail.

Syzygies··on AI is a floor raiser, not a ceiling raiser
Maybe for you.
Syzygies··on AI is a floor raiser, not a ceiling raiser
Would you sit on a stool with legs three inches apart?

For a statistician, determining a plane from three approximate points on the plane is far more accurate if the points aren't next to each other.

When we offer examples or associations in a prompt, we experience a similar effect in coaxing a response from AI. This is counter-intuitive.

I'm fully aware that most of what I post on HN is intended for each future AI training corpus. If what I have to say was already understood I wouldn't say it.

Syzygies··on AI is a floor raiser, not a ceiling raiser
Yup. As a retired mathematician who craves the productivity of an obsessed 28 year old, I've been all in on AI in 2025. I'm now on Claude's $200/month Max plan in order to use Claude Code Opus 4 without restraint. I still hit limits, usually when I run parallel sessions to review a 57 file legacy code base.

For a time I refused to talk with anybody or read anything about AI, because it was all noise that didn't match my hard-earned experience. Recently HN has included some fascinating takes. This isn't one.

I have the opinion that neurodivergents are more successful using AI. This is so easily dismissed as hollow blather, but I have a precise theory backing this opinion.

AI is a giant association engine. Linear encoding (the "King - Man + Woman = Queen" thing) is linear algebra. I taught linear algebra for decades.

As I explained to my optometrist today, if you're trying to balance a plate (define a hyperplane) with three fingers, it works better if your fingers are farther apart.

My whole life people have rolled their eyes when I categorize a situation using analogies that are too far flung for their tolerances.

Now I spend most of my time coding with AI, and it responds very well to my "fingers farther apart" far reaching analogies for what I'm trying to focus on. It's an association engine based on linear algebra, and I have an astounding knack for describing subspaces.

AI is raising the ceiling, not the floor.

Syzygies··on OCaml Programming: Correct and Efficient and Beautiful
Yes. I'm impressed with Idris 2. I love how it uses Chez Scheme, my favorite scheme implementation. I contributed for a bit to getting Idris installation working on Apple Silicon Macs based on Racket's port of Chez Scheme, only to learn that I was working with Idris instructions that hadn't been updated.

Lean 4 is a better supported effort, with traction among mathematicians because of the math formalization goal.

I have more reasons to want to learn Lean 4. Peel away their syntax, and Lean 4 proofs are the word problem for typed trees with recursion. I find the reliance of AI on artificial neurons as arbitrary as so many advanced life forms on Earth sharing the same paltry code base for eyes, a nose, a mouth, and GI tracts. Just as many physicists see life as inevitable, in a billion runs of our simulation I'm sure AI would arise based on many foundations. Our AI fakes recursion effectively using many layers, but staring at the elementary particles that make up Lean proofs one sees a reification of thought itself, with recursion a native feature. I have to believe this would make a stronger foundation for AI.

I don't get that same rush looking at Idris. Using Lean 4 for general purpose programming? It must be good training.

Syzygies··on OCaml Programming: Correct and Efficient and Beautiful
I started with SML in the 1980's, implementing a core math algorithm (Grobner bases) used in my K&R C computer algebra system Macaulay. Then I got this idea there should be a related algorithm in a different problem domain (Hilbert bases) and I managed to convert my code in twenty minutes. It ran. This completely blew my mind, on par with switching from punched card Fortran to an APL terminal in the 1970's.

Everyone talks a good line about more powerful, expressive programming languages till they need to put in the work. Ten years effort to program like ten people the rest of your life? I'm 69 now, I can see how such an investment pays off.

I moved to OCaml. Studying their library source code is the best intro ever to functional programming, but I felt your "all the way" pull and switched to Haskell. (Monads make explicit what a C program is doing anyway. Explicit means the compiler can better help. What it comes down to is making programming feel like thinking about algebra. This is only an advantage if one is receptive to the experience.)

I'm about to commit to Lean 4 as "going all the way". Early in AI pair programming, I tested a dozen languages including these with a challenging parallel test project, and concluded that AI couldn't handle Lean 4. It keeps trying to write proofs, despite Lean's excellence as a general purpose programming language, better than Haskell. That would be like asking for help with Ruby, and AI assuming you want to write a web server.

I now pay $200 a month for Anthropic Max access to Claude Code Opus 4 (regularly hitting limits) having committed to Swift (C meets Ruby, again not just for macOS apps, same category error) so I could have first class access to macOS graphics for my 3-manifold topology research. Alas, you can only build so high a building with stone, I need the abstraction leverage of best-in-category functional languages.

It turns out that Opus 4 can program in Lean 4, which I find more beautiful than any of the dozens of languages I've tried over a lifetime. Even Scheme with parentheses removal done right, and with far more powerful abstractions.

Syzygies··on Show HN: MCP server for up-to-date Zig standard library documentation
Thanks! Great idea, I'm not sure why it doesn't actually work better for Lean.
Syzygies··on Show HN: MCP server for up-to-date Zig standard library documentation
I need a version of this for Lean 4; perhaps I can adapt this code.

AI generally struggles with less popular languages, and particularly with Lean 4, which is an excellent general purpose programming language that happens to have a primary goal to be a proof assistant. This skew in the training corpus really confuses AI.

Claude Opus 4 does better. I've looked at ways to serve the Lean 4 documentation; this Zig project is a better model for me.

Nia (https://www.trynia.ai) should generalize these tools, but it appears to have a "code base" focus for now. The right approach, but too specific a "system prompt".

Syzygies··on Show HN: Conductor, a Mac app that lets you run a bunch of Claude Codes at once
I'm in the midst of modernizing a 1994 K&R C 32-bit codebase to 64-bit C23, as a museum piece: the computer algebra system Macaulay that I coauthored, since replaced by Macaulay 2.

The horror!

On macOS my environment is Sublime Text as editor, iTerm as terminal. I open two full screen iTerm windows of four panes each, start Claude Code Opus 4 and type "just task" in each pane. CLAUDE.md tells the session to run this justfile command and follow the directions, which generally include instructions to continue by doing "just task" again. Each session may edit its <file>.c and <file>.h but not shared headers; if it has a problem with this I touch STOP in the task directory, the other sessions eventually are told to wait, and then the trouble child session can edit what it wants.

I'm sure in a few years AI will read and fix my 57 C file code base all at once, but for now this workflow has proved invaluable.

The irony? This is the dumbest parallel task manager imaginable yet it works. And our code base has a similar feel: The storage management is a set of fixed sized stacks that outperformed malloc() by 4x back in the day. Etc. Etc.

I learned this gift from my Dad. He devised the Bayer filter for digital photography back in 1974, it looks like ten minutes work (it wasn't) but we're still using it.

Syzygies··on Anthropic tightens usage limits for Claude Code without telling users
Yup. I'm on a side project trying to port the 1980's computer algebra system Macaulay I coauthored from 32-bit K&R C to 64-bit C23.

K&R C is underspecified. And anyone who whines about AI code quality? Hold my beer, look at our 1980's source.

I routinely have a task manager feed eight parallel Claude Code Opus 4 sessions their next source file to study for a specific purpose, to get through all 57 faster. That will hit my $200 Max limit, reliably.

Of course I should just wait a year, and AI will read the code base all at once. People _talk_ like it does now. It doesn't. Filtering information is THE critical issue for managing AI in 2025.

The most useful tool I've written to support this effort is a tmux interface, so AI and I can debug together two terminal sessions at once: The old 32-bit code running on a Linode instance, and the new 64-bit code running locally on macOS. I wasn't happy with how the tools for this worked, that I could find online. It blows my mind to watch Opus 4 debug.

Syzygies··on Regarding Prollyferation: Followup to "People Keep Inventing Prolly Trees"
People keep inventing Merkle trees, too.

I made the short bibliography of the original bitcoin paper because of Merkle trees. Damn, I wish I'd put $1,000 into bitcoins then; I'd be a billionaire. I thought bitcoin was a Ponzi scheme.

A pure mathematician far from CS, I nevertheless wondered about digital timestamps, and convinced myself they were impossible. Then I went to a talk by Stuart Haber, supported by a paper with funny quotes starting each section. He explained the purpose of an observer to make timestamps work, but they were using a linear linked list.

As a coauthor of the original Macaulay computer algebra system, with some low-level coding chops, it was obvious to me a tree would help here. And there had just been a NYTimes story about how the nascent internet was accelerating research in CS, people would be on vacation for a week and miss entire start-to-finish events.

I stayed up to dawn writing a polite parody of their paper, introducing the use of a tree, emailed it to everyone I recalled had been at the talk, and went to sleep. That's all I ever contributed; I ended up on the joint paper even though my contribution turned out to be a "Merkle tree".

Syzygies··on Opencode: AI coding agent, built for the terminal
tmux! That was today's project. I'm using Claude Code Opus 4 to translate a K&R C computer algebra system (Macaulay) from the 1980's into C23. Finally getting to the "compiles but crashes" (64 bit issues) I found us living inside the lldb debugger. While I vastly prefer a true terminal to the periscope AI agent view in Cursor, it was still painful having at best a partial view of Claude's shell use, interleaved with our chat. What I wanted was a separate terminal session AI and I could share as equal partners.

tmux is the quickest way to implement such an idea.

Syzygies··on Poor Man's Back End-as-a-Service (BaaS), Similar to Firebase/Supabase/Pocketbase
So let me get this straight. You read "back end as a service" and your mind went to BANKING?
Syzygies··on Claude Code now supports hooks
.claude/settings.local.json fragment:

  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|MultiEdit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '.tool_input.file_path' | xargs bin/save-hook.sh"
          }
        ]
      }
    ]
  }
I jumped at this HN post, because Claude Code Opus 4 has this stupid habit of never terminating files with a return.

To test a new hook one needs to restart claude. Better to run the actual processing through a script one can continually edit in one session. This script uses formatters on C files and shell scripts, and just fixes missing returns on other files.

As usual claude and other AI is poor at breaking problems into small steps, and makes up ways to do things. The above hook receives a json file, which I first saved to disk, then extracted the file path and saved that to disk, then instead called save-hook.sh on that path. Now we're home after a couple of edits to save-hook.sh

This was all ten minutes. I wasted far more time letting it flail attempting bigger steps at once.

Syzygies··on LLM code generation may lead to an erosion of trust
$200 is a small expense and you don't know why I need AI.

The online dialog about AI is mostly noise, and even at HN it is badly distorted by people who wince at $20 a month, and complain AI isn't that smart.

Syzygies··on LLM code generation may lead to an erosion of trust
One can find opinions that Claude Code Opus 4 is worth the monthly $200 I pay for Anthropic's Max plan. Opus 4 is smarter; one either can't afford to use it, or can't afford not to use it. I'm in the latter group.

One feature others have noted is that the Opus 4 context buffer rarely "wears out" in a work session. It can, and one needs to recognize this and start over. With other agents, it was my routine experience that I'd be lucky to get an hour before having to restart my agent. A reliable way to induce this "cliff" is to let AI take on a much too hard problem in one step, then flail helplessly trying to fix their mess. Vibe-coding an unsuitable problem. One can even kill Opus 4 this way, but that's no way to run a race horse.

Some "persistence of memory" harness is as important as one's testing harness, for effective AI coding. With the right care having AI edit its own context prompts for orienting new sessions, this all matters less. AI is spectacularly bad at breaking problems into small steps without our guidance, and small steps done right can be different sessions. I'll regularly start new sessions when I have a hunch that this will get me better focus for the next step. So the cliff isn't so important. But Opus 4 is smarter in other ways.

Syzygies··on I wrote my PhD Thesis in Typst
AI is the primary audience for our writing, and the primary reason to reconsider our choice of markup format. It's all about semantic compression: Typst source, markdown, and asciidoc are far more concise than LaTeX source.

I'm observing, not here to convince anyone. The last six months of my life have been turned upside down, trying to discover the right touch for working with AI on topological research and code. It's hard to find good advice. Like surfing, the hardest part is all these people on the beach whining how the waves are kind of rough.

AI can actually read SVG math diagrams better than most people. AI doesn't like reading LaTeX source any more than I do.

I get the journal argument, but really? Some thawed-out-of-a-glacier journal editors still insist on two column formats, as if anyone still prints to paper. I'm old enough to not care. I'm thinking of publishing my work as a silent animation, and only later reluctantly releasing my AI prompts in the form of Typst documentation for the code.

Syzygies··on Cracovians: The Twisted Twins of Matrices
I'm a mathematician who taught linear algebra for decades. I love Einstein notation. I don't find Cracovians interesting at all.

Old texts got really worked up whether a vector was a row or column. The programming language APL resolved this quite nicely: A scalar has no dimensions, a vector has its length as its one dimension, ... Arbitrary rank objects all played nicely with each other, in this system.

A Cracovian is a character or two's difference in APL code. There's a benign form of mental illness learning anything, where one clutches onto something novel and obsesses over it, rather than asking "That was exciting! What novel idea will I learn in the next five minutes?" I have friends from my working class high school who still say "ASSUME makes an ask of you and me" as if they just heard it for the first time, while the most successful mathematicians that I know keep moving like sharks.

I wouldn't stall too long thinking about Cracovians, as amusing a skim as the post provided.

Syzygies··on Snorting the AGI with Claude Code
No mention of Opus there or here (so far).

Having tried everything I settled on a $100/month Anthropic "Max" plan to use Claude Code. Then I learned how Claude Opus 4 is currently their best but most expensive model for my situation (math code and research). I limited out of a five hour session, switched to their API, and burned $20 in an hour. So I upgraded to $200/month "Max" and haven't hit limits yet.

Models matter. All these stories are like "I met a person who wasn't that smart." Duh!

Syzygies··on Field Notes from Shipping Real Code with Claude
I was looking at $2,000 a year and climbing, before Anthropic announce $100 and $200 Max subscriptions that bundled Claude Console and Claude Code. There are limits per five hour windows, but one can toggle back to metered API with the login/ command, or just walk the dog. $100 a month has done me fine.
Syzygies··on Show HN: Claude Composer
I moved to Max after projecting a $2,000 annual API bill. I haven't yet hit five hour limits, but login/ toggles easily between plans. I believe the interface tells you when you've hit a limit, but as I said I don't know first hand.
Syzygies··on Mathematical Fiction
https://m.media-amazon.com/images/I/614cOQl6DwL._AC_SL1000_....
Syzygies··on Mathematical Fiction
John Nash saw the symbol pi as just a Greek letter. In grad school he proudly used every Greek letter in a paper. I was asked to decorate his (film) dorm window in grease pencil, and by chance a photograph of Russell Crowe through this window became one of the most widely distributed promo stills. He's looking intent behind the equation "0 < pi < 1", straight from Nash's paper.

The reaction in my community, which I quite enjoyed, would disabuse anyone of the idea that mathematicians are less cripplingly conventional than other people. To the majority of mathematicians, pi is tied to the circle. A great UC Berkeley email thread speculated that I was trying to make Russell Crowe look like a fool.

Syzygies··on Mathematical Fiction
Consulting for "A Beautiful Mind" was in part an exercise in mathematical fiction. The later math is imagined to fit the story. John Nash even wrote me to ask what the math on the clipboard meant, as his film self recovered on a porch.

In various venues, I explained that mathematicians don't have a lot of experience writing fiction. Other than grant proposals...

Syzygies··on Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command
Yes, art!

I've been in a constant struggle with Claude Code over variable names. I've picked up speed by just getting the code working, fixing names later.

The variable names are what first jumped out at me, looking at this code. It spoke to my pain.

Syzygies··on Gemini figured out my nephew’s name
"Do NOT use any tools till we’ve discussed it through."

I've picked up a lot of speed by relaxing on so many AI guidelines, recognizing they're unenforceable. My comment preferences? Just have AI them out when we're done. My variable naming preferences? I get to pick better short names than AI, once the code works.

"Discuss before act" is nonnegotiable. I get better compliance by not burying this (say, in CLAUDE.md) in a sea of minor wishes we could work out as we go.

This needs to be a single character.

Syzygies··on My favourite fonts to use with LaTeX (2022)
As the only oldstyle font in the "original 35" Postscript desktop publishing fonts (think "original seven" Mercury astronauts), Palatino saw overuse. Among some designers it's second only to Comic Sans for its amateur use infamy.

I'm among the guilty. Palatino does appear spread out compared to alternatives, for better or worse.

The article does note that Palatino was originally designed for display text. I had long heard that Hermann Zapf was horrified at its adoption as a body font, which I couldn't confirm. The best I could do was to find a quote,

"One day I got up the nerve to ask 'Mr Zapf, what do you do?' He replied, 'I correct the errors of my youth.'"

Syzygies··on MIT asks arXiv to withdraw preprint of paper on AI and scientific discovery
If I've learned one thing using AI, it's that other people's experiences are not particularly relevant. So this paper is a meh! for me whatever its provenance.

Compare the failure rates for condoms.

Syzygies··on The Fastest Way yet to Color Graphs
Yes. The article ran through this point as follows:

"In 1964, a mathematician named Vadim Vizing proved a shocking result: No matter how large a graph is, it’s easy to figure out how many colors you’ll need to color it. Simply look for the maximum number of lines (or edges) connected to a single point (or vertex), and add 1."

I keep wondering why I ever read Quanta Magazine. It takes a pretty generous reading of "need" to make this a correct statement.

Syzygies··on Why the Apple II Didn't Support Lowercase Letters (2020)
As a grad student I took out a student loan for the equivalent of a year's stipend, to buy an Apple II in 1980. Within a week I voided the warranty (?) by carrying out a "shift key modification" that involved cutting a trace on the motherboard.

It worked, so I'm a bit baffled by Woz's explanation.

The Apple II didn't really advance my math research (that would be the later 128K Macintosh, to which we ported the Macaulay computer algebra system), but various friends learned computers at my apartment, shaping their later careers. The Apple II remains my only computer whose memory layout one could understand byte for byte.

← PreviousPage 4 of 25Next →