Better HN
topnewbestaskshowjobs
Log inSign up

CraigJPerry

5,609 karma · joined Sep 23, 2013 (13y ago) · 1,678 submissions

I'm @CraigJPerry2 on twitter.
Submissions

comment 5mo ago · link · parent

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...

comment 5mo ago · link · parent

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.

comment 5mo ago · link · parent

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.

comment 5mo ago · link · parent

>> Consumer power supplies probably don't

At least here in the EU they do and i think it's the case in most countries world wide?

Looks like that 2014 case might have been a sub-standard charger that didn't conform to required safety standards?

I actually experienced a (cheap) charger exploding under my desk back around 2015.

There's a youtuber called BigClive that delights in tearing down the bad chargers. Ken Shirrif's blog is the best resource i know of for this topic though.

Anyway, i feel pretty safe with the vision pro plugged in with an apple charger. The battery does get warm though...

comment 5mo ago · link · parent

I bought the refreshed M5 version with the new headstrap. I read so many complaints about weight and it was just never an issue for me personally. Maybe the new strap is that much better?

That said, the battery cable was super annoying, id accidentally catch it multiple times per day. The battery is good for less than 2 hours so i used it plugged into the wall.

For zoom calls, the persona thing is hilariously bad, unusable in a business context. Interesting for a few minutes as a tech demo though.

The virtual layout is good - a big citrix app screen (its the ipad app) for remote desktop, zoom, safari etc off to the sides and then things like calendar widget pinned to physical wall. But text clarity / quality is just slightly not good enough for software development. Almost, its close. If you dont mind large fonts its good enough.

Ultimately returned it but it was a close run thing, i almost kept it.

I do still hanker for something like this, tempted to try xreal or other glasses but seems like the PPD is even lower.

comment 6mo ago · link · parent

>> I’m losing control over the code I write when I work with agentic code generation

> Are you saying we collectively need to get better at abstraction so that LLMs get better at abstraction (either by training, or our prompting), so that their code is easier to read?

No - our current abstraction for coding agents is a loop where we express some freeform specification of a goal, then a sub loop kicks off where an llm takes a stab at what good looks like for the next step (make an edit, search for info, run a command to cause some side effect etc etc), it iterates in this loop and when it's finished its sub loop, it declares end of turn and the loop returns to the user for steering input.

That inner agent loop can make it quite hard to stay in control.

What if instead of only these low level free form prompts we additionally had some higher level primitives to work with?

comment 6mo ago · link · parent

I clearly identify with the problem the author raises, which is: the bottleneck is understanding.

I don't go along with their mitigations though.

In programming we have one tool for this: abstraction. Decomposition, pattern recognition, even data structures and algorithms are all down stream of abstraction. Collectively, we've never truly mastered abstraction, but it's what we have and we collectively wield it well enough that it's usually somewhat effective.

We are in dire need of a better abstraction.

comment 6mo ago · link · parent

I’ve had both - the 380 is much lighter to carry around than the 480.

I wouldn't recommend either though, for both, the keys are not nice to type on if you don’t press perfectly downward, if you have any angle other than vertical, the keys occasionally bind a little. This is amplified on the 480 with longer key travel. They’re different types of key mechanisms on both but suffer the same problem.

If you have any kind of case, the 480 stand slot can be harder to use.

comment 6mo ago · link · parent

I prefer "the bottleneck is understanding" framing.

The author is nibbling at the same problem ultimately, but i don't think "hey one strategy is we could just let cognitive debt accumulate so we can go faster!" is a particularly insightful tool in the toolbox. Don't misread me, i'm not denying it can be a valid strategy.

Instead i want to read about insightful strategies for optimising that system-wide bottleneck we have: understanding.

Tell me about how you managed to shift to a higher level of abstraction, tell me about how and when that abstraction leaks. Tell me how you reduced the amount of information that has to flow through the system bottleneck.

comment 6mo ago · link · parent

>> many small decisions

It’s making guesses not decisions, framing as decisions will lead you astray to wasted time and tokens.

It’s vaguely productive to tell them a ton of relevant info upfront attempting to minimise their need for load bearing guesses. I say vaguely because obedience is generally only around the level where it's good enough to lull you into a false sense of security, not to actually be obedient.

It’s a bit more productive to use the various loop mechanisms (hooks, /goal etc) to evaluate each end of turn against guard rails and reject with clear instruction on whats unacceptable. Obviously if you only do this without the front load of info then you’re likely to spend more tokens to reach a satisfactory end of iteration.

comment 6mo ago · link · parent

That was a really thoughtfully put together answer. Kudos, i enjoyed reading that

comment 6mo ago · link · parent

i turned off adguard on ios safari to see what you're talking about... oh wow! You really didn't overstate it.

In other news, my appreciation of the block lists i have configured in adguard just notched up a few more points!

comment 6mo ago · link · parent

>> like a Rolex watch

A Grand Seiko could be an apt comparison, this is hand finished rather than mass produced on a production line. Also, by a Japanese craftsperson using a prized skill (lacquer vs zaratsu).

