• 1 Post
  • 571 Comments
Joined 3 years ago
cake
Cake day: September 2nd, 2023

help-circle
  • That’s called immediately mode gui (or imgui). It has nothing to do with think about elements or pixels. You do have elements, it’s just that they’re rendered directly (immediately) instead of stored.

    You have a panel+border+text “primitive” drawing functions. Nothing is stopping you from creating a single function that calls all 3 of those. You probably should, since it’s probably a common pattern. You could call it DrawBoxedText. There is no difference between a DrawBoxedText function and a BoxedText element with a draw() method.


  • The first problem is a you problem though. There’s nothing stopping you from dividing your global god-class into smaller ones. For example, you can have one state struct per windows. So windows wouldn’t have access to the state of other windows.

    The second problem is also the reason I don’t often use imgui. Imgui is great for introducing UI to applications that would re-render every frame, like a video game. But for every other application, it feels like a waste. If I wanted to waste resources I would write it in python or JavaScript.




  • Their app being so bad is the only reason third party apps were even a thing. The official reddit was just unusable on mobile.

    It is the only social media that had a significant user base using third party apps.

    The same is true for the search. You had to use their party (google) search engines to search for something on reddit.

    Not even the desktop website is good. I don’t even remember the name of the extension, but that one extension that every power user had brought many simple features that reddit didn’t add after years of existing.

    Their multiple redesigns were universally hated. The reason they haven’t shut down old reddit is because a non-insignificant amount of traffic uses that frontend, even though it is 2-3 redesigns old.

    Basically anything that reddit did was shit. It only was popular because the core features worked and were free with very little ads. And it had a massive (and active) user base that posted content, so basically every google search contained a reddit link with a decent answer.






  • I can get to my house, and I can value it at 5 trillion €. That doesn’t make it worth 5 trillion €.

    If an actual person/company that values things for a living, does an analysis on the value of my house, and it is valued by X€, then it is probably valued at X€. If someone says “pff just because they say so? I’ll buy your house for 5€”. Then a lot of people will come and say “5€? That’s a steal, if you’re gonna give it for such a low price, I’ll get it for 6€”, and it will probably go on until it reaches an amount very close to X€. If it ends up way below X€, the ones that did the analysis would probably want to buy it themselves, because they actually think they can make a lot of profit on that.

    I don’t know why I have to explain this. This is very basic economics.




  • Not saying that named parameters are bad, but the builder pattern serves the same purpose and imo it’s more ergonomic.

    TrainBuilder::new()
      .with_electric_motor(true)
      .with_width(1.0)
      .build()
    

    I don’t care about the color of the train or the amount of wheels, I just want the default train with a few changed parameters.

    If you do named parameters in rust, you would need to set every parameter. The only way to not set every parameter is to give a special meaning to the Default trait. But that is uncommon to happen in rust. And many structs that could easily derive Default don’t.


  • Again, those 2 are smaller than half the size of the random steel skyscraper I’m comparing it against. I could make a 1m tall sandcastle and claim sand is great at building castles. IDK if skyscraper has a formal definition, but I think you’re missing the point.

    Something being cool does not make it objectively better. Of course, we don’t have to do everything the same way. Maybe the builders of the buildings had unique constraints that made wood better than steel in their case. Or maybe they did so for artistic reasons, which they deemed worth the cost or not using steel. Or maybe they just put an arbitrary constraint of themselves of “we must use wood because we want to”.

    Tall buildings made out of wood existing does not mean that it is a good default choice for building skyscrapers.

    Sure, you claim that there are actual skyscrapers planned/being developed. But I wonder what sacrifices, if any, they had to make.

    Maybe we have been using steel all this time because nobody ever thought of wood. But I find that unlikely.






  • I’ve considered this many times. But I just can’t see a fair way to do this.

    You either compensate with money or with time. I would gladly pay 3x my commute monetary cost to just teleport there, so at least in my case time compensation would be much better. So how to do it?

    Option 1: Clock in when leaving the house, but that is incredibly easy to cheat.

    Option 2: Calculate once per employee the time it should take them to get there based on their transportation method. They can just claim to commute in a time-inefficient method (such as walking or cycling) when they go in car instead. What happens to people that don’t always use the same method?

    Option 3: Reduce the work hours for everyone by the same amount. This is amazing, but you can do this without claiming it’s for commute compensation. If you only do this reduction when not WFH, then you are basically punishing those who WFH and would have a short commute time. The ones on the top would just WFH 99% of the time from very far away and get massive commute compensations otherwise. Even then, the times they go to the office would be massively beneficial.

    For money, it’s basically the same.

    I just don’t think it can be done fairly.