Live data from Hacker News

Learnings from 100K lines of Rust with AI (2025)

zfhuang99.github.io

141–150 of 225 posts

Re: Learnings from 100K lines of Rust with AI (2025)

#141

Earlier quoted context omitted.

> LLMs do reason No, they don't. They are token predictors that use statistical techniques to emit the randomly weighted next most likely token given the previous token list. The result is a strange mimic of human reasoning, because the tokens it predicts are trained on strings that were produced by humans that were reasoning, but that's not the same thing. Human cognition is complex and poorly understood, and the na…

You have moved goalposts from reasoning to "human cognition". I won't tolerate that sort of slippery wordplay. Reasoning is making analogies between logical patterns found in conceptual space, with a direction of time (statements precede conclusions). For example. A => B and B => C. You may now deduce A => C. For something fuzzier, A~D and B~E, you may now deduce that D~=>E. This is the sort of thing that higher laye…

The problem with that is LLMs can output words or symbols that seen like it used "reason" to produce. But for everything the core algorithm does, it's simply nothing like the wetware reasoning to get to the same answer. So he didn't move goalposts. He always meant the reasoning that stems from human cognition.

Technically if it has that, it'd be singularity no? So basically the premise is they are doing nothing of the sort. Prove any LLM enough and it really does show it has no quarrels contradicting itself or being bossed around. Has no belief / no orientation etc. It's truly mindless but tricks our mind and soul (or whatever) probably.

Re: Learnings from 100K lines of Rust with AI (2025)

#142
post #125

Earlier quoted context omitted.

> It's not surprising that an LLM would produce different specs for the same work on different runs This is what I don't understand: AI is a computer program with its own data. If we give the same input to that computer program every time, why does it produce different outputs every time? Or does the input include LLM data + our prompt + some random data that computer program picks from its Internet search?

