• 0 Posts
  • 90 Comments
Joined 1 year ago
cake
Cake day: August 2nd, 2023

help-circle


  • And memory bugs are only a subset of bugs that can be exploited in a program. Pretending Rust means no more exploitation is stupid.

    This is facile.

    According to Microsoft, about 70% of security bugs they see are memory safety issues.

    Yes: if you introduce memory safety, there’s still those 30% of security bugs left. But, well, I’d rather worry about 30% of issues than 100%…

    Similarly, I use libraries that eliminate SQL injections unless you really go out of your way.





  • Yeah, projects also exist in the real world and practical considerations matter.

    The legacy C/C++ code base might slowly and strategically have components refactored into rust, or you might leave it.

    The C/C++ team might be interested in trying Rust, but have to code urgent projects in C/C++.

    In the same way that if you have a perfectly good felling axe and someone just invented the chain saw, you’re better off felling that tree with your axe than going into town, buying a chainsaw and figuring out how to use it. The axe isn’t really the right tool for the job anymore, but it still works.


  • Pipoca@lemmy.worldtoProgrammer Humor@lemmy.mlSTOP WRITING C
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    8 months ago

    C is not how a computer truly works.

    If you want to know how computers work, learn assembly and circuit design. You can learn C without ever thinking about registers, register allocation, the program counter, etc.

    Although you can learn assembly without ever learning about e.g. branch prediction. There’s tons of levels of abstraction in computers, and many of the lower level ones try to pretend you’ve still got a computer from the 80s even though CPUs are a lot more complex than they used to be.

    As an aside, I’ve anecdotally heard of some schools teaching Rust instead of C as a systems language in courses. Rust has a different model than C, but will still teach you about static memory vs the stack vs the heap, pointers, etc.

    Honestly, if I had to write some systems software, I’d be way more confident in any Rust code I wrote than C/C++ code. Nasal demons scare me.


  • Pipoca@lemmy.worldtoProgrammer Humor@lemmy.mlSTOP WRITING C
    link
    fedilink
    arrow-up
    11
    arrow-down
    2
    ·
    8 months ago

    Right tool for the job, sure, but that evolves over time.

    Like, years back carpenters didn’t have access to table saws that didn’t have safety features that prevent you from cutting off your fingers by stopping the blade as soon as it touches them. Now we do. Are old table saws still the “right tool for the job”, or are they just a dangerous version of a modern tool that results in needless accidents?

    Is C still the right tool for the job in places where Rust is a good option?


  • Pipoca@lemmy.worldtointernet funeral@lemmy.worldGo No Further
    link
    fedilink
    English
    arrow-up
    13
    ·
    10 months ago

    Merriam Webster is a descriptive dictionary. They don’t tell you how words “should” be used, they say how words are used.

    Using literally as an intensifier goes back literal centuries. The earliest written citation we’ve found of that usage goes back to 1769. It can be found everywhere from Dickens to Brontë.

    It’s also hardly the first word to go on a similar path towards becoming an intensifier. Very originally meant “genuine”, really meant “in fact”, absolutely meant “completely”, etc.

    But who complains about sentences like “I was really bored to death”, or “I was absolutely rooted to the ground”? Does saying “it’s very cold” just mean “it is a genuine fact that it is cold”?

    Literally still means what it means. You can’t use literally to mean “yellow”, for example. People aren’t generally confused when they come across the word.


  • Pipoca@lemmy.worldtolinuxmemes@lemmy.worldAccurate?
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    Homebrew is fairly different from pip, cargo or npm in that only python developers use pip, only rust developers use cargo, etc. And those are mostly used to manage libraries, rather than executables.

    Meanwhile, essentially everyone who uses the console uses homebrew regardless of what programming languages they might or might not use. I was making a joke about how good, useful and basically required homebrew is.