Live data from Hacker News

Pijul: a distributed version control system, written in Rust (2019)

nest.pijul.com

21–30 of 125 posts

Re: Pijul: a distributed version control system, written in Rust (2019)

#21
post #8
post #4

From 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…

> 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 a…

Regarding that second link about the bad merge, I think there is a deeper problem at hand. Namely that we still work with the textual representation of a program as the “source of truth”, but each time we save and commit this way, a lot of information is lost.

What I would like is instead of representing source code as text to have a binary representation of the AST of the software that I am writing where, crucially, all edit operations are recorded into history.

Perhaps such a binary format could even be slightly faster to work with in terms of time taken for editor and compiler to parse it?

And not only record edit operations, but differentiate between instancing and copying a node, so that we can express whether code that we duplicate should be edited everywhere automatically in the codebase when we change it, or if they should be allowed to diverge. (Both of which make sense in different contexts and would be great to actually express in the source representation and have the IDE read and understand.)

Furthermore, such a representation could allow for more freedom when positioning elements of the code because we aren’t constrained to just lines and lines of text with characters next to each other and lines above and below each other.

Now, a lot of non-textual editors exist already but I haven’t seen any that I like and besides I don’t want another language, I want to write Rust code in such a way as outlined here.

Re: Pijul: a distributed version control system, written in Rust (2019)

#22
post #3

How does it compare to Darcs? https://hackage.haskell.org/package/darcs Edit: Better link is http://darcs.net/ , darcs has been around for more than 10 years and is still actively maintained.

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

Re: Pijul: a distributed version control system, written in Rust (2019)

#23
FWIW, 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-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.

Re: Pijul: a distributed version control system, written in Rust (2019)

#24
post #8

Earlier quoted context omitted.

> 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 a…

> 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]. Sure, if the two branches have diverged around the location of the patch, there will need to be a merge resolution. Wouldn’t Pijul require the same too?

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.

Re: Pijul: a distributed version control system, written in Rust (2019)

#25
post #6

Earlier quoted context omitted.

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

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

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

Re: Pijul: a distributed version control system, written in Rust (2019)

#26
post #4

From 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…

Some people avoid merges like plague because they hate their commit history looking like a train station. Then you cherry pick and/or rebase.

I find that with `--first-parent`, my history looks reasonably linear, assuming the typical workflow of having each merge commit merging a topic branch into master.

Re: Pijul: a distributed version control system, written in Rust (2019)

#27
post #26

Earlier quoted context omitted.

Some people avoid merges like plague because they hate their commit history looking like a train station. Then you cherry pick and/or rebase.

I find that with `--first-parent`, my history looks reasonably linear, assuming the typical workflow of having each merge commit merging a topic branch into master.

Yeah that works, if people are disciplined (no merge origin/master into master ...). You don't see individual commits from feature branches though.

Re: Pijul: a distributed version control system, written in Rust (2019)

#28

Earlier quoted context omitted.

Some people avoid merges like plague because they hate their commit history looking like a train station. Then you cherry pick and/or rebase.

I never really understood this philosophy. Separating the graph structure from how you view it is the way to go I think. e.g. `git log --no-merges`.

Why would I want my history to be a graph in the first place?

Re: Pijul: a distributed version control system, written in Rust (2019)

#30
post #23

FWIW, 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-…

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

Post reply on HN