HNHacker News
TopNewBestAskShowJobs

john-h-k

384 karma · joined March 23, 2025

https://johnk.dev
submissionscomments
john-h-k··on Can I stop drone delivery companies flying over my property?
The legal system is when you get to shoot at things that break the law
john-h-k··on Atomics and Concurrency
x86 and modern ARM64 has instructions for this, but original ARM and RISC approaches are literally a hardware-assisted polling loop. Unsure what guarantees they make, I shall look.

Definitely a good clarification though yeah, important

john-h-k··on The radix 2^51 trick (2017)
note: since learnt that B port is just port 11 in all the intel docs, uops.info just hexifies them to keep ports single-char
john-h-k··on Atomics and Concurrency
> The important thing to remember is that each of these cannot be split into separate instructions.

Nitpick, but they absolutely can be split into several instructions, and this is the most common way it’s implemented on RISClike processors, and also single instructions aren’t necessarily atomic.

The actual guarantee is that the entire operation (load, store, RMW, whatever) occurs in one “go” and no other thread can perform an operation on that variable during this atomic operation (it can’t write into the low byte of your variable as you read it).

It’s probably best euphemismed by imagining that every atomic operation is just the normal operation wrapped in a mutex, but implemented in a much more efficient manner. Of course, with large enough types, Atomic variables may well be implemented via a mutex

john-h-k··on The radix 2^51 trick (2017)
This isn't just due to the actual dependencies of flag instructions at hardware level (although likely be a factor), it also majorly affects code layout. On Arm64 for example, you can make a comparison, do other operations, and then consume the result of that comparison afterwards, which is excellent for the pipeline and OoO engine. However, because most instructions on x86_64 write flags, you can't do this, and so you are forced to cram `jcc`/`setcc` instructions right after the comparison, which is less friendly to compilers and the OoO engine
john-h-k··on The radix 2^51 trick (2017)
uops.info has latency for both (Alder Lake) at 1 cycle but throughput (lower is better)

* for add is 0.20 (ie 5 per cycle)

* for adc is 0.50 (ie 2 per cycle)

so it does seem correct.

This seems to be a consequence of `add` being available on ports 0, 1, 5, 6, & B, whereas `adc` is only available on ports 0 & 6

So yes as an individual instruction it’s no worse, but even non-dependent instructions will be worse for OoO execution (which is more realistic than viewing it as a single instruction)

john-h-k··on The Polymarket users betting on when Jesus will return
> This article, while its tone aged poorly with the relevant election results,

While I get your point, it’s critical to recognise that betting 90% on a six being rolled doesn’t make you correct when a six is rolled. You can believe polymarket was truly mispriced even with this outcome

john-h-k··on A scientist who disarmed an atomic bomb twice
Yes, I am wrong it seems. I am unsure where I got the high<->secondary mixup from, I'm sure I saw something talking about high explosive and defining it strictly as "needs supersonic shock wave to initiate", but have just checked and can't find anything saying that. Will edit my prior comment, thanks
john-h-k··on Dr John C. Clark, a scientist who disarmed atomic bombs twice
I’ll happily admit if I was asked to do this I’d run away screaming.

That being said, once it’s failed detonation (and you’ve cut off any possible signals to the detonator), wouldn’t you roughly expect it to be as dangerous as transporting one?

They mention the large chunk of ̶h̶i̶g̶h̶ secondary* explosive in there, but the key attribute of ̶h̶i̶g̶h̶ secondary explosives - by definition - is how hard they are to actually trigger. So the only failure mode is “somehow the detonator itself has entered a state that did not detonate with the initial signal, but will eventually detonate after >1hr”, which you’d _hope_(!) it was wired to prevent.

Again, I’d shit myself immediately in this scenario. Just interesting from an engineering perspective

*see comment below, `high` explosive does not mean "hard to detonate". Cursory searches for the [limited] information on the trigger-explosive used in nuclear weapons suggest they were mostly secondary explosives, and also will probably have put me on a new watchlist!

john-h-k··on Show HN: Loodio 2 – A Simple Rechargable Bathroom Privacy Device
next black mirror episode will be someone screaming for help as they are trapped in the bathroom while their anti-brown-noise device drowns out their pleas and they are left to die in there
john-h-k··on "Grok 3's Think mode identifies as Claude 3.5 Sonnet
Right. But given all pairs of mainstream LLM combinations, it seems a model is more likely to say “yes I am X” when it is X than when it isn’t X, even if it still has a high chance of being wrong.

