13 ms·
Pijul: a distributed version control system, written in Rust (2019)
- nathell 7y agoPrevious discussions: https://news.ycombinator.com/item?id=18654958 https://news.ycombinator.com/item?id=18654958 https://news.ycombinator.com/item?id=18235798 https://news.ycombinator.com/item?id=18235798 https://news.ycombinator.com/item?id=13643025 https://news.ycombinator.com/item?id=13643025 https://news.ycombinator.com/item?id=10470281 https://news.ycombinator.com/item?id=10470281
- hbbio 7y agoHow does it compare to Darcs? https://hackage.haskell.org/package/darcs https://hackage.haskell.org/package/darcs Edit: Better link is http://darcs.net/ http://darcs.net/, darcs has been around for more than 10 years and is still actively maintained.
- superpermutat0r 7y agoI think it has a more tractable algorithm than darcs.
- mattmein 7y agohttps://pijul.org/manual/why_pijul.html#pijul-for-darcs-users https://pijul.org/manual/why_pijul.html#pijul-for-darcs-user...
- pmeunier 7y agoFrom a complexity theory perspective, the Darcs patch application algorithm runs in time O(2^n) in the worst case, where n is the number of patches since the beginning of the repository. That exponential merge happens in practice. In Pijul, it is always O(log n + c), where c is the size of the largest conflict between the current repository and the patch you're trying to apply. So, it is a double-exponential improvement in practical uses, even though you could totally make c = n for the sake of the argument. The tradeoff is that Pijul doesn't handle the very cool (but rarely usable in practice) "darcs replace". From an implementation perspective, Pijul is in Rust, relies on less external stuff than Darcs (for example no need for Putty on Windows), is available as a library. edit: also, Pijul has branches, too, and Darcs doesn't. But branches are far from being as useful as in Git, and in fact most Git workflows use short-lived branches, which are essentially just patches in both Pijul and Darcs.
- carterschonwald 7y agoAre we talking about the Darcs version < 2 merge algorithm or the merge algorithm in current darcs?
- pmeunier 7y agoThe current darcs. Conflict fights are still exponential, and happen sometimes. I'm a really happy darcs user, but I was talking about complexity theory here, which considers worst cases. For the sake of completeness, I don't know the full story for the complexity of Darcs "in most cases", but I believe it to be linear in the size of history in the normal case (as it needs to try and commute all the patches with your new patch).
- gnufx 7y ago"Current" might mean the latest release or the current darcs.net repo with v3 patches, which I can't claim to have followed.
- gnufx 7y agoI can't find the details off-hand, but doesn't Darcs actually have the facility to define different types of patches as well as normal ones and "replace"? I don't know whether that's ever been done, but it could be useful, whether or not it's a worthwhile trade-off.
- atombender 7y agoI don't know too much about the specifics, but Pijul is based on a new "theory of patches" that is different from Darcs' and which they claim is "formally correct". Darcs always had a problem with exponential merge solutions, and Pijul apparently doesn't, partly thanks to using what they call a "conflict-tolerant" format for storing the tree. See the "Pijul for Darcs uses" at https://pijul.org/manual/why_pijul.html https://pijul.org/manual/why_pijul.html.
- cryptonector 7y agoIt's comparable, apparently: https://pijul.org/manual/why_pijul.html https://pijul.org/manual/why_pijul.html https://pijul.org/manual/why_pijul.html#pijul-for-darcs-users https://pijul.org/manual/why_pijul.html#pijul-for-darcs-user...
- core-questions 7y agoThe problem with Darcs, which I've seen in use, is that the tooling around it is atrocious. Compared to something like Bitbucket or GHE, it's a huge pain for a bigger team, and requires a very oldschool workflow. There's a Jenkins plugin that barely works, you have to build your own new version because distro packages are old, etc. Not sure whether there's any actual advantage at all.
- pmeunier 7y agoWell, we (the Pijul team) are trying to learn from Darcs and not disregard that aspect. Darcs maintainers have been super busy fixing the performance issues, but since Pijul doesn't have those, we can invest more time in the tooling. Look at nest.pijul.com for example, or the satellite projects such as Thrussh (https://cargo.io/crates/thrussh https://cargo.io/crates/thrussh), which aim at making the UX as smooth as possible.
- the_duke 7y agoCorrect url: https://crates.io/crates/thrussh https://crates.io/crates/thrussh
- core-questions 7y agoThanks, this is fascinating. I'd been hoping to move one of my teams away from Darcs to Git but they're very set in their ways; gotta assume the work to bring them to Pijul would be just as much work, but then the other teams that use Git would also need to move. Way too much CD tooling to re-implement. Would consider for a new project, somewhere else, though. I really miss my perfect understanding of SVN when I get lost in some Git madness - it's obviously way more powerful and faster but sometimes I get into merge scenarios where I have to go edit files just to restore whatever I just did on another branch or what-have-you. Editors papering over this with extensions to "resolve using theirs" etc. help but seem like an ugly fix. I am interested in https://www.unisonweb.org/ https://www.unisonweb.org/ which I saw here recently as storing its code in a fundamentally different way that helps make ugly merge conflicts a thing of the past by making the on-disk format (and therefore the revision control system) aware of some aspects of the AST. I'd love to see this go further and have a "no conflict" merge take place as long as two edits to a single file touched different functions and the merged version passes some tests or whatever.
- vmchale 7y agoDarcs has a some pathological algorithms. IME, darcs has never lost a repo of mine and Pijul has. So I'm not clamoring to use pijul instead - I don't use darcs in a way that runs into the pathological cases anyway.
- frutiger 7y agoFrom https://pijul.org/manual/why_pijul.html#patch-commutation https://pijul.org/manual/why_pijul.html#patch-commutation: > In Git, importing just a few commits from another branch is called "cherry-picking", and involves changing the identity (the hash) of those commits. This usually works the first time. However, when done again, as the maintainer of a stable branch probably wants to do, this often causes counter-intuitive conflicts. If you're doing this in git to apply a fix to a master branch and multiple release branches, you're doing it wrong. You should be basing the patches off the merge-base of master and the oldest release branch you wish to land the change into. If you work this way, you can merge the patch cleanly into all target branches, and this new patch becomes the new merge-base. So you can actually continue to apply new patches without any conflicts.
- mjw1007 7y agoBut you don't want your VCS to dictate your project management. Maybe you want to apply the patch to the main development branch, let people try it there for a while, and then decide which maintained release branches should get the patch.
- frutiger 7y agoYou can actually achieve this by making a new branch at the merge-base, cherry picking the fix from the development branch, then landing this branch into the release and development branch. Git will record the parent commit correctly on both branches but apply no changeset to the development branch, while applying it to the release branch. I admit the above is a bit much for most people.
- pmeunier 7y ago> I admit the above is a bit much for most people. True, but it's not just the UI: this also requires discipline and constant synchronisation in a team. Pijul achieves the same without much discipline.
- mjw1007 7y agoIt's still not ideal. With git's DAG-based "patch model", I think what you'd really want to do is, after making the new branch and cherry-picking the fix, make that new commit a second parent of the original commit (so that it becomes a merge, but its tree doesn't change). I think that would leave the graph with the best representation of what's going on (ie, the same thing as if you'd made the patch from the merge-base in the first place). But git's hash-based system for identifying commits won't let you add new parents.
- dochtman 7y agoLatest commit from 7 months ago. Also, anecdotally I've heard it's not very user friendly in practice; more like a research prototype than usable software.
- manojlds 7y agoIf anything, a user friendly git is what we need, not yet another tool with bad UX.
- pmeunier 7y agoThere are lots of tools out there to try and make Git simpler/more user-friendly. There's also Mercurial, which is more user-friendly while still using the same idea. Pijul is meant to model asynchronous work as just that, whereas Git forces it into a unique history. For example, in Pijul, "pull --rebase" and "pull" produce different history, but are guaranteed by design to produce the same result, and strictly equivalent repositories (there's actually just one command for both). This difference is fundamental.
- BlueTemplar 7y agoFossil?
- pmeunier 7y agowould you care to justify a little bit? The latest version is 0.x, are you talking about bugs, or something else?
- yepguy 7y agohttps://discourse.pijul.org/t/is-this-project-still-active-yes-it-is/451 https://discourse.pijul.org/t/is-this-project-still-active-y...
- xoa 7y agoFWIW, this has gotten a certain amount of attention on HN over the years since it was begun but it's instantly noticeable that patches tailed off and stopped last June. Naturally that raises the question of "is this even still alive", and last month the starter of the project, Pierre Meunier, posted a response to a query about that indicating a major rewrite is in progress: ---- https://discourse.pijul.org/t/is-this-project-still-active-yes-it-is/451 https://discourse.pijul.org/t/is-this-project-still-active-y... >Is Pijul still under active development? >That’s right, the last patches are pretty old. A few things have happened since then, but they’re not public yet. This has included (1) thinking about new algorithms to solve our remaining problems and (2) thinking about the future and sustainability of the project, including its funding. >Another thing going on is a major rewrite of libpijul. This project was our first Rust project, was started in a pretty early version of Rust, on an incomplete theory that was only finalised in 2019. Until then it wasn’t clear what functions and types we wanted to expose, and how to document them. >I’m currently reorganising everything, in particular using a lot more proc-macros, and making it more general so that it can run on various backends (well, actually different variants of Sanakirja). >We will hopefully have news pretty soon. I’d love to fix all the bugs in the Nest discussions, my hope is that many of them will simply disappear with the rewrite. ---- Of course, everyone here probably knows about the risks of major rewrites, though granted that's lessoned for something that began in the research phase and never got close to a 1.0 and major uptake. It is a pretty interesting project and I'd love to see it go well, so hopefully it can make the series of transitions to something more mature and self-sustaining! For now though it looks like things will be in a bit of stasis, and everyone will have to wait and see what emerges on the other side.
- eikenberry 7y ago> risks of major rewrites The risks are mostly in relation to your existing users. As this was more of a prototype, with no real user base, in my mind it fits more with the "throw the first away" line of thinking.
- potiuper 7y agoRust or any procedural language seems not to be the most apt lang to do a first implementation / rewrite of a patch theory. Patches themselves have already been generalized to paths using HOTT ref: https://www.cs.cmu.edu/~rwh/papers/htpt/paper.pdf https://www.cs.cmu.edu/~rwh/papers/htpt/paper.pdf. The takeaway from https://arxiv.org/abs/1311.3903 https://arxiv.org/abs/1311.3903 is the use of commutation to allow for push out while the HOT ref discusses pseudocommutation regarding merges. See the footnote about commutation being inaccurate term regarding darts model. With the addition of ojo "ghost" deletes and pseudo edges, a formal implementation should provide a non-exponential model/algorithm amenable for optimization.
- KirinDave 7y agoI'm glad this made the front page. I and other of my friends have tried a few times now with varying degrees of success. For those of us pining for the days of darcs or wanting to escape the git monoculture, Pijul is really great.
- rumanator 7y agoWhat's the value proposition of Pijul? I mean, not being Git is not a good reason to convince anyone to adopt it as a VCS. A tool needs to actually be better at something and add tangible value where others may not have. What's the absolute best reason to convince anyone to adopt Pijul?
- vmchale 7y agoCompared to git, it relies on patches rather than a branch approach. I think it's more intuitive. Less opportunities to do silly things and some things that are punishing in git are not with patch-based version control.
- rumanator 7y ago> Compared to git, it relies on patches rather than a branch approach. Is this even relevant at all? I mean, in the user's POV the role of a VCS is to CRUD changesets and branches. As long as the user can commit their changesets and audit the DAG of past commits, who cares how the system is implemented under the hood?
- pmeunier 7y ago> in the user's POV the role of a VCS is to CRUD changesets and branches That would be the role of a filesystem, and Git is a perfect distributed filesystem. A VCS also allows people to merge their changes and to detect and handle conflicts gracefully. > who cares how the system is implemented under the hood? Pijul is not at all about the underlying implementation of commits. Patch commutation is a radically different way of thinking about cooperation, and (1) much simpler and (2) has the potential to scale to much much larger repositories.
- sergiotapia 7y agoFinally, a moral DVCS.
- j88439h84 7y agoIs this a graph theory joke?
- deleted 7y ago[deleted]
- vmchale 7y agoLast I tried it (a couple years ago), repositories got corrupted. I'd like something to replace darcs, but so far I haven't found it.
- pmeunier 7y agoWell, for a project explicitly announced as experimental (there's even a blinking paragraph on nest.pijul.com), two years is quite a while. The repository of Pijul itself got corrupted several times, but the last time was certainly more than a year ago.
- Nullabillity 7y agoLast I tried it (in November), repositories got corrupted.[0] I wish Carnix would just use Git instead, but I get why that's not happening. [0]: https://nest.pijul.com/pmeunier/carnix/discussions/39 https://nest.pijul.com/pmeunier/carnix/discussions/39
- pmeunier 7y agoThis is a network error, not a corruption error. I agree the CLI is not yet stable.
- Nullabillity 7y agoI guess it was caused by a network error, but it still ended up with the repository in a corrupt state (with the patches "existing" but invisible).
- nieve 7y agoWhile that's a reasonable position in some ways I certainly don't get the impression that I should assume Pijul is not up to the most fundamental guarantee of an SCM: not losing my code. A page telling me why I should use Pijul probably should explain that I shouldn't use it for anything that matters in the most trivial of ways and yours doesn't. https://pijul.org/manual/why_pijul.html https://pijul.org/manual/why_pijul.html
- nemetroid 7y agoThe implications of Pijul are really interesting. Some of the guarantees afforded by Pijul's model are clearly superior to those afforded by Git, but I can't help but get the impression that Pijul is: 1. considerably more complex under the sheets, and 2. considerably more complex in situations you're going to have to deal with as a user. It would be nice to read an article from someone familiar with Pijul, that would take a look at the "ugly" (from the user's perspective) parts, and either explain how they aren't issues in practice, or at least show how you would handle them and argue why the benefits outweigh the costs. For example, accurately representing repository states with files appears difficult: the page on Pijul's theory[0] explains how Pijul does not limit the repository to containing valid states, and mentions that "...else, we say the file has a conflict, and presenting the state of the file to the user in an intelligible way is not obvious.". There's an independent article about Pijul[1] that gives some examples of how you could end up with two different conflict states in Pijul that render into identical files. I also had a look in the patch list for the master branch[2]. I managed to find a few patches I couldn't understand by looking at them. I realize that Pijul is still some ways from being ready for mass consumption, but the selling point of Pijul is its theory of patches. The documentation for "pijul patch"[3] notes that outputting patches as text "may lose information", and that "the text representation is merely a pretty-printed representation, and is not sufficient to apply the patch". This suggests to me that the difficulty in viewing those patches is at least partially due to viewing Pijul patches being a hard problem. Here's an example, "Fixing a conflict with #387": https://nest.pijul.com/pijul_org/pijul:master/patches/6E7KeeqoxngvDnPvBbQDSeMvWZLN2qUMUvDnF8wADb42iZtLFWHbQSf7YAyx5D37ZuoRY3W2B5opjUJt5ZPHGUpY https://nest.pijul.com/pijul_org/pijul:master/patches/6E7Kee... Some lines at the top appear to be for informative purposes. They reappear later on, but slightly different (e.g. imports reordered, or with changed whitespace), and without any color (green or red) that would indicate that they were added or removed. They're shown in a context (e.g. line 219, 222) where they fit in as additions together with other lines that were added, though. The output of "pijul patch" for this patch[4] looks somewhat similar, and likewise not very easy to digest. I really want to like Pijul, but I'm worried that it's too powerful and requires too much from the user. I would like to be wrong, though, so I would really welcome an article explaining these "darker" sides. 0: https://pijul.org/manual/theory.html https://pijul.org/manual/theory.html 1: https://jneem.github.io/pijul/ https://jneem.github.io/pijul/ 2: https://nest.pijul.com/pijul_org/pijul:master/patches https://nest.pijul.com/pijul_org/pijul:master/patches 3: https://pijul.org/manual/reference/patch.html https://pijul.org/manual/reference/patch.html 4: https://pastebin.com/b8XT5WPE https://pastebin.com/b8XT5WPE
- Myrmornis 7y agoIs there a reason it's named after the Smooth-billed Ani? (Not saying a reason is needed!) https://en.wikipedia.org/wiki/Smooth-billed_ani https://en.wikipedia.org/wiki/Smooth-billed_ani
- pmeunier 7y agoYes: these birds build their nests cooperatively.
- jeffdavis 7y agoI use and like git, but I feel like I'm working against it sometimes. I much prefer a rebase workflow with a linear history, and a chance to reorganize and reword commits so they make more sense. Git allows this workflow, and does quite a good job of it, but I feel nudged towards "just merge it". If a VCS could do anything to improve the rebase workflow, that would be pretty interesting to me.
- jeffdavis 7y agoA more useful landing page: https://pijul.org/manual/why_pijul.html https://pijul.org/manual/why_pijul.html
- svnpenn 7y ago> This website uses cookies to ensure you get the best experience on our website. Thats the quickest way to get me to close the tab.