‹ BackHN Continuity

Thread

Topcoat is pushing the boundary of server applications with Rust

113 points · 100 comments · sagacity

  1. lolakutty · · focus · HN ↗
    Why bother with rust when you can write it in C and ask an LLM to weed out the memory bugs?
    1. Georgelemental · · focus · HN ↗
      Why bother with asking an LLM to weed out the memory bugs when you can write it in Rust?
      1. lolakutty · · focus · HN ↗
        > when you can write it in Rust..

        Because fuck borrow checker..(and the horrible syntax)

        1. _flux · · focus · HN ↗
          So actually the answer to your question is that Rust provides excellent guardrails against memory safety issues, and in some cases, for code correctness as well, by allowing more behavior to be encoded in types. One of those guardrails is borrow checker.

          Thus, the agent needs to iterate less.

          1. lolakutty · · focus · HN ↗
            >Thus, the agent needs to iterate less.

            I mean, I didn't meant to run the LLM every compile cycle. May be just before a release or something..

        2. BadBadJellyBean · · focus · HN ↗
          As if C was any better than rust. So much clutter. So hard to grok with all the macros. I'd rather read rust than C.
        3. felipellrocha · · focus · HN ↗
          I don't get the complaints about the horrible syntax. The syntax is fine... Which is weird cause I only get complains from c/c++ folk, and that set of languages have objectively AWFUL syntax
          1. simpsond · · focus · HN ↗
            It’s subjective. Some folks think lisps are it, others basic. Folks need to accept that we do not need global alignment on what good syntax means.
          2. lolakutty · · focus · HN ↗
            Rust's syntax is horrible not because of the braces. But due to the type system information the code has to carry. And the type system, unlike something like Haskell, is not always smart enough to infer the types from the context. Which cause even more noise in the form of type hints!

            Add to that the horror of life time annotations, you really have a mess at your hands. I have seen projects litter clone everywhere just to sidestep this mess.

    2. Ar-Curunir · · focus · HN ↗
      Why bother with C when you can get an LLM to write it in Rust and not waste tokens on finding memory bugs
    3. huijzer · · focus · HN ↗
      If you go that way, why not write LLVM Intermediate Representation? And if you know your server CPU anyway, why not write machine code?

      I personally like Rust for web applications a lot because you can catch many bugs at compile time instead of during tests or runtime.

      1. hmokiguess · · focus · HN ↗
        Soon we're gonna need a way to catch bugs at prompt time
      2. lolakutty · · focus · HN ↗
        >If you go that way, why not write LLVM Intermediate Representation? And if you know your server arch anyway, why not write machine code?

        Nah, C is good enough for me.

        > catch many bugs at compile time...

        Rust borrow checker is too dumb that you catch many non-bugs as well...I don't like that.

        Mmm..LLMs also generates false positives. But at least you can reason with it...

      3. officialchicken · · focus · HN ↗
        Reuse is bad / NIHS is good and it's hard to reach token metrics using accepted engineering practices. That leads to the point of having the LLM invent a new specialized job security chip architecture for your IR just to run CRUD app.
    4. cultofmetatron · · focus · HN ↗
      > write it in C and ask an LLM to weed out the memory bugs?

      because a non-determinist chain of reasoning is not the same as a fully deterministic algorithm. Its the best tool when a deterministic system is not feasable.

      1. lolakutty · · focus · HN ↗
        >because a non-determinist chain of reasoning is not the same as a fully deterministic algorithm.

        It is not. But rust's borrow checker has its costs. It forces awkward implementations. Either suffer the horrible life time syntax, or pay the price of clone everywhere.

        If you use C and run LLMs over it once in a while, I think it will get you most of the way.

        1. tancop · · focus · HN ↗
          99% of code only needs to know 'static and 'a, maybe 'b when you take two references and return one but that's pretty rare. You only get into complex lifetimes if you write the kind of code that belongs in a library.
    5. benjiro29 · · focus · HN ↗
      Why bother with rust when you can write it in C and ask an LLM to weed out the memory bugs?

      Here is a idea, why not combine both? Have the advantage of Rust its build in checks and LLMs independent checks. Now you get both for a even more safe program.

      1. lolakutty · · focus · HN ↗
        That is the worst of both worlds. You are paying for rust borrow checked forcing awkward designs, and you are paying for tokens.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.