HNHacker News
TopNewBestAskShowJobs

samhuk

760 karma · joined November 24, 2020

Software Engineer creating delightful software.

Created Verba, Exhibitor, SockState, GoodFlow, ts-pg-orm, and such. Most of these are only fun side-projects.

Links to me online: linktr.ee/samhuk

submissionscomments
samhuk··on Sock State – Redux-Like State Container over Web Sockets for JavaScript
TL;DR: Redux-like state container over Web Sockets for Javascript, allowing for distributed computing. This has been for some projects of mine where I have multiple Javascript processes that need to communicate with each other without the usual awful workarounds.

Not-so-TL;DR:

I posted a little (awful quality) GIF preview of it's chat app example here [0].

The more detailed motivation of this is that typical Javascript build toolchains that I've seen and used all have this tendency to use multiple watchers for code builds and app process(es), using tools like concurrency [1]. These often end up plagued with race conditions and funky workarounds like debouncing.

Ever noticed when you make file changes and your app/whatever restarts a zillion times or doesn't properly restart? That's the issue Sock State was originally made to solve! Example:

Process #1: Build watch process starts, rebuilding some source code when file(s) change.

Process #2: App watch process starts, restarting when output file(s) change.

Typical flow: Source code change occurs --> #1 triggers build --> output file(s) gradually created --> #2 triggers app restart

Common issues with that:

1. Multiple debounces often required

2. Multiple file system watchers

3. App process(es) have no idea when builds start/fail

So I created Sock State for some side-projects that have particularly complex build processes in order to ensure that:

1. Build processes can publish their status updates to a centralized state store

2. Other processes can subscribe to changes of, restarting at the exact correct time, once, with no workarounds or other weird goofiness.

It's now turned into a bit more than just a glorified build status message bus, and perhaps can be something a bit more in the future.

[0] https://twitter.com/thesamhuk/status/1690318953594114048?s=2...

[1] https://www.npmjs.com/package/concurrently

samhuk··on I fixed a bug the other day
Regarding tech leadership:

Perhaps I've just been unlucky, but a rather depressing proportion of tech leadership that I have been under in the past appear to have seeked the role in order to:

1. Hide lack of engineering aptitude.

2. Put less work in.

If i'm on the right track with that, then it well explains why they don't care about cultivating a good engineering culture and let everything devolve into a zoo - i.e. everybody feels like everyone is out to get each other, no team work, rep farming, and all that nonsense.

Regarding getting work done:

I agree, I actually believe that it's the cause of the slow death of many companies: A gradual acceptance of nay-sayers, laziness, and "losers", that is to say an acceptance of people who just think that everything is lost, there's no point to fixing anything, and instead choses to spend their time placating why nothing can be done about anything.

It's depressing, and was traumatic for when I was working in those environments in the past. (I like to think) I'm a get shit done and deliver awesome products kind of guy, so these "loser" engineers and leaders are a true PITA.

samhuk··on I fixed a bug the other day
I agree, "denying a bug" does not equal "lazy", but rather "denying a bug one has created" does at best equal "lazy", at worst malicious (e.g. rep protection).
samhuk··on I fixed a bug the other day
> Deny that there is a problem. > Deny that it is your problem. > Ask for more information. > Complain.

Oh my does this ever bring traumatic memories!

This entire article reminds me of a previous company I used to work for. There was a sufficiently large number of engineers that had a similar, if not more elaborate, deliberate, and sinister way of responding to bugs:

* Deny {bug} is a problem - "I don't see how this affects you/anyone?"

* Deny {bug} can even be fixed - "Ok, fair, but I don't see how this can be fixed?"

* Deny {bug} is their problem - "Ok, fair, but have you tried asking {other employee?}, they are responsible for this." (they are obviously not)

* Be rude - "If you think this is a problem, then go fix it"

All this was just obvious defensive walls of lies to protect their reputation and hide their lack of skill and their laziness.

Around 5% of the engineers were like this and I've always analogized it to the proportion of U238 in a sample of Uranium - just enough enriched dogshit to cause a critical mass of misery.

I left (for greener pastures) shortly after I had a couple of tasks requiring interaction with these "engineers", which made working around them impossible, and then realizing that leadership had totally lost control of the zoo and didn't care one iota.

samhuk··on Ferromagnetic half levitation of LK-99-like synthetic samples
> The market never lies

Whilst this can sometimes be true, e.g. Disney stock decline tied to "go woke go broke", in general this is demonstrably, incredibly false.

The market is based on a mix of widely known facts, speculation, hopes, dreams, fraud, and a bunch of other weird goofy phenomena.

