
⚙️Runs https://teapaw.org/t.co/hpDuJqA6x0 ✏️Draws https://teapaw.org/t.co/8WdzSEMDUL ❤️Polyglot projects #bazel #scala 🎓@EPFL'13
Switzerland
Joined November 2013
- Tweets1.7K
- Following732
- Followers367
- Likes3K
this just happened to my partner. @DB_Bahn can you please explain?!
21.09, 19:35 Ich wurde vom DB-Personal gebeten, den Speisewagen zu verlassen und in einem anderen Wagen weiter zu stillen.
Solch diskriminierendes Verhalten von Zugpersonal, anno 2025, im Ernst?!
@DB_Presse @hebammenverband @tazgezwitscher
#stillen #diskriminierung #deutschebahn
1
89
Nice @visakanv vibes here :)
109
Each time I configure a device running ESPHome I'm flabbergasted:
Flash a firmware to a device through a browser connected to a locally running docker-container.
Easy as pie.
100
Ah, the lovely bugs that result from a subtle clock skew between different docker containers... :/
1
68
Got a lot of value out of this post by @meln1k to solve my bottleneck with SQLite and I should be able to amp things up a bit now.
teapaw.org/meln1k/status/18133141…
how I squeeze 60K RPS out of SQLite on a $5 VPS:
There are tons of tutorials on how to setup SQLite, and sometimes they contradict each other. Here is what worked for me.
1. Configuring PRAGMAs. We need to send the following PRAGMA commands right after opening the connection:
PRAGMA journal_mode = WAL;
- enables write-ahead log so that your reads do not block writes and vice-versa.
PRAGMA busy_timeout = 5000;
- sqlite will wait 5 seconds to obtain a lock before returning SQLITE_BUSY errors, which will significantly reduce them.
PRAGMA synchronous = NORMAL;
- sqlite will sync less frequently and be more performant, still safe to use because of the enabled WAL mode.
PRAGMA cache_size = -20000;
- negative number means kilobytes, in this case 20MB of memory for cache.
PRAGMA foreign_keys = true;
- because of historical reasons foreign keys are disabled by default, we should manually enable them.
PRAGMA temp_store = memory;
- moves temporary tables from disk into RAM, speeds up performance a lot.
Do NOT use cache=shared! Some tutorials recommend configuring it, but this is how you get nasty SQLITE_BUSY errors. It is disabled by default, so you don't have to do anything extra.
2. Use immediate transactions
If you know that transaction can possibly do a write, always use BEGIN IMMEDIATE or you can a get SQLITE_BUSY error. Check your framework, you should be able to set this at the connection level.
3. Open two connection pools
Another trick is to open 2 connection pools, one for reads only and another for reads/writes. Set the connection limit of write pool to 1, and the connection limit of the read pool to some reasonably high number, e.g. number of your CPU cores.
4. Bonus: how I configure sqlite with Go
Here is the code in go I use to configure the sqlite connections:
```go
func SQLiteDbString(file string, readonly bool) string {
connectionParams := make(url.Values)
connectionParams.Add("_journal_mode", "WAL")
connectionParams.Add("_busy_timeout", "5000")
connectionParams.Add("_synchronous", "NORMAL")
connectionParams.Add("_cache_size", "-20000")
connectionParams.Add("_foreign_keys", "true")
if readonly {
connectionParams.Add("mode", "ro")
} else {
connectionParams.Add("_txlock", "IMMEDIATE")
connectionParams.Add("mode", "rwc")
}
return "file:" + file + "?" + connectionParams.Encode()
}
func OpenSqliteDatabase(file string, readonly bool) (*sql.DB, error) {
dbString := SQLiteDbString(file, readonly)
db, err := sql .Open("sqlite3", dbString)
pragmasToSet := []string{
"temp_store=memory",
}
for _, pragma := range pragmasToSet {
_, err = db.Exec("PRAGMA " + pragma + ";")
if err != nil {
return nil, err
}
}
if readonly {
db.SetMaxOpenConns(max(4, runtime.NumCPU()))
} else {
db.SetMaxOpenConns(1)
}
return db, nil
}
```
1
139
Having re-learned about ZIO's `Scope` I was hoping it would help release the memory that's not being garbage collected.
Apparently, properly releasing the resources related to the requests I'm making allow me to fill my memory even faster
¯\_(ツ)_/¯
40
What does it take to download the entire world’s podcast episodes?
With a bit of free time and a 10Gbit/s connection available, I'm trying to find out.
1
2
123
However, now I’m not blindly downloading audio files anymore:
I’ll need to manage a process with different stages that take a while, and keep track of the progress of things so I can update and fix errors and problems as I discover them
(because turns out they are many)
2
57
Part II over here -> teapaw.org/0xTelegraph/status/181…
Downloading all the podcasts, part II:
I went from “Can I fill my 10Gb bandwidth with podcast downloads” (to which the answer is “Yes, definitely”) to
“Can I build a podcast downloading & transcription system that runs on my home hardware”.
23
Downloading all the podcasts, part II:
I went from “Can I fill my 10Gb bandwidth with podcast downloads” (to which the answer is “Yes, definitely”) to
“Can I build a podcast downloading & transcription system that runs on my home hardware”.







