• 0 Posts
  • 135 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle






  • Your default types for that are i32 or u32. It’s the exact same number of characters yet encodes more precise information.

    I’m aware of packing, but for my specific niche the main bottleneck is CPU, and it’s important to minimize the amount of memory usage to improve data locality, increasing cache hit rates, ultimately increasing cpu throughout. Any gains we would make by packing such small values would likely be eliminated by the cost of unpacking them, unless it’s a flags-like value where we are primarily comparing individual bits.



  • Cargo being an all-in-one tool is actually one of my favorite things about the rust ecosystem. It’s many things, and it does it all seamlessly.

    Regarding comparing to C or C++, how can you argue either is designed better? C, while standing the test of time, predates so many modern programming concepts or standards and writing C code is extremely error prone. C++ improves on many of C’s shortfalls, but it wasn’t designed. It’s the result of different things being loosely bolted on to C over the course of 30 years. And it’s still error prone, for example while there are smart pointers and other types that can make writing memory safe code possible, they’re not default and they aren’t always fully supported in the standard library, let alone anything else.







  • Only if you can reasonably argue that the output is the input (even with exact matches over a certain size being auto-rejected), and that it is enough to qualify as a copyrightable work. I’d argue line completions can never be enough to be copyrightable, and even a short function barely meets the bar unless it is considered creative in some way.