Tuesday, May 12, 2009

PPUG 2009.5.12

looking at gitk: lots of concurrent development

I don't usually blog twice on the same day to the same blog, so I won't say "here I go again" as that'd imply it's a habit.

I'm learning about DARCS, by David Roundy at Berkeley, based on his theory of patches, developed for GNU Arch but never committed. He prototyped in C++ and developed in Haskell (gasps and chuckles), ergo the Haskell crowd loves it ("probably the most used Haskell application out there" dig dig).

Theory of Patches
is dry but not a bad read. PPUGs are pretty seriously into CS, so likely some of us will or have. It's not unix-y in that the tools "talk back" (not the usual POSIX thing) but it's unixy in doing one little thing well. It doesn't "do branches" though, just plant new trees and exchange genetic material.

Don't think in terms of revisions. Partial sequence stuff (sequencing is a kind of ranking, post-cardinal naming). Problems: small community, small set of tools, the Corner Case [tm] -- sometimes your merges take exponential time (could freeze or crash -- a mathematical possibility in any case). Darcs 2.0 seems a lot more stable.

I need to cancel with Juniper, meeting at IBM building day after tomorrow. A long time friend wants to celebrate my birthday. I'm not really wearing the pants in my company, where virtual chassis technology is concerned.

John Melesky is good at presenting stuff, as was Jason, who gave the preamble (overview), from the haze of his cold. darcsweb is written in Python. patch-tag.com offers free hosting for FOSS, or paid for ~FOSS.

I'm sitting next to Robin Dunn of wxPython fame, mentioned my using his name recently, trying to self promote as some noob in a qyoob. He's not tested the EMF feature much, isn't sure how capable it is. EMF is a Microsoft format, comes with an instruction set (you can store a sequence of steps, not just their end results, more like PostScript in that way).

Review Board is a Django web application (in beta). It's a front end to "any" DVCS. You get a dashboard and a way to submit code changes for review. Idealist uses this to manage workflow, giving peers ways to discuss potential commits to the shared trunk.

On to our Mercurial presentation by Brett Carter. It's fast, efficient and simple. Version control is one of the most important tools programmers have, so having a clear mental model, in understandable code, is a commendable goal. Changesets get sha hashes. The "tip" is the most recent changeset. There's some other nomenclature: DAG (directed acyclic graph -- aka your history); named branch; workingdir; parents (the changesets preceeding you); id (globally unique hash for each cset). You can nest directories (repositories).

Mercurial gives each user a complete repository of the project, with all the history. It's easy to create clones over ssh. Push or pull. Pull the new changesets and run "hg update" to check in the changes (into your local version). Serve any repository over http (hg serve -- name a port eh?).

So what about merging, doesn't that get difficult? Yeah, sometimes. A conflict results in a head, a new branch really. You can merge them if you want to.

Manas closing party? Not everyone is on the same page on that one.

Mercurial uses the unix "merge" command by default.

When you're ready to distribute your product, make a branch. You have distributed and local tags for those csets, then you can refer to them by name. Tag something as a release why not?

I asked a summary overview type question prompting several overlapping replies, reaching tacit consensus that these tools don't dictate workflow, but provide more freedoms to design good ones.

Robin uses Mercurial to distribute the days work among a large number of test boxes and virtual platforms, syncs them all up at the end of the day, and checks back in to svn, a non-distributed repository (aka a mother ship). Most DVCS regimes will end up with a Mothership at the end, i.e. some canonical location where the veridical thing lives, e.g. Python's web site is a central repository for Pythons, even if the version control is Hg.

Bitbucket: I'm getting distracted through some of this (there's another group in the next room, kinda loud), but we're getting a very clear example of using this tool to commit improvements to Piston, another cool Django application (we keep hearing about those).

Basically, the social networking that needs to happen atop a DVCS is wrapped in some web application that manages the pushes and pulls.

Michel is talking about bzr (Bazaar) from Canonical, also written in Python. Launchpad is like Bitbucket for bzr. The Zope community has moved to Launchpad recently. Repository, Branch, Working tree, Revision -- this is your working namespace in this kingdom (queendom).

Hey, I'm liking this new battery, been going for like an hour and a half, still 2 hours available. I just mail ordered it last week.

Igal Koshevoy
(Pragmaticraft) is a fan of Mercurial, but is raving about git, a "special snowflake" of Kafkaesque proportions (another ethnicity, surprise surprise). But normal human beings can use it now, it's no longer completely crazy. The Linux kernel moved to git in a kind of panic mode when Bitkeeper stopped serving community needs. Igal is going lickity split, geeks seem amused (chuckle chuckle). Gitk looks pretty wild.

"Mercurial people like to make lots of clones" -- that's a good line.