Rendered at 16:05:27 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
mitchellh 4 days ago [-]
Based on Russ Cox's work. I take every opportunity I get to implore people who care about computer science and/or software engineering to read everything Russ Cox writes anywhere and everywhere, but starting on his blog is good: https://research.swtch.com/
jjice 4 days ago [-]
His writing on regular expressions and their engines is maybe the best resource for them I've ever found. He's such a wealth of knowledge and him publishing this on his site is an incredible resource of the rest of us.
randusername 3 days ago [-]
Thank you both for these comments.
Every year there are new no-name programmers that want to learn what they can from the best, every year (lately) it gets a bit harder to separate the signal from the noise online to discover those resources.
The framing is Go, but most of the advice applies to any language. Even capable AI agents, left to their own devices, often pick a muddled testing strategy compared to Russ's recommendations.
avocadoLife 3 days ago [-]
Thank you. As someone who appreciates your own work and writing, I particularly value your recommendations. Please don’t hesitate to share any others that come to mind.
mi_lk 4 days ago [-]
Call software development dead however you want. It just peaces my mind knowing there’re still people hand-crafting serious software engineering
sublinear 4 days ago [-]
Whether to write code by hand is a question of how specific and precise the result needs to be, not whether AI could do it. We write code for the same reasons we literally "write by hand" or do anything else by hand.
The same has always been true across all of history for other skills that are deemed "obsolete".
What makes code different is that it is both the specification and the implementation of an idea. If you're working alone this is a meaningless fact. If you're working on a team and there are strict requirements, you could spend an afternoon reviewing AI output... or you could just write it yourself and be sure. The only difference is what makes you feel better. The work doesn't stop though. We are not limited by materials or customers here. We are limited by purpose. It's still just code. You write as much or as little as you need to.
If this was a war, it doesn't matter who pulls the trigger and firing more bullets faster doesn't necessarily mean you win.
jeffbee 4 days ago [-]
Well, it was dead for a while. Nobody gave two poops about FP conversion for 20 years until Grisu, then there was a flood of improvements.
Russ Cox inspired me 10+ years ago to get into programming (and Go). I'm glad he's still making breakthroughs. If you haven't already, check out his tour of the Acme editor:
Crazy-better in particular for 128-bit floats! Nice.
The commentary on the change is nice as well; some good improvements being deferred to a later moment, as they introduce API changes, etc.
zokier 4 days ago [-]
> I've also compared to a zig implementation of zmij which is generally considered the fastest formatting implementation and found it to be generally about the same speed.
This seems somewhat unexpected. Most benchmarks I've seen put zmij significantly faster than uscale, so does this imply that the zig port of zmij is sufficiently slower to put them on more equal footing? Or did the author find additional speedups for uscale?
I do fully agree with the author on speed not being everything and adaptability etc can definitely be valid reasons to prefer this.
hygeoworks 3 days ago [-]
[dead]
xiaoliangliang 4 days ago [-]
[dead]
minfazhai 3 days ago [-]
[dead]
lnxsxu 4 days ago [-]
[dead]
cromka 4 days ago [-]
[flagged]
paaloeye 4 days ago [-]
Absolutely not.
If anything, Zig not being tainted by AI is a feature.
cromka 4 days ago [-]
How so?
burglins 4 days ago [-]
How not?
cromka 4 days ago [-]
What kind of answer is that? I asked How So because I want to know, not because I said it is NOT!
DangIsATyrant 4 days ago [-]
[flagged]
simonask 4 days ago [-]
I don't think that's true at all, not any more than any other programming community. HN is much more AI-brained than any other forum.
The doomerism is so tiring. We don't know how any of this will play out, even in the short term.
insanitybit 4 days ago [-]
This is so funny. The rust community is largely extremely anti-AI to a point where I worry that the community is going to sabotage the language.
jraph 4 days ago [-]
What makes you say so?
Aren't many vibe-coded projects in Rust?
Doesn't Rust have a permissive AI policy?
insanitybit 3 days ago [-]
> What makes you say so?
Go look at r/rust.
> Aren't many vibe-coded projects in Rust?
Yes. I don't know that I'd consider those people a part of the "rust community".
> Doesn't Rust have a permissive AI policy?
Somewhat. It requires disclosure.
sampullman 3 days ago [-]
That seems permissive to me. In what world does it make sense to hide the provenance of an open source code submission?
insanitybit 3 days ago [-]
It's almost definitionally restrictive? It isn't about what makes sense, it is literally an additional restriction.
sampullman 3 days ago [-]
When the above commenter said "Doesn't Rust have a permissive AI policy?", I interpreted that to mean "...compared to other projects with AI policies", which I think is a reasonable understanding of it.
Permissive rarely means "has zero restrictions" in normal parlance.
LoganDark 4 days ago [-]
[flagged]
LoganDark 3 days ago [-]
To be clear, I was saying it's not helpful to accuse projects of being worthless just because they don't ban AI. Linux is a prominent example of a project that did not become worthless just because of any stance on AI.
geophph 4 days ago [-]
Is success of a language binary? Surely there’s a middle ground between used everywhere and doomed.
jibalt 4 days ago [-]
Loaded questions are, by their nature, not honest.
KneeAwn 4 days ago [-]
Doomed in what sense?
cromka 4 days ago [-]
It hasn’t picked up enough popularity to have enough software written with which, in turn, so there isn’t much material to train AI with. As opposed to other strongly-typed languages. This is why Rust is so popular with all new stuff.
It’s a fairly common opinion that no new language designed for humans will ever get popular and Zig is that language that hasn’t even matured fully compared to other ones.
jjuel 4 days ago [-]
So a language has to be able to be used well by AI to not be doomed? Then I would argue there are a lot of doomed languages out there. Honestly, I have moved back to caveman era for my coding. I want to learn and write it myself. I don't want to be in the industry if all I do is prompt, and verify output. Could an AI create something fast for me? Sure, but where is the fun in just constantly putting out stuff that may or may not be useful to anyone including myself by just prompting an LLM and then surfing the internet until it is done? To me this perfectly encapsulates why I have pivoted to Zig. They are about learning, and improving as a programmer and person. I could feel my ability to critically think, and find answers myself slipping away at my last job (basically a prompt factory). It was not what I liked. It hurt all parts of my life not just coding. So to me there will be lots of people like that and will pick up Zig due to their stance on AI/LLMs. Will it ever be the go to for all sorts of companies? Probably not, but I don't think it was on that track before all this AI factory stuff started anyway.
shoobiedoo 4 days ago [-]
> They are about learning, and improving as a programmer and person.
Couldn't agree more. I've been thinking for a while that I want to make my own lispy programming language, so I took it one step further and bought an ARM assembly book which I have to learn before I can write the language in assembly.
An LLM could bang out a lisp in less than a minute, but I know that looking back and having my own story, overcoming obstacles using my brain, and knowing that a project is "mine" is so critical to being human, in my opinion.
Cordiali 4 days ago [-]
A huge part of the programming, computing, and electronics ecosystems exist purely for The Love of The Game™.
As another example, knitting used to be something done by a pretty large percentage of people. Now it's done by a tiny fraction. But I'll bet you anything, that the overall quality and diversity of their ecosystem (tools, knowledge of techniques, books, consumables, etc.) has massively improved compared with a hundred years ago.
coxmi 4 days ago [-]
What you tend to find in clothing patterns and the like is that they’re more obviously designed for beginners with fewer skills, generally with more explicit instructions for things like seam allowance, seam selection, or pattern segment mirroring. Old patterns expected that seamstresses already knew about the limitations of their own material choice or design because there was stronger tacit knowledge in the user base. I'd expect that this led to more creative expression within the medium at the small scale, with a higher level of technical skill for a larger number of people.
I don't think you can call the modern ecosystem 'improved', necessarily, it's just that the tools (specifically knowledge-based tools or documentation) have been altered to the standard of the specific technology’s audiences. There are certainly areas of fashion education or industry now with much more technical and creative output, and also online tutorials covering techniques not previously available, but crucially the distribution of deep skill has changed dramatically.
It seems relevant to LLMs, at least, that the specific production methods used have odd effects on the mass and distribution of skill throughout a set of technology users, and it's not necessarily a positive change overall.
tadasv 4 days ago [-]
Not sure what you're talking about, I'm currently writing a fairly sophisticated parser with C ABI in zig with LLM assistance. No issues with LLMs at all. On latest zig version + gemini neon.
But on the maturity side I kinda agree. I think the zig core team is small which worries me a bit and not sure what would happen to zig if Andrew disappeared one day.
insanitybit 4 days ago [-]
I don't think this is a big issue anymore. I've written totally new languages, from scratch, with LLMs. I then write programs using those languages and LLMs can do so just fine, they do surprisingly well at picking things up and in-context learning them. Unless your languages is extremely different I just don't think it'll be an issue.
wasabinator 4 days ago [-]
That makes it popular in my books. The world needs something that isn't yet another AI oriented technology. People need to remember that what is popular to them within their own echo sphere doesn't naturally extend to all of humanity.
paaloeye 4 days ago [-]
> there isn’t much material to train AI with
I obviously haven't seen with my own eyes how much Zig the frontier was exposed to, but Zig + agents isn't painful at all.
> have enough software written with
Ghostty, no? The community is using AI too.
IMMO, Zig is mature enough.
dnautics 4 days ago [-]
I am having a great time with zig + ai. And im glad the core strict-no-ai, the language features are sprawling enough that i cant imagine ai not slopping it if it were.
flohofwoe 4 days ago [-]
> so there isn’t much material to train AI with
Presence of a lot of example code in the training data doesn't seem to matter as much as in the olden days. Zig works just fine as LLM target, and so do other 'niche' programming languages.
That Rust is particulary well suited for LLM code generation seems to be mainly a popular opinion in the Rust community as coping mechanism for the fact that language choice really doesn't matter much anymore and their precious Rust language as is good as any when the code is written by LLMs ;P
wslh 4 days ago [-]
I imagine LLMs could help to not only create synthetic codebases but whole simulated agent communities to make Zig (or any other programming language) first class.
yellowapple 3 days ago [-]
I think it's less about popularity (LLMs seem to do fine even with more obscure languages than Zig) and more that Zig's syntax, standard library, etc. is much more of a moving target than Rust's currently is. Rust's compile-time checks are also stricter than Zig's, which helps narrow the scope of hallucinations (though I think Zig's compile-time checks are strict enough for that in practice, once the language+stdlib stabilizes enough to not utterly confuse any LLM trying to extrude Zig code based on training data).
jibalt 3 days ago [-]
> It hasn’t picked up enough popularity to have enough software written with which, in turn, so there isn’t much material to train AI with. As opposed to other strongly-typed languages. This is why Rust is so popular with all new stuff.
Frantic handwaving, none of which is a reason why Zig is "doomed". The main problem for AI with Zig is that it is in flux and so AI can base its responses on obsolete information, but this can usually be dealt with by careful prompting.
> It’s a fairly common opinion that no new language designed for humans will ever get popular
The contrary opinion is also common -- what you seem to be arguing is that your opinion is common and therefore right. But new languages are proliferating at a rapid pace with the help of AI. It's a new world and it's too soon to reach firm conclusions like "X is doomed".
In any case, Zig is 10 years old and is already quite popular. You started with a ridiculous loaded question -- really an assertion -- that Zig is doomed. You also asked why ("how so") Zig not being tainted by AI is a feature and got huffy when someone asked "how not". Obviously it's a feature for people who are anti-AI or at least want the option to avoid it. And that could also obviously be a reason for it not to be doomed "given the popularity of Rust with AI projects".
And it's important to note that this whole thing is off-topic trolling. The article is about improved floating point handling, not idiotic nonsense about whether Zig is "doomed".
Numeric1137 4 days ago [-]
Key word: opinion
dnautics 3 days ago [-]
> It hasn’t picked up enough popularity to have enough software written with which, in turn, so there isn’t much material to train AI with.
No. AI can one-shot all sorts of inferences. For an unpopular language to be effective with AI, it has to be well designed and not have any footguns.
Vivek-KY 4 days ago [-]
[dead]
aurareturn 4 days ago [-]
I think Rust is going to be doomed soon too.
Some programming language designed from the group up for agents would likely dominate in the future.
KMag 4 days ago [-]
You'd want tons and tons of high quality code for training data, so you'd probably want easily transpilation from one or more very popular languages.
You'd want to have high information density to get most efficiency out of your inference budget / energy consumption.
Presumably, that points to this hypothetical language just being a dense text serialization of a control flow graph with just enough type hints to run something like HM type inference.
That might also mean such a language might not be too difficult for an AI to transpile back into Rust and/or C++.
dnautics 4 days ago [-]
> You'd want tons and tons of high quality code for training data
Why does everyone say this? Im building a de novo theorem proving language and AI is doing a very good job of writing the stdlib.
> You'd want to have high information density to get most efficiency out of your inference budget / energy consumption.
Also nonsensical. For example, a two or three token variable name with semantic meaning is going to beat the shit out of a variable like x, v, v1, v2, etc.
> Presumably, that points to this hypothetical language just being a dense text serialization of a control flow graph
You know whats a great, dense way to symbolically represent a control flow graph? Code.
> with just enough type hints to run something like HM type inference.
Type hints require two round trips to fix, and is often information at a distance (without experience you cannot e.g. easily de novo guess the types at the call site -- is it put(dict, k, v) or is it put(k, v, dict)), honestly semantic hints are much better (e.g. good function names, modular organization, etc.) At least this is my experience doing LOTS of AI assisted coding in a dynamically typed language. The AI makes very few if any typing errors.
DonHopkins 3 days ago [-]
> might not be too difficult for an AI to transpile
Name (or invent) a language that's "to difficult for an AI to transpile".
Why would you need AI to transpile it? Even INTERCAL has a conventional compiler that emits C.
If you’re designing a language from scratch, you can design its semantics and compilation strategy together. AI can help implement the compiler.
The interesting question is which representation helps agents produce correct, maintainable programs with fewer mistakes and retries. “Fewer tokens” and “less work” aren’t synonyms.
osigurdson 4 days ago [-]
I'm pretty sure that AI sees programming languages as far more boring that humans do.
flykespice 4 days ago [-]
what are such languages?
ForHackernews 4 days ago [-]
Golang, arguably. It's built to be idiot-proof, unambiguous, and extremely verbose.
rootlocus 4 days ago [-]
Golang is nice for some projects, but I don't see it become the lingua franca of LLM software development for a very simple reason: it doesn't squeeze all the performance it can, and doesn't go as close to the metal as possible.
Every programming language is a tradeoff between performance, safety and programmer ergonomics. I trust LLMs will make this tradeoff obsolete, meaning we'll finally be able to ditch programmer ergonomics and some safety (testing can get better, tooling can get better, LLMs aren't as susceptible to footguns) and mostly ditck programmer ergonomics. This means we can finally write efficient software. And you won't implement highly performant software in a GC language.
ForHackernews 3 days ago [-]
Eh, the baseline these days is Python/JS/Java so porting to Golang would be a performance improvement for most LoB applications. I don't necessarily agree that LLMs are less susceptible to footguns. They are less likely to trip on the obvious rakes, but that doesn't mean there aren't buried landmines in LLM code.
I'd rather trust a deterministic garbage collector than a nondeterministic LLM.
rootlocus 3 days ago [-]
> They are less likely to trip on the obvious rakes, but that doesn't mean there aren't buried landmines in LLM code
I didn't say they were immune, I said they were less susceptible, and languages like Rust already eliminate most footguns. Humans are also nondeterministic, which is why we rely on tooling and tests.
ForHackernews 3 days ago [-]
Yes, sure. If your argument is just "Rust is great" then I'm not really objecting. I just don't think AI coding agents mean the end of garbage-collected languages. Nobody cared to squeeze every ounce of performance out of the metal in the 90s, why would they bother now that computer is cheap?
I think LLMs write good Golang (e.g. they write the same golang anyone does) and mediocre to poor Rust, maybe because Go is simpler, or there's more examples in the training set.
Go also compiles extremely fast so that helps AI agents do tight loops to find and fix bugs.
allthetime 4 days ago [-]
Zig is very similar in this aspect but lets you reach a bit lower down the stack.
osigurdson 4 days ago [-]
Quite a bit lower than Go. Zig is slightly lower level than C imo.
allthetime 4 days ago [-]
I don’t disagree, but curious what you mean by that…
tancop 3 days ago [-]
C has magic global state in the standard library. Zig makes you create allocators and IO providers then pass them to any function that needs them.
samatman 2 days ago [-]
My personal answer to this is bit-level manipulation with packed structs and any-power-of-two integers.
It's extremely powerful and ergonomic, and as a result I stuff things into bits as a matter of course. If I have four of one option and eleven of another, why use two bytes when one will do? Packing and unpacking is branch-free, which means it can mostly be ignored when reasoning about performance: unlike memory pressure, which is only becoming more important over time.
parlortricks 4 days ago [-]
Id add Python is pretty great given how much content the LLMs consumed on it.
80fj0348i 4 days ago [-]
With Python I am consistently running into problems with: 1. lack of type safety at runtime, especially across modules, and 2. poor primitives for concurrency. I get much better results in languages with strict static typing and native, broadly used concurrency tools.
flykespice 4 days ago [-]
So I guess Javascript is the worse candidate for LLM coding
Every year there are new no-name programmers that want to learn what they can from the best, every year (lately) it gets a bit harder to separate the signal from the noise online to discover those resources.
The framing is Go, but most of the advice applies to any language. Even capable AI agents, left to their own devices, often pick a muddled testing strategy compared to Russ's recommendations.
The same has always been true across all of history for other skills that are deemed "obsolete".
What makes code different is that it is both the specification and the implementation of an idea. If you're working alone this is a meaningless fact. If you're working on a team and there are strict requirements, you could spend an afternoon reviewing AI output... or you could just write it yourself and be sure. The only difference is what makes you feel better. The work doesn't stop though. We are not limited by materials or customers here. We are limited by purpose. It's still just code. You write as much or as little as you need to.
If this was a war, it doesn't matter who pulls the trigger and firing more bullets faster doesn't necessarily mean you win.
https://www.youtube.com/watch?v=dP1xVpMPn8M
The commentary on the change is nice as well; some good improvements being deferred to a later moment, as they introduce API changes, etc.
This seems somewhat unexpected. Most benchmarks I've seen put zmij significantly faster than uscale, so does this imply that the zig port of zmij is sufficiently slower to put them on more equal footing? Or did the author find additional speedups for uscale?
I do fully agree with the author on speed not being everything and adaptability etc can definitely be valid reasons to prefer this.
The doomerism is so tiring. We don't know how any of this will play out, even in the short term.
Aren't many vibe-coded projects in Rust?
Doesn't Rust have a permissive AI policy?
Go look at r/rust.
> Aren't many vibe-coded projects in Rust?
Yes. I don't know that I'd consider those people a part of the "rust community".
> Doesn't Rust have a permissive AI policy?
Somewhat. It requires disclosure.
Permissive rarely means "has zero restrictions" in normal parlance.
It’s a fairly common opinion that no new language designed for humans will ever get popular and Zig is that language that hasn’t even matured fully compared to other ones.
Couldn't agree more. I've been thinking for a while that I want to make my own lispy programming language, so I took it one step further and bought an ARM assembly book which I have to learn before I can write the language in assembly.
An LLM could bang out a lisp in less than a minute, but I know that looking back and having my own story, overcoming obstacles using my brain, and knowing that a project is "mine" is so critical to being human, in my opinion.
As another example, knitting used to be something done by a pretty large percentage of people. Now it's done by a tiny fraction. But I'll bet you anything, that the overall quality and diversity of their ecosystem (tools, knowledge of techniques, books, consumables, etc.) has massively improved compared with a hundred years ago.
I don't think you can call the modern ecosystem 'improved', necessarily, it's just that the tools (specifically knowledge-based tools or documentation) have been altered to the standard of the specific technology’s audiences. There are certainly areas of fashion education or industry now with much more technical and creative output, and also online tutorials covering techniques not previously available, but crucially the distribution of deep skill has changed dramatically.
It seems relevant to LLMs, at least, that the specific production methods used have odd effects on the mass and distribution of skill throughout a set of technology users, and it's not necessarily a positive change overall.
But on the maturity side I kinda agree. I think the zig core team is small which worries me a bit and not sure what would happen to zig if Andrew disappeared one day.
I obviously haven't seen with my own eyes how much Zig the frontier was exposed to, but Zig + agents isn't painful at all.
> have enough software written with
Ghostty, no? The community is using AI too.
IMMO, Zig is mature enough.
Presence of a lot of example code in the training data doesn't seem to matter as much as in the olden days. Zig works just fine as LLM target, and so do other 'niche' programming languages.
That Rust is particulary well suited for LLM code generation seems to be mainly a popular opinion in the Rust community as coping mechanism for the fact that language choice really doesn't matter much anymore and their precious Rust language as is good as any when the code is written by LLMs ;P
Frantic handwaving, none of which is a reason why Zig is "doomed". The main problem for AI with Zig is that it is in flux and so AI can base its responses on obsolete information, but this can usually be dealt with by careful prompting.
> It’s a fairly common opinion that no new language designed for humans will ever get popular
The contrary opinion is also common -- what you seem to be arguing is that your opinion is common and therefore right. But new languages are proliferating at a rapid pace with the help of AI. It's a new world and it's too soon to reach firm conclusions like "X is doomed".
In any case, Zig is 10 years old and is already quite popular. You started with a ridiculous loaded question -- really an assertion -- that Zig is doomed. You also asked why ("how so") Zig not being tainted by AI is a feature and got huffy when someone asked "how not". Obviously it's a feature for people who are anti-AI or at least want the option to avoid it. And that could also obviously be a reason for it not to be doomed "given the popularity of Rust with AI projects".
And it's important to note that this whole thing is off-topic trolling. The article is about improved floating point handling, not idiotic nonsense about whether Zig is "doomed".
No. AI can one-shot all sorts of inferences. For an unpopular language to be effective with AI, it has to be well designed and not have any footguns.
Some programming language designed from the group up for agents would likely dominate in the future.
You'd want to have high information density to get most efficiency out of your inference budget / energy consumption.
Presumably, that points to this hypothetical language just being a dense text serialization of a control flow graph with just enough type hints to run something like HM type inference.
That might also mean such a language might not be too difficult for an AI to transpile back into Rust and/or C++.
Why does everyone say this? Im building a de novo theorem proving language and AI is doing a very good job of writing the stdlib.
https://github.com/ityonemo/2b4m
> You'd want to have high information density to get most efficiency out of your inference budget / energy consumption.
Also nonsensical. For example, a two or three token variable name with semantic meaning is going to beat the shit out of a variable like x, v, v1, v2, etc.
> Presumably, that points to this hypothetical language just being a dense text serialization of a control flow graph
You know whats a great, dense way to symbolically represent a control flow graph? Code.
> with just enough type hints to run something like HM type inference.
Type hints require two round trips to fix, and is often information at a distance (without experience you cannot e.g. easily de novo guess the types at the call site -- is it put(dict, k, v) or is it put(k, v, dict)), honestly semantic hints are much better (e.g. good function names, modular organization, etc.) At least this is my experience doing LOTS of AI assisted coding in a dynamically typed language. The AI makes very few if any typing errors.
Name (or invent) a language that's "to difficult for an AI to transpile".
Why would you need AI to transpile it? Even INTERCAL has a conventional compiler that emits C.
If you’re designing a language from scratch, you can design its semantics and compilation strategy together. AI can help implement the compiler.
The interesting question is which representation helps agents produce correct, maintainable programs with fewer mistakes and retries. “Fewer tokens” and “less work” aren’t synonyms.
Every programming language is a tradeoff between performance, safety and programmer ergonomics. I trust LLMs will make this tradeoff obsolete, meaning we'll finally be able to ditch programmer ergonomics and some safety (testing can get better, tooling can get better, LLMs aren't as susceptible to footguns) and mostly ditck programmer ergonomics. This means we can finally write efficient software. And you won't implement highly performant software in a GC language.
I'd rather trust a deterministic garbage collector than a nondeterministic LLM.
I didn't say they were immune, I said they were less susceptible, and languages like Rust already eliminate most footguns. Humans are also nondeterministic, which is why we rely on tooling and tests.
I think LLMs write good Golang (e.g. they write the same golang anyone does) and mediocre to poor Rust, maybe because Go is simpler, or there's more examples in the training set.
Go also compiles extremely fast so that helps AI agents do tight loops to find and fix bugs.
It's extremely powerful and ergonomic, and as a result I stuff things into bits as a matter of course. If I have four of one option and eleven of another, why use two bytes when one will do? Packing and unpacking is branch-free, which means it can mostly be ignored when reasoning about performance: unlike memory pressure, which is only becoming more important over time.