Which means you should (as a bayesian actor) update on it saying “I am X” as evidence it is X

john-h-k··on "Grok 3's Think mode identifies as Claude 3.5 Sonnet
> General point: it's impossible to prove anything based on an LLM's response since it's impossible to distinguish a true LLM statement from a false one.

This seems true but sort of vacuous. Obviously an arbitrary statement, much like that as a human, can only be determined "true"/"false" by rigorous first order logic.

But outside of binary T/F, wouldn't "grok says it is Claude 3.5 Sonnet yet other LLMs do not" make you update your chance that grok is actually just Claude 3.5 sonnet?

I wouldn't say I believe it with much conviction. But it seems irrational to not believe it _somewhat more_ after seeing this.

john-h-k··on Why old games never die, but new ones do
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Su...
john-h-k··on Finland announces migration of its rail network to international gauge
Wow not even a verbal slip up I literally read Australia as Austria. Equally impressed and horrified with myself
john-h-k··on If an AI agent can't figure out how your API works, neither can your users
> a next token predictor can figure it out

Describing LLMs as "next token predictors" is disingenuous and wrong

john-h-k··on The behavior of LLMs in hiring decisions: Systemic biases in candidate selection
> We haven't solved interpretability and we don't actually know how these things work

But right above this you made a statement about how they work. You can’t claim we know how they work to support your opinion, and then claim we don’t to break down the opposite opinion

john-h-k··on Finland announces migration of its rail network to international gauge
Don’t OBB Railjet trains travel at 230km/h?
john-h-k··on The Fastest Way yet to Color Graphs
Very few compilers actually use vertex coloring for register allocation
john-h-k··on Insurers launch cover for losses caused by AI chatbot errors
> At best, this screams, “you’re doing it wrong.”

If you’re doing it wrong to a meaningful extent you won’t be able to get insurance or it will be very expensive

john-h-k··on Insurers launch cover for losses caused by AI chatbot errors
This feels like a pretty far fetched straw man. If someone invented medical malpractice insurance yesterday you could use the exact same argument.

More generally I think “if something is bad, we should not be able to insure it because then we incentivise it” is not right

john-h-k··on Why GADTs matter for performance (2015)
But you can load any byte by loading 8 bytes and shift (v cheap)
john-h-k··on AI is draining water from areas that need it most
Obligatory link about AI water/energy use https://open.substack.com/pub/andymasley/p/individual-ai-use...
john-h-k··on Why do LLMs have emergent properties?
> Yes, deep learning models only interpolate

What do you mean by this? I don’t think the understanding of LLMs is sufficient to make this claim

john-h-k··on OpenAI reaches agreement to buy Windsurf for $3B
To be fair, only 3 posts within "possible LLM usage" timeframe. Also I don't think using LLM to comment == bot. More curious about the motivation behaviour such behaviour, if it is occurring
john-h-k··on OpenAI reaches agreement to buy Windsurf for $3B
I find this comment odd but not at all discriminatory and will happily inform that yes, I am white British. I can see the point you’re going for but I do think it’s more complex than that. I don’t think LLMs are equivalent to another human race. Principally, LLMs have many pretty major differences to humans which you don’t really see at the inter-racial level. Secondly the reasoning for why asking someone their race in this context would be weird involved a lot of human history. If you’d asked my height or eye colour there’s nothing discriminatory feeling about that. That historical context doesn’t exist with LLMs
john-h-k··on OpenAI reaches agreement to buy Windsurf for $3B
Was this written by an LLM? Not accusative but something about the vibe strongly suggests it
john-h-k··on Memory-safe sudo to become the default in Ubuntu
Ah, interesting to know. I guess it is only the coreutils stuff where that is a concern
john-h-k··on Memory-safe sudo to become the default in Ubuntu
The other big thing iirc is they’re all MIT licensed rather than GPL(et variants) licensed
john-h-k··on Dimension 126 Contains Twisted Shapes, Mathematicians Prove
Sorry, yes, that was a major misunderstanding of the previous comment by me. I am utterly wrong!
john-h-k··on Dimension 126 Contains Twisted Shapes, Mathematicians Prove
[remarkably incorrect answer misunderstanding the above comments]
← PreviousPage 5 of 7Next →