129 points · by pncnmnp · 3y ago · 63 comments
Q: If you magically had enough extra time to do one additional thing at work that you’re not doing now, what would it be?
A: Oh, I’ve got a long list. But my #1 thing right now I think would be a new version control system which the working name is Fit, it’s a combination of Fossil with Git. Uses the Fossil user interface but it uses the low-level file format of Git. So that then you can work with Fossil’s interface but push and pull to legacy Git users. And I think that would be huge.
The development happens on its mailing list, but there is also an Heptapod (a gitlab fork modified to also support mercurial) instance here: https://foss.heptapod.net/mercurial/tortoisehg
Interesting enough, almost all my work nowadays consists of interacion with git remotes. But my local clone has always been mercurial via hg-git.
Although usually what seems to happen is people only use one linear history and never branch anything. I'm not sure if that's because Git is hard, or just because nobody wants to learn about branches and stuff in any system if they don't have to.
In any case it works perfectly fine and is an amazing step up compared to no VCS.
I'm surprised that's the #1 magic-wand project for anyone. I'm not trying to yuck his yum, but am just surprised.
But the larger elephant in the room for any such effort is that Fossil's mental model is, by choice, way different from git. If they just want a new ui that isn't as "git sux," surely a new cli to kid-gloves git would be less work than trying to reinvent a whole new version control system, and that goes 1000x for trying to maintain wire compat with every git server in the world
It seems like Dr. Hipp is frustrated that Fossil hasn’t had mainstream adoption, and that git has, he’s talked about it quite a bit in Fossil docs and here on HN. Given that SQLite is very stable and adoption is an absolutely runaway success, I’m not too surprised his wish list now turns to Fossil.
> Fossil’s mental model is, by choice, way different from git.
Is that accurate? It does come with a ton of extra features, but seems like the core version control model is quite similar conceptually, and differs more on implementation (SQLite backing instead of file system) and workflow dogma (Fossil’s moralizing of rebase and commit graph edits). The Fossil docs even start with “The feature sets of Fossil and Git overlap in many ways.” Fossil was released after but within a year of git being released, the timeline and docs and comments from the authors generally suggest it’s a reaction to git, taking the good parts and trying to, in the authors’ eyes, improve and fix their perceived problems with git.
We'll start with Fossil not tolerating `git rebase` or `git commit --amend`: https://www.fossil-scm.org/home/doc/trunk/www/fossil-v-git.w... and the number of repos I've seen where PRs don't land without someone chirping about "please rebase your branch"
"Fossil was designed for [...] just four programmers, and 64% of it is from the lead developer alone. [They] know each other well and interact daily." https://www.fossil-scm.org/home/doc/trunk/www/fossil-v-git.w... makes one wonder what kind of awesomeness would ensue if running `fit clone https://github.com/chromium/chromium.git`
and its related topic: "Fossil is not designed for drive-by contributions" and "Where Git encourages siloed development, Fossil fights against it.": https://www.fossil-scm.org/home/doc/trunk/www/fossil-v-git.w... -- I would be really sad to have all my working changes auto-pushed by the tool, although the https://github.com/martinvonz/jj#readme is also in that spirit, where almost every operation is a `git add . && git commit -mwip`
Fossil is `git push --mirror` by default: https://www.fossil-scm.org/home/doc/trunk/www/fossil-v-git.w... versus `git push origin HEAD` which is what most people think of with "git push"
Then, as one of the obvious actual technical issues: Fossil is SHA-3: https://www.fossil-scm.org/home/doc/trunk/www/fossil-v-git.w...
> But the larger elephant in the room for any such effort is that Fossil's mental model is, by choice, way different from git.
How? I've been glancing at docs but I don't see much difference, still a DAG of commits that are named after its hash like almost every other DVCS
From onlooker perspective the killer feature seems to be integration with project management tools vs "just" being a VCS
it's really too bad, everything else in Fossil looks very compelling.
https://www.fossil-scm.org/home/doc/trunk/www/fossil-v-git.w...
Also GH/GL is popular because of everything else they do (issues, page rendering, now CI/CD) not because git CLI is too hard.
Improvements are welcome of course but the moment newbie hits merge conflict no amount of CLI niceness can get around them not knowing what to do with it and that's true regardless of DVCS. For "non-programmers" no CLI is good enough anyway.
Git is primarily a file format. There's also a canonical set of low-level command-line utilities. But you can create whatever interface you want. Most programmers and GUIs happen to use the canonical command-line tools, but that's hardly necessary. Fit would keep the necessary part of Git (the file format), and provide a different human interface.
I don't think it's right to call that "just a new porcelain".
I have no clue how Hipp thinks to implement it, much less in a way that allows push and pull to legacy Git users.
https://corecursive.com/066-sqlite-with-richard-hipp/
I’m going to write my own mail server. I was making notes on that even as we were setting up this call. That’s a big problem, and that’s at least as difficult if not more difficult than writing a database engine, but I don’t want to be beholden to Gmail. I don’t want them controlling my destiny. I don’t want them controlling the record of all of my conversations. I want to control that myself, and so I’m going to go through a lot of pain and a lot of work and a lot of effort to come up with some solution that I can control myself. I can go out and lease a virtual machine out there in the cloud and run it myself and not depend on a third party to control my email.
I've recently did a small server for private use (after google yeeted the free tier) and let's say it does require a bit of mail knowledge to set it up right.
That being said there is probably some container doing it, surely "easy mail selfhosting" isn't a new problem
Wowzers, that's some RMS-"Web Over Email"-level "I have privacy concerns so I'm going to reinvent $foo" https://stallman.org/stallman-computing.html
Hipp not only wrote SQLite, which uses his own parser generator (Lemon) but he also wrote his own version control system (Fossil), and his own editor.
Perhaps it's more likely that he wants to be in control of the things which most closely affect him, rather than this being a privacy issue?
Anyone had experience running SQLite on low-power embedded platforms? Is this expected performance?
I'd expect closer to 5uS than 5mS, but I'm not that familiar with the ESP32 devices
sqlite3_initialize();
sqlite3 *db;
sqlite3_open("/data/sqlite.db", &db);
char *err = 0;
sqlite3_exec(&db, "DROP TABLE table_name;", NULL, NULL, & err); // This takes ~5ms even when table_name does not existThe handle named `db` in your example is as expensive to create as a connection in the relative sense and should be optimized the same way in your application. It may be less expensive than a network database connection, but its still very expensive relative to any subsequent queries. The database file is opened, its first page is read, its schema is parsed from text (!), some memory is pre-allocated and so on every time you make that call.
The sqlite3_exec call invokes the parser and query optimizer every time it is called. A better benchmark would be to compile a valid statement (sqlite3_prepare). The unit under test should just be sqlite_bind() for relevant parameters followed by sqlite_step(), and maybe (but not necessarily) sqlite_reset().
I wonder if it could be doing multiple small writes on every operation -- I could definitely imagine small writes getting very costly, especially with wear-leveled file systems that might be moving around pages on even small writes.
Have you used a digital logic analyzer to figure out how long reading the page takes, how many pages SQLite reads for that query, and how much work SQLite has to do before it can fetch the next page? I haven't seen any ESP32 SQLite ports that can eagerly fetch pages, even though it's relatively simple to do with DMA (but would require some significant changes to SQLite because it's designed to be ignorant of OS preemption which is not the case in most RTOSes).
While I very much appreciate the safety of being a very small cog in a larger machine, I also wonder how my career might be more enjoyable and satisfying if I had chosen to limit my options to small teams where every single person on the team had a critical impact on the success of a project.
I think medium-sized projects (say a team of max 10, or maybe 2 smaller ones) seems to be the most fun ones. You have enough manpower to do some bigger reorganizing if required but it isn't as big that rewrite of any part is years-long saga.
SQLite is not something we wire up and expose bare-ass to the public internet. We don't worry about 0-day security issues in this context. It's more like a wrapper our product uses for structured disk access. Anything that would warrant urgent patching is in .NET vendor or in-house software piles.
If something horrible happened and the entire SQLite dev team was wiped off the face of the planet, I'd make a note to look at alternatives by ~2025.