News for hackers. Stuff that matters.
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by eslaught on Friday September 25, 2020 @03:24PM (#24593255)
If you've ever used Darcs, that might help motivate why Pijul is interesting. Darcs was the first system I used with an interactive mode, sort of like `git add -i`. Obviously that's a UX-side change that can be (and has been) replicated in Git. But at the time it was fairly mind-blowing to work that way.

The other part is the theory of patches. Darcs took the lead here too, but the algorithms and implementation left something to be desired. So Pijul could be really cool if it finally gets this to really work.

On the other hand, if I'm being honest, all of my really hairy merge conflicts are not things that I think could be resolved by this---not without changing the way we think about code from being about text to being about ASTs. So I'm not sure if Pijul would have any practical day to day consequences for me. Certainly, when I moved from Darcs to Git, aside from UX issues, I don't think I noticed any major practical headaches due to the loss of the theory of patches.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by riffraff on Friday September 25, 2020 @05:36PM (#24594357)
You left out the thing that was awesome about darcs, that pijul could do too: real cherry pick,where picking a change also tracked down the other patches needed for that, you could literally pull whole features from one tree to another, not just a commit.

It was marvelous with darcs.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by jcheng on Friday September 25, 2020 @06:52PM (#24594898)
Isn't that describing `git merge <commit>`? (The whole point of cherry-pick being that you specifically DON'T want anything but the one commit)

Edit: Never mind, I see that darcs patches are not equivalent to git commits (and maybe not to anything in git).

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by garmaine on Friday September 25, 2020 @05:59PM (#24594549)
> On the other hand, if I'm being honest, all of my really hairy merge conflicts are not things that I think could be resolved by this---not without changing the way we think about code from being about text to being about ASTs.

With the trend towards automatic code formatting, I don’t think that would be difficult to do.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by breck on Friday September 25, 2020 @11:04PM (#24596094)
I think this is where things could go—VCS aware of semantics—which could happen if syntax==semantics.
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by gnufx on Friday September 25, 2020 @04:36PM (#24593849)
> The other part is the theory of patches. Darcs took the lead here too, but the algorithms and implementation left something to be desired.

For what it's worth, there's a Darcs 3 in development, with a new patch format/theory, thanks to the two keeping it alive. Find darcs 2 generally pleasant enough with a fairly large code base. I didn't understand the reason for not keeping the darcs interface with new guts for pjiul.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by matt-attack on Saturday September 26, 2020 @10:22AM (#24599067)
Yep. I’ve used darcs for at least a decade. The mental model is just so straightforward, I simply never wrestling with it. It does exactly what I want with very little thought. I’ve transitioned to git this last year and my head hurts constantly.

Things that used to be trivial are now unsolvable (by me at least).

The darcs ui was a complete joy. Interactive but super fast. Incredibly easy for new uses to learn.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by juped on Friday September 25, 2020 @09:27PM (#24595679)
Conflicts can't be avoided (certainly not by tree-diffing), and aren't an error state ("conflict" is a bad name because it sounds like it is). The useful innovation of pijul is that conflicted states are not an exceptional state - you can continue to apply patches.
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by creata on Friday September 25, 2020 @11:01PM (#24596079)
I understand that conflicts are inevitable, but wouldn't tree-diffing at least be an improvement over line-diffing? I recall that Pijul's theory of generalized files (arbitrary digraphs of lines IIRC) is already fairly complicated though.
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by juped on Saturday September 26, 2020 @01:54AM (#24596733)
It wouldn't really make much of a difference, if any. For source files, anyway - more complicated diffing helps for files we consider just "binary" now but that are actually structured.

Pijul's pushouts are unrelated - that just allows a line in a file to be ambiguous, rather than definitely being one line.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by creata on Saturday September 26, 2020 @10:29AM (#24599108)
You say Pijul's pushouts are unrelated, but their construction depends on a very line-centric definition of patches. Wouldn't it need to be made more complex to accomodate tree patches?
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by juped on Saturday September 26, 2020 @03:13PM (#24601367)
No? The concept is that a unit of diffing (a line, or a tree node in your hypothetical tree-diffing approach) can be ambiguous until another patch resolves the ambiguity.
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by creata on Saturday September 26, 2020 @03:20PM (#24601415)
In the vaguest sense, sure. But if a file is a list of lines, this "ambiguous file" is a digraph of lines. If a file is instead a tree of strings, what does an "ambiguous file" look like? See this paper which was the source of some of the main ideas of Pijul, and in particular, note that its extension to structured data is listed as "future work", which means it probably hasn't been done yet.

https://arxiv.org/pdf/1311.3903.pdf

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by juped on Monday September 28, 2020 @05:55PM (#24621629)
I don't think you have understood the pushouts paper. Look at figure 4 again.
Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by creata on Friday October 02, 2020 @02:55PM (#24665847)
Which one's figure 4? They're not numbered.

Also, can you point out what my misunderstanding is? That'd help a lot.

Re:Pijul: A intuitive VCS unlike Git that's based on sound t... by hinkley on Friday September 25, 2020 @03:47PM (#24593442)
A tool that handles a frequent but not particularly challenging problem is still a net win. Humans make errors. The more times I have to do something manually, the higher the likelihood I have screwed one of them up. I don't expect to get better at doing a task the 101st time. But I do expect the odds that one of them gets cocked up to climb ever so slightly. Better if the machine can just do it.

If the majority of the code is written by middle-of-the-road team members, then most of the merges will be done by those same people. Something that never helps me with my changes still helps me, due to my shared responsibility for the project. This is an often overlooked aspect of the tool selection process.