• 2 Posts
  • 34 Comments
Joined 3 years ago
cake
Cake day: August 11th, 2023

help-circle
  • korneltoRustWhy is Rust so bare-bones?
    link
    fedilink
    English
    arrow-up
    21
    ·
    3 months ago

    Rust tries to move language functionality to libraries where possible. Instead of adding high-level magic to the language, Rust prefers to add a low-level feature that can be used to build higher-level features. For example, instead of built-in nullable types, it has enums with data, which were used to make Option. This way hopefully you can do more things with fewer language features. Functionality of higher-level features can be explained by lower-level ones (knowing how things are implemented is important for systems programming), and you can reimplement them if you need (e.g. Rust in the Linux kernel uses its own smart pointers instead of those from the standard library).

    Rust tries to keep the standard library small, and move unnecessary code into crates-io crates. The problem with stdlib is that there is only a single version shared by all programs, so it has to stay backwards-compatible forever. Long term stdlib accumulates outdated functionality and deprecated APIs, which can’t be fixed. Crates.io crates support versioning, so they can evolve and iterate without breaking anyone.

    Another reason is that Rust supports low-level programming, including embedded. This means that the language itself can’t depend on any fat runtime, and doesn’t even perform heap allocations.






  • eGMP cars (Hyundai/Kia) need 20 minutes of charging per 2-3 hours of driving. It really works — I’ve driven across Europe twice now, and often my coffee breaks take more time than the car needs to recharge.

    The battery tech has advanced significantly in the last 10 years. Leaf used to be 24kWh, now it’s 40kWh for the same price. If the trend continues (and likely will thanks to economies of scale ramping up), by the time you need to replace the battery in today’s EVs, the replacements will be cheaper and better.




  • CS1 never fully integrated expansion packs, so there were three different ways to zone the industry, and a long disorganized list of ad-hoc zoning policies. CS2 had a chance to start with more of this more coherently designed.

    Plus CS2 made road editing much more precise and flexible. You can add and remove lanes instead of having separate road types for 150 different lane configurations.








  • korneltoRustWhy async Rust?
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    2 years ago

    I think Rust’s async is very well designed for what it is: easy to build state machines that can be composed without heap allocations.

    I think a lot of shallow criticism comes from people using Rust outside of its niche — when people aren’t writing the next nginx in it, but rather yet another blog.





  • korneltoProgrammingSoftware Disenchantment
    link
    fedilink
    English
    arrow-up
    6
    ·
    3 years ago

    This has always been the case. When Windows XP came out people hated it needed 64MB (not GB) of RAM, because that was more than the entire disk installation of Windows 95, which was also bloated compared to older Macs and Amigas.