News for hackers. Stuff that matters.
Re:What If OpenDocument Used SQLite? by bane on Monday September 18, 2023 @10:11AM (#37556353)
I'm not sure if the problem you are pointing out has to do with:

a) SQLite the file format - which is Public Domain and so well documented that parsers for it exist in numerous other languages even though it's almost pointless because...

b) SQLite, the Public Domain (and thus entirely source available) C implementation of the library that can operate on the file format -- and is documented to a level well above what most ISO standards shoot for. It's designed to be used in other software and has bindings for pretty much every major language.

c) Some notional OpenDocument stored in a SQLite file that's really just waiting for somebody to make and document.

ISO standards are great, but if we had to wait for ISO to define a file format we'd have pitifully little to work with.

Re:What If OpenDocument Used SQLite? by joshspankit on Monday September 18, 2023 @10:24AM (#37556511)
Sounds like a solution is to use the C implementation to define the standard and have it canonized in to an ISO.
Re:What If OpenDocument Used SQLite? by belenos46 on Monday September 18, 2023 @10:27AM (#37556559)
Yeah, a solution in search of a problem.
Re:What If OpenDocument Used SQLite? by cornstalks on Monday September 18, 2023 @12:25PM (#37558354)
That's what Opus did. The RFC[1] has a base-64 encoded libopus.tar.gz appendix (Appendix A), which is the "primary normative part of this [Opus] specification." If the prose and source code disagree, the source code takes priority and "wins" when it comes to which is normative.

I have a love-hate relationship with this approach.

[1]: https://datatracker.ietf.org/doc/html/rfc6716

Re:What If OpenDocument Used SQLite? by dfox on Monday September 18, 2023 @12:31PM (#37558435)
That is common for codec standards, the normative part of many MPEG specifications is the parser/decoder in C-like pseudo-code. What is somewhat unique for Xiph is that their normative reference decoders are actually usable.
Re:What If OpenDocument Used SQLite? by Eduard on Monday September 18, 2023 @03:15PM (#37560652)
funny, the RFC even includes a shell command pipeline to extract the base64 out of the awkward RFC formatting.

Using the C source code still leaves room for ambiguities / under-specification, no? After all, the semantics rely on the particular gcc release used for compiling the code.

Re:What If OpenDocument Used SQLite? by cornstalks on Monday September 18, 2023 @04:09PM (#37561328)
There is still the possibility of a bug or under-specification, but that's always the case in any spec. At least with Opus they document what implementation-defined behavior they require, so assuming there aren't any hidden bugs then you should get consistent output across compilers.
Re:What If OpenDocument Used SQLite? by Eduard on Tuesday September 19, 2023 @03:20PM (#37574988)
but the semantics change depending on the build tool version and other factors.
Re:What If OpenDocument Used SQLite? by btilly on Monday September 18, 2023 @02:14PM (#37559835)
It is possible that the C implementation of SQLite is the single most commonly deployed software library ever. If not, then it is probably the second, after zlib.

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

Therefore I consider it a better supported format than most standardized formats.

Re:What If OpenDocument Used SQLite? by lucideer on Monday September 18, 2023 @06:51PM (#37563221)
That page makes the argument for zlib & sqlite, but Daniel Stenberg makes some good points here[0].

My guess would be zlib is still number 1 though, even accounting for Daniel's considerations.

[0] https://daniel.haxx.se/blog/2021/10/21/the-most-used-softwar...

Re:What If OpenDocument Used SQLite? by pl4nty on Monday September 18, 2023 @07:16PM (#37563436)
for one, it's bundled with consumer versions of Windows as winsqlite3.dll. not sure when this started though
Re:What If OpenDocument Used SQLite? by sdeframond on Monday September 18, 2023 @03:18PM (#37560703)
I think this has been discussed before about WebSQL.

> The [WebSQL] specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path.

https://www.w3.org/TR/webdatabase/

Re:What If OpenDocument Used SQLite? by sdeframond on Monday September 18, 2023 @03:53PM (#37561110)
The Chrome blog post about deprecating sqlite-based WebSQL makes an interesing point. I believe it applies to OpenDocument as well.

> The Web SQL specification cannot be implemented sustainably, which limits innovation and new functionality. The last version of the standard literally states "User agents must implement the SQL dialect supported by Sqlite 3.6.19". SQLite was not initially designed to run malicious SQL statements, yet implementing Web SQL means browsers have to do exactly this. The need to keep up with security and stability fixes dictates updating SQLite in Chromium. This comes in direct conflict with Web SQL's requirement of behaving exactly as SQLite 3.6.19.

https://developer.chrome.com/blog/deprecating-web-sql/

Re:What If OpenDocument Used SQLite? by bane on Monday September 18, 2023 @07:28PM (#37563590)
In other words, "all the implementors chose a standard, but we're the standard deciders so we're killing the whole idea".
Re:What If OpenDocument Used SQLite? by dragonwriter on Monday September 18, 2023 @07:40PM (#37563734)
One problem was the standard was bug-for-bug replication of a particular version of SQLite.

There’s very good reason for that not to be a standard. (Now, assuming the SQLite documentation is licensed in a way which supports this, copying the documentation of SQLite’s supported SQL as of that version into the standard might have been viable, but no one interested in having WebSQL proposed that or any other resolution.

That relates to the cited issue of absence of independent implementations, which would have been a problem even with a spec that supported independent implementations and verification of their compliance independent of a particular reference implementation. though I personally think the spec problem is a bigger real problem (even if not the decisive policy problem) than the “everyone is using the same underlying software to implement the spec” problem is in this case, where the shared implementation is a permissively licensed open source implementation sponsored by several of the browser vendors, among others.

Re:What If OpenDocument Used SQLite? by bane on Monday September 18, 2023 @08:27PM (#37564193)
hmmm...I appreciate the thoughtful reply. You bring up an interesting point. What is the SQLite documentation licensed as? I would assume PD like the rest of it, but I don't know that for sure.
Re:What If OpenDocument Used SQLite? by anticensor on Tuesday September 19, 2023 @03:46PM (#37575401)
SQLite itself is in the public domain.
Re:What If OpenDocument Used SQLite? by sdeframond on Tuesday September 19, 2023 @02:23AM (#37566244)
The standard deciders are the implementors. There is no point in opposing them. The W3C is actually the representatives of Google, Mozilla, Microsoft, Opera and so on.
Re:What If OpenDocument Used SQLite? by zie on Monday September 18, 2023 @05:38PM (#37562434)