HNHacker News
TopNewBestAskShowJobs

andersmurphy

1,007 karma · joined February 22, 2019

https://andersmurphy.com
submissionscomments
andersmurphy··on Let's make the worst Htmx
It's nice to see HTMX4 is adopting the core strengths of Datastar. That sort of cross pollination of ideas is a huge boon to the wider hypermedia community in general.
andersmurphy··on Let's make the worst Htmx
A focus on morph by default means you don't have an explosion of endpoints and can write programs like the 300 redirect days. [1]

Once you want realtime/collaborative app SSE + morph lets you do that easily. Add streaming compression and this approach is suddenly crazy bandwidth efficient.

For people coming from react this gives you v = f(state) over the wire.

Lastly signals handle the edge cases where an out of bound morph would nuke your ephemeral client side state (mostly text input).

You can do this in htmx but you are fighting the design the whole way. Turbo is a bit better but doesn't have signals.

[1] https://dev.37signals.com/a-happier-happy-path-in-turbo-with...

andersmurphy··on Let's make the worst Htmx
My experience was similar. I'd wound down a startup and as a solo developer could no longer afford to do react + a backend. So I tried HTMX, then turbo (which introduced me to morph and push based re-fetch). Finally moved to datastar because I could drop alpine and it has best in class morph, signals and SSE support. Immediate mode over the network is amazing DX.

Makes multiplayer out of the box over large datasets trivial. See these demos if you don't believe me [1][2] (open them in multiple tabs and have fun)

[1] https://checkboxes.andersmurphy.com

[2] https://example.andersmurphy.com

andersmurphy··on SQLite in Production: Optimizing WAL Mode, Concurrency, and VFS Layers
RDS*
andersmurphy··on SQLite in Production: Optimizing WAL Mode, Concurrency, and VFS Layers
Sqlite with litestream has a smaller default window of data loss than RDF. 1s vs 5 minutes.
andersmurphy··on SQLite in Production: Optimizing WAL Mode, Concurrency, and VFS Layers
I would only recommend sqlite if you know what you are doing (and/or prepared to learn it inside out). It's more of a build your own database primitive (often you'll have multiple sqlite databases for different things). Which can be incredibly rewarding and deliver amazing performance outcomes, simple ops, etc.

I see the migration argument come up a lot. But, in practice with sqlite you'll be using projections where you have a source of truth database (event log) and project off it into disposable/expendable sqlite databases. So schema changes are often just delete and rebuild the projection.

andersmurphy··on SQLite in Production: Optimizing WAL Mode, Concurrency, and VFS Layers
Personally, I think the better way to tackle sqlite_busy is to have a single writer managed at the application level. That effectively eliminates sqlite_busy in the context of a single process.

> To ensure write operations don't suffer from disk synchronization bottlenecks, pair WAL mode with the following pragma

Only do this if you are prepared to sacrifice durability (i.e can afford to lose transactions).

andersmurphy··on Ethics Is the Skill That Matters Most Now
> The bottom line

Is how Claude ends 90% of articles. So yes LLM slop.

andersmurphy··on AI Mania Is Eviscerating Global Decision-Making
Maybe maybe not. In large organisations for each person creating value with LLMs there are probably more destroying value. Bob used to only waste one person time with LLMs he can waste the entire organisations time.

Anyone can use an LLM make a bad ideas sound like a good idea. I imagine this will lead to insane amounts of productivity loss as the entire organisation ends up pivoting to follow the bad idea of a mediocre VP etc.

andersmurphy··on After 7 years in production, Scarf has reluctantly moved away from Haskell
Philip Walder (one of the creators of Haskell) was our lecturer for my CS introductory course. I'd never done any programming before then.

Yes, imperative languages were initially counter intuitive to me. OO was even worse. SQL was fine as it's more declarative/functional.

andersmurphy··on After 7 years in production, Scarf has reluctantly moved away from Haskell
Yeah compile times have always mattered. It's why games often have a scripting layer in lua despite the engines being C/C++.
andersmurphy··on After 7 years in production, Scarf has reluctantly moved away from Haskell
Lisp/smalltalk programmers have been going on about this tradeoff for a long time. It mattered before LLMs too. Lisp/Clojure repl allowing you to compile tiny parts of your program inside your running program is incredible for your feedback/iteration loop.

Ironically, this is also what makes them shine with LLMs, the LLM has access to the running program and can modify it while it's running to get feedback instantly.