samhuk··on Ask HN: What's the coolest physical thing you've made?
Due to two things:

1. I'm a bit of a klutz

2. I'm somewhat of a perfectionist-closeted-as-a-realist-for-money kind of person, so physical things that I make/do never scratch that "must be perfect" itch.

...I almost never make anything physical (other than food? Is that cheating?). However!

First tiny backstory: Around 5 years ago I had a Clevo shitbox laptop for gaming (all I could afford then). It was loud and overheated (obviously). It was back in the "desktop replacement" days when there was a weird trend craze of putting desktop GPUs and CPUs into huge laptops, at the peril of...everyone?

So after a few months of having it, I decided to integrate an AIO water cooler "onto" (into?) it.

From a Youtube videos I learned the ins-and-outs of molex, lapping copper (how to not breath in ultra toxic metal dust was a welcome bonus), 12V and 24V switching power supplies, soldering, wire stripping, etc., then I just stuck the AIO cooler on with thermal adhesive, hooked it all up with a nice rocker switch and electric wizbangs, and I had a cute little switchable AIO cooler for my gaming laptop.

It looked gross, but actually resulted in a ~10% gaming perf boost and made it a lot more quiet (the AIO was taking a tonne of heat from the CPU where most of the heat and gaming bottlenecks came from.

It really did look hilarious. It was a fun story when guests came round for food/drinks/whatever; I would often get asked about what the heck it even is, as it just looked like some kid hot-glue-gunned a bunch of random wires, fans, and boxes to the back and under-side of a laptop.

samhuk··on Ask HN: Do you still use a hand held/desktop calculator?
It may be highly likely that I'm in some kind of out-of-touch techno bubble, but I don't see that much of a point of real physical hand-held calculators anymore. I feel like they got stuck between a rock and a hard place, i.e.:

1. With everything being so mega-project and planned-ahead nowadays, you rarely need that "oh lemme just calculate it for you right now" on-the-stop calculating. If a piece of work needs that, in my eyes somebody has already failed upstream.

2. For simple calculations, a normal computer will work fine (and you're likely using one anyway in jobs that need calculating).

3. For complex calculations, you will likely be writing a script in some programming language in order for the calculation to be easily repeatable, etc.

I can just imagine there are loads of people in jobs that do need real physical hand-held calculators every day, and are shaking their fist at me right now :P

samhuk··on Ask HN: Do you still use a hand held/desktop calculator?
If you would like, could you explain why you need to use a calculator every day?

I am probably in a massive techno bubble, right?

samhuk··on Electronic Structure of LK-99
This is how I explained LK-99 to a friend a couple days ago :P
samhuk··on Electronic Structure of LK-99
Indeed. The separation between "Chemistry" and "Physics" completely breaks down when you start dealing with electron behaviours.

I've actually got a little tin-foil-hat pet theory that Chemistry is slowly dying as it approaches "completion" of its roots (macroscopic phenomena of matter), and is gradually being subsumed by Physics. To at least a silly layman like me, lots of bleeding-edge Chemistry nowadays reads like your average Physics, e.g. doing quantum simulations for protein folding, superconductors, etc.

I'm probably just being silly though, right?

samhuk··on Electronic Structure of LK-99
My ultimate take-away about LK-99 since the start has been that, even if it doesn't turn out to be a holy-grail or whatever, the novel ideas behind the material are incredibly interesting.

The idea of causing tiny (~0.5%) crystal lattice shrinkage with cuprate percolation is a really interesting idea.

So far, only huge pressures or very low temperatures (i.e. Physics) have been used to cause that shrinkage, therefore perhaps LK-99 could, at the least, mark the time that Physicists hold up their hands, admit that they have failed, and let the Chemists give it a shot.

I'm slightly oversimplifying the situation, of course, and the disciplines of science cannot be so distinctly separated, but, y'know.

samhuk··on Electronic Structure of LK-99
I have to unfortunately agree with the sibling comment (although it was a little too verbose for its point).

If, to you, the most interesting thing about LK99 and the developments thereof is tweets and internet forum drama about it, then that speaks more about you than anything to do with anything else.

If you don't have anything to add to the conversation, then just don't add?

samhuk··on NASA mistakenly severs communication to Voyager 2
No. 2 degrees error at such a large distance equals huge distance error.

Also, empty space is huge and matter-things like Earth and the Sun are tiny compared to it.

samhuk··on NASA mistakenly severs communication to Voyager 2
TL;DR:

1. Voyager 2 has been pointing 2 degrees off from Earth

2. Been that way for a while and nobody noticed because very old computers.

3. Meaning that the probe has gone dark (ingress and egress comms are not possible)

4. However, both Voyager probes have software that tells them to routinely calibrate themselves every few months

5. Meaning that it should point at Earth in the next few months (most likely).

samhuk··on US offices are sitting empty – business owners will have to adapt
Been almost solely a remote software engineer for ~5 years.

The last couple of offices I've seen just have terrible equipment. This of course could just be my own anecdotal coincidental experience or just me being picky, but I do wonder if it's actually, at least in part, due to companies just not giving two sh*ts about equipment because fewer and fewer workers are actually going into the office.

If that hypothesis is true, then it's a really vicious and rapid positive feedback doom-spiral: worse equipment -> fewer on-site workers -> less motivation for better equipment -> even worse equipment -> even fewer on-site -workers...

...repeat ad nauseam.

Also, slightly tin-foil-hat-like (however I bet many will relate), but in the country I'm currently living in (UK), the government sold off all of the transport services to private soulless demons and political cronies, causing a runaway price surge that means a yearly pass for one ~30 minute route is >£5,000 (around $6,000?).

So, yeah, each on-site for me equals getting scammed by profiteering demons, having my back eviscerated by the knock-off-of-a-knock-off of a Herman Miller that has foam crushed into a slab of diamond, spending 30 minutes finding a HDMI/whatever cable, and of course losing 1-2 hours of my life to transport there and back.

Nah.

EDIT: What would make on-site a viable possibility for me would just be: Nicer transport (e.g. >70% chance of seat, instead of 1E-300% chance at the moment), cheaper transport, and better equipment.

EDIT2: I forgot biggest on-site downside of them all: bad tea and coffee :P

samhuk··on Thoughts on the fading away of the age of IE
I'm too young to be any kind of oracle on IE and it's history, however I'm personally glad that IE was already fading away by the time I began my software engineering career. This is because, from the stories I've heard from older colleagues, IE rapidly turned into another loser EEE Microsoft boondoggle; trying to own the ecosystem and crush competition by:

1. Moving standards so fast, so randomly, and so opaquely, that nobody can keep up.

2. Abusing market share and WinOS (then sued for it)

3. Etc...

In my eyes, IE was never going to recover from all of that bad blood. It was ill-fated and doomed to die once greed took a hold.

samhuk··on Thoughts on the fading away of the age of IE
> But how they have evolved!

I'de disagree with that statement as some of their moves (such as purchasing GitHub) could be equally viewed as part of their typical EEE strategy that permeated the entire business.

WSL could also be, and indeed is by many, viewed the same way ("Microsoft is just trying to pseudo-own the linux ecosystem by embedding it within Windows").

Personally, seeing how EEE permeated the entire business in the infamous 90's & 00's era Microsoft and all of the dirty laundry that ended up being aired, I don't doubt for a second that the current-era Microsoft is just as bad, but better at hiding it.

Apples don't fall far from the tree.

Fool me once...

samhuk··on The evolutionary stage of Betelgeuse inferred from its pulsation periods
Yes. It's a strange colloqialism indeed, but very common even in academia.
samhuk··on Ask HN: What boosted your confidence as a new programmer?
When I was finishing my internship at around 19 years old, on the last day a few colleagues did the whole card signing business.

A close colleague - a team lead of a different team who I had worked with a lot, went to a couple dev conventions and meetups with, and agreed with on a many facets of software dev and life in general, signed the card as so:

> It starts with a dream. Don't stop.

Many many years later, I still think about it often. Sometimes, all it takes is a little faith.

samhuk··on The evolutionary stage of Betelgeuse inferred from its pulsation periods
Key result: "We conclude that Betelgeuse is in the late stage of core carbon burning, and a good candidate for the next Galactic supernova."
samhuk··on Ask HN: Are people in tech inside an AI echo chamber?
I whole-heartedly disagree, but on a more technical note: "echo chamber" is a pajorative that implies a bunch of people "sniffing their own farts and enjoying it" - more accurately, a group of people believing in a false because of groupthink.

To expand and to tell of a very recent story: For work I used ChatGPT to help me write a 500 line bash script to automate a bunch of stuff. It took me around 1 day versus the 5 it would have taken me if I would go the google/ddg/stack overflow route of slowly crawling through outdated content and SEO noise to find the signals.

It worked, completely!

Solely from that experience, I'm convinced that it's not just farts and kool-aid. To go one step further, even, i'de say that anybody who doesn't at least have a cursory awareness or AI is in fact the one in the "echo chamber", isolated from the possible.

It's not the do-all solution, of course, but in certain scenarios, it's quite obviously, trivially demonstrably, revolutionary.

samhuk··on AMD CPU Use Among Linux Gamers Approaching 70% Marketshare
Minor correction: AMD CPUs do have something similar to efficiency cores, it's just that AMD doesn't clearly market it that way.

They bin CCDs for performance (max attainable frequency, thermal efficiency, etc) and include a good one and a not-so-good one on a CPU.

I got a 5950x a couple years ago and it's quite well known in the AMD space.

Intel's "efficiency cores" are almost the exact same thing - cheaper lamer cores to keep core count higher.

samhuk··on Loneliness is stronger when not alone
This is HN, a reply that rewords "just don't be sad" into a turgid essay of meandering variables and equations will shoot to the top or close to it.

I am sometimes surprised that so many fall into producing and consuming this overblown, dense, turgid content, however then I look around and see that there exists an absolute deluge of essays on the misogyny of Gone Girl, and then I kind of understand how it's just the nature of a good chunk of humans to produce and consume such essays.

Even this is one such example...

samhuk··on Texas governor signs law shutting diversity offices at public universities
In my experience on HN, there have been plenty of unflagged/un-deranked posts regarding DEI. Remember when the harvard admissions scandal occurred? There is obviously "things to see here", in some cases.

In this case, there indeed may be some new phenomenon, which is real, effectful action against DEI in education, by government (at least in a long time and as far as my memory serves me).

Calling something you (you personally) don't like to see, don't find interesting, or don't agree with as "just stuff, nothing worth seeing", is not the right way to approach discourse in online forums, wouldn't you agree?

Personally, i'm undecided on the DEI hot button, but what I'm more passionate about is open discourse about it, not more of your philosophy of shutting it down.

samhuk··on Texas governor signs law shutting diversity offices at public universities
That would be great, in theory, but:

1) This rule is not applied consistently, as we all know.

2) Doesn't the post represent new phenomenon? Has this thing happened before? (government taking real, tangible action against DEI in education, not just talk etc.). If not, then by guidelines, it should be ok, unless it's not "interesting" (whatever that means).