>> vanity item

Who covets a calculator? The attraction here is surely celebrating the craftsmanship and the story / history behind the product and firm that produced it.

comment 7mo ago · link · parent

10x what? 10x revenue? 10x features shipped? Whats the measure, is it 10x speed of dev like parent comment? Because an unqualified 10x could mean 10x SLOC which is trivial with an agent but has negative value.

Assuming 10x on the speed of dev, Is the vscode repo a decent example? Recently they've been all in on AI augmented development so i'm thinking they'd be a reasonable subject?

How do you isolate out what counts as the "development" part of their delivery cycle (is that the dev inner loop, does that show up in frequency of commits then?) to measure it and see if it's running 10x?

https://github.com/microsoft/vscode/graphs/contributors?from...

comment 7mo ago · link · parent

I guess it doesn't have to use JavaScript for the back behavior. It could use a server-side rendered referrer if that hasn't been stripped by the browser?

You say that JavaScript and fallbacks for menus is a solved issue but the number of menus that are just an absolute clusterfuck is ridiculous on the web today. They're really not a solved issue, Progressive enhancement is hard to do. Genuinely hard in some cases.

On balance, while this is not without flaws, it's interesting. Accessibility, deep linking, reduction in cognitive load for the developer. There's some merit here.

comment 7mo ago · link · parent

OrbStack is impressive on the performance and energy efficiency fronts. I'm not aware of anything that comes close. But they're doing something funky under the covers. You can't just start any OS in a VM. It has to be somehow mangled to suit their VM. Thankfully NixOS is available so I'm fine for my use cases. It's still remarkable how efficient it is.

comment 7mo ago · link · parent

The cheapest copilot plan felt totally unsustainable to me. For around £8 month i was getting 100 opus 4.6 prompts (albeit with a reduced context window size around 128k iirc vs 200k to 1m for first party hosted opus). Gpt5.4 was hosted with 400k context iirc.

On top of that, you’ve got 2000minutes of container runtime, so running cloud agents was included. As was anthropic agent sdk mode via copilot which is very comparable with claude code - not identical, the anthropic “modular prompt” is much leaner in the sdk version.

I cant say im mad, i got above what i paid in value. That said, going forward ill probably go back to openrouter payg rather than a subscription.

I got a free 3months of the gemini £19 plan and ive been playing quite a bit, 3.1 pro is a good model, i just find it slow. Flash i think i under appreciated until now.

comment 7mo ago · link · parent

>> Can't think of anything it's currently lacking.

Speed? The pro models are slow for me

The model 3.1 pro model is good and i don't recognise the GP's complaint of broken tool calls but i'm only using via gemini cli harness, sounds like they might be hosting their own agentic loop?

comment 7mo ago · link · parent

>> the world stops buying US bonds and suddenly they are bankrupt and can not pay its debts

How does this work exactly? It doesn't. It's a misunderstanding of public debt.

When you say stops buying US bonds, you're talking about the secondary market for US government bonds right - because in practice, contrary to the econ textbooks and common understanding, only a small number of institutions are allowed to purchase them in the primary market, not only that but these purchasers are compelled by law to continue buying them, to continue bidding for them at a fair price, and if they don't have the reserves to buy them then these purchasers will be given the reserves to continue to buy them. The entire premise of the argument falls apart as soon as you step away from the econ model and look at the legislation governing what actually happens by law.

comment 8mo ago · link · parent

yeah 3 years sounds reasonable to me, less than one asset depreciation cycle in business. Pain for you and me, but just a bump in the road for the accounts dept.

comment 8mo ago · link · parent

Do you not end up breaking half the value of referential integrity doing it that way (e.g. you had to update all the queries but now you have a sharp edge in that all future queries need to remember to be soft delete aware. Not a blocker for sure, just a sharp edge).

You know your system better than me for sure, a random commenter on a website :-D your comment just shocked me out of my daze enough for my brain to say "but I always move the record to another table rather than soft delete" and i felt compelled to give unsolicited and likely wrong opinion.

comment 8mo ago · link · parent

Articles entire thesis looks like it can be completely de-railed if one activity happened: ai infrastructure firms cease to be able to secure more capital.

Is that likely? History says it's inevitable, but timeframe is an open question.

comment 8mo ago · link · parent

I don't think there's a requirement that they give access for free but they are alone i think in doing so.

Here in the UK (where i also have free tesla repair manual access) i have to pay a daily rate (there are annual subscriptions available) for other marques and i would say it's not cheap.

