HNHacker News
TopNewBestAskShowJobs

CraigJPerry

5,603 karma · joined September 23, 2013

I'm @CraigJPerry2 on twitter.
submissionscomments
CraigJPerry··on AI-generated posters don’t have to be horrible
Designers republic and memphis were the only designs i couldn't immediately see were AI generated.

The only reason i couldn't tell memphis is because it's aping a known design language already, it's just a perfect copy so me not being able to tell it wasn't AI isn't a free pass in this case.

I think if there was a little less "grid" feeling to the layout details then i wouldn't be able to tell on a few of the other designs either.

Edit: the designers republic version is quite a lot different than the others, it's not just that it's the only design to avoid pairing every feature with an icon, it's the whole layout variety - there's different font sizes, the positioning of elements is very well done to my eye. I'm gonna say this has to be another case like memphis, there's some pre-existing design language that i don't know of and it's just aping that. It's much more human than the others which i can believe are straight ai.

CraigJPerry··on Towards Self-Driving Codebases
Why couldn't you express all those as test cases rather than instructions?

In test cases i can do anything, a test framework is just a way of discovering and then scheduling functions to run. I can emit useful instructions to the agent from the failed test case: "After walking the AST of all use of state machine X, a branch was found at Y which reused stale state. Ensure stale references are dropped..."

I can force the agent to pass the test suite before it considers itself done. I can reject edits of such test cases to partially mitigate reward hacking. etc etc

CraigJPerry··on Retrospectively Reverse-Engineering Apple's Neural Engine
This isn't ai slop. It's fascinating and well written.

But I learned something really basic - i didn't know that the ANE (and the data pipeline around it) was designed for CNN rather than transformers. It's always been an open loop in my head, wondering why the ANE was less impactful than i understood it should be.

CraigJPerry··on CEO fired developers to make room for AI. Developers create open source AI CEO
Yank on that thread harder, developers and engineers are not safe just because they rely on different patterns.

But once you've toppled the house of knowledge work, you'll find you can rebuild it easily because the foundation still exists, and it's the thing missing in this analysis; judgement.

CraigJPerry··on Pnpm 12.0
Describing NPM as boring is a stretch. Given its security model, i think spicy is a far more apt label.

I have switched to pnpm already.

CraigJPerry··on Deutsche Bank becomes first foreign yuan clearing bank in Europe
>> They still import a lot

I don't think it's common knowledge how much they dropped imports since the Iran / straight of hormuz crisis.

Back at the start of that conflict there were a lot of breathless takes about what catastrophe was in store in a few weeks time, and what materialised was bad but not in anything like the same league as what was predicted.

The thing that wasn't accounted for in the analysis at the time was just how rapidly and by how much China could suppress its appetite for oil imports.

CraigJPerry··on License plate reader searches should require a warrant
System 1: a system for recording an image of a location at a given place over time.

System 1 can refer to the dashcam or the mk1 eyeball + notepad in your example.

System 2: a system for tracking the presence of a person across both time and location

An example of system 2 would be the facial id system being trialled on the london underground currently.

These are a difference in kind not in degree. It doesn't matter how many system 1's you deploy, you cannot unlock the capability of querying where any given face was observed across time and location.

CraigJPerry··on US Treasury undertakes historic intervention in yen market
>> Currency interventions never work

Where did you learn that? It doesn't reflect the structural volumes present. Central banks make interventions all the time in line with little stabilisation programs. Those are almost always deemed success.

Maybe you deduced it by yourself? If so, fx is weird despite traditionally being seen as the simplest area in finance. E.g. It's counter-intuitive but we tend to think trade make up most FX volume globally. It's in the area of less than 3%. The majority by far is speculative and hedging.

The other trap is fx volume, people assume the know what volume is but then they learn expressions of fx volume is almost always actually tick volume.

CraigJPerry··on Some more things about Django I've been enjoying
I think the mental model is the right thing to focus on. I'm not denying there are cases where async at the edge of an app can make sense but there's no free lunch and i that doesn't appear to be well understood.

Maybe i will write a blog post, if nothing else than to get my own thoughts in order.

CraigJPerry··on Some more things about Django I've been enjoying
I'm not sure i see it as a hack, but i do feel unduly burdened as a developer by async in python. I feel like there's a lot that i have to think about and i'd appreciate more help from the language.

