HNHacker News
TopNewBestAskShowJobs

Nimelrian

139 karma · joined July 7, 2017

submissionscomments
Nimelrian··on JavaScript Equality Minesweeper
> it seems equality operator in javascript is good for nothing but being a source of confusion and a target of jokes.

  if (someValue != null) {
    // someValue is neither null nor undefined
  }
> does it not make sense to just remove it from the language completely?

No, because you'd wreck quite a bit of the internet with that.

> who is deciding that?

ECMA TC39

Nimelrian··on Reboot Your Dreamliner Every 248 Days to Avoid Integer Overflow (2015)
> a story about a bug in a missile that was on the verge of delaying its deployment due to tests failing.

A Patriot Missile in Saudi Arabia wasn't launched to intercept a SCUD, which then killed 28 soldiers. The reason was poor handling of rounding errors [1]

The maiden flight of the Ariane 5 rocket resulted in a RUD due to an integer overflow [2]

[1] http://www-users.math.umn.edu/~arnold/disasters/patriot.html

[2] http://www-users.math.umn.edu/~arnold/disasters/ariane.html

Nimelrian··on Game Programming Patterns: Double Buffer (2014)
> with the disadvantage of only being able to sync over a narrow range, such as 40-60 Hz.

1) This is not the problem of FreeSync itself but of the panels and their support for VRR.

2) I have 2 FreeSync monitors at home which both do 40-144Hz (Acer XF270HUA and Benq XL2730Z). In addition, more than 2 years ago AMD added LFC to help with the classic case of "FPS drops below FreeSync range" issue. I don't notice any issues with judder when my framerate goes below the range for 1 or 2 frames.

Your info is out of date. Nowadays FreeSync is just as good as GSync if you get a monitor of good quality (and you still pay 150-300$ less just because it isn't GSync).

Nimelrian··on The tasting of surströmming
Germans have experience with Surströmming.

> In 1981, a German landlord evicted a tenant without notice after the tenant spread surströmming brine in the apartment building's stairwell. When the landlord was taken to court, the court ruled that the termination was justified when the landlord's party demonstrated their case by opening a can inside the courtroom. The court concluded that it "had convinced itself that the disgusting smell of the fish brine far exceeded the degree that fellow-tenants in the building could be expected to tolerate".

Nimelrian··on Jupiter has 10 more moons we didn't know about
Saturn's rings are a bit more special. They are actually only 10-100m thick. There's still a difference (however small it may be) between those and kilometer sized rocks.
Nimelrian··on Parcel: Fast, zero configuration web application bundler
> Parcel has a better experience than your C++ build tools. Be it CMake, Ninja, or whatever build tools people use in 2018.

I don't think there are many people who'd say that there's any good experience with using CMake for any slightly complicated project.

Nimelrian··on Semantic Compression
What also helps immensely is the fact that C++ supports free functions. Free functions + templates allows for generic logic which is separated from the data they operate on, something Java doesn't allow in any remotely easy way. Yes, there are utility classes with static functions, but that is just horrible.
Nimelrian··on Node.js is forked to Ayo.js (pronounced like “IO”)
Using non-gender-neutral pronouns and assumptions of gender, according to a post on golem.de

https://forum.golem.de/kommentare/opensource/open-source-nod...

Nimelrian··on Idiomatic Redux: Implementation and Intent
Passing the store (or in general, your application state) down from each component to their children has one big flaw: It reduces your components' reusability in other projects.

You can circumvent this by creating a component at the top level of your application which holds the state and passes it down via React's context. The state-dependent components can then pull the state from context where they need it. By doing so, you basically reinvented react-redux, which works just like this (+ the performance optimizations).

Regarding your issue with the complete app rerendering on a single keystroke: This is a result of you passing down the entire store to each component. Since you still edit the store in an immutable way, on every keystroke you create a new store object and React rerenders everything because the store prop changed. I'm also confused how using paging/filtering would help with this.

Another advice would be to not store form state in redux. Keep your redux store only for your actual model application state. Keep forms/temporary state in your components and move it to your model redux store once it is done/baked.

← PreviousPage 2 of 2