Fushuan [he/him]

Huh?

  • 1 Post
  • 266 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • Yeah elden ring SotA, I finished all the bosses and all the content but 1 optional boss on saturday, and the last boss yesterday. Good dlc but the balancing is kinda whacky and is has the typical complainers about difficulty, the typical defenders that have not finished the dlc, and then people that have done all bosses that know that the last boss is the most overtuned piece of shit to be ever crafted in ER. The other optional hard boss (bottom right) is also kinda stupid but it’s optional and it does give you SOME breathing room, but the last one is just completely un enjoyable.











  • Shared poibters are used while multithreading, imagine that you have a process controller that starts and manages several threads which then run their own processes.

    Some workflows might demand that an object is instantiated from the controller and then shared with one or several processes, or one of the processes might create the object and then send it back via callback, which then might get sent to several other processes.

    If you do this with a race pointer, you might end in in a race condition of when to free that pointer and you will end up creating some sort of controller or wrapper around the pointer to manage which process is us8ng the object and when is time to free it. That’s a shared pointer, they made the wrapper for you. It manages an internal counter for every instance of the pointer and when that instance goes out of scope the counter goes down, when it reaches zero it gets deleted.

    A unique pointer is for when, for whatever reason, you want processes to have exclusive access to the object. You might be interested in having the security that only a single process is interacting with the object because it doesn’t process well being manipulated from several processes at once. With a raw pointer you would need to code a wrapper that ensures ownership of the pointer and ways to transfer it so that you know which process has access to it at every moment.

    In the example project I mentioned we used both shared and unique pointers, and that was in the first year of the job where I worked with c++. How was your job for you not to see the point of smart pointers after 7 years? All single threaded programs? Maybe you use some framework that makes the abstractions for you like Qt?

    I hope these examples and explanations helped you see valid use cases.



  • but… this is not the math you see at STEM, this is the math you see at high school at best. There’s no deeper meaning in actual STEM math problems, they are way too abstract or specific. There’s no watermelons, it’s just some a, b, n1, nk… maybe some physics formulas that apply to velocity, mass… I read 0 problems in my uni math and physics courses where they used real world examples.

    I see your point but that’s for high schoolers, not STEM students or alumnus.





  • Oh I just installed lightdm in arch, disabled whatever I had, enables that service and activated the autologin by writing my username in some files I don’t remember anymore. And that was it.

    Due to some hardware issues I had I even had no service enabled and used to start it manually from a non GUI environment every time I logged on, and it worked fine. Now it’s properly enabled though.