HNHacker News
TopNewBestAskShowJobs

zeorin

38 karma · joined July 31, 2018

[ my public key: https://keybase.io/zeorin; my proof: https://keybase.io/zeorin/sigs/aP1nVX_zolMes1Ykc6NN4KLa1yItsueasC7bdwFtI5Y ] https://keyoxide.org/me@xandor.co.za
submissionscomments
zeorin··on The Useless UseCallback
React is easy, once you understand why

{} !== {}

and that it uses reference equality as a proxy for value equality.

This is why the absolute simplest thing to do is to just memoize all the things (see https://attardi.org/why-we-memo-all-the-things/ for a deeper dive into this approach).

I know that the conventional wisdom (e.g. https://kentcdodds.com/blog/usememo-and-usecallback) is not to do that, but it's worth noting that Kent doesn't actually bring receipts for his claims, and also the discussion is typically limited to toy examples, not huge applications that have the potential for huge cascading renders when anything changes. In my own profiling of real world applications I have found that memoizing everything is not actually a performance regression. And then also consider the React Compiler, which of course does the same, at an even more fine-grained level than any human could be bothered to consistently do by hand.

zeorin··on Dotfiles Management
For me the killer feature of home-manager versus other dotfiles managers is that it also installs any software your dotfiles depend on or assume to be present on the machine.
zeorin··on Vim Foot Pedal
My fix for this is to also remap holding the Enter key to right control.

That way I can use the "control" key on the opposite side of the alpha key, the same way one is meant to do with the shift key when touch typing.

zeorin··on Ad blocking is under attack (2017)
> Do you close your eyes walking around town any time you go by a store front, you see a roadside ad, a bench covered in ads, a taxi backseat, public toilets, any sports events and jerseys, TV, newspapers, magazines, radio...

There will be open-source AR projects to block those, too, one day

zeorin··on Traditional Packaging Is Not Suitable for Modern Applications
Nix packaging doesn't involve containers.
zeorin··on WebContainers are now supported in Firefox on desktop and Android
You could use different Firefox profiles for this...
zeorin··on Electronics Explained: Fundamentals for engineers, technicians and makers (2018)
If you scroll down to the bottom there's a link to buy the whole book.
zeorin··on Ask HN: Would you buy a modern Toshiba Libretto?
This does sound great to me. Do you have any way to keep up to date with your progress?
zeorin··on MDN Redesign
Don't give them any ideas
zeorin··on Vue 3 as the New Default
They're fixing that: https://beta.reactjs.org/
zeorin··on Why not to whitelist operating system user agents
eslint-plugin-compat [0] and stylelint-no-unsupported-browser-features [1] can help you know when you're using an unsupported browser feature.

[0] https://github.com/amilajack/eslint-plugin-compat

[1] https://github.com/ismay/stylelint-no-unsupported-browser-fe...

zeorin··on The open calendar, task and note space is a mess
I've only recently started using org and haven't yet tried this, but I did research CalDav interop ahead of time and found https://github.com/dengste/org-caldav
zeorin··on Building Container Images with Nix
Much more in-depth article about Nix and Docker, covers how they overlap, contrast and complement one another: https://sandervanderburg.blogspot.com/2020/07/on-using-nix-a...
zeorin··on Headless React
What tool is that?
zeorin··on Using GDPR to obtain one’s data as JSON
That's not accurate, at least as far as GDPR is concerned.

Only necessary ones don't need consent, but the bar for "necessary" is high: the software wouldn't be able to function without it and there's no way to implement the software without it. Think: "address" is necessary for "delivery".

Even then you still need consent to store the cookie under most versions of the "Cookie law", which is a complementary but different thing to GDPR.

zeorin··on Nix is the ultimate DevOps toolkit
This isn't a tutorial, but for an overview of Nix and Docker read https://sandervanderburg.blogspot.com/2020/07/on-using-nix-a...
zeorin··on Free and liberated e-books, carefully produced for the true book lover
What are GOATS?