top 50 comments

sorted by: hot top controversial new old
[–] [S] 94 points 1 month ago (1 child)

Kroah‑Hartman consistently framed language choices in terms of reviewer workload rather than developer convenience. Linux has "over 5,000 developers" but "about 150 core maintainers that review the majority of the code," a skew that drives his priorities. "We optimize for reviewers. We don't optimize for developers because we have a lot of developers," he said, suggesting Rust's ability to enforce locking and lifetime rules at build time means reviewers can spend their limited bandwidth on logic rather than bookkeeping: "If it builds as a reviewer, I know it's OK. I can look at the logic."

That's a great point. Living open source code must be readable and maintainable. Rust is an excellent match for that.

  • source
  • hideshow 2 child comments
  • [–] 46 points 1 month ago (7 children)

    So many system bugs are because of unclear memory ownership, buffer overflows, and race conditions. C/C++ don't help you avoid any of these footguns. Any other system that relies on GC is non-deterministic and prone to mystery hiccups, which is why OS and driver tech has been pretty much the same foundation since the 70s.

    Rust lets you avoid 2 of those 3 issues (thread race conditions are still a thing). And being compiled, instead of interpreted bytecode means you can get reasonable performance on smaller machines. No wonder these OS guys are so excited.

  • source
  • hideshow 8 child comments
  • [–] 17 points 1 month ago

    Yup. Most of my career has been working on embedded realtime software, so interpreted languages are right out and really only C and a subset of C++ are available. I’ve now been using Rust in that way for about nine months now and while the syntax is sometimes silly feeling, being able to not worry about some many other issues has made development much better.

  • source
  • parent
  • load more comments (6 replies)
    [–] 23 points 1 month ago* (2 children)

    Don't know about "fun again" but definitely a lot less nervewracking and paranoia inducing.

  • source
  • hideshow 4 child comments
  • [–] 14 points 1 month ago

    It is hard to think in and see through the eyes from a Kernel core maintainer, if you don't do this kind of stuff at this level. Instead enforcing style guides, looking for edge cases and unexpected issues because C allows to do anything must be terrifying. Part of this "nonsense" goes away using a language that is designed to handle this better. And you know, learning a new language with features you always wanted to have in C might be exciting too, I don't know. I can imagine Rust being more fun than C in the Kernel for some, so this is not a wild take or anything like that.

    I think the most exhausting part of Rust was two fold: a) the language was not designed to be used in the Kernel, they needed to update and discuss after real world usage, and b) the push back from C developers who either didn't understand Rust or think its bad for the Kernel. The childhood illnesses of Rust in Linux is seemingly over.

  • source
  • parent
  • [–] 9 points 1 month ago (8 children)

    I've got a non trivial project in Rust, and it takes like 5 min to compile on my machine. Personally, I don't know how anybody can call this fun. I find it insane to have to wait minutes to see the changes and to iterate. And like sure you can break shit up into crates to speed up compilation, but to do that you already have to have a design you're happy with and that's stable.

  • source
  • hideshow 12 child comments
  • [–] 18 points 1 month ago* (2 children)

    I find it insane to have to wait minutes to see the changes and to iterate.

    i did devops between 2015 & 2025 and got used to the cadence of waiting between 15 & 180 minutes for testing/production pipelines to finish vetting the work i submitted to them.

    i went back to doing IT last year and setup similar pipelines to update the code base my predecessor left behind and my new boss expressed the same consternation about waiting for your changes to iterate.

    i'm thankful for it because it gives me 30-ish minute windows to browse and annoy people on lemmy throughout the day. lol

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 1 month ago (2 children)

    haha this reminds me of my days working with websphere :)

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 1 month ago (1 child)

    Gosh. I remember working with this back in 2019 and earlier. Our legacy products ran on it. I remember a new service we made (before Spring Boot really took off) used TomCat. It was so much easier to mess with. I asked why we don't use that for our main product. Imagine my surprise when they said we actually used to.

    I'm sure they had their reasons, I was a younger dev at the time and didn't have insight into why they changed it. But still. Everything is so simple now. Java to run your jar. Your jar has your server built in. Done. And that's not even including containerization.

    I do miss Jenkins though. GitHub Actions seems to be the new hotness. Maybe I just don't have the muscle memory yet, but it can be annoying.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 1 month ago* (last edited 1 month ago) (1 child)

    Yeah, not gonna miss app servers. I do find the JVM was kind of made for a different era though. It's basically designed to act like a VM on top of which all your apps run. So, startup time isn't really a problem, and it wants to grab as much memory as it can by default. But nowadays everybody just makes small self contained apps that you can scale horizontally, so this whole model the JVM is tailored for isn't really used outside big enterprise. And Jenkins was alight, I used to use it back in the day too. For the most part, I do find GitHub actions are an improvement though. You just make a script and magic happens.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 9 points 1 month ago (1 child)

    5 minutes sounds like way too much, unless you mean a fresh compile. But then you shouldn't need to wait that long between changes, since incremental compilation should kick in then.

    And like sure you can break shit up into crates to speed up compilation, but to do that you already have to have a design you're happy with and that's stable.

    I mean, if you have your modules structured in a tree structure and with proper visibility, then it isn't a particularly big leap to put it into a separate crate. You just move the files, maybe fix some visibility modifiers still, and then a bit of boilerplate to add it to the workspace.

    It's only really when you're publishing to crates.io, that you don't particularly want to keep changing the names/scopes of the crates, as they'll stick around on there for the foreseeable future.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 1 month ago (3 children)

    It's around 100k loc sized project, so from what I've seen that's about what you can expect with Rust.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 10 points 1 month ago (1 child)

    5m seems about right. Lemmy's from scratch builds are ~3.5m on a fast machine, and we have ~60k lines of code, and are using some with large libraries with lots of features enabled.

    But you really should only ever have to do a from scratch build either at the beginning, or when you deploy. When developing, your IDE should only ever really run check or clippy, which should take seconds at most.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (2 replies)
  • [–] 7 points 1 month ago* (1 child)

    Five minutes with build cache? Or from cold build?

    With cache, then there's almost certainly something wrong with your computer or project.

    Also... you aren't building with --release every time are you?

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (4 replies)
    [–] 5 points 1 month ago (10 children)

    Rust would be better if the rust community wasn’t so up everyone’s ass about using rust.

  • source
  • hideshow 11 child comments
  • load more comments (9 replies)
    [–] 4 points 1 month ago (5 children)

    What part of Rust is fun?

    C is fun to me because the syntax is easy to understand and straight to the point. C is also great for learning low level coding, I find Rust so confusing

  • source
  • hideshow 10 child comments
  • [–] 26 points 1 month ago (5 children)

    Yes, C syntax is easy understand

  • source
  • parent
  • hideshow 7 child comments
  • load more comments (3 replies)
  • [–] 22 points 1 month ago (2 children)

    Rust requires you to unlearn some of the C and CPP habits. And so it's like learning a language that approaches things differently. That is pretty fun to see how another language solves a problem etc. I think rust is a very fun and interesting language tbh. But you are free to not like it, that's all good man. That's why we have different languages. After getting into rust, for me, you need to convince me to use C or Cpp, they have their niches for sure, but rust allows that too like embedded programming etc.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (2 replies)
  • [–] [S] 4 points 1 month ago* (5 children)

    What part of Rust is fun?

    C is fun to me because the syntax is easy to understand and straight to the point.

    You probably had never the pleasure to search for bugs caused by C Undefined Behaviour in multithreaded code.

    When I was writing my diploma thesis, I was writing multi-threaded code for an embedded DSP system. Results were wrong all the time. I tracked it down to atan2() giving wrong results. I searched for about six weeks how to fix that and it disappeared when I changed the position of the program's data segment.

    (If the concept of Undefined Behaviour is new to you, I can recommend the web pages of Jens Regehr).

    The above debugging experience was 25 years ago. We have better languages now. Rust has no Undefined Behaviour. That means you can track any bug (except compiler bugs) deterministically down to where the actual logic of the code, and the model of it which was in your head depart. This is great.

    Rust is fun because you can compile a complex program and it runs.

    But industry is still working with a fifty year old language written for systems where 32 kilobytes were a lot of memory. At work, I am still searching for bugs in multi-threaded C code with manual memory management (the previous developer didn't think this needs locks), and I have to explain to the CTO that no, wo won't have a release this fall, while the company literally drowns in technical debt.

  • source
  • parent
  • hideshow 5 child comments
  • load more comments (5 replies)
  • [–] 3 points 1 month ago (1 child)

    Also really easy to introduce bugs. But from how everyone online talks about being good developers is all you need. I don't know how those bugs get there in the first place.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 4 points 1 month ago* (1 child)

    I don’t know how those bugs get there in the first place.

    Easy to explain.

    Visualizing program code as cables, this is how a shiny new program would look:

    And this how, for example in a commercial environment, or if the programmers are not absolute masters, such a program will look after 15 years of bug fixing, feature requests, urgent changes, deadlines, and unfinished restructurings:

    The thing is that especially C code contains tons of implicit invariants which you simply cannot maintain in such code.

    And don't forgot that the picture above shows perhaps 500 cables, but a codebase can easily contain 50000 lines of code....

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (1 reply)
  • load more comments
    view more: next ›