For example, ford charges me £20/hour or £75/day for access to manuals, wiring diagrams, online connected diagnostics (which sounds more impressive than it is, the UI will show vehicle status like fuel tank level or error codes reported by the various ECUs, without physically connecting to the vehicle, i.e. it's done over the vehicle telemetry link), and the ability to connect via a data link connector device for diagnostics and some reflashing activities. Security activities like key coding require a further (chargeable) registration).

The same setup is available by at least VAG, BMW and Fiat Chrysler (the latter has an annoying extra device registration step the others don't). All chargeable.

comment 8mo ago · link · parent

>> Tesla is the same pattern applied to consumer vehicles

No i'd push back on this because the entire workshop manual is available for free without even registration required. You can literally google and land in the relevant sections and it is of a far higher quality than ford, VAG or bmw as three examples i'm pretty familiar with. I haven't seen the John Deere stuff.

Tesla does have "special tools" for some repair procedures, a practice as old as the auto industry but they don't rely on them to the same extent as BMW for example. Anecdotally, the special tools i'm aware of are genuinely useful - for example, the tool for disconnecting seatbelt anchors saves time vs the traditional bolt - where special tools on other marques are often clearly to workaround a failure of packaging or engineering resulting in tight access for a regular tool.

Their online API access is a little bit annoying, or at least unfriendly to casual home user, specifically the workflow to register an OIDC client, but not insurmountable.

comment 8mo ago · link · parent

I used ghostty for the shell in my agent-manager tool (think something like https://air.dev/ but in SwiftUI. One architectural detail i'm still going back and forth on is: who should own the PTY?

If embedded Ghostty owns it, now i have to have some kind of workaround to instrument what's happening inside the terminal - signals, stdout/stderr events, return code etc.

If my parent agent-manager app owns it, now i don't have the nice clean small interface to ghostty (i'm a fan of John Ousterhout style narrow but deep interfaces, pulling complexity down rather than pushing up to parent).

Not sure if any other ghostty embedders might have advice. It's on my todo list to task a an agent to "gh repo clone" a few ghostty using shells and report on their arch.

comment 8mo ago · link · parent

>> Misconception 1: specification documents are simpler than the corresponding code

I used to be on that side of the argument - clearly code is more precise so it MUST be simpler than wrangling with the uncertainty of prose. But precision isn't the only factor in play.

The argument here is that essential complexity lives on and you can only convert between expressions of it - that is certainly true but it's is overlooking both accidental complexity and germane complexity.

Specs in prose give you an opportunity to simplify by right-sizing germane complexity in a way that code can't.

You might say "well i could create a library or a framework and teach everyone how to use it" and so when we're implementing the code to address the essential complexity, we benefit from the germane complexity of the library. True, but now consider the infinite abstraction possible in prose. Which has more power to simplify by replacing essential complexity with germane complexity?

Build me a minecraft clone - there's almost zero precision here, if it weren't for the fact that word minecraft is incredibly load bearing in this sentence, then you'd have no chance of building the right thing. One sentence. Contrast with the code you'd have to write and read to express the same.

comment 8mo ago · link · parent

Ahh apologies

#!/usr/bin/env bash # agent-lib.sh — shared plumbing for all claude -p agents

AGENTS_DIR="${AGENTS_DIR:-$HOME/Code/github.com/craigjperry2/tiny-agents}" SKILLS_DIR="$AGENTS_DIR/skills" CLAUDE_OPTS="${CLAUDE_OPTS:-}"

# Build a system prompt by concatenating skill files # Usage: load_skills core/unix-output.md domain/git.md output/plain-text.md load_skills() { local combined="" for skill in "$@"; do local path="$SKILLS_DIR/$skill" if [[ -f "$path" ]]; then combined+=$'\n\n'"$(cat "$path")" else echo "[agent-lib] WARNING: skill not found: $skill" >&2 fi done echo "$combined" }

# Core invocation: reads stdin, prepends system prompt, calls claude -p # Usage: run_agent <system_prompt> [extra claude opts...] run_agent() { local system_prompt="$1" shift local stdin_content stdin_content=$(cat) # buffer stdin

    if [[ -z "$stdin_content" ]]; then
        echo "[agent] ERROR: no input on stdin" >&2
        exit 1
    fi

    # Combine system prompt with stdin as user message
    printf '%s' "$stdin_content" \
        | claude -p \
            --system-prompt "$system_prompt" \
            --output-format text \
            $CLAUDE_OPTS \
            "$@"
}

# Run agent then pipe through a guard # Usage: run_agent_guarded <guard_name> <system_prompt> run_agent_guarded() { local guard="$1" shift local system_prompt="$1" shift

    local output
    output=$(run_agent "$system_prompt" "$@")
    local agent_exit=$?

    if [[ $agent_exit -ne 0 ]]; then
        echo "$output"
        exit $agent_exit
    fi

    # Pass through guard
    echo "$output" | "$AGENTS_DIR/guards/$guard"
    exit $?
}

# For structured output: run agent then validate with jq run_json_agent() { local system_prompt="$1" shift run_agent "$system_prompt" --output-format text "$@" | guard-json-valid }

comment 8mo ago · link · parent

My skills/domain/git.md looks like this:

    Context: You are working with Git repositories.
    - Commit messages follow Conventional Commits: type(scope): description
    - Types: feat, fix, docs, refactor, test, chore, ci, perf
    - Subject line max 72 chars, imperative mood, no trailing period
    - Reference issue numbers when relevant
So it produces messages like:

    $ git diff HEAD~1 | bin/ai-commit-msg
    fix(guards): pass input to claude and tighten verdict handling
12345
56