Live data from Hacker News

Executable Is a SQLite Database

fzakaria.com

11–20 of 116 posts

Re: Executable Is a SQLite Database

#11
I wonder how flexible is the SQLite binary format to allow to design a tool that would take a SELF binary/db and rewrite it to make BLOB values more mmap-able (OS page aligned) in order to allow shortcuts in the self-exec loader.

Re: Executable Is a SQLite Database

#12
I don't think this goes far enough! Make the actually app store be the same file itself. so it's a living application and the file is constantly updated to how you use it. Copy it around, and you carry your data wiht you as well.

Let's go deeper. it's a webserver app + the server code + application code + db, so pocketbase++ where it's also the deployment target.

Then combine it with APE liek system, and the same file loads and stores things on every platform. evil laugh

Very cool hacking! My hats off to the author.

Re: Executable Is a SQLite Database

#13

I don't think this goes far enough! Make the actually app store be the same file itself. so it's a living application and the file is constantly updated to how you use it. Copy it around, and you carry your data wiht you as well. Let's go deeper. it's a webserver app + the server code + application code + db, so pocketbase++ where it's also the deployment target. Then combine it with APE liek system, and the same fil…

_> https://github.com/blue-monads/potatoverse

Re: Executable Is a SQLite Database

#15

I don't think this goes far enough! Make the actually app store be the same file itself. so it's a living application and the file is constantly updated to how you use it. Copy it around, and you carry your data wiht you as well. Let's go deeper. it's a webserver app + the server code + application code + db, so pocketbase++ where it's also the deployment target. Then combine it with APE liek system, and the same fil…

The application writing its state to the executable is basically Smalltalk (or Lisp). It's an extremely powerful way of writing software, IMO.

Re: Executable Is a SQLite Database

#16

I don't think this goes far enough! Make the actually app store be the same file itself. so it's a living application and the file is constantly updated to how you use it. Copy it around, and you carry your data wiht you as well. Let's go deeper. it's a webserver app + the server code + application code + db, so pocketbase++ where it's also the deployment target. Then combine it with APE liek system, and the same fil…

I didn't have this idea exactly but I did play around with sqlite as an embedded database for packing ruby apps into a single file a while ago. It was less direct than this: you basically compiled all the dependencies (including .so's) into a fake filesystem that an overridden `require` loaded from, which was unpacked to a `:memory:` database at runtime from a `.data` section that got bolted onto the interpreter. It died when 1.8->1 9 changed how the build system works and I never got round to updating.

A version based on this which carries around an overlay filesystem would be comparatively straightforward, the hard work is already done.

Re: Executable Is a SQLite Database

#17
post #5

I appreciate the inventiveness of this idea. But I don’t find myself thinking I must have this.

Yeah... Original and clever, and a great read! But it seems mostly useful to the handful of people dealing with ELF internals, than to the vast majority of people executing ELF blissfully ignorant of its internals... Maybe if the latency and size trade-offs were the other way around it would be more appealing to the masses.

Re: Executable Is a SQLite Database

#18
Yeah, I have been amazed for an entire life how many tools the IT industry invented during last 50 years to just disguise a database.

OK, in '70s, '80s or '90s when compute and storage resources were limited and every bit counted, specialized formats did make sense.

But nowadays we'd save enormous efforts by just packaging stuff in SQLite databases. Microsoft's proprietary file formats (Office, Power BI etc.), OpenOffice/LibreOffice OpenDocument format, or almost everything else would fit perfectly.

Documents, files, are all data (called "data files", aren't they?), including executables, which as can be seen in this article are also databases.

https://sqlite.org/aff_short.html

https://sqlite.org/appfileformat.html

Post reply on HN