• 0 Posts
  • 22 Comments
Joined 2 years ago
cake
Cake day: July 6th, 2023

help-circle
  • With GPU rendering, you should learn about GPU processing and memory usage too, not that it would matter much for such a use-case.

    nvtop is nice for displaying all that info (it’s not nvidia-specific).

    Also % CPU usage is not a good metric, especially when most people forget to set CPU frequencies to fixed values before measuring. And heterogenous architectures (e.g. big.LITTLE) make such numbers meaningless anyway (without additional context). But again, none of this really matters in this use-case.


  • A quick shallow look.

    • Avoid single hard paths. Provide fall-backs. Make them all configurable. Use xdg (properly)…etc.
    • Avoid .unwrap() or any source of panic!() for non-fatal things that can actually fail.
    • Make non strictly necessary fields optional in you model, if that helps.
    • Use .filter_map() and .collect() in your parsing code, instead of all the matches and continues in a for loop. You can use .ok()? to early-return with None on errors.
    • And finally, since you’re micro-benchmarking, try speedy or borsh instead of bincode, unless you need the serde compat for some reason.





  • I would move all struct members from Foo<false> into a “new” Foo<true> and return that?

    Yes… if you don’t define Drop for Foo.

    If you do, then you will have to either use mem::take()/mem::replace() with each field, or if you don’t mind unsafe {}, you can just do a trivial transmute. Justunsafe { transmute(self) } should work.




  • This is neither news*, nor majorly relevant. Having rustc_codegen_gcc as a rustup component is going to be way more relevant, and is much closer to delivery, just to give an example.

    * The post itself (not the content of it) appearing on the official blog was sort of pleasantly surprising (brought tears to my eyes, i tell ya). Hopefully that was a result of maturity, rather than external pressure.











  • I didn’t understand your sentence. But:
    Having concerns is valid.
    Having them in the context of this story/ad is misplaced.

    IBM invested 1B$ in Linux all the way back in year 2000 (imagine how much that is worth with tech inflation), and they did it again years later.

    That 1M$ is nothing. It’s not nearly enough to control the Rust foundation for one year, let alone controlling the Rust project as a whole. Calling it a “Vote of Confidence in Rust’s Future” was probably a good-spirited joke from the author, at least I hope it was.

    Note that IBM still doesn’t control Linux (even after acquiring RedHat), and we still have no problem calling them evil. Some of us still have no problem calling MS evil either, although many of the new crop of developers won’t, because for them the chance to have the financial privilege of working there someday outweighs any moral considerations. Incidentally, there is a good intersection between this group, and the group that takes moral posturing about whatever in-group approved cause of the month to the maximum. Ironic, isn’t it?