←
oldmoe مُحَمَّد3,331 posts
oldmoe مُحَمَّد avatar

oldmoe مُحَمَّد

@oldmoe

Xoogler, Rubyist, SQLitist

◷ Joined May 2008▧ 92 Photos and videos
oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Nov 8

New TinyBits Release with significant performance improvements for dictionaries. Now even the tiniest records can save space and time without compromises

Post attachment
Younes Abouelnagah avatar
⟳ oldmoe مُحَمَّد retweeted
Younes Abouelnagah@machine_wisdom·Nov 3

Building an Alexa+ add-on brought back lessons from my Gmail Add-ons days. Now I’m betting on #A2UI as the HTML of apps inside ChatGPT, Claude, and other AI assistants or agentic harnesses. I've built saga a2ui to put that bet into practice. Here’s why.

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Oct 6

Porting from Rails to a decent Ruby stack yields a lot more performance while using a lot less memory. I believe more can be gained from further optimization. Won't reach Rust levels of course so probably won't be up to Don Quixote's standards!

Post attachment
DHH@dhhOct 5

Last conversion of the Campfire from my token stash goes to JavaScript/Express. As with the others, I'm sure you can find more to optimize. But this gives you a sense of what order of magnitude these options exist within with agent-led development. github.com/basecamp/once-cam…

Post attachment
oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Oct 2

I am not sure what dhh is proposing here as he talks about exerting extreme violence? Is he calling for killing me and my family since we are Muslims living in Europe? or just expel us? Maybe force convert us to Christianity in an inquisition? So based!

DHH@dhhOct 2

It took the Reconquista nearly eight hundred years to reclaim Spain. Don't give me that loser talk that it's "too late for Europe." The next generation coming up is unbelievably based. They've seen what suicidal empathy has wrought upon their nations. Never lose faith.

Post attachment
oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Oct 2

I think the Rails World keynote fueled a lot of discussion and debate in the Rails & the wider Ruby community. But I also think it's about time to have such a discussion. I share my own experience & some of the great work the community is doing here oldmoe.blog/2026/10/02/its-a…

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Sep 13

But it was a reminder that concurrency is hard, and if there is a window for an error, it will eventually happen, no matter how small that window is. Also SQLite rocks, it feels like the docs are indeed, complete, and cover everything you might face! 6/6

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Sep 13

There was no way to access this data except via this process itself and when it was killed, boof, this phantom data were all gone! Thankfully not much was lost and most was recoverable through other means (logging, APIs) 5/n

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Sep 13

As a result, a never ending transaction was created, where all other transactions happening within it on the same conn worked but never any other conn. After killing the other processes, the app seemed to work, though all writes were not visible outside this process. 4/n

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Sep 13

In an app of mine, Suddenly all processes except one were unable to write to the db. Throwing SQLite Busy errors. After a bit of investigation, it turns out that there was a tiny window where a fiber/thread can capture a connection that was waiting in a busy callback 3/n

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Sep 13

"The busy callback should not take any actions which modify the database connection that invoked the busy handler. In other words, the busy handler is not reentrant. Any such actions result in undefined behavior." What undefined behavior? Well I got to see it first hand! 2/n

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·Sep 13

I have encountered a very interesting SQLite issue (not a SQLite bug, a user error though) on a production app that I think is worth sharing. So SQLite has this busy handler callback feature, where you register a callback to handler busy errors. The feature doc page warns: 1/n

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·30 Dec 2025

If you are building a really high performance data ingestion pipeline, what matters most is how many pages you are touching per tx and in which cache level (L1, L2, L3) would they fit. WAL helps, but it will largely depend on how many records are written per page in a single tx

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·4 Nov 2025

user1: why is this slow? rails dev investigates: oh, it’s N+1 AR queries. user2: why is this slow? C dev investigates: oh, it’s N+1 malloc(). the similarity is uncanny.

oldmoe مُحَمَّد avatar
oldmoe مُحَمَّد@oldmoe·23 Oct 2025

Spent a little time optimizing a hot route on a Ruby Roda + SQLite JSON API app 15 db queries: 1 refactored, 3 new indexes & all now use prepared statements DB time was ~5ms per req, now ~500us per req Most of the req time was in DB, reqs now are under 1 ms Roda + SQLite FTW!