News for hackers. Stuff that matters.
Re:Bzr is dying; Emacs needs to move by xradionut on Thursday January 02, 2014 @08:10AM (#6999411)
I hate when people say "git won the war", it sounds like an excuse to close minds and stop progress.

What if "Microsoft won the war"? Or vim? Or IBM? Or Java? Or Taco Bell?

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @09:26AM (#6999675)
Microsoft did win the war; very little progress has been made by its competitors from the time; what's had success has been new OSes - OSX, iOS and Android (which while built of GNU/Linux pieces, is radically different from traditional GNU/Linux - enough to qualify as a different OS IMO, since the API is different).

Vim did win the war; there's still nothing better.

IBM did win the war, and then shot themselves in the foot with pricing on their new generation (which generation was a pretty radical shift). There's not much chance of git doing that.

Java did win the war; its competitors from the time are largely dying (Objective-C has had a kind of zombie revival due to iOS, but I don't expect it to last). You could argue that Ruby has overtaken it, but again the changes over the last ten years of ruby - and the influence of rails - have been enormous.

I don't think we should stop trying to make a better VCS. But I do think we should accept that Git has won against bzr and hg in their current form; neither of those will displace git without radical changes that they are probably unsuited to make. Most likely the successor to git will be a new program entirely.

Re:Bzr is dying; Emacs needs to move by belluchan on Thursday January 02, 2014 @12:05PM (#7000611)
> Vim did win the war; there's still nothing better

I'll just put this here for you:

https://code.google.com/p/vim/source/browse/src/eval.c

Yes that's nearly 25,000 lines of mixed spaces and tab filled pre-C89 C with 492 occurrences of #idef, many appearing in the middle of a function definition. I recently ran vim with debug symbols compiled and it was nice enough to dump a nice 4GB regular expression log file in my project directory. The way to turn that off is to find some ifdefs and comment them out. If vim won then well, I'm not sure what winning means. I've switched to emacs with evil, which in my opinion is better than vim in a lot of ways.

> (Objective-C has had a kind of zombie revival due to iOS, but I don't expect it to last).

Yeah ok, "zombie-revival" sure, your credibility gets a score of 0 here. This isn't an argument, it's a prediction, and a stupid one. Nobody will come back to check your comment in 5 or 10 years and call you out on it. This is just the certain kind of asshat thing you can say and not worry about it coming true or not because you're some anonymous commenter making the internet richer with your irresponsible use of a keyboard.

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @02:53PM (#7001802)
> Yes that's nearly 25,000 lines of mixed spaces and tab filled pre-C89 C with 492 occurrences of #idef, many appearing in the middle of a function definition. I recently ran vim with debug symbols compiled and it was nice enough to dump a nice 4GB regular expression log file in my project directory. The way to turn that off is to find some ifdefs and comment them out. If vim won then well, I'm not sure what winning means.

Winning means the user experience, not the code. And sure, I was lazy, it would be more accurate to say vim and emacs won between them (and are still fighting it out).

> Yeah ok, "zombie-revival" sure, your credibility gets a score of 0 here.

Do you disagree that a) Objective-C was more or less dead prior to the release of iOS b) almost all people currently using Objective-C are doing so solely because it's the language you can write iOS apps in c) absent huge, radical changes, Objective-C will never threaten Java's popularity the way that post-Java languages (C#, GHC Haskell (very different from the language that was standardized in 1990), Go, Scala) are?

Re:Bzr is dying; Emacs needs to move by belluchan on Thursday January 02, 2014 @03:55PM (#7002208)
No Objective-C was not dead before iOS. A thriving Apple was supporting Objective-C in every way possible, and moving from Carbon to Cocoa.

Objective-C is used to build applications for Apple software. It's not a threat to Java, but that doesn't mean Objective-C is dead. Objective-C will be around for a long time to come. It's a modern language that powers all of Apple's most recent technology. They have no reasons to change, and there are no signs that Apple is on the verge of disappearing into the aether.

Vim is shitty software. I like the UI, but the thing is single threaded and everything runs on the UI thread. There's no hope for async, or an event loop, or even a settimeout like feature. The code is full of globals and trying to add new features to the thing is going to result in inexplicable, unfathomable seg faults. Vim uses shitty regular expressions in the UI thread to do syntax highlighting which is why that's slow for big files and why the syntax highlighting breaks.

So the code matters. There will never be powerful IDE like features as long it's this single threaded thing that only ever does anything as a response to user input. Given the state of the code, changing this does not seem ever possible.

Re:Bzr is dying; Emacs needs to move by JabavuAdams on Thursday January 02, 2014 @10:25PM (#7003969)
> So the code matters. There will never be powerful IDE like features as long it's this single threaded thing that only ever does anything as a response to user input.

Run VIM in a sub-process, and communicate with it through a fake terminal. Basically, quarantine the madness.

Re:Bzr is dying; Emacs needs to move by aaronem on Thursday January 02, 2014 @12:35PM (#7000811)
Say what you like about Emacs; its source, both in C and in Emacs Lisp, is generally quite readable, and the former I've found to be especially well commented.
Re:Bzr is dying; Emacs needs to move by xmonkee on Thursday January 02, 2014 @12:26PM (#7000760)
Making predictions isn't allowed on the internet anymore?
Re:Bzr is dying; Emacs needs to move by aaronem on Thursday January 02, 2014 @12:34PM (#7000805)
Of course it's allowed. So is judging someone's credibility based on the predictions he chooses to make, whether by the accuracy of said predictions over time, or the plausibility of said predictions in advance of proof's arrival.
Re:Bzr is dying; Emacs needs to move by EdwardDiego on Thursday January 02, 2014 @08:01PM (#7003592)
> Java did win the war... ...You could argue that Ruby has overtaken it

For what? A specific niche of web applications?

Re:Bzr is dying; Emacs needs to move by jamesaguilar on Thursday January 02, 2014 @04:41PM (#7002511)
> Vim did win the war; there's still nothing better

Least substantiated claim of 2014 so far.

Re:Bzr is dying; Emacs needs to move by BostX on Thursday January 02, 2014 @08:45PM (#7003716)
Haha, but the race is long :)
Re:Bzr is dying; Emacs needs to move by pedrocr on Thursday January 02, 2014 @12:43PM (#7000855)
> Android (which while built of GNU/Linux pieces, is radically different from traditional GNU/Linux - enough to qualify as a different OS IMO, since the API is different).

The "GNU/Linux" vs "Linux" discussion is a long one but I'm pretty sure there's (almost?) no GNU in Android.

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @02:40PM (#7001725)
I don't normally say "GNU/Linux", but I felt this was a case where the distinction is particularly important, because Android does run the Linux kernel, but is (IMO) a different OS from GNU/Linux.
Re:Bzr is dying; Emacs needs to move by pedrocr on Thursday January 02, 2014 @05:09PM (#7002677)
Right. The reason I made my comment was because you said "which while built of GNU/Linux pieces" referring to Android, which doesn't make sense.
Re:Bzr is dying; Emacs needs to move by rpgmaker on Thursday January 02, 2014 @01:05PM (#7001018)
There's GNU in android.
Re:Bzr is dying; Emacs needs to move by justincormack on Thursday January 02, 2014 @01:09PM (#7001044)
I don't think there is. What are you thinking of? All of userland is not GPL licensed, I don;t even think any is LGPL, so I don;t think there is any GNU there.
Re:Bzr is dying; Emacs needs to move by belorn on Thursday January 02, 2014 @01:35PM (#7001229)
In fsf writing about it:

  Android is very different from the GNU/Linux operating system
  because it contains very little of GNU. Indeed, just about
  the only component in common between Android and 
  GNU/Linux is Linux, the kernel. 
http://www.gnu.org/philosophy/android-and-users-freedom.en.h...
Re:Bzr is dying; Emacs needs to move by derleth on Thursday January 02, 2014 @04:06PM (#7002285)
> Vim did win the war; there's still nothing better.

GNU Emacs is much better. It's easier to use and easier to extend.

Re:Bzr is dying; Emacs needs to move by Sssnake on Thursday January 02, 2014 @05:27PM (#7002794)
>Vim did win the war; there's still nothing better.

Haha, good one. Many of vim's predecessors are better even, nvi is far nicer to use than vim is for example.

Re:Bzr is dying; Emacs needs to move by falcolas on Thursday January 02, 2014 @08:49AM (#6999539)
As an avid git user, I believe that git's victory against current tools does nothing to stop someone from creating a better DVCS in the future. They'll just have to identify why git won and address those points, if they want to dethrone git.
Re:Bzr is dying; Emacs needs to move by wirrbel on Thursday January 02, 2014 @09:42AM (#6999736)
The success of git is - apart from the speed - related with its property of being the "stupid content tracker".

Git's architecture is a simple bottom-up engineering approach. The user interface (porcellain) builts upon a conceptually simple core (plumbing). Other VCS have defined nice UI which where then implemented by a core that depends on the UI. This top-down approach means that the core components can suddenly become quite complicated and in the end it is hard for the user to get a deeper understanding of the system.

The funny aspect of this is, that a lot of people complain about Gits bad user interface. It turns out however that Git is really easy to grasp.

Re:Bzr is dying; Emacs needs to move by dasil003 on Thursday January 02, 2014 @10:49AM (#7000115)
Exactly. The git data model is intuitive and easy to grasp after a short amount of time. The porcelain is poorly designed, but part of that is due to the flexibility of primitives underneath, and the desire to support arbitrary workflows.

Contrast with svn which attempts a very clean porcelain interface with a completely muddled data model underneath. The conflation of repositories, directories and branches in svn makes it impossible for it ever achieve 20% of git's functionality simply because things are so poorly defined.

After using git for 6 months I understood it better than I did about svn in the previous 5 years. I would prefer a better porcelain, but given that software development is my full time job and that I can use git for all software development regardless of the language, I'm happy to commit a bit of muscle memory to git's idiosyncrasies.

Re:Bzr is dying; Emacs needs to move by chx on Thursday January 02, 2014 @12:43PM (#7000856)
> the desire to support arbitrary workflows.

Now I am laughing and laughing bitterly. git supports one workflow -- the massively decentralized one. To this day you can't have a simple workflow with git, the one that cvs/svn supported and practically all small project would benefit from, the one that bzr calls a bound branch.

git , I believe , is the textbook case of what the opposite of a user friendly UI is. commands have switches which change the command so fundamentally it should be another command. Which noone wants 'cos there are like 140 commands already. switches which across commands do the same thing but are named differently. The same command doing wildly disparate things without any indication of what's happening -- try git checkout file, and guess what the state of file will be. It might from the staging area or it might come HEAD if it wasn't staged. Nuts.

Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @01:33PM (#7001213)
> "To this day you can't have a simple workflow with git, the one that cvs/svn supported and practically all small project would benefit from"

What? Of course you can. I've worked on teams that did it. You are talking total rubbish.

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @03:16PM (#7001962)
I'm a happy git user, but tell me how this is supposed to work: there's me and one other guy working on a project. There are three logical branches: trunk, his branch, and my branch. In SVN there would be five source trees: those three on the server, his working copy and my working copy. But in git we end up with fifteen: the three on the server, my branch on my machine, his branch on my machine, master on my machine, the remote-tracking copies of those three on my machine, and the same again on his machine. All of which could be different.

How do I reduce that complexity? I always pull and never fetch, which helps slightly, but only slightly; pull seems to fetch other branches, so it's still possible to have my copy of a branch end up behind my remote-tracking copy of that branch. There's no command analogous to pull for "add and commit and push", so that's always a second step to possibly forget (I don't want to rely on an alias as I work on a number of different machines). Most problematic at the moment is that there's no way to tell the difference between an up-to-date branch and a non-remote-tracking branch, so I sometimes delete branches that I haven't fully pushed, because I forgot to make them remote-tracking, so they didn't show up as behind when I "git status"ed.

Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @03:39PM (#7002103)
Set up a repo on a server somewhere and declare it to be the "central repo". You and the other developer pull/push from that repo only. In other words, ignore some of git's capabilities and treating git like SVN. Just because you can pull from your teammates, does not mean that you have to.

I've been on a team that transitioned from SVN to Perforce, the again to Git, keeping the same workflow all the way through.

It isn't the way that I prefer using git, but it works perfectly well.

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @04:13PM (#7002327)
> Set up a repo on a server somewhere and declare it to be the "central repo"

That's the situation I described. We still have the problems I mentioned: sometimes we commit without pushing (particularly because we sometimes didn't set a branch to be remote-tracking and didn't realize this), and sometimes our branches are behind our copy-of-the-remote-branch because we pulled different branches (which leads to bogus merges in the history).

Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @06:13PM (#7003077)
Committing without pushing is not a problem (unless you intended to push but forgot to?) It is not a concept that necessarily exists in traditional centralized version control systems, but the fundamental problem still exists. In SVN "forgetting to push" is just called "forgetting to commit".

If your team member forgot to push and you put out new changes, that is a problem for him to resolve. If you forgot to push, and your team member put out new changes, that is a problem for you to resolve. Workflow wise, this all works the same as it does with any other centralized workflow.

If you forget to check for updates... well that is something that happens in other centralized schemes as well. You figure it out when you go to push and it fails, you correct it, then you are good to go.

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @06:43PM (#7003227)
> Committing without pushing is not a problem (unless you intended to push but forgot to?) It is not a concept that necessarily exists in traditional centralized version control systems, but the fundamental problem still exists. In SVN "forgetting to push" is just called "forgetting to commit".

Sure, but you hit the problem twice as often in git, because you have to do twice as many things.

> If you forget to check for updates... well that is something that happens in other centralized schemes as well. You figure it out when you go to push and it fails, you correct it, then you are good to go.

In SVN that doesn't show up as a merge in the history.

Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @08:56PM (#7003748)
> "Sure, but you hit the problem twice as often in git, because you have to do twice as many things."

Well no, I don't...

If this really is a frequent problem for you, then you might want to consider adding a note to the end of git-commit's output to remind you to push, or even just aliasing git-commit to push by default. I would recommend that you instead learn how to use git, but failing that...

> "In SVN that doesn't show up as a merge in the history."

If you don't want to resolve those situations with a merge, then don't resolve those situations with a merge... Rebasing exists for a reason.

Re:Bzr is dying; Emacs needs to move by NickNameNick on Thursday January 02, 2014 @08:02PM (#7003596)
In SVN, that shows up as a conflict which has to be merged by hand. 'git rebase' and/or 'git mergetool' are nicer.
Re:Bzr is dying; Emacs needs to move by __david__ on Friday January 03, 2014 @08:27AM (#7005284)
> In SVN that doesn't show up as a merge in the history.

You might like "git pull --rebase"

Re:Bzr is dying; Emacs needs to move by mattengi on Thursday January 02, 2014 @06:47PM (#7003245)
Don't pull origin/master directly into local feature/test branch. Pull into local master then rebase local branch onto it.
Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @07:42PM (#7003519)
This goes against all the advice I've seen elsewhere; we push our feature branches all the time, and sometimes pull from each other's if we're working in overlapping areas, so we need to not rebase them.
Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @08:58PM (#7003754)
If that's what you want to do, that is fine, but you are no longer using a centralized process if you do it that way.

Git allows you to follow a centralized process perfectly fine. However if you choose to not follow a centralized process, it will not force you to.

Re:Bzr is dying; Emacs needs to move by eropple on Thursday January 02, 2014 @04:59PM (#7002616)
Is there a reason you aren't using disposable feature branches?

I don't track my other developers' feature branches locally unless I need to view them.

Re:Bzr is dying; Emacs needs to move by lmm on Thursday January 02, 2014 @06:44PM (#7003233)
You're right, thinking about it - most of the time I wouldn't have a copy of my coworker's branch (though we do sometimes pull changes from each other's feature branches - indeed that's supposed to be the big advantage of git, no?)
Re:Bzr is dying; Emacs needs to move by StavrosK on Thursday January 02, 2014 @12:58PM (#7000967)
> It turns out however that Git is really easy to grasp.

Please write something to explain it. I must be pretty dumb, because I don't get it, even after reading about ten explanatory texts.

Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @01:23PM (#7001148)
Since you have already read ten things about it and don't understand it, it would help if you told us what you do not understand so that we do not waste our time rehashing things that you have already not understood.
Re:Bzr is dying; Emacs needs to move by StavrosK on Thursday January 02, 2014 @01:48PM (#7001316)
That's a very good question. I hadn't really tried to pinpoint what exactly I don't understand about it until now, but here's what some thinking uncovered:

Branching/merging/committing is pretty straightforward. The problem is that some commands seem to be very convoluted. For example, why does reset do four different things depending on whether it's soft or hard or plain? I keep having to Google to find how I can revert my latest commit.

Another thing I have trouble with is obscure failures. Obviously this isn't something I can just learn, but there are times when git fails for a reason I don't understand...

Re:Bzr is dying; Emacs needs to move by Crito on Thursday January 02, 2014 @02:49PM (#7001783)
Ah yeah. The "why" with a lot of the porcelain stuff probably tends to be an unsatisfying "Because somebody didn't think it through very much a few years ago." git-reset would probably be better if it defaulted to --soft, and possibly left the other options to other commands.
Re:Bzr is dying; Emacs needs to move by chx on Friday January 03, 2014 @03:05AM (#7004598)
Here http://www.sbf5.com/~cduan/technical/git/ this is the only way to understand git.
Re:Bzr is dying; Emacs needs to move by StavrosK on Friday January 03, 2014 @06:51AM (#7004980)
That's a great explanation, thank you!
Re:Bzr is dying; Emacs needs to move by reinhardt on Thursday January 02, 2014 @02:09PM (#7001486)
Same here, whenever I attempt to give it another chance, sooner or later I break down and revert to hg-git. I recently discovered EasyGit [1] and it seems promising from the docs. There's also gitless [2] that was covered in HN a few days ago.

[1] https://people.gnome.org/~newren/eg/

[2] http://people.csail.mit.edu/sperezde/gitless/

Re:Bzr is dying; Emacs needs to move by gonzo on Thursday January 02, 2014 @10:55PM (#7004057)
And we all know what runs through porcelain before it runs through plumbing.
Re:Bzr is dying; Emacs needs to move by r0muald on Friday January 03, 2014 @07:14AM (#7005053)
1. Linux

2. GitHub

That's it really.