The single writer is less of an issue in practice than it's made out to be. Modern nvme drives are incredible and it's trivial to get 5k writes per second in an optimized WAL setup. Way more than most apps could ever dream.
And even then, I've used a batch writer pattern to get 180k writes per second on a commodity vps.
ex: main.db + fts.db. reading and writing to main.db is always available; updating the fts index can be done without blocking the main database — it only needs to read, the reads can be chunked, and delayed. fts.db keeps the index + a cursor table — an id or last change ts
could also use a shard to handle tables for metrics, or simply move old data out of main.db
* some examples:
conn = sqlite3.connect("data.db")
conn.execute("PRAGMA journal_mode=WAL") # concurrent reads (see above)
conn.execute("PRAGMA synchronous=NORMAL") # fsync at checkpoint, not every commit
conn.execute("PRAGMA cache_size=-62500") # ~61 MB page cache (negative = KB)
conn.execute("PRAGMA temp_store=MEMORY") # temp tables and indexes in RAM
conn.execute("PRAGMA busy_timeout=5000") # wait 5s on lock instead of failing
edit: orms will obliterate your performance — use raw queries instead. just make sure to run static analysis on your code base to catch sqli bugs.
my replies are being ratelimited, so let me add this
the heavy duty server other databases have is doing that load bearing work that folks tend to complain about sqlite can't do
the real dmbs's are doing mostly the same work that sqlite does, you just don't have to think about it once they're set up. behind that chunky server process the database is still dealing with writing your data to a filesystem, handling transaction locks, etc.
by default sqlite gives you a stable database file, that when you see the transaction complete, it means the changes have been committed to storage, and cannot be lost if the machine were to crash exactly after that.
you can decide to wave some, or all of those guaranties in exchange for performance, and this doesn't even have to be an all or nothing situation.
I usually try to explain it like this: “Single writer” is rarely a real problem, because a writer is not slow. It writes exclusively, but very quickly.
"Batch writer pattern" is a good idea to get rid of expensive commits.
Debugging, sanity checking, testing, etc. are the best uses of LLMs. Much better than writing code.
Developers should write their own code and use LLMs to design and verify. Better, faster architecture and planning, pre-cleaned PRs and no skill atrophy or loss of understanding on the part of the developer.
Funny, I have the complete opposite impression after using claude code for a while. I would never trust it to design anything. Never again. But it can code pretty well given a very tight and limited scope.
To clarify, AI should not do the design itself. You develop the design in conversation with AI.
I come in knowing what I need to build and at least one idea or more of how it should be done. I present the problem, constraints, potential solutions, and ask for criticisms and alternatives. I can keep it as broad as possible or I can get more granular like struct layouts, api endpoints, etc. I go back and forth until there's an approach I prefer and then I code that approach.
| it can code pretty well given a very tight and limited scope.
It's wildly better at tight and limited scope than large scale changes but even then I would rather code it myself.
> It's wildly better at tight and limited scope than large scale changes but even then I would rather code it myself.
One thing I would like to see is the use of LLMs for smarter semi-manual editing.
While programming I often need to make very similar changes in several places. If the instances are similar enough I can get away with recording a one-off keyboard macro to repeat, but if there are differences that are too difficult to handle this way I end up needing to do a lot of manual editing.
It would be nice to see LLMs tightly integrated into the editor so I can do a simple "place the cursor at things like this" based on an example or two. I'm sure more ideas for using LLMs more quickly perform semantic changes you intended are possible, instead of just prompting for a big diff. I feel there's a lot more innovation possible in this direction, where you're still "coding it yourself" but just faster.
I've had a similar thought. A super refactor feature would be amazing, but wouldn't fit into the current zeitgeist of agent everything. Hopefully as the hype starts to die down and prices go up, we'll get some of these smaller, more targeted features.
Then watch it f'up half your codebase because it thinks it's slightly related to your examples. The alternative, giving it 10 examples, is actually more work.
You should try using the existing agents for your semi-manual editing. You don't need editor support. The coding agent can find "things like this" faster than you can. Just tell it what to look for and how to change it.
What I did was make one commit by hand (involving multiple files), and then told Codex (last year's Codex!) to make the equivalent changes to other instances in the code base.
> I come in knowing what I need to build and at least one idea or more of how it should be done. I present the problem, constraints, potential solutions, and ask for criticisms and alternatives
Never understood that argument. Because there’s two steps in design. Finding a good solution (discussing prior art, tradeoffs,…) and then nailing the technical side of that solution (data structures, formula,…). Is it the former, the latter or both?
Except "trad" households (full time SAHM in a nuclear home) are not traditional. Tradition is not something only the upper-middle class in a post-war boom attained for a short period of time.
Throughout human history, it was rare for only two people to raise a child, let alone one. Or for women to not bring money into the home.
Like many "trad" trends, it's based more on advertising and television than history.
At the very least, you need a whole society of aunts and uncles and grandparents and cousins, and deep friends to truly do any kind of traditional family structure in the traditional way. Otherwise it's just emulating an extremely narrow portion of the trad that didn't exactly exist in the first place.
> At the very least, you need a whole society of aunts and uncles and grandparents and cousins, and deep friends to truly do any kind of traditional family structure in the traditional way.
"It takes a village to raise a child" was meant literally. However, the glory of capitalism required people to move to where the jobs were, turning that millennia-old principle upside down ever since industrialization. And car culture was the ultimate fatal blow, when children can't even walk their own neighborhood any more.
I remember when Hillary Clinton said "it takes a village to raise a child" and she was mocked by conservatives and accused of undermining parental rights and wanting governments to control families.
And when BLM made it part of their charter to encourage community support for children beyond the typical nuclear unit they were accused of a radical Marxist agenda to "destroy families."
For some reason the very concept of extended families and community engenders deep anger and hostility from some Americans, and that's odd for a nation of immigrants considering how common the "whole society of aunts and uncles and grandparents and cousins" is in the rest of the world.
> For some reason the very concept of extended families and community engenders deep anger and hostility from some Americans
I think because excessive individualism plays into the hands of large companies. There is an individualist culture that has naturally grown over time in the US, but it has also been pushed by big corporations because if you can't depend on your neighbors and extended family, you need to spend money to fill the gaps.
But when leftists says things like community support, it doesn't bring up images of traditional villages and extended families. It brings up images of communists saying things like abolish the family. Naturally, due to their history.
It's not like leftists are known for their traditional family values now or then, so why should it be taken that way?
Yes, when you intentionally take what leftists say in bad faith and stereotype them negatively, then the bad faith interpretation and negative stereotypes make sense. But normal people don't hear "communism" when leftists say "community support."
Also given how many people espousing "traditional family values" among the right turn out to be abusers, pedophiles, rapists, deadbeats, etc, what you might consider "traditional" values don't actually mapped to the left-right political axis at all.
And I assume you didn't bother reading my comment or this thread very hard and just wanted to dunk on the left, but the American nuclear family isn't "traditional family values" to begin with.
"I did not have memory enabled, nor did I have information about me associated with my account; I did these tests in Incognito Mode. To make sure it wasn’t somehow feeding my account information to Claude even in Incognito Mode, I asked a friend to run these tests on his computer, and he received the same result; I also got the same result when I tested it through the API."
Given those precautions if it is just memory or some form of deanonymization that's also cause for concern.
There is rent-seeking, rent extraction and the rentier class. All are a part of the process of enclosure. Landlords are included in this but it may not seem that way because enclosure happened so long ago.
This is a trite response that doesn't engage with what was originally stated.
The double edged brilliance/danger of capitalism is that it constantly opens up and moves into new markets. This is good, it means once the market determines a need, capital investment can accelerate production of the good that meets that need.
But the flip side is it is coming for everything. Everything will be marketized and monetized and accelerated and made efficient. And there are genuine problems with that.
Regulation has been the historical response, but we've seen concentrated wealth chip away at regulations for decades or even rip them apart overnight.
This is a contradiction that needs to be resolved. One can be pro-capitalism or anti-capitalism and come to the same conclusion.
> we've seen concentrated wealth chip away at regulations for decades or even rip them apart overnight.
There are more and more regulations every day. Oil refineries are being abandoned in California due to regulations so heavy there's no way for them to operate anymore. A friend of mine pulled his business out of California due to stifling regulations.
> Everything will be marketized and monetized and accelerated and made efficient.
I give my unwanted items to the thrift store rather than the landfill. Others sell it on eBay. This is monetizing/making things more efficient. And it's good.
but not universally. oil refineries were causing asthma and environmental degradation.
them moving to another state is a regulatory failure (they shouldn't have another jurisdiction to move to, they should just operate without imposing negative externalities on others, spelling of the refineries).
what value is clean air? what is the value of a human life? how much is your attention worth?
these are questions that capitalism should not answer, but will nevertheless try to.
Socialist economies are much more environmentally destructive, because they are so inefficient they cannot afford the luxury of being environmentally cleaner.
The problem isn't capitalism. That's just poor thinking from someone who has spent too much time thinking about political ideology. The problem is how we finance campaigns combined with gerrymandering. And if you want proof, look at corruption in communist and formerly communist countries. It makes the US look like a bunch of choir boys by contrast. Thinking that it is about capitalism is just an attempt to wedge in some political ideology into a practical problem of governance and a sign someone has never actually had to lead real humans before.
Not op but if I’m being honest, I don’t feel as if that’s the case until I see a film whose special effects are limited to mise en scene and matte paintings and then I always have this overwhelming feeling that we’re all missing out.
Films on film using in camera effects are still made on occasion but they’re art films for niche audiences.
But we’ll never get another Ben Hur. And that doesn’t sit well with me even if society can’t yet fully explain why.
Rivers caught on fire for a hundred years before the EPA was formed.
reply