News for hackers. Stuff that matters.

timhwang21

Re:Liero – Sling'n'shoot Worms Game on Friday December 29, 2023 @04:58PM (#38810725)
The larpa in Noita is a direct callback to Liero!
Re:Half-Life 25th Anniversary Update on Friday November 17, 2023 @03:13PM (#38309371)
They may be on VPN. Google recaptcha has dynamic risk-based friction and is prone to serving effectively impossible challenges to users on VPN.
Re:The architecture of Uber’s API gateway on Saturday May 22, 2021 @08:39PM (#27251507)
Enjoying the article so far, but some things make it a bit hard to read. 1) code snippets are screen shots, and 2) some links point to an internal Google Docs page.
Re:On Cache Invalidation: Why Is It Hard? (2018) on Monday April 05, 2021 @10:46AM (#26699712)
"Cache invalidation, naming things and off-by-one errors. And cache invalidation."
Re:GHC 9.0, supporting linear types on Thursday December 31, 2020 @10:10AM (#25593319)
Fantastic comment! Thank you so much for this.
Re:React's UseRef Deep Dive on Thursday December 17, 2020 @06:45PM (#25462018)
> it might be better to just be a standalone library

See: https://github.com/reduxjs/redux, among others.

The React ecosystem did exactly this for the past few years, but evidently it was decided that a more native approach like hooks were better.

Re:React's UseRef Deep Dive on Thursday December 17, 2020 @02:31PM (#25459364)
This is true as long as you're able to strictly enforce the container-presenter pattern, which is increasingly harder to do as an application grows in complexity.
Re:React's UseRef Deep Dive on Thursday December 17, 2020 @08:25AM (#25455342)
One key difference between hooks and functions is that hooks tap into some hidden global component registry (I'm being handwavey here but this is more or less what happens). This allows side effects to be persisted and tracked between function calls.

You can probably build all this infrastructure yourself without hooks and only with plain functions. It'll involve some global store and some subscription mechanism. You'll end up with something really similar to Redux.

Re:React's UseRef Deep Dive on Thursday December 17, 2020 @08:23AM (#25455320)
I've more or less driven frontend development with React at several companies over the last 4 years. While some of the complaints are exaggerated I don't think the overarching premise should be dismissed as "a meme."

> No idea what this promise chaining thing is that you're talking about.

If you have any asynchronous things going on in `useEffect`, you'll have to do something similar to that `await(0)` song and dance in tests. This specifically affects tests if you do things like update the UI by toggling loading spinners on await.

> Redux

s/Redux/higher order components. One of the motivations for hooks was that as a mechanism for logic composition, HOCs just felt awful to use. (So did render props, which everyone suddenly used for everything in a brief moment of collective insanity.)

> Only a superficial understanding of React

I think there's something in this. The fact is that good or bad, 1) hooks aren't intuitive, 2) hooks have basically doubled React's API surface area. Previously, React was so simple that a backend engineer could pick it up and get productive with it in half a week. That's much less the case these days. I've been onboarding devs to React for years, and these days there's a lot more "yeah, that's magic, you don't need to know how that works for now."

Re:JavaScript Pattern Matching Proposal on Wednesday April 25, 2018 @01:42PM (#16924031)
Stage zero proposals generally read less formally. IIRC they are held to lower standards and expected to be formalized in the later stages.
Re:JavaScript Pattern Matching Proposal on Wednesday April 25, 2018 @01:36PM (#16923969)
I wouldn't necessarily say it's deep equality, it's just a less verbose way of sequentially checking properties. It's not going to check every property.

At least for me, I feel I'd be using this a lot for the boring but common use case of checking for empty arrays and such:

  const doSomethingToArr = arr => match (arr) {
    [] => whatever,
    [x] => whatever,
    [x, ...xs] => whatever
  }
Re:Docker vs. Kubernetes vs. Mesos on Wednesday August 02, 2017 @09:32AM (#14910378)
This is addressed:

>Google had tremendous experience with containers (they introduced cgroups in Linux) but existing internal container and distributed computing tools like Borg were directly coupled to their infrastructure.

Well, of course. Only companies with fuck-you money can afford the extra bytes spaces take up versus tabs, so it follows logically that they'd pay their developers more.
Re:Ask HN: Who is hiring? (February 2017) on Wednesday February 01, 2017 @01:44PM (#13543594)
Rocket Fuel | Web Applications Developer (fulltime) | ONSITE | https://rocketfuel.com/

Looking for frontend developers to help port our existing platforms into an integrated UI build with React and Redux.

Hiring process: coding challenge > phone interview > on-site interview with team.

Contact: [email protected]

Job description: http://app.jobvite.com/m?3GJgqiwS

Re:Show HN: CodeBuff – smart code formatter on Monday September 19, 2016 @10:31AM (#12531706)
If you're interested, Google Research recently published a paper about code formatting via dynamic programming: http://static.googleusercontent.com/media/research.google.co...