HNHacker News
TopNewBestAskShowJobs

tantaman

1,169 karma · joined August 20, 2012

http://github.com/tantaman
submissionscomments
tantaman··on Python: Just Write SQL
I'm in a 4th camp: we should be writing our applications against a relational data model and _not_ marshaling query results into and out of Objects at all.

Elaborations on this approach:

- https://news.ycombinator.com/item?id=34948816

- https://github.com/papers-we-love/papers-we-love/blob/main/d...

- https://riffle.systems/essays/prelude/

tantaman··on Python: Just Write SQL
similar project that generates types for queries into an intermediate representation that can be consumed by, say TypeScript, to get static Types: https://github.com/vlcn-io/typed-sql
tantaman··on Stopping at 90%
I've found it to be 100x

What I can get running in a weekend for my personal use would:

- take 20 days (10x) to turn into something that other teams in the same company can easily consume without much effort on their part

- take 200 days to turn into a public facing product that people would actually use instead of their current thing

IMO, this is why engineers so often look at products and think "Oh, I can build that in a weekend"

I've created plenty of toy languages and reactive UI libraries in a weekend. People may find inspiration and take some ideas from my 2 days of work but nobody is going to use those as a replacement for their current thing without the next 198 days of effort.

A small example: if you can create a "spreadsheet to website generator" in a few hours, it'll be a month before you've built it out enough to launch a product around it that will attract users.

tantaman··on Google vs. the Open Web
Someone needs to tell the tens of thousands of employees working in the abuse protection space about the user agent string!
tantaman··on Mycelite: SQLite extension to synchronize changes across SQLite instances
Getting there! fly.io is using cr-sqlite these days :)
tantaman··on CRDT Benchmarks
Wouldn't any of the Rust implementations be what you need (Yrs, Diamond Types or the Automerge rust re-write)? Given you can bind to a Rust implementation in JS or Python or whatever else.
tantaman··on CRDT-richtext: Rust implementation of Peritext and Fugue
Very cool. Left some comments related to some drawbacks I see of your current approach -- https://github.com/vlcn-io/cr-sqlite/issues/65#issuecomment-...

If you're open to resolving those I'd love to stick it into cr-sqlite :)

tantaman··on Astmaker – A DSL in Rust for programming language designers
Is it just me or is this paywalled?
tantaman··on Explore Washington DC through the eyes of a spy
It’s where the Iwo Jima memorial is so pretty common to send a tourist there.

You can also pick up the mount vernon trail in Roslyn along with the Custis trail if you bike.

They’re trying to make it more of a spot and do weekly free concerts in the park there these days.

tantaman··on Why and how we retired Elm
don’t hire people if they’re too excited about the tech stack, proceeds to rewrite their app every time a new shiny comes out.
tantaman··on An up-to-date list of SQLite related news from all over the World
Does LibSQL and extension news count?

https://twitter.com/tantaman/status/1643588081067384834

tantaman··on Solaris movie review and film summary (1976)
Solaris starring George Clooney
tantaman··on Testing GPT 4's code-writing capabilities with some real world problems
I was mock interviewing ChatGPT for a few hours yesterday with application and system design + coding said application. My conclusion was it was a no hire for even the most jr positions because it required considerable amounts of direction to arrive at anything approximating an acceptable solution.

tldr -- this matches my experiences as well.

tantaman··on Relic: Functional relational programming for Clojure(Script)
Beautiful. I've been noodling on exactly this same idea. So far I've explored using SQLite but it would be ideal if there was no SQL between me and my relations. Another direction I've taken is adding STM to JavaScript and implementing a JS api for querying relations.
tantaman··on A Gentle Introduction to CRDTs
It'd depend on the network topology and rate of syncing.

For a simple case of two nodes, they'll be divergent until each node sends the other their current state.

For client-server, the "whole system" wouldn't be in the same state until all clients report all their changes to the server and the server re-broadcasts all those changes to all clients.

