Better HN
topnewbestaskshowjobs
Log inSign up

andersmurphy

1,011 karma · joined Feb 22, 2019 (7y ago) · 496 submissions

https://andersmurphy.com
Submissions

comment 10mo ago · link · parent

Its a statement of our times that this is getting down voted. JIT is so underrated.

comment 10mo ago · link · parent

The limitations of HTMX are not the same as the limitations of Datastar. Datastar is a whole other beast with only a few at most vestigial similarities to HTMX.

You can't do virtual scroll over a billion checkboxes in HTMX (I've yet to see anyone manage in react for that matter either), yet you can do it easily in Datastar. [1]

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

comment 10mo ago · link · parent

netBSD! ... o wait not linux... damn

comment 10mo ago · link · parent

Biggest displacement has to be commenting on HN.

comment 10mo ago · link · parent

I'd argue the opposite vertical scaling us a whole lot more effective than horizontal scaling if your using a language that has both real threads and green/virtual threads (go or anything on the JVM). You get such insane bang for your buck these days even over provisioning is cheap. Hell direct NVME can easily give 10-100x vs the crappy network drives AWS provides.

Zero downtime deploys have been solved for single machines. But, even then I'd argue most businesses can have an hour of downtime a month. I mean that's the same reliability as AWS these days.

Really, there are a handful of cases where you need multiple servers:

- You're network limited (basically you're a CDN).

- You are drive limited you need to get data off dirves faster than their bandwidth.

- Some legal requirement.

This is before we get into how trivial it is to shard sqlite by region or customer company. You can even shard sqlite on the same machine if you need higher write throughput.

comment 10mo ago · link · parent

Yeah, you really want directly connected NVME drives to your machine/VPS. It can make orders of magnitude difference.

comment 10mo ago · link · parent

I mean it has blob types. Which basically means you can implement any type you want. You can also trivially implement custom application functions to work on these blob types in your queries. [1]

- [1] https://sqlite.org/appfunc.html

comment 10mo ago · link · parent

Yes unix socket using the java 16 socket channels. Interestingly there was only a 5-10% improvement vs IP sockerts (with no ssl).

comment 10mo ago · link · parent

The thing is sqlite can scale further vertically than most network databases. In some context's like writes and interactive transactions it outright scales further. [1]

That's before you even get into sharding sqlite.

[1] - https://andersmurphy.com/2025/12/02/100000-tps-over-a-billio...

comment 10mo ago · link · parent

Wonder if that inspired: The tomb of the eaters - in caves of qud.

comment 10mo ago · link · parent

Forth

comment 11mo ago · link · parent

Thank you for beating the mmap drum and LMDB! It's truly an incredible piece of tech.

comment 11mo ago · link · parent

What am I missing? The transactional safety problem (the bulk of the paper) is solved simply with a single writer. Which is where you want to be anyway for efficient batching throughput (and isolation).

The other concerns seem to imply there are no other programs running on the same machine as the database. The minute that's not true (is it ever true?). Then OS will do a better job (as seen with LMDB etc).

I think it's telling that the paper focuses on mongoDB not LMDB.

comment 11mo ago · link · parent

How so? LMDB, boltdb/bbolt and sqlite (with mmap) are all rock solid. Just because mongodb used mmap badly does not make it any less valuable.

comment 11mo ago · link · parent

Why? Sqlite and LMDB make fantastic use of it. For anyone doing a single writer db it's a no brainer. It does so much for you and it does it very well. All the things you don't have to implement because it does it for you:

- Reading the data from disk

- Concurrency between different threads reading the same data

- Caching and buffer management

- Eviction of pages from memory

- Playing nice with other processes in the machine

Why would you not leverage it? It's such a great fit for scaling reads.

comment 11mo ago · link · parent

With a trend towards immutable single writer databases MMAP seems like a massive win.

comment 11mo ago · link · parent

Feom what I remember if AWS loses your data they are basically give you some credits and that's it.

comment 11mo ago · link · parent

Yup, often orders of magnitude better.

comment 11mo ago · link · parent

100% this directly connected nvme is a massive win. Often several orders of magnitude.

You can take it even further in some context if you use sqlite.

I think one of the craziest ideas of the cloud decade was to move storage away from compute. It's even worse with things like AWS lambda or vercel.

Now vercel et al are charging you extra to have your data next to your compute. We're basically back to VMs at 100-1000x the cost.

comment 11mo ago · link · parent

Even easier with sqlite thanks to litestream.

comment 11mo ago · link · parent

Yup another trick is to only serve br compressed resources and serve nothing to clients that don't support brotli. A lot of http clients don't support brotli out of the box.

I take it further and only stream content to clients that have a cookie, support js and br. Otherwise all you get is a minimal static pre br compressed shim. Seems to work well enough.

comment 11mo ago · link · parent

Somehow doubt this. It would mean most react websites that serve static content without paywalls for SEO would get banned by the indexes too.

Which for better or worse is a large portion of the modern internet.

comment 11mo ago · link · parent

Do we? I feel the layers of abstraction are quite extensive now. They are anything but simple.

comment 11mo ago · link · parent

Handles billions of rows just fine. Can take you unreasonably far on a single server.

comment 11mo ago · link · parent

It's got crazy write throughput too if you hold it right.

comment 11mo ago · link · parent

Nope, still going strong.

https://news.ycombinator.com/item?id=46124205

comment 11mo ago · link · parent

Yeah I wonder how it would work with things like custome application functions etc. But I guess the query is run locally and it's the pages that are fetched from S3? So it just works? That would be awesome.

I guess there's only one way to find out.

comment 11mo ago · link · parent

Clojure has had dynamic vars since the beginning (2007?). Johnathan probably got it from elisp though.

comment 11mo ago · link · parent

It's not about rust or no rust, rust is fine. It's about the constant drama.

comment 12mo ago · link · parent

I guess it's time to finally try FreeBSD.
1
789
17