Progrider

Programming discussion

Recent posts

The newest topics and replies across all categories.

PostPosted
Help · post #4

Is this what Godot does with its physics tick?


by kettle
Help · post #3

Read the article. Jump heights are identical now. I'm clamping frame_time to 0.25s as well, otherwise dragging the window gives a spiral of updates.


by teo
Help · post #2

Variable dt makes the integration depend on the frame rate. Fixed step with an accumulator: accumulator += frame_time; while (accumulator >= STEP) { update(STEP); accumulator -= STEP; } render(accumul…


by jf
Help · post #1

Small 2D platformer in C++ with SDL. I multiply velocity by dt every frame. At steady 60 it's smooth. When it dips, the player stutters and jumps come out at a different height, which breaks some leve…


by teo
General · post #15

counterpoint, had a corrupted sqlite db on a VPS whose provider had a flaky disk. postgres wouldn't have saved me either but you do feel alone. PRAGMA integrity_check in your backup job, please


by Anonymous
General · post #14

Nobody's said it so I will: most of what you want from a database at this size is one file you can copy somewhere and open with a CLI.


by carcdr
General · post #13

If losing a day of writes would hurt, look at Litestream, it ships the WAL to object storage continuously. Haven't needed it but people I trust like it.


by rproxy
General · post #12

It's what I do. Test a restore or you don't have a backup.


by dan_r
General · post #11

Ok this has been really useful. Going with SQLite, WAL, BEGIN IMMEDIATE on writes. One more: backups. Is a nightly .backup to another machine enough?


by sam
Help · post #4

The full RFC one is a page long. People print it out to frighten juniors.


by vek
Help · post #3

^[^@\s]+@[^@\s]+$ and move on. Every stricter one I've seen in production rejects somebody's real address, usually with a plus sign or a newer TLD in it.


by lintroller !-TjZOnKc
Help · post #2

There isn't a correct one. Check that there's something, then an @, then something with no spaces, and then send them a message with a link. That's the only test that tells you whether it's a real add…


by ines
Help · post #1

what is the correct one. found like 5 online


by pbj
General · post #10

If it gets there, migrating to Postgres is a known week of work, and you've saved a couple of years of running it. The bigger trap is type sloppiness. SQLite will let you put text in an INTEGER column…


by marta_k !izYA-5cv
General · post #9

Today.


by gcfail
General · post #8

A few hundred users.


by vek
General · post #7

You'll want a second app server eventually and then you're stuck.


by gcfail
General · post #6

Its transaction() helper has .immediate() on it. The default is deferred. node:sqlite you'd write it yourself.


by nils !PxNS1ZCy
General · post #5

Point 1 is news to me, I'd never have found that. Does better-sqlite3 do that for you?


by sam
General · post #4

Oh good, a sensible answer. Now watch somebody suggest kubernetes.


by vek
General · post #3

I run Postgres for a living and I'd say use SQLite for this. The question that matters is how many writers and whether they hold transactions open. One writer at a time, so if you do a slow thing insi…


by marta_k !izYA-5cv
General · post #2

Not a web app, but my sensor box writes every few seconds and has for years. WAL mode, busy_timeout set, no problems. Use .backup or VACUUM INTO for backups and not cp.


by dan_r
General · post #1

I keep reading both "just use SQLite" and "you'll regret it". Small app, a few hundred users at most, single VPS, mostly reads. It's a Node process. Postgres feels like one more thing to run and back …


by sam
Findings · post #3

Java's Double.compare does give NaN a total order. Rare win for the old thing.


by gcfail
Findings · post #2

Same in every language with IEEE floats and a comparison sort. JS is worse because sort() defaults to comparing strings.


by lintroller !-TjZOnKc
All times shown in UTC.