• 0 Posts
  • 516 Comments
Joined 2 年前
cake
Cake day: 2023年6月21日

help-circle


  • Don’t forget Intel’s latest GPU launches either! For custom PCs, there are some really affordable and relatively powerful GPUs available now (for the price). Despite their performance otherwise, Intel is killing it in the GPU space now.

    For a lower spec build, you could definitely put together something with a 12100F (or other cheap CPU) and a battlemage GPU. Depending on where you get all the parts, you might be able to hit sub-$500 and get great 1080p performance, or for sure sub-$1k 1080p and likely 1440p performance.

    Handhelds also have a lot of good options available too. To save some cash, you can get low end Steam Deck and swap the hard drive yourself. Got myself the cheapest LCD variant and swapped the tiny drive in it with a 2TB drive off Amazon.


  • I’ll be honest. I’ve written async code in Rust for years and I don’t think I’ve used select at all. I tend to drop into manually implementing Future before that point. Either way, the issues related to that macro still exist, but the author seemed to call it out and link to an article about it (which doesn’t seem disingenuous at all to me).

    As for cancellation, the fact that you can cancel tasks by default in Rust has come up far more for me than any issues with unintended cancellation (which I don’t remember ever coming up, honestly). What I find myself wanting in other languages (especially JS) is the ability to both control when the task starts executing (for initialization logic or to prepare the task and pass it somewhere before it starts executing) and when it stops executing (early termination, for example with debouncing). I don’t get that by default in other languages, or often even at all in JS (unless I pass an abort controller everywhere).


  • Another potential security issue is path traversal - can someone getting an uploaded paste pass in an ID that allows them to read files in other directories of the system, like ../cert.pem? Verifying that the ID is a valid UUID, if that’s the route you go, should solve this.

    Anyway, it was a lot of fun reading your posts the past few days. Seeing the improvements between the iterations was really cool. Feel free to keep sharing your adventures!













  • TehPers@beehaw.orgtoRust@programming.devstruct in Rust
    link
    fedilink
    English
    arrow-up
    1
    ·
    26 天前

    In other languages, these are usually called static methods. Rust just uses these instead of constructor methods. That way you never have to work with a partially initialized value - you just create the value in your new function once you’ve initialized all its fields.


  • Do you happen to know when the most recent new prisoner to gitmo was brought there? And how about the most recent kidnapping, assault, or other official international crime by the Chinese government?

    Maybe some numbers? There are dozens of known Chinese international, extralegal police stations opened in at least 30 countries. There are less than 30 remaining gitmo prisoners.

    Nobody likes gitmo. If a certain “party of law and order” would actually give a crap about law and order, it’d be closed by now. But comparing the two is grasping for straws, especially since one’s actively being expanded while the other has been shutting down since Obama.