683
submitted 9 months ago by yogthos@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] lemann@lemmy.one 87 points 9 months ago

Ah, good ol' Microsoft Office. Taken advantage of their documents being a renamed .zip format to send forbidden attachments to myself via email lol

On the flip side, there's stuff like the Audacity app, that saves each audio project as an SQLite database 😳

[-] Hexagon@feddit.it 50 points 9 months ago

Also .jar files. And good ol' winamp skins. And CBZ comics. And EPUB books. And Mozilla extensions. And APK apps. And...

[-] neo@lemmy.comfysnug.space 9 points 9 months ago

cbz is literally just a renamed zip

[-] MonkderZweite@feddit.ch 4 points 9 months ago

Btw, you can create "chapters" by creating folders. Easy to automate with a loop.

[-] neo@lemmy.comfysnug.space 1 points 9 months ago

a lot of the time i handle it manually since i try to pack things in "volumes" that most closely mimic physical releases, and writing the code to get that information would be slower than just looking it up manually

so, for example, the first volume of bleach has 7 chapters, so i'd pack those 7 chapters together into one cbz, the second volume in another cbz, etc.

[-] beeb@lemm.ee 28 points 9 months ago

an SQLite database

Genius! Why bother importing and exporting

[-] xigoi@lemmy.sdf.org 20 points 9 months ago

Minetest (an open-source Minecraft-like game) uses SQLite to save worlds.

[-] lemann@lemmy.one 8 points 9 months ago

Mineclone2 is an absolute masterpiece of a game for Minetest IMO

[-] xigoi@lemmy.sdf.org 9 points 9 months ago

I prefer games that embrace the difference from Minecraft instead of trying to emulate it. My favorite is MeseCraft.

[-] AVincentInSpace@pawb.social 1 points 9 months ago

So does Scrap Mechanic (sandbox game that's basically Space Engineers on the ground -- or, more loosely, Minecraft but with physics and you can build cars) also uses sqlite to save worlds. It also uses uncompressed JSON files to store user creations.

[-] gamma@programming.dev 3 points 9 months ago

It used to use project folders, but due to confusion/user error was changed in 3.0.

[-] tsonfeir@lemm.ee 23 points 9 months ago

SQLite is amazing. Shush.

[-] mogoh@lemmy.ml 17 points 9 months ago

that saves each audio project as an SQLite database 😳

Is this a problem? I thought this would be a normal use case for SQLite.

[-] fiah@discuss.tchncs.de 16 points 9 months ago

doesn't sqlite explicitly encourage this? I recall claims about storing blobs in a sqlite db having better performance than trying to do your own file operations

[-] MNByChoice@midwest.social 8 points 9 months ago* (last edited 9 months ago)

Thanks for the hint. I had to look that up. (The linked page is worth a read and has lots of details and caveats.)

The scope is narrow, and well documented. Be very wary of over generalizing.

The measurements in this article were made during the week of 2017-06-05 using a version of SQLite in between 3.19.2 and 3.20.0. You may expect future versions of SQLite to perform even better.

https://www.sqlite.org/fasterthanfs.html

SQLite reads and writes small blobs (for example, thumbnail images) 35% faster¹ than the same blobs can be read from or written to individual files on disk using fread() or fwrite().

Furthermore, a single SQLite database holding 10-kilobyte blobs uses about 20% less disk space than storing the blobs in individual files.)

Edit 5: consolidated my edits.

[-] fibojoly@sh.itjust.works 3 points 9 months ago

Civilisation (forget which) runs on an SQLite DB. I was rather surprised when I discovered this, back then.

this post was submitted on 13 Sep 2023
683 points (97.6% liked)

Programmer Humor

31223 readers
60 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS