• 0 Posts
  • 205 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.








  • sushibowl@feddit.nltoEurope@feddit.org*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    Drones work now because they are $1000 (random number in the right range), while a patriot missile is $4 billion dollars each. Sure you could shoot a drone down with one, but if you do the enemy will just send more and bankrupt you.

    I agree with the point but these numbers are some orders of magnitude off. A patriot missile is typically 4 million dollars (so not billion). Drones vary widely depending on the type. Man-portable scouting drones can go as low as a few hundred dollars. I don’t think a patriot missile would ever target something that small flying that low though. The Iranian Shahed is estimated to cost around $30-50k. Russia produces its own upgraded version (better navigation systems, bigger warheads, etc.) that costs around $80k.

    Even then, you can make 50 drones for the cost of a single patriot. The economics are not favourable.







  • I did not come away from this article with a very positive opinion on Clarkson. He strikes me as the type of guy who is incapable of recognising a problem that he himself is not personally facing. Climate change wasn’t real until he tried his hand at farming. Driving electric vehicles won’t solve the climate problem, science will (did science not develop the battery technology needed to move away from gasoline cars?). Farmers are struggling and will be forced to sell to millionaires and capitalists (is he himself not the capitalist that bought a hobby farm from a struggling farmer?).

    I don’t think he’s seeing his own hypocrisy here. Farmers have been facing these problems for years and no one paid attention. He calls up his buddy in Westminster, immediately gets a full cabinet meeting, and as if by magic the government starts moving in his favour (taking away power from local government, I might add).

    This isn’t a black and white issue and there is merit to Clarkson’s point that local government can get captured and corrupted by personal conflicts and interests. But I don’t agree with the image he appears to project as a defender of the common man and poor farmer. He’s a millionaire who has never given a single shit about farmers until he personally owned a farm.




  • Can you elaborate where your confusion lies? It’s a digital good, there is no marginal cost. So they can pretty much price a game however they want. So pricing is mostly about maximising revenue, i.e. get as many sales as you can at the highest possible price.

    A sale is a relatively straightforward strategy where you first sell the game at a high price to all the people who are fine with paying a lot, then you lower the price to sell more copies to the people who weren’t willing to pay the higher price. The result is more total profit. There is a time limit too to create a sense of urgency (“I better buy now so I don’t miss the opportunity”).