• 0 Posts
  • 163 Comments
Joined 2 years ago
cake
Cake day: August 19th, 2023

help-circle
  • It’s a deadlock situation and can arise without any screw ups. Imagine the buses being 5x as long and all reach the intersection at the same time as an example. All have space to enter the roundabout but they’ll reach the same situation as in the picture.

    To fix this people uses signals and can be done by having the buses follow “Only 1 or 2 articulated (double) buses are allowed into the roundabout at a time”. A rule like that might be required if you have a lot of articulated buses. The risk of this happening depends on how many ways you can enter a roundabout no a bus like that, how long the buses are, how frequently they run and how big the roundabout is.


  • I would go for “garbage, bad and ok” where bad is acceptable. Most styles are ok, a lot of anti-patterns are bad but still get the job done but sometimes people write pure garbage. I’m very happy that at my job we just have a lot of bad code that’s workable but this one contractor wrote an absolute piece of shit. His code was a convoluted side-effect mess that was “reactive” and at around 3-5x more verbose than the “naive” solution. He made so many decisions that increased complexity and overhead that it become a rigid buggy mess.

    Sometimes people just need to stick to the basics by using a database layer and a service layer on the backend and a API layer and component code on the front.





  • It’s based on usage. R word is tainted now, this might change in the future or not. Language doesn’t care about etymology, only about usage. If the usage is generally negative and implies inferiority of a minority it’s a slur.

    Calling someone an idiot doesn’t imply that disabled people are inferior, which makes it ok to use.




  • You’re not forced into global forced variables, but they’re the default. Use the local keyword in front of the variable declaration for nicely scoped variable.

    It’s not that cumbersome to do things like

    local date=`date`
    echo "$date"
    

    but in all honesty the syntax sucks ass because it’s not intuitive. If statements suck ass, passing variables has to be done via command line arguments sucks ass, switch statements suck ass, making structured data sucks ass (jq is nice though).

    I agree with you that bash really sucks when you get to anything more than 10 lines and at that point I’d take literally prefer Dreamberd.




  • It’s pretty simple actually. Mine runs the program as it would normally and whenever the program reaches out to say “create this file” or “load this font” for example Wine will grab that call and translate it into a Linux OS command. As long as the program gets all their Windows API calls and windows specific files requests satisfied it will happily continue.

    This is why ARM support is such a hassle for wine since the processor is with a different architecture so the compiled binary needs to be translated as well with all the nuances.