Fushuan [he/him]

Huh?

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

help-circle
  • 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.



  • I think that it’s about intolerance, some people are using a term in the intended non-slur manner, and others are intolerant about that rational desire. Even tolerant people shouldn’t torerate intolerance, so no, being pissed about people telling them to stop using the term in the intended non-slur way is not toxic.

    If that really hurts you, it’s a you thing. It’s not intentional, the meaning isn’t derived from the slur, it’s not a micro aggression. You won’t like the answer, but toughen up.


  • Because that’s like saying that “negro” is a slur when it’s being used in a Spanish textbook. No it’s a fucking color. Context is important and rewriting other languages because it seems hurtful in yours is super toxic.

    Master means supreme, master piece, the supreme piece, master ball, supreme ball, master key, the supreme key. It was used in slavery because the master was the supreme entity for the slaves, in a bad way. One specific use of a word doesn’t and shouldn’t cover the inherent meaning of it and as a consequence all of its uses.

    Tbh, I don’t care which name is used for the supreme branch, be it main or master because my team usually renames them to prod/uat/dev and branches as feature_etc, but saying that others are using racial slurs because they are using the old default that makes perfect sense is toxic.


  • The reason they don’t do multi people and multi year coding projects has nothing to do with repeatability of the experiments, most science coding is done through simple-ish code that uses existing libraries, doesn’t code them. That code is usually stored in notebooks (jupyter, zeppelin) or simple scripts.

    For science code, it usually falls in the realm of data analysis, and as a data engineer, let me tell you that the analysis part of the job is usually very ad-hoc modifications of the script and live coding though notebooks and such.

    The part where whatever conclusion of the research is then transformed into a functioning application, taking care of naming conventions, the architecture of the system where the input data, the transformations, the postprocessing and such is done, is usually done by another team of dedicated data engineers or software developers.

    I guess that it would be helpful for the analysis part to have standardized templates for data extraction and such, but usually the tools used in the research portion of the process and the implementation portion are completely different (python with tensorflow vs C++ with openvino or whatever cloud based) so it’s not really fair to load the architecture design since the beginning.






  • Yeah, okay. Tell that to every code editor’s defaults and every open source projects source code that I have read.

    Encountering tab indented files is like encountering ANSI encoded files or /r/n newline’d files. It’s not how it should be done. Sorry.

    Spaces are there to ensure that everyone sees the same, tabs have issues with internal indentation of function declaration and the sort. Yeah it indents like correctly, but then you do need spaces to indent vertically called functions correctly and it always ends up being a cluster fuck. Spaces are a standard for a reason.