samhuk··on Texas governor signs law shutting diversity offices at public universities
It's not exactly technical, so I get that it's not 100% "on-brand" for HN, however it is a little sad that the post has to be flagged.

It feels like the community isn't trusted with a political topic like this.

samhuk··on Reddit bans subreddit detailing how to move to competitor Kbin
Ah, Voat. Thinking back, I cringe at the fact that I was quite a prominent user in it's very early days, before it got took over by antisemitism etc. Before the FPH crowd and others who were banned from Reddit came over, it was a reasonably nice place where otherwise-silenced (/"uncomfortable") topics coule be discussed in a fairly pleasant and intellectual way (sometimes). I even bought some merch to support the site when ako (or w/e the founder's username was?) was complaining about running out of money for the site.

A good example was that I actually remember discussinf about the increasing rate of transexuality amongst children on there (what could be the causes, the consequences, etc.), all the way back in circa 2015. 8 years before it became such a hot-button topic...

Voat never went away though - Poal was created and the entire, quite angry and detestable, userbase migrated.

There will always be a spectrum of humans, and every spectrum has two ends, and there will probably always be the "80% middle" forums, and the "10% ends" forums...

samhuk··on Notes on Vision Pro
> Phones sell because they made computers unintrusive

Respectfully, how does this make any sense? Didn't mobile phones end up becoming the most intrusive technology on Earth? (I'm not sure what you specifically mean by "intrusive", but I'm assuming that you mean "the extent to which the object interrupts your life/tasks/etc.").

Phones sell because they are:

1. Convenient

2. In most civilizations on Earth, it became a necessary item in order to live (authentication, payments, maps, etc.).

I'll skip the lesser points, such as the fact that they took over the camera for >99% of people for 99% of the time.

samhuk··on Saturn reclaims 'moon king' title from Jupiter with 62 newfound satellites
Ah, certainly. I think "Titan" is a somewhat odd name for a human.
samhuk··on Saturn reclaims 'moon king' title from Jupiter with 62 newfound satellites
> Saturn's system currently hosts three of these groupings — the Inuit group, the Gallic group and the densely populated Norse group, all of which take their names from different mythologies.

> All of the newfound moons of Saturn fall into one of these three currently existing groupings. Three of the new moons belong to the Inuit group, but the majority fit in the Norse group.

TIL Saturn's moons are named after various human groups.

← PreviousPage 2 of 7Next →