HNHacker News
TopNewBestAskShowJobs

pmeunier

672 karma · joined July 13, 2014

submissionscomments
pmeunier··on Show HN: Gitern is a Git host for hackers
Sounds cool! What's your theory of patches? Or do you use patches only for storage (like Git in some cases)? What's the story for very large files?

Also, it seems Gut hasn't had any updates for more than a year, which is even before Pijul's last public patch.

pmeunier··on Show HN: Gitern is a Git host for hackers
Hi! main author here. I'm about to release it, should be ready in the next few days. Most of the 6 months were spent testing and debugging it, actually.
pmeunier··on A Graphical Introduction to Lattices
I am one of the authors of Pijul. It is indeed a semilattice, but not exactly "commutative": the only operations that commute are operations that could be done in parallel. For example, adding a file doesn't commute with editing it.

But unlike in Darcs, where conflicts are messy and not super well-defined in all cases (and not to mention, sometimes cause Darcs to run for a time exponential in the size of the repo's history), two conflicting edits always commute in Pijul.

The main points of Pijul were (1) to solve the soundness issues with conflicts and (2) to fix the exponential problems.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> My question was, in that case wouldn’t Pujil need assistance too?

> Your reply: “conflicts are resolved by patches” - indicates there was a conflict that needed to be resolved by a human or not?

Yes, conflicts need to be resolved by humans indeed (sorry for misunderstanding your question).

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> My problems only become relevant when trying to contribute to projects that already use Pijul/Nest (Carnix).

Well, but then you can't blame others for using their preferred tools rather than your preferred tools. Also, Git doesn't work for Carnix, because its main author (me) is completely overwhelmed with too many projects and wouldn't want to add the additional project of managing Git branches.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
You don't have to use the Nest at all, Pijul can work on your own server via SSH, the protocol just runs commands through SSH.
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> You can build the same feature on top of pretty much any reasonable DVCS, certainly on top of git.

Absolutely, the only difference is the time you'll waste managing your branches (creating, rebasing and merging them).

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
I think you've failed to read the other answers I and others have provided.

But hey, everyone should read the answers they want, if someone wants to pick only the ones that are the easiest to dismiss then have fun.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> the rewrite apparently not happening in the open

I'm the author of the rewrite. It will almost certainly be open source when it's done, but it is not open right now, because:

- the license of the current version has not been properly observed by other projects in the past.

- this project keeps getting bashed for "corrupting repositories" and "changing formats constantly", even though it is announced as experimental everywhere (also, some corruption claims have been wrong in the past, and we have released converters every time the formats have changed).

Therefore, allowing people to test the new version as it is being debugged would probably not improve this situation.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
You're basically saying the Nest is still primitive. Yes it is! It's even blinking on its front page https://nest.pijul.com
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
European laws require something like that to be said. The Nest uses cookies to authenticate you, it doesn't even give you one if you don't log in.
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
This is a network error, not a corruption error. I agree the CLI is not yet stable.
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> gotta assume the work to bring them to Pijul would be just as much work

Not really. If they're not heavily relying on the "darcs replace" feature, it's just the same interface. The dependencies between patches are computed differently.

Be careful though, Pijul is still 0.12, the patch format will change.

> I'd love to see this go further and have a "no conflict" merge take place

This seems possible in a future Pijul. Right now we're just starting to get text files right! Let's see in a few years.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
The 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).

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> but you shouldn't believe that that solves the dependency problem.

I don't think anyone believes that. The dependencies in Pijul are the minimal dependencies that make the patch application possible, they are by no means semantic (you can totally add dependencies manually, btw).

However, for the particular use case explained above (stable branches, backporting bugs), the default behaviour of Pijul already gives you something really useful.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> No, the role of the file system is not to track how changesets are organiced into branches.

Oops, we just got a little bit more feature requests for a VCS than "CRUD changesets and files".

But this isn't an answer to my feature request, which was the ability to merge changes.

> Similarly, patches are only relevant as an external interface of the VCS

Why? If they're relevant as the external interface, maybe this means they model the problem better than snapshots, and should therefore be used as the implementation.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
Yes: these birds build their nests cooperatively.
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> The criticism directed by the Pijul guys at git cherry-pick is actually not a problem at all.

Maybe, maybe not, but it comes with actual arguments, whereas that comment doesn't.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
Hi! I'm one of the authors.

> 1. considerably more complex under the sheets, and

Yes it is, which sometimes comforts me when I think of how long it's taken to get a version that works reasonable well.

That said, it's also not the kind of complexity that goes against performance, but rather the kind that makes it hard to process Pijul repositories or patches with independent tools.

> 2. considerably more complex in situations you're going to have to deal with as a user.

I've used it quite a bit, but the biggest repository I've every interacted with is Pijul itself, which is a rather small codebase, so I don't know how the UX scales.

I find it as easy to use as Darcs, with the caveat that patches are not always as intelligible as in Darcs. That said, patches solving conflicts are weird and/or wrong in Darcs, and they are quite simple in Pijul. And I believe conflicts are the situations where you need the most simplicity and clarity.

> It would be nice to read an article from someone familiar with Pijul, [..]

That is a really nice suggestion for a blog post, it's now on my todo list. Thanks!

> For example, accurately representing repository states with files appears difficult

This is unfortunately a difficulty intrinsic to the problem. Git has the same issue, it just doesn't really show it because the conflicts that cause this are shown in a very basic way (there's only so much that diff3 can guess).

> I managed to find a few patches I couldn't understand by looking at them.

There are two issues: one is that the Nest doesn't yet have the best algorithms to render patches (but is likely to improve a lot with the new version of libpijul I'm writing), and the other one is that some patches might have been converted from a previous patch format, which makes them weird.

> I really want to like Pijul, but I'm worried that it's too powerful and requires too much from the user.

The goal is quite the opposite! For starters you can use it just like Git (with branches, and only with better merges). But then when you realise you don't need branches, everything becomes much simpler, and the tool stops getting in your way. For large Git repositories (such as NixOS/nixpkgs on GitHub), I wish it was using Pijul about 100% of the time I contribute or even use my local clone.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
Well, 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.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
It is not at all about not being Git. The absolute best reason is that Pijul actually has the properties that people think Git has:

- in Pijul, patches are associative: pulling B and C together after A does the same as pulling just C after pulling A and B. Git doesn't have that property: sometimes diff3 randomly (and silently) decides to shuffle lines around.

- in Pijul, patches commute. Most Git users try to simulate that by rebasing branches, but (1) that can mean a lot of extra work for no fundamental reason and (2) Git runs the same clunky merge algorithms to decide how to do it.

- Pijul knows what a conflict is, whereas Git pretends to know, but then there's "git rerere".

- in Pijul, you can clone one subdirectory of a monorepo by just pulling the patches related to that directory. Git can do partial clones as well, but only with LFS and/or submodules, which are incredibly clunky and unnatural.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> 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.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
In full fairness, was it Darcs version 0.x? Pijul has never made any claim to be stable yet (but we're getting there).
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
Well, 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), which aim at making the UX as smooth as possible.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> 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.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
First, even though Pijul has branches, patch commutation means that most Git branches are just regular patches in Pijul.

> Wouldn’t Pijul require the same too?

If you're talking about my point (1) above, the answer to your question is no, because in Pijul, conflicts are resolved by patches, so if a branch has a patch solving a conflict, the conflict cannot come back. So Pijul doesn't need "rerere".

If you're talking about my point (2), the answer is also no: non-associative merges happen for bad reasons in Git. By design, Pijul doesn't have them at all.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
There 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.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
would you care to justify a little bit? The latest version is 0.x, are you talking about bugs, or something else?
pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
From 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.

pmeunier··on Pijul: a distributed version control system, written in Rust (2019)
> If you're doing this [..], you're doing it wrong. [..]

This is not 100% true (see my answer to the second part below), but the point of Pijul is that you don't need to "do things right" to avoid the potential problems of your version control system. In the end, a version control system is just a tool, not a way of life or a work methodology.

Sure, there are example projects where the Git way is the best, but they are quite rare (one example is Software Heritage [1]).

> 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.

This is not actually true, and is the whole point of Pijul. In Git, your suggestion works only as long as (1) there is never any conflict, else you need "git rerere", and (2) 3-way merge never runs into a non-associative merge [2].

[1] https://www.softwareheritage.org/ [2] https://tahoe-lafs.org/~zooko/badmerge/simple.html

← PreviousPage 8 of 10Next →