LLMs have a temperature parameter. At zero temperature they are deterministic: they always choose the most likely next token at each step based on what came before and the model weights, and they will always generate the same output given the same input. As you raise the temperature they will start (pseudo)randomly choosing tokens other than the single most likely token (though that one will still be the most likely…

Nah. Even with zero temperature this is still variation.

Re: Learnings from 100K lines of Rust with AI (2025)

#143

Earlier quoted context omitted.

If you ask 10 different humans to produce the spec with the same information (prompt and context) they will also produce 10 unique answers that will contradict each other and (depending on who you asked) may be just as confident. There are real decisions to be made when going from a vague prompt to a spec. It's not surprising that an LLM would produce different specs for the same work on different runs. If the prompt…

LLMs aren't people. They don't reason. They're token generators, a black box. Your analogy falls on its face with any scrutiny.

Wow, there are still people trying to claim they don't reason. What will they have to do before you'll admit that they can?

Re: Learnings from 100K lines of Rust with AI (2025)

#144
post #30
post #9

I'm also shifting to an vibe coding workflow, but I have a genuine question: whenever I use AI for Rust, it makes an insane amount of lifetime errors. I have no idea how people are churning out so many lines of code so quickly. Honestly, despite all the hype around Rust in the community, the fact that AI can't handle lifetimes reliably makes me reluctant to use it. The AI constantly defaults to spamming .clone() or w…

Honestly Rust is an UGLY language. For whatever powers it possesses in memory safety, its cryptic symbology is reminiscent of assembly. This is a problem when language designers are mathematicians and don’t understand typographical nuance and visual weights.

[dead]

Re: Learnings from 100K lines of Rust with AI (2025)

#145

Earlier quoted context omitted.

You have moved goalposts from reasoning to "human cognition". I won't tolerate that sort of slippery wordplay. Reasoning is making analogies between logical patterns found in conceptual space, with a direction of time (statements precede conclusions). For example. A => B and B => C. You may now deduce A => C. For something fuzzier, A~D and B~E, you may now deduce that D~=>E. This is the sort of thing that higher laye…

The problem with that is LLMs can output words or symbols that seen like it used "reason" to produce. But for everything the core algorithm does, it's simply nothing like the wetware reasoning to get to the same answer. So he didn't move goalposts. He always meant the reasoning that stems from human cognition. Technically if it has that, it'd be singularity no? So basically the premise is they are doing nothing of th…

> Technically if it has that, it'd be singularity no?

reasoning is not black and white. It is possible to reason poorly. Most people cannot do basic math proofs, even math majors struggle with the hardest math proofs. Reasoning in humans is also context/token dependent. I just spent one HOUR trying to show my mom (who has mild dementia) how to use amazon fire (push DOWN until your channel shows up, push RIGHT until the channel becomes big) and she could not figure it out. Rewrote the instructions in japanese and she followed the logic relatively smoothly. Ironically, i'm pretty sure her english is better than her japanese, vocabulary wise.

> it's simply nothing like the wetware reasoning to get to the same answer.

but you don't know how wetware reasoning works, so you are incapable of making that proclamation. I'm pretty sure when I do math proofs (I'm not an amazing mathematician) sometimes I have to literally tick my way through each step of the proof, sometimes breaking it down to super-basic substeps, which to me feels awful lot like what an LLM could be doing. For that matter we don't know how LLM reasoning works but my claim is that these LLMs are in principle capable of reasoning due to architecture.

If this doesn't make sense I suggest you look over the architecture of LLMs carefully and try to understand my point.

(BTW I'm not talking about "reasoning models" with "thinking turns", that's just marketing speak, I'm talking about ANY transformer-based model, even the "dumbest UX architecture" completion models)

Re: Learnings from 100K lines of Rust with AI (2025)

#146

Earlier quoted context omitted.

> LLMs do reason No, they don't. They are token predictors that use statistical techniques to emit the randomly weighted next most likely token given the previous token list. The result is a strange mimic of human reasoning, because the tokens it predicts are trained on strings that were produced by humans that were reasoning, but that's not the same thing. Human cognition is complex and poorly understood, and the na…

You have moved goalposts from reasoning to "human cognition". I won't tolerate that sort of slippery wordplay. Reasoning is making analogies between logical patterns found in conceptual space, with a direction of time (statements precede conclusions). For example. A => B and B => C. You may now deduce A => C. For something fuzzier, A~D and B~E, you may now deduce that D~=>E. This is the sort of thing that higher laye…

Reasoning requires cognition, otherwise there's nothing to reason about, no context or value system to use as a basis for reason.

Decision making can be done by trained machines following rules, but that's different that reasoning. A thermostat isn't reasoning when it decides to turn on the air conditioner, to argue otherwise expands the definition of "reason" to be so broad that it becomes useless.

LLMs are trained on human knowledge and reasoning that results from human cognition, and they are excellent at stochastic mimicry - if the argument is that they are actually reasoning, then some sort of equivalent to human cognition must be present for that to be true. Lacking that, they are nothing more than "token extrusion machines" with some potentially useful characteristics.

Re: Learnings from 100K lines of Rust with AI (2025)

#147

Earlier quoted context omitted.

> If you ask 10 different humans to produce the spec with the same information (prompt and context) they will also produce 10 unique answers But they didn't ask humans, they asked a machine. We expect our machines to behave in predictable ways. > If the prompt already contained answers to all the decision points that come up when writing the spec then the prompt would already be the spec itself. This is one of the be…

> We expect our machines to behave in predictable ways. I expect LLMs to produce randomly varying output. Maybe it's the thousands of hours I spent doing monte carlo simulations for my PhD. > This is one of the best arguments against using LLMs I've seen. > It reduces to the classic argument- at the point where you've described a problem and solution in sufficient detail to be confident in the results, you've invente…

I haven't made the argument that LLMs aren't useful, I can see cases where they are.

I don't think they include areas where correctness, determinism or human reasoning are important.

At least, not in isolation.

Re: Learnings from 100K lines of Rust with AI (2025)

#148
post #16

Earlier quoted context omitted.

Yes, but it comes with much better “built-in” guardrails to rein in the autocomplete. Especially if compared to something runtime-surprise-prone-if-lovable like Ruby.

This is why I suggested Go. Rust doesn't add anything over Go for LLM coding.

But it does. A whole class of runtime errors you can trivially produce in safe Go — null pointer dereferences, unchecked type assertions, missed enum cases — are unrepresentable in safe Rust. Also, the type system is a lot more expressive, so more invariants can be encoded in it, leading to more business logic bugs being caught at compile time rather than in production.

Re: Learnings from 100K lines of Rust with AI (2025)

#149

Earlier quoted context omitted.

LLMs do reason (they just sometimes don't reason well ). I assure you I've met many devs and "engineers" that reason less than LLMs, and are black boxes, especially in terms of the code they write.

> LLMs do reason No, they don't. They are token predictors that use statistical techniques to emit the randomly weighted next most likely token given the previous token list. The result is a strange mimic of human reasoning, because the tokens it predicts are trained on strings that were produced by humans that were reasoning, but that's not the same thing. Human cognition is complex and poorly understood, and the na…

> They are token predictors that use statistical techniques to emit the randomly weighted next most likely token given the previous token list.

Sounds like an implementation detail. Now describe how human reasoning works and explain why that process of chemical and electrical signals results in "reasoning" whereas what LLMs do isn't.

The problem with being this reductive is you can do it to anything, including humans. You can’t be reductive about LLMs and refuse to be reductive about humans - that's poor reasoning, and an LLM would out-reason you on this point, further negating your case.

Post reply on HN