• 0 Posts
  • 57 Comments
Joined 2 years ago
cake
Cake day: August 3rd, 2023

help-circle
  • The basic problem is that identifiers can be either types or variables, and without a keyword letting you know what kind of statement you’re dealing with, there’s no way of knowing without a complete identifier table. For example, what does this mean:

    foo * bar;
    

    If foo is a type, that is a pointer declaration. But if it’s a variable, that’s a multiplication expression. Here’s another simple one:

    foo(bar);
    

    Depending on how foo is defined, that could be a function call or a declaration of a variable bar of type foo, with some meaningless parentheses thrown in.

    When you mix things together it gets even more crazy. Check this example from this article:

    foo(*bar)();
    
    

    Is bar a pointer to a function returning foo, or is foo a function that takes a bar and returns a function pointer?

    let and fn keywords solve a lot of these ambiguity problems because they let the parser know what kind of statement it’s looking at, so it can know whether identifiers in certain positions refer to types or variables. That makes parsing easier to write and helps give nicer error messages.





  • I think holding more helium in a smaller space is the opposite of what you want. The lifting force is equal to the weight of the air being displaced, so you want as little stuff as possible in as big a volume as possible.

    Maybe if you went the other way round and compressed the atmosphere?


  • A system I work with gives all keys a string value of “Not_set” when the key is intended to be unset. The team decided to put this in because of a connection with a different, legacy system, whose developers (somehow) could not distinguish between a key being missing or being present but with a null value. So now every team that integrates with this system has to deal with these unset values.

    Of course, it’s up to individual developers to never forget to set a key to “Not_Set”. Also, they forgot to standardise capitalisation and such so there are all sorts of variations “NOT_SET”, “Not_set”, “NotSet”, etc. floating around the API responses. Also null is still a possible value you need to handle as well, though what it means is context dependent (usually it means someone fucked up).



  • Skyrim is a totally different beast because the ingredient effects you know about don’t depend on your Alchemy skill anymore: instead you simply discover the effects by successfully making a potion with them. So there’s a sort of minigame of trying different ingredients together to discover what kind of effects they give to potions, which in my opinion is neat because it matches up with how you might do this in reality.

    I think the developers didn’t like the “surprise” extra potion effects you could get in Morrowind, so they changed it in oblivion.



  • I work at a large telecom company building customer support infrastructure, and you are by and large correct. It is a direct policy not to list our phone number on our website, which is supposed to “nudge the customer journey towards alternative solutions first.” That means AI chat, or user guided search on the website, or whatever.

    The funny thing is, being the most customer friendly company is supposed to be one of our organisation’s goals. By and large actually, individuals working here (at least at the lower levels) all want to genuinely help customers. However the way incentives are set up and the organisation is structured, inevitably cost savings is what drives most of the work that gets done.


  • The planet’s gravity is not what is causing the time dilation, but rather the gravity of the supermassive black hole that it was orbiting. The black hole is somehow spinning extremely rapidly, causing frame dragging, which creates a particular stable orbit very close to the event horizon.

    Apparently the energy requirements of the orbit would preclude ever reaching the planet except by slingshot manoeuvres around intermediate size black holes or neutron stars.