• 0 posts
  • 15 comments
Joined 3 years ago
Cake day: August 3rd, 2023
  • 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.

  • 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).

  • Rigor in definitions allows us to express a lot of complex things in a compact form. this allows us to treat “Cars” as something different than “Motorcycles” while both a motorized vehicles.

    Meh. There’s plenty of room in the gray zone between “car” and “motorcycle” where things like this or this can exist. The botanical world has worked very hard to create rigorous definitions of fruits and vegetables only to be completely ignored by cooks. The culinary world in general has done just fine for centuries without rigorously specifying whether taco’s are sandwiches and cereal is a soup.

    As long as it is generally understood what people mean by a word when they use it everything will be mostly fine. REST is an understood term, whether the inventor of the term meant something else by it is immaterial.

  • is-number is a project by John Schlinkert. John has a background in sales and marketing before he became an open source programmer and started creating these types of single function packages. So far he has about 1400 projects. Not all of them are this small, though many are.

    He builds a lot of very basic functionality packages. Get the first n values from an array. Sort an array. Set a non-enumerable property on an object. Split a string. Get the length of the longest item in an array. Check if a path ends with some string. It goes on and on.

    If you browse through it’s not uncommon to find packages that do nothing but call another package of his. For example, is-valid-path provides a function to check if a windows path contains any invalid characters. The only thing it does is import and call another package, is-invalid-path, and inverses its output.

    He has a package called alphabet that only exports an array with all the letters of the alphabet. There’s a package that provides a list of phrases that could mean “yes.” He has a package (ansi-wrap) to wrap text in ANSI color escape codes, then he has separate packages to wrap text in every color name (ansi-red, ansi-cyan, etc).

    To me, 1400 projects is just an insane number, and it’s only possible because they are all so trivial. To me, it very much looks like the work of someone who cares a lot about pumping up his numbers and looking impressive. However the JavaScript world also extolled the virtues of these types of micro packages at some point so what do I know.

  • Micro services always require more maintenance, devops, tooling, artifact registries, version syncing, etc.

    The initial transition is so huge too. Like, going from 20 to 21 services is no big deal, but going from 1 service to 2 is a big jump in the complexity of your operations.

  • A git branch is just a pointer to a commit, it really doesn’t correspond to what we’d naturally think of as a branch in the context of a physical tree or even in a graph.

    But as the article points out, a commit includes all of its ancestors. Therefore pointing to a commit effectively is equivalent to a branch in the context of a tree.

    Some other version control systems like mercurial have both a branch in a more intuitive sense (commits have a branch as a bit of metadata), as well as pointers to commits (mercurial, for example, calls them bookmarks).

    I mean, git has bookmarks too, they’re called tags.

  • It’s not that deep. Here’s the two main critiques leveled towards the game in the article.

    • you don’t always know the consequences of your actions, and they’re not always predictable: a seemingly sensible choice sometimes ends badly, and a seemingly dumb choice could get you a reward
    • you can load a save and redo your things whenever you want, i.e. save-scum

    These are both somewhat obvious just from the structure of the game. Ultimately the conclusion the author is shooting for is that this makes Baldur’s Gate 3 a bad game but a good piece of interactive fiction.

    The author uses the mechanics of chess often as sort of an example of the pinnacle of game design which to me is telling. Video Games are much broader than that. Insisting that people should not call the thing you don’t like a game but instead “interactive fiction” is pedantry at best, and gatekeeping at worst.

    Sure, if you view the game through the lens of chess you will come away with these flaws. But for example, if you always knew the consequences of every choice the narrative tension would be destroyed. Of course chess has no such concern, so if we’re looking at games through that lens then narrative tension is of no value. Ultimately I think this is just a very narrow viewpoint of what games should be.

  • I think there’s a group of people who are just going to avoid quality completely and have entire factories running at normal quality only. Kinda similar to how some people don’t really do nuclear.

    If you don’t like the concept of going into space though maybe this expansion is not for you. I think the base game will get the bot upgrades for free anyways.

  • How could you learn anything about what people think of microtransactions from the success of a game that doesn’t have them? If a beloved franchise added a sequel with microtransactions in it and that sequel tanked, then maybe you’d have a case. From the success of Baldur’s Gate 3 the most you could conclude is “people will still buy a game that doesn’t have microtransactions,” which is not particularly revelatory.

    A bunch of AAA games that heavily feature microtransactions are smash hits and made millions of dollars. Sure, people complain about it, but they also purchase tons of them (may not be the same people, mind you). I’m pretty sure we can conclude that not all people hate microtransactions. Hell, publishers will look at Baldur’s Gate 3 and probably go “man, this game is good but if they put some paid cosmetics in there they could have made even more money.”

    And it’s probably true.

  • If a great game like Elden ring would’ve had cosmetic sets you could buy, would it have undermined the “greatness” of the game? I really don’t see it happening.

    I agree with you that people mainly care about the game being good. However a game’s budget is more or less fixed. If From had made a bunch of cosmetic sets it would be taking away resources from making the “main” game, and it may not have been as great and polished as it is.

    Also, once you have microtransactions in a game, there’s going to be a temptation to maximize the revenue gained from them, which can lead to the aggressive strategies you mention.

    I’m not saying it’s impossible to do mtx without ruining the game, but it’s difficult. Without mtx, the only thing you have to maximize your revenue is to make the game as good as possible, and so everyone involved in the game’s development is aligned towards that goal.

    Once you add mtx, there will be people involved whose main goal is to maximize revenue from the mtx (and I’m not saying those people are evil or want the game to be bad; they’re just doing their job). And so a sort of tug of war starts to happen between devoting resources and design decisions to make the game better, or getting people to buy your cosmetics. Finding the right balance through that mess is difficult.

  • Honestly, I hope Reddit stays popular so that most people stay there. As long as Lemmy doesn’t turn into another escape for CP/Nazi’s/random shit groups.

    I wouldn’t be surprised at all if various extremist groups end up setting up their own lemmy instances. The whole point of the decentralisation is you can’t stop them from doing that. I doubt the big instance will connect with those instances though. We might end up with a sort of alternate mini-fediverse for various groups that don’t get accepted into the main one.

    This is also your solution if main instances start getting too popular and you don’t like them anymore. Set up your own instance and disconnect from the rest. The main selling point of lemmy is you always keep some control over the platform.