A pathological case (but happens when people leave an ipad in a drawer or something) -- a node could be offline for 6 months and the rest of the system never gets those changes until that node comes back online. There's technically some divergence: the other nodes are missing whatever state the ipad had, but does it really matter if that node was unimportant enough to be left offline?

Depends on use case for sure.

tantaman··on A Gentle Introduction to CRDTs
Yep! That was one plan for deploying cr-sqlite to "the cloud."

D1, unfortunately, doesn't support loading extensions into SQLite.

fly.io, and their sqlite solution, does however!

I've been using fly.io to run cr-sqlite in the cloud and act as a sync server for non peer to peer use cases. Eventually I'll have finished up a re-write of strut.io[1] atop vlcn/cr-sqlite which'll serve as a good end to end example of how to make applications with this sort of architecture.

Some discussion about this setup on the fly.io forums: https://community.fly.io/t/litefs-many-tens-to-hundreds-of-t...

[1] https://github.com/tantaman/strut

tantaman··on A Gentle Introduction to CRDTs
:(

I'll try to get to that.

tantaman··on A Gentle Introduction to CRDTs
In a client-server sync setup you can drop a client's deletes (for certain crdts like observed-remove sets) once they send their changes to the server. The server, of course, needs to retain them.

Other GC research unrelated to this project but something I've been following: https://braid.org/antimatter

tantaman··on SQLite Wasm in the browser backed by the Origin Private File System
SQLite WASM uses SharedArrayBuffers and Atomics to turn async OPFS apis into blocking APIs (really just _one_ api -- getSyncAccessHandle)

Given the use of SharedArrayBuffers and that SharedArrayBuffers can't be used in a shared worker (funny), SQLite WASM doesn't work in shared workers.

If getSyncAccessHandle was made synchronous then maybe everything would just work. It'd also improve SQLite WASM perf by 30% according to their measurements [1]

[1] https://sqlite.org/forum/forumpost/af64f73911e5410cf9a640c9e...

tantaman··on SQLite Wasm in the browser backed by the Origin Private File System
What's wrong with many tabs? The DB handles getting hit by many tabs correctly -- it's just as if many processes were hitting the db in a non-browser environment.

Example of syncing your app across tabs with SQLite here: https://vlcn.io/docs/guide-solving-tabs

tantaman··on SQLite Wasm in the browser backed by the Origin Private File System
If it helps, I detail some of the pros/cons of using the official SQLite build vs unofficial builds (wa-sqlite, which is similar to absured-sql) here:

https://vlcn.io/docs/guide-persistence#persistence-options

tantaman··on Materialized View: SQL Queries on Steroids
> Application can tolerate stale data...

Projects like https://readyset.io/, https://materialize.com/, https://github.com/mit-pdos/noria can keep your materialized views up to date as the underlying base tables change.

tantaman··on For Want of a JOIN
This is an incredibly common thing. The worst I've seen it is when people drop their SQL DB for a No-SQL thing (for no good reason) and then end up implementing all the joins they lost in the application :(
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
lmk if you need any help getting things set up.
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
I know that DiamondTypes does write to disk and acts much like a db itself. I was thinking it could be possible to expose that library as a virtual table in SQLite.
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
np. Gives me a good reason to finish up those usage docs and example apps :)
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
yeah, not yet. yjs and automerge have rust ports so _maybe_ (big maybe) sequence crdts can be added by creating a virtual table interface to those projects. TBD.
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
There's different strategies for solving conflicts but CRDTs wouldn't be a good fit where you need a total ordering of all transactions -- such as bank deposits.
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
I'd originally done a sidecar route but ultimately went the extension route for portability.
tantaman··on Crsql – Multi-writer and CRDT support for SQLite
There's libsql, a fork of SQLite, that intends to be an "open contribution" version of SQLite.
← PreviousPage 2 of 4Next →