Live data from Hacker News

Executable Is a SQLite Database

fzakaria.com

111–116 of 116 posts

Re: Executable Is a SQLite Database

#111

Earlier quoted context omitted.

I didn't understand the core issue, is it that due to non-alignment of the on-disk data you have to do a copy at load time, but if you could guarantee alignment of the actual blob content then you could use it directly?

Exactly, a guaranteed alignment and continuity of a blob makes it memory-mappable allowing to avoid copying the data back and forth.

On a brief background read it looks like another issue is that blobs are not necessarily stored in contiguous regions of the file. Maybe there's some clever way to combine a VFS shim and virtual tables to store page aligned blobs in a region of the same file as the main database.

Re: Executable Is a SQLite Database

#115

(author) I'm enjoying the comments. When I published a short-paper with this idea in academic circles, the feedback wasn't so kind

It’s a great insight and fun to think about. Perfect for HN.

If I put on my academic-paper-reviewer hat, I’d probably ask: what does that insight get us? What knowledge can we pull from databases into compilers? If we convert compiler/linker/loader operations into database lingo, then do we see patterns or more insights that let us resolve existing controversies/problems?

I haven’t read the author’s academic paper, so I don’t know what he considered the contribution to be. The contribution is “what knowledge was learned that improved the world”. The insight is enough for a minor paper, in my opinion. But if you can show it is the key to tackling an existing problem, that would be a great paper.

Academic reviews are rough. Hasty, inconsistent, often poorly written or incomplete. Responses can be random with good papers getting harsh reviews. Don’t take it too personally. Sometimes the information in a communication isn’t in the content - it is what it says about the communicator. Keep working on your writing and thinking clearly and your odds of better reviews improve … but will never be 100%!

Re: Executable Is a SQLite Database

#116
post #93

(author) I'm enjoying the comments. When I published a short-paper with this idea in academic circles, the feedback wasn't so kind

I love your idea, 40% of which is because I had the same one. I think it is the next logical extension over using zip as the container (jar/ooxml/epub). https://sqlite.org/draft/appfileformat.html There is little reason that ELF needs to be so complex. My motivation was to bundle multiple wasm modules together along with data.

And it's already in use. In the geospatial world we have geopackage, basically a replacement for the still ubiquitous shapefile. It's build on the idea of the earlier spatialite extension for sqlite. Then, shortly after the introduction of geopackage, esri followed suit and released their 'mobile geodatabase', also based on sqlite.

It works great as storage for geometries and attributes and at the same time you have the full power of sqlite for all kinds of analysis.

Post reply on HN