What agents mean for Rust (and vice versa)

(smallcultfollowing.com)

21 points | by mfrw 2 hours ago

4 comments

  • kubb 1 hour ago
    I wonder if „hard“ languages like Haskell will make a comeback with LLMs, because the short term cost of learning the language isn’t that significant anymore contrasted with the long term benefits of the type system and better structure.
    • black_knight 1 minute ago
      I have used LLMs a ton with Haskell! Opus knows Haskell really well, and it can do things very quickly in it. And in my experience the code it produces has very few bugs.
    • omicronxt 1 hour ago
      What makes languages like Haskell good is exactly benefits you acquire due to learning various abstractions which allow you to write better code. For example I like for an LLM to write code in Haskell using higher order algebraic effects, it's really great for readability but you still need to have some notion of what they are to use them. LLM won't program using them just by itself it needs to be deliberate instruction.
    • pjmlp 46 minutes ago
      I think everyone is focused on the wrong future, it is like watching folks arguing about which Assembly ISA variant is more relevant in the presence of optimising compilers.

      The hard reality is none of them.

      We will have some kind of type system/profs to help drive LLMs output, and those that still will have a job as system architects or whatever, will generate applications directly.

      And just it happens with optimising compilers, there will be a way to generate some kind of intermediate representation, like the -S switch, but that is it.

      Generating source code for 3 GL languages is an intermediate step.

      Who thinks otherwise should spend sometime looking into papers of AI role in compiler development.

      For example,

      "CGO 2022 Keynote: Compiler 2.0"

      https://www.youtube.com/watch?v=w_sX9aZoZxg

      "Machine-Generated, Machine-Checked Proofs for a Verified Compiler"

      https://www.youtube.com/watch?v=Dmt0h99iOmM

    • josephg 1 hour ago
      I sometimes ask an llm to plan out an algorithm or concept in Haskell. Then I ask it to implement it in rust. I think I get a better implementation that way - though I might just be fooling myself. They seem to find simpler abstractions if you start there.
    • Levitating 1 hour ago
      In my limited experience with OCaml, Opus has problems using the paradigm correctly. For instance it sometimes avoids recursion when it obviously fits.

      It gets it right after a few attempts.

    • throwawayy6767 1 hour ago
      The size of the training data also matters. Turns out the Rust Evangelist Task Force was right to push it on HN all along
      • vaylian 1 hour ago
        I also wonder if some deprecated practises and packages will linger in the training data for a long time. I remember the Python 2 to 3 transition. A lot of people parroted all kinds of outdated information on Python 3 and that made people hesitant to switch to Python 3.
      • Gigachad 52 minutes ago
        I found it amusing I used to push Rust so many years ago not knowing that I’d eventually get everything I asked for. And especially not how it would happen.
        • throwawayy6767 39 minutes ago
          Just like many open source maintainers lectured their unhappy users that their broken and featureless software was given for free and they should make PRs instead of complaining.

          Be careful what you wish for, etc

  • Depurator 1 hour ago
    I've been writing rust for maybe 6 years now, and Im very happy i started before the LLMs entered the scene so i had to fight the borrow checker and all that jazz.

    Now, I will say im extremely productive with rust and LLMs, and its also comfortable to know that I wont have to rewrite anything to a new language, rust is already the best.

    A famous swedish comedian talks about heroin as the "best drug". Where people usually end up and don't want to stop taking.

    • raphinou 55 minutes ago
      I've learned rust when llms appeared and it helped me developed while I learned. My use of llms evolved (https://asfaload.com/blog/ai_use/) and is still evolving: I'm currently at a point where I write most app code myself and use llms to review it. Test and doc I like to delegate to llms, and in that I'm the reviewer. I think I've found the middle point that fits me: llms have an added value, but I think I avoid most of their idiosyncrasies.
    • shevy-java 41 minutes ago
      AI skynet slop won. Your pre-LLM days shall be honoured in memory.

      The current slop-code though ... I don't think many would miss it.

      Others "heroin", as analogy, isn't one convincing to get into the slop addict scene really, in my opinion.

  • shevy-java 43 minutes ago
    > And, naturally, I also happen to think Rust is a really good fit for agentic development

    To me this is a sad development. AI skynet slop is winning. Does any real human, aside from the fanboi faction, really love "agentic programming"? That is to use prompts to autogenerate text that is source code? I find that both sad and horribly uninteresting. I also stopped reading AI slop generated descriptions - they are just spam, babelfish 2.0 if you will. When I know that the human behind that text, was too lazy to write it himself or herself, why would I want to read that text? That's just a waste of my time.

    > But I think Rust is popular for another reason: because Rust happens to be a really good fit for agentic coding.

    Ok, so Rust is the perfect language for bots. Wasn't the original idea to be a great language for humans? What is the point here if AI slop auto-generates everything? Why would you need a human here?

    > Rust is designed to give “good performance by default”, making the idiomatic thing typically also be the fastest thing. But another key part of Rust is that you have the knobs to eke out better performance when you need it.

    Ok but why does this then not apply to C, C++, Java, C#, D? These can not be used rather than Rust? And you also should not run into memory issues with C like pointers - after all, AI skynet slop should generate bug-free code in C or C++ too. So I don't get why Rust would be THE ultimate slop language here. To me, if AI works, then any language can be slopped down.

    This reminds me of the incredibly sad presentation DHH gave on a rails-conf, aka now slop-conf, where he spoke about how AI will win and how Rust beats Ruby hands down and he only AI-slop-spams now (busy on Omarchyslop). These people don't have a "vision" that is decoupled from AI - they are businesspeople and promo-people, convincing you that AI slop is the future. To me this is very sad rather than ... "exciting".

    • throwawayy6767 17 minutes ago
      Rust is fast, both at run and compile time (both important for the speed of the agent loop), its nazi compiler excludes many categories of errors that LLMs might make, the compiler's helpful error messages give precious hints for the agent to iterate upon, it's relatively new so not encumbered with half a century of legacy cruft with obsolete syntax, it has many modern first class features, it neatly compiles into a single portable executable. It's the language that's best positioned to mitigate the issues of LLMs while leveraging their (and its own) strength.