Complex type systems are cool. But, they are not free. I say this as someone who's first programming language was Haskell.

andersmurphy··on What ORMs have taught me: just learn SQL (2014)
That's partly the problem ORMs. Lowest common denominator that prevents you from leveraging a lot of the power of your actual database.
andersmurphy··on Comparing Fable and 10 other LLMs on refactoring a LangGraph god node
Wait what? gpt5.5 is better than fable. I thought fable was the endtimes?!

Wonder if this is because fable swirches down to opus for somethings without telling you?

andersmurphy··on US AI stock sell-off shakes markets from Wall Street to Asia
Neither of the companies you mentioned are listed.
andersmurphy··on "Start with a Monolith" Was Good Advice. AI Is Changing That
Personally the main advantage of monoliths is performance.
andersmurphy··on MSc Thesis – The Limits of Generalized Sync
Yeah, it's an intellectually intoxicating idea but incredibly hard to get right.

For me the problem is that in practice it only fits really well with quite a specific subset of problems, but we desperately want it to be a general solution that can apply to all the things (or at least it's often marketed that way).

andersmurphy··on MSc Thesis – The Limits of Generalized Sync
> Generalization breaks down for offline-capable applications. Offline writes require conflict resolution, create authorization edge cases, and demand coordinated schema management across server and client replicas.

> ...These constraints are structural; engineering effort cannot remove them...

> The trade-off analysis shows that three sync engine vendors converged independently on this conclusion from different starting positions.

This is the big irony. That the vendors all converged on the fact that sync engines only really "work" when you remove the offline part. But, at that point they are a complicated/over engineered cache or worse introducing hard distributed computer science problems unnecessarily.

andersmurphy··on Datastar: It's Pretty Good – With David Nolen [video]
I honestly think streaming HTML is a game changer for collaborative realtime web apps.
andersmurphy··on Will the next high value profession be people who can think independently?
I feel like independent thought will decrease considerably with LLMs. I wonder if they will effectively become oracles in the sense that the average output of an LLM will be what most companies do therefore you can predict what most companies will do.
andersmurphy··on Building an HTML-first site doubled our users overnight
I've found what works really well on 3G an MPA with streaming HTML with brotli compression rendering the whole page on every change.
andersmurphy··on Building an HTML-first site doubled our users overnight
Is it slow though? Like in practice? This demo [1] using Datastar (a streaming HTML framework) every action including scrolling roundtrips to the server. Even the checkboxes changing colour is a roundtrip.

https://checkboxes.andersmurphy.com

andersmurphy··on SQLite improving performance with pre-sort
Also if anyone has a better way to do the pre-sort in Java/Clojure/JVM I'm all ears.
andersmurphy··on Show HN: Hacker News Waterfall
Tokenfalls! My dwarf fortress eyes read this deluge completely differently.
andersmurphy··on Do we fear the serializable isolation level more than we fear subtle bugs (2024)
In SQLite all writes are serialisable by default and it scales really well. I think having a single writer is what makes the big difference here.
andersmurphy··on How's Linear so fast? A technical breakdown
User permission can often be very dynamic. Sync engines (local first ones even more so) give them access to a much larger set if that data in a client side database.

This also makes them much more vulnerable to a data leak/breach if their device gets compromised or stolen as the data is all on their device.

The client having access to only what it needs in terms of data and making that as ephemeral as possible is a big part of defence in depth.

andersmurphy··on How's Linear so fast? A technical breakdown
You don't even need your backend that close if your server is fast enough. Streaming HTML immediate mode is pretty good. See this demo (server is in Germany and runs on a potato uses no optimistic updates, eveb scroll round trips) [1]

Honestly client side animations go a long way to masking latency too.

- [1] https://checkboxes.andersmurphy.com/

andersmurphy··on How's Linear so fast? A technical breakdown
Sync engines are fast to a point but if you start working with large enough datasets and/or care about security you ultimately end up with something closer to streaming immediate mode HTML. Of course that means sacrificing local first.
andersmurphy··on The perils of UUID primary keys in SQLite
Although not as prominent as insert SELECT and UPDATE both benefit from page cache locality, assuming rows that are stored near each other are often selected/updated together.
andersmurphy··on The perils of UUID primary keys in SQLite
An insignificant amount for the comparison (why I didn't mention it), it's a fast implementation and the JVM C2 JIT has kicked in by the time the first batch has completed.
← PreviousPage 2 of 16Next →