• 0 Posts
  • 29 Comments
Joined 2 years ago
cake
Cake day: August 2nd, 2023

help-circle



  • 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.


  • 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
    ·
    2 years 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?










  • There’s more than 2 ways to get Israeli citizenship.

    Both of those fall under the “right of return” for Jews.

    Non-Jews with permanent residency can become citizens after 3 years if they give up their previous citizenship. Meanwhile, Jews are allowed to be dual citizens. For example, some Druze in the Golan Heights became Israeli citizens that way, particularly due to the Syrian Civil War.

    Also, in 1952, Israel passed a citizenship law that gave citizenship to anyone who had been a national of the British mandate in 1948, had registered as an Israeli resident in 1949, and hadn’t left Israel before claiming citizenship. So about 170k Arabs were granted citizenship, while the ~720k who fled or were expelled during the war were excluded, although they expanded eligibility a bit in 1980 to include Arabs who had returned to Israel after the war.




  • Python virtual environments feel really archaic. It’s by far the worst user experience I’ve had with any kind of modern build system.

    Even a decade ago in Haskell, you only had to type cabal sandbox init only once, rather than source virtualenv/bin/activate.sh every time you cd to the project dir.

    I’m not really a python guy, but having to start touching a python project at work was a really unpleasant surprise.


  • A nuclear reactor is the part of a nuclear plant that generates steam from the radioactive materials.

    NuScale’s plan, for example, is to build a pre-fabricated reactor you can ship via truck to the plant. You put it in a deep pool, and add some piping to connect it to your steam turbine, and you’ve got a power plant.

    It’s modular, in that you can put many nuclear reactors in your pool. You can hook them up to whatever steam turbine you want. You don’t necessarily need more sites, you can have one site with more reactors.

    The advantages of the design is better passive emergency safety, centralized building of the most complex parts, and the ability to build smaller plants for smaller cities.

    Additionally, there’s been some discussion refurbishing old coal plants with small modular reactors; you’d basically replace the old coal furnace with a new pool of SMRs, hooking the steam to the old turbines and other infrastructure. Honestly, I’ll beleive it when I see it.