HN user

Amelorate

32 karma
Posts1
Comments12
View on HN

A while ago, while talking to a friend about game design, I had the realization:

Players will quit over issues they see in a game, even when in actuality those are non -issues.

Rust sort of already has this, though implemented in a worse way. They use 0.[major/minor].[minor/patch]. When the library author wants to indicate that their library is stable, they go to 1.0.0 and promise that they'll never make a breaking change.

The problem with that approach is that you never know if a change is major or minor, since many projects use the 0.A.B differently. Even if projects were standardized, you're missing some information compated to A.B.C or A.B.C.D.

My interpretation of the article was that chrome ships with a blocklist of websites that have annoying autoplay features, but will automatically remove websites from that blocklist that you usually start by playing their videos, and automatically adds websites to the blocklist if the first thing you do is pause the video.

Youtube probably is not on the blocklist, but it will add youtube to your personal blocklist if you always pause the videos.

Minecraft's Far Lands aren't actually related to floating point precision, although movement near the Far Lands is affected.

My understanding of what causes the Far Lands isn't that great, but I think it's caused by one of six or eight shorts overflowing in the generation algorithm.

Edit: It seems I needed to read more of the Minecraft Wiki link for the Farlands. https://minecraft.gamepedia.com/Far_Lands#Cause covers it much better than I could.

C for All 8 years ago

Python uses * * , but that is ambigous with

  int a = 1;
  int *b = &a;
  int c = a ** b;
  // Am I casting b to an int (returning it's address) and exponenting it or am I derefrencing b and multiplying it's result with a?

It is possible for a compiler to optimize long method chains into the equivalent imperative code. The rust compiler is an example, and in the case of the iterator trait, it can actually be optimized better than the equivalent imperative code, by removing checks when indexing into the array.

Counter-argument to changing the return type of a function with var: You can change the return type of the function to another type that might break some assumptions later in the code.

For example, if the code assumes it has a type Foo with a length field, and you change the return type of tha function to a Bar without that length field, the compiler will complain that Bar doesn't have a length field, rather than complaining about trying to assign a Bar to a variable of type Foo.

Even worse is if the Bar type changes the symantics of that length field (perhaps going from the number of elements to the max index of elements, causing an off-by-one error), the code could break silently.

That's mostly a strawman argument, however it is worth noting.

Small thing to note: While a lot of intelectual discussion does go on in /g/, the board's culture does often encourage misleading information and trolling. Browsers of reddit and Hacker News are often called out and ridiculed, and a number of technologies are dismissed based on being ran by "SJWs".

If you can filter out these things, /g/ does have a lot of discussion, but it is very different from Hacker News.