Live data from Hacker News

SQLite as an Application File Format

sqlite.org

11–20 of 108 posts

Re: SQLite as an Application File Format

#11
post #9

Somehow my first thought from the title was using sqlite as a format for applications. So like a replacement for ELF. I think this idea is both fascinating and horrifying.

I worked @fzakaria on developing that idea. It actually worked surprisingly well. The benefits are mostly in the ability to analyze the binary afterward though rather than any measurable benefit in load time or anything like that though. I don’t have the repo for the musl-based loader handy, but here’s the one for the virtual table plugin for SQLite to read from raw ELF files: https://github.com/fzakaria/sqlelf

Re: SQLite as an Application File Format

#12

Bit unrelated rant but I'm still not sure why ZIP has been adopted as an Application File Format rather than anything else. It is a remanent of a DOS era with questionable choices, why would you pick it over anything else?

Because Windows can view and extract them out of the box without installing any additional applications. If it supported anything better out of the box I'd guess people would use that instead.

Re: SQLite as an Application File Format

#13

Bit unrelated rant but I'm still not sure why ZIP has been adopted as an Application File Format rather than anything else. It is a remanent of a DOS era with questionable choices, why would you pick it over anything else?

It works well enough. What could, for instance, epubs gain by having another base format instead?

Re: SQLite as an Application File Format

#14

Searched for this topic: > and is backwards compatible to its inception in 2004 and which promises to continue to be compatible in decades to come. That is pretty amazing. You could do a lot worse.

Same as .zip, .xml, .json and many others. Doesn't mean that whatever the app stores inside will remain backward compatible which is the harder problem to solve.

Still helpful!

Re: SQLite as an Application File Format

#15

Bit unrelated rant but I'm still not sure why ZIP has been adopted as an Application File Format rather than anything else. It is a remanent of a DOS era with questionable choices, why would you pick it over anything else?

I think most format use "gzip" instead of "zip".

Re: SQLite as an Application File Format

#16

Bit unrelated rant but I'm still not sure why ZIP has been adopted as an Application File Format rather than anything else. It is a remanent of a DOS era with questionable choices, why would you pick it over anything else?

- archiver format to stow multiple files in one; your actual files (in your choice of format(s)) go inside

- files can be individually extracted, in any order, from the archive

- thousands of implementations available, in every language and every architecture. no more than 32KiB RAM needed for decompression

- absolutely no possibility of patent challenges

Re: SQLite as an Application File Format

#19
post #12

Bit unrelated rant but I'm still not sure why ZIP has been adopted as an Application File Format rather than anything else. It is a remanent of a DOS era with questionable choices, why would you pick it over anything else?

Because Windows can view and extract them out of the box without installing any additional applications. If it supported anything better out of the box I'd guess people would use that instead.

"The operating system makes it easy to mess with" doesn't seem like a particularly useful property for application file formats.

Re: SQLite as an Application File Format

#20
post #9

Somehow my first thought from the title was using sqlite as a format for applications. So like a replacement for ELF. I think this idea is both fascinating and horrifying.

wonder if this would make hot-swap functions easier, if every function had its own section and every section was in the db
Post reply on HN