I don't want to be overly critical, there's languages that people complain about and then there are languages that no one uses... If i compare it to js/ts, some stuff is genuinely better in Python - e.g. if you missed an await. While both ecosystems have lint tools available for this, but the behaviour is just friendlier in python.

Structured concurrency is better in python, but even if TaskGroup is nicer to use than AbortController, it still has its own foibles which means i'll usually advocate for AnyIO.

But the js/ts ecosystem just generally benefits from being async from the get-go where python you're just a time.sleep() away from a bug that will slip through dev envs and ci pipelines undetected and only rear its head under load in prod.

If i have a tip to share its the debug flag for asyncio run:

    asyncio.run(f(), debug=True)  # find some more issues before prod
CraigJPerry··on Some more things about Django I've been enjoying
There are so many footguns[1] in async python but it really has stolen the zeitgeist of modern python web. Synchronous django has a lot to commend it. If you deploy it reasonably well (workers, behind a caching reverse proxy etc) it's easy to operate in production even under duress.

It's not going to be the right stack for long lived websocket connections or whatever but for a CRUD-ish or enterprise app, often very productive.

[1] buffer bloat is too easy to sleep walk into

    queue = asyncio.Queue()  # oops
unbounded concurrency

    await asyncio.gather(*(fetch(item) for item in items))  # look mum! no outbound sockets left or maybe even no file descriptors
accidental blocking

    data = requests.get(url).json()  # oops! we're blocking the event loop
and sure you can setup a separate task to measure the event loop latency and alert on that but this is the kinda thing you'll never find in a tutorial, you just need to experience this stuff and figure out a solution you like

I can go on and on about async python (cancellation bugs, leaking a task - that has a cataclysmic failure mode where if you forget to hold a reference to your asyncio.create_task() then it's all weak refs in that machinery so your task can get garbage collected before it ran or completed in production! super tricky forensics. Then there's all the obvious stuff like race conditions, new ways of creating deadlocks, blah blah i really can go on for days.

CraigJPerry··on Everyone should know SIMD
>> you'll begin to naturally decompose every for loop into these five steps

Does zig have auto vectorisation? I'm thinking that if you write the code in a vector friendly way, then the compiler can do the boiler plate for you

https://llvm.org/docs/Vectorizers.html

https://inside.java/2025/08/16/jvmls-hotspot-auto-vectorizat...

CraigJPerry··on The 'absolute magic' of Morse code that still connects people globally
The thing that never fails to impress me is when an old timer ham copies a signal that's basically right on the noise floor when all i can hear is static. There was an old chap at the radio club i went to and he just had incredibly well tuned hearing. Felt almost superhuman
CraigJPerry··on Dev productivity metrics suck. Ops reviews are key for AI-accelerated eng orgs
> Core 4 (and similar) rub me the wrong way – measuring individual developers as the atomic unit IMO is always meaningless

And From: https://getdx.com/research/measuring-developer-productivity-...

    > Diffs per engineer*
    >
    > * Not at individual level
Are you guys agreeing or disagreeing with each other?
CraigJPerry··on Dev productivity metrics suck. Ops reviews are key for AI-accelerated eng orgs
I'm trying to disentangle this from the established / proven / trusted "dx core 4" (ask your local devops person if you don't recognise the name).

I found "initiatives" was added. What does this new initiatives measure bring. Why do we care about otherwise unqualified initiatives, how do i know that doesn't just mean using the other 4 proven measures as cover for pushing pet projects without merit?

I'm super cynical tonight it seems. This is just rubbing me up the wrong way i guess and i can't really put my finger on why.

CraigJPerry··on AI changes the economics of software rewrites
Not a good example i'd say given Python's position as pretty much the ultimate glue language :) You'd more likely keep the python shell (and faster developer iteration speed) and push measured hotspots down into c++/rust/c/whatever.

Incidentally, Whenever i've done this in the past it's had a pleasant side effect of improving architecture. You end up forcing something akin to "push for's down and pull if's up" because crossing the ffi boundary is not free. It can be quite magical, as in leading to comically unbelievably speed ups when you also take advantage of vector intrinsics.

CraigJPerry··on US residents angry datacenters 'shoved down our throats' are recalling officials
Sounds like a certainty stated like that. So not like toilet paper during covid?

what if the market was hard to enter?

What if the inputs aren't available?

What if the costs of the inputs rises?

What if the capital for expansion isn't available?

What if the manufacturers don't expect demand to persist?

What if there's a shortage of skilled labour?

What if it takes years to expand supply?

What if there wasn't effective competition?

I'm not sure it's as certain as you seem to claim.

CraigJPerry··on CarPlay Is Additive
That's just engine and gearbox i believe, not really a BMW.

Could be an Alpina

CraigJPerry··on Internal Combustion Engine (2021)
The thing that's missing here that really drastically changes the story is all the emissions control hardware that would exist on such an engine.

This is a circa 1990s engine in the US market i think? Dual Overhead Cam didn't really become popular in the US market until then i think. 70s-80s for single overhead cam to become established.

The diagrams are beautiful and informative as always from this author.

CraigJPerry··on Looking Ahead to Postgres 19
>> Each PG connection being a whole process does not scale like MSSQL that uses a thread per connection

There's no free lunch id think, the PG model is more robust. Unsafe extensions can take down the whole instance in the threaded model, processes contain the blast radius to that connection (also typically easier to debug since this type of issue is thankfully rare, it's also gnarly to get on top of).

Further, on linux (not on windows) a lot of the lines between a thread and a process get blurry (copy on write, shared memory mappings etc). They're both handled very similarly in the kernel, theyre both scheduled using similar machinery.

>> For PG to do plan caching it would need to serialize the plan between processes and that would require some significant work since it was never designed that way.

Is that true? I'm thinking the buffer cache and locks and WAL coordination are just as fast - it's just mmap'd SHM into each process. It's not like every access needs IPC?

CraigJPerry··on RF hacking my cloud-controlled ceiling fan
Love these write-ups, i have various 433mhz things around the home that i’ve integrated with home assistant. Probably the most useful is still a bbq thermometer with multiple probes.

Anyway i was going to post my favourite tool in this space https://github.com/jopohl/urh universal radio hacker just makes the process trivial, but i see the repo is marked archived now. Either way, the software is excellent.

CraigJPerry··on Apple raises prices of MacBooks, iPads
>> it will be consumers demanding

But how do I get to express that demand? Asking as a frustrated regular user of excel - excel is amazing software but if your laptop is not in airplane mode, the number of little delays that creep in is wild. It's all seemingly network delays, connecting to onedrive servers when i'm editing a field (why?!), 10s of connections to random microsoft domains as i flick between tabs in the UI (why?!) - each flick incurring a subtle but observable delay.

>> Dreaming is free... All Electron devs

I like your sentiment for sure but i reckon you might be barking up the wrong tree. I'll give the clearest counter example i know of:

When i scroll a buffer in Zed (it's a 120fps editor written in rust that i really want to like) i perceive micro stutters.

When i scroll a buffer in VSCode (an electron app) it's buttery smooth.

I've tried this many times over 1.5+ years of releases. It's a reliable finding on an m1 macbook pro and an m1 imac.

If the slow stack can be fast and the fast stack can be slow, then there's more to this than just tech stack.

CraigJPerry··on The Coming Loop
> My current status is that I have not had much success with this way of working for code I deeply care about

If something is judgement heavy, "code i care deeply about", then i don't really agree with the direction of travel here. Don't try to delegate decisions you care deeply about.

I do like the framing of agent loop vs harness loop, but only delegate stuff that you can accurately specify in advance, that usually means stuff that's repeatable in my case ("hey go see how i did X, do that but for Y"), and that inherently means stuff that's predictable.

For stuff where lack of my judgement as input is just going to cause me to say "no", we're down to collaborating in the "agent loop" as Armin puts it. And that's totally fine. It's fast, but also safe.

Remember before AI coding assistants, sometimes you'd get an engineer join your team who was SUPER productive, your peers would be jealous "oh yeah but you guys only got all that done because you have X on your team!" - they didn't live the curse of having that kind of person around - if you don't have them PERFECTLY aligned, then they run off at break neck speed in the wrong direction.

CraigJPerry··on When I reject AI code even if it works
The bottleneck when using a "faster keyboard" is understanding. We have a tool for this in compsci. Not having to fully understand something in order to successfully exploit it is a staple of computer science; we use abstractions to help us reason at a higher level. You don't necessarily always have to understand the nuance involved in selecting a hash function just to put and get some items in a hash map. Specifically, when are these cases where you don't need to go that deep? Are there similar scenarios for ai written code?

I'm more interested right now in what does that abstraction look like for AI generated code. Is there some reasonable solution wherein a sandboxed component in the enterprise architecture has various attributes (e.g. the bytes i stuff into this file store component are always the exact bytes i get back from it) confirmed by methods other than a human reading its code? Those methods, are they cheaper, faster, safer than just having a human do it?

If your enterprise architects have to read every line of code in your system today then i'd claim your architecture practices have room to mature. What can derived from that, and in which scenarios, for the purposes of safely leveraging immutable write-only code? I'm not interested in evolving the code (lines of code spent to solve a business problem was never an asset, it was always a cost) if it wasn't hand crafted by a human, i still have the requirements so i can just regenerate the entire thing with the revised requirement.

CraigJPerry··on The room the economy can't see
insta-subscribe, very well written.

>> And the economy looks at you taking the shift and concludes, smugly, that the shift must have been the most valuable thing you could possibly have been doing, because look, you chose it

I struggle with economics as a discipline. Or more precisely, I struggle with the parts of economics that get treated as if they are describing human life with scientific precision, when they often seem to be describing a very strange fictional creature who happens to resemble a spreadsheet.

There is a lot in what we might loosely call microeconomics that I find genuinely useful. It gives us a language for trade-offs, incentives, constraints, opportunity costs - all the little pressures and choices that shape daily life. Used well, it can help us understand the world more clearly and make better decisions inside it.

But then there is the other stuff. The grander stuff. The part that starts making confident claims about whole economies, whole societies, whole populations of supposedly rational actors - and this is where my patience starts to wobble.

Because so much of it depends on assumptions that feel heroic at best and comic at worst. Take something as ordinary as buying a loaf of bread. How much time do you spend, in that moment, weighing your expected future tax burden? For most people, across most of human history, the answer is: none. Absolutely none. The bread is there. You need bread. You buy the bread.

And yet models that assume people behave as if they are constantly running these elaborate forward-looking calculations end up informing policies, forecasts, and decisions that shape the conditions of everyday life. That is the part I find hard to swallow. Not because models are useless - they are not - but because the gap between the modelled human and the living human can be treated as a rounding error, when sometimes it feels like the whole problem.

CraigJPerry··on Free SQL→ER diagram tool, runs in the browser, nothing uploaded
The whole code base is a breath of fresh air to be honest: https://github.com/royalbhati/sqltoerdiagram/blob/main/src/m...

Author is top notch in my book. I'm a sucker for someone taking a complex problem and distilling out a simple solution. I don't know of higher praise to give a developer.

CraigJPerry··on AI coding at home without going broke
I wondered if there might be a no brainer "free" option on discarded hardware.

I have a GTX1080ti which i think is circa 2018, it's unused, more than paid for itself over the years, owes me nothing at this point so the hardware is free.

It runs Gemma e4b multimodal, qwen 3.5 8b or the qwen 4b embeddings models well enough (40+ t/s for the LLMs).

The machine consumes 350 watts at the wall when under load (3 watts when sleeping, 80w at idle). Electricity costs me £0.035GBP/kwh which is cheap for the UK (load shifting via house battery).

144k output tokens for around 1pence (and takes an hour to do that in theory).

It's only JUST cheaper to use than the far more capable deepseek v4 flash model despite the free hardware and ~10x cheaper than normal electricity.

CraigJPerry··on Show HN: Extend UI – open-source UI kit for modern document apps
Those bounding box demos are decent.

By quirk of fate i've spent the past 2 days prototyping some stuff on pdfjs. Just trying to figure out a game plan for handling bounding boxes in the face of page zooming, different resolutions etc. etc. I can't see it mentioned whether the components are virtualising pages (as in reusing dom elements as document pages scroll by). I guess i just learned what i'll be exploring tomorrow then...

CraigJPerry··on Ask HN: Are you still using a Vision Pro?
It's a shame because this is the best visual fidelity i think of all the devices.

I managed several days back to back, it's very like 1440p on a 27" and millions of people use that every day productively but when you're spending that kind of money, i don't want £200 monitor quality.

CraigJPerry··on Ask HN: Are you still using a Vision Pro?
Zoom itself works absolutely fine, it's just the ipad app you get on vision pro. My complaint is what happens when you turn your camera on - meeting participants see an uncanny valley representation of yourself - your "Persona" which you scan in when you get the device.
Page 1 of 34Next →