Search Results: "agi"

10 December 2007

Steve Kemp: Find me somebody to love

Debian Admin
It looks like the fine DebianAdmin.com site is at it agian: Word-for-word copyright infringement by the user "admin". See the other cisco articles for more infringements. (OK I'm still bitter their site is pimped all over the place, including wiki.debian.org, and their name is confusingly similar to my sites...)
Apache SQL
After yesterdays frustrations with SQL::YASP I moved to parsing logfiles to an temporary SQLite database. I now have a tool which you may use to load an arbitary number of Apache logfiles to, and query via SQL. It looks something like this:
asql> load /var/log/apache2/acc*
Creating tables
Loading: /var/log/apache2/access.log
Loading: /var/log/apache2/access.log.1
asql>   SELECT referer,COUNT(referer) AS number from logs GROUP BY referer ORDER BY number DESC,referer
- 4807
http://localhost/stats/ 2
http://foo.ocm/stats/ 2
asql>
Very useful :) A Debian package is available if you're interested in testing / using it, as is a mercurial repository. The package now stands at 0.4 and is essentially done. It has tab completion on filenames and does enough for me. It might be nice to allow it to auto-read certain files on startup, or persist the database but I'll not bother unless people ask for it.

Steve Kemp: You're making me live

Is there an existing system which will allow me to query Apache logfiles via an SQL string? (Without importing into a database first). I've found the perl library SQL::YASL - but that has a couple of omissions which mean it isn't ideal for my task: Still it did allow me to write a simple shell which works nicely for simple cases:
SQL>LOAD /home/skx/hg/engaging/logs/access.log;
SQL>select path,size from requests where size > 10000;
path size 
/css/default.css 13813 
/js/prototype.js 71261 
/js/effects.js 37872 
/js/dragdrop.js 30645 
/js/controls.js 28980 
/js/slider.js 10403 
/view/messages 15447 
/view/messages 15447 
/recent/messages 25378 
It does mandate the use of a "WHERE" clause, but that was easily fixed with "WHERE 1=1". If I could just have support for count I could do near realtime interesting things... Then again maybe I should just log directly and not worry about it. I certainly don't want to create my own SQL engine .. it just seems that Perl doesn't have a suitable library already made which is a bit of a shocker!

Steve Kemp: All the time anywhere

Thanks for the comments/mails on my previous post. I've now started the migration properly. All code currently held upon cvsrepository.org will be moved to http://repository.steve.org.uk/ - a nice system-agnostic name. So far I've only setup the pages for two project (my dotfiles and ~/bin) but I'm happy with the process, and the naming scheme appears sane to me now. Using sub-domains I need only install one CGI which is a big win, and using a simple set of templates + mod_rewrite all projects get the same look and feel. I've still got to tweak the stylesheet a little, but otherwise I'm happy with things. I can host both public and private repositories, and that all works magically. Of course the huge win is no longer needing to run a pserver for CVS! All future checkouts will be via HTTP, and the rare few people with commit access will be able to do so over SSH. Once things have been migrated I'll cause the cvsrepository names to redirect to the new locations, and keep that up until the domain expires as a transition period. (I think +1 year :)) The other job for the weekend is releasing a fixed security update for Samba, to fix the regressions.... That is in hand, but the buildds are being slow. If they're not all done I'll release it anyway today/tomorrow. I'm annoyed that I handled the timing so badly, but I hope that people don't hate me for it.

9 December 2007

Kartik Mistry: At /home..

* Flickr pics says whole story. Foss.in == Fun! I learned a lot while managing Debian/Ubuntu stall. Next year we will have more better stall and representation from community. Debian Tshirts were given to 3 nice people (Thanks - Prasad, Amod and Anivar) who maintain stall during my mysterious gaps. Sorry to Cydork - yeah, size does matter! * Thanks to team at foss.in, You people rocks (always)! * Finally, back /home (as usual, flight was delayed). Kavin is crawling much intelligent way and demands things (he want to chew everything..). So, time to alert!

7 December 2007

Jan Wagner: Package updates and others

Since some weeks I’m really busy, private and at work. It’s going into the end of the year and everybody is in hurry. There seems also coming some changes for our family down the road in the future, but more maybe later. Additionally one months ago Santiago Ruano Rinc n did surprisingly turn up as my AM. We started fast, but I got stuck at P&P part 1 with the License comparisons, cause actually I’m so busy at work and with my family, that I can’t concentrate enough late at night, when trying to work on the papers. For example the graphviz license is completely overwhelming me. My hope in the last time was some bigger timeslots at the weekends, but they got smashed by my family and/or work issues. I hope Santiago is not getting annoyed by me and I can find hopefully some free time on holidays or in the first weeks next year. Anyways … Christian Perrier started a review and translation process of ipplans debconf templates by the debian-i18n contributors. The templates was in really bad conditions, most of it was copied over from gallery2 and I did know that they wasn’t so good. Thanks for all your work, when the process is over I’m proud to include your really nice work. Two other packages got updates. php-suhosin got new upstream release after months which fixes the broken perdir/.htaccess support. Unfortunatly I missed the release (cause there is no announcement list and there was no watch file) unless Raphael Geissert did leave a note. I integrated the new VCS and homepage stuff also and formorer did fix some minor issues. So we can hopefully upload now (when it arrives testing) the first package to backport.org and sleep little bit better, when using PHP on stable.
nagios-plugins also got updated. Since Seanius seems really busy (like allways), nobody did really took care of the package. In October it got two CVE which was solved via NMU by the testing-security team, also two new upstream releases where available. So I droped the obsolete patches, integrated new once, did make the new shiny lintian a bit more happy, some minor fixes and queued the package to Seanius. ;)
You can expect both packages on backport.org soon. My other (comaintained) packages will get updated to latest policy and VCS/homepage guidelines in the near future. Actually I’ve to prioritize what to do with the left time slots. :/

6 December 2007

Gunnar Wolf: Triple negations

I'm packaging Ruby's PDF::Writer module for Debian - It is a simple module and (almost) ready for upload. But anyway, it carries some issues I had to bring to debian-legal's attention, mainly, five files licensed under Creative Commons licenses (specially two of them, which are under its NonCommercial variant - clearly non-free), so I'm repackaging the .orig.tar.gz into a +dfsg version. But I know I'm a lazy and sometimes stupid bum. Even more, the package will be group-maintained by the pkg-ruby-extras team, so we must be as careful as possible not to forget to remove the non-free material - To remove two scripts, and to replace three images with free equivalents I just made. But hey, tell me if this does not feel ugly to you. At least to the bits of you who learnt human grammar:
clean::
	# Make sure we strip out non-DFSG demo files from the orig.tar.gz
	[ ! -f demo/qr-library.rb -a ! -f demo/qr-language.rb ]   false 
	[ $$(md5sum images/bluesmoke.jpg   cut -f 1 -d ' ') == 0586eca5af7523ab871609eceb44724a ]   false
	[ $$(md5sum images/chunkybacon.jpg   cut -f 1 -d ' ') == a000b1917142ce332fd3474f0722cd6f ]   false
	[ $$(md5sum images/chunkybacon.png   cut -f 1 -d ' ') == 927feec1cbbf23c4d89a4a5ad88e6d0f ]   false
Triple negations. How nice.

Gunnar Wolf: Digging into Drupal

As of late, I've shifted quite dramatically my sysadmining/development activities. On the development front, although Perl is still my mother tongue and I maintain many systems I wrote with it (and my main involvement in Debian is through the pkg-perl group, of course), I've been largely switching over to Ruby - both under the Rails framework and doing standalone stuff.But somehthing that's new to me (well, relatively - it has been observed I have been playing with the idea in and out for some more time) is entering this maze of twisty little passages, all alike called Drupal. What can I say? I'm quite surprised by it. It is such a reach CMS, and so twistable for almost-anything, that it still defeats me.I've been asked (ordered? pushed?) to propose a complete plan to replace my Institute's current static-and-butt-ugly-HTML site with something dynamic and manageable, so, of course, this last week has been an intensive Drupal crash-course for me.Drupal itself is quite complex, yes, and I thought I had it mostly mastered for the trivial tasks. But then, I started looking for some I-thought-quite-simple extra thingies - And I started discovering its user-contributed modules. I've been having quite a bit of fun with them, and as I hate messing up my clean and nice installation, I've even set up a Drupal5 modules APT repository for Etch, where I'm putting the modules as I process them.As I'm really not into PHP, and I still lack enough of the Drupal framework understanding to really step forward and become responsable for them, I'm not yet even suggesting packaging them for Debian - but a time might come where I upload them as well ;-)BTW, in case somebody is wandering about this Jaws-to-Drupal scripty I mentioned that other time: It basically works for blog entries (as you can see in my test site - barring some trivial latin1-UTF discrepancies). I have not yet migrated because I'm also trying to migrate my Phoo photo galleries to Acidfree albums... And it's quite a more challenging task than just migrating blog+comments. But soon, I hope - I have a bit more time than in the last weeks to be able to play with it. Anyway, here it is as it is.

5 December 2007

David Welton: Hecl Java Integration

Yesterday, I took the Java integration I'd been building into the Hecl Android port, and moved it into its own directory, so now it's built in to the command line/j2se (non JavaME) version of Hecl for people to experiment with. Here's a slightly modified version of my posting on the subject: I created a java/ subdirectory with an org.hecl.java package that does a few things. The core of the system is in JavaCmd and Reflection. The first creates commands out of Java classes. It utilizes, obviously, the reflection stuff in Reflection. Both are, at the moment, sort of hacky and tentative, but work. For instance, I checked in this bit of test suite today:
test java-2  
   java java.util.Hashtable ht
   set hasht [ht -new  ]
   $hasht put foo "bar"
   $hasht get foo
   bar 
The 'java' command takes a class, and string, and creates a new Hecl command 'ht' that is tied to the Hashtable class. ht -new (could have been -new [list]) is how we call the constructor. After this, $hasht points to a Hashtable, and we can utilize its methods. Up to a point, at least - there have to be mappings in Reflection to deal correctly with types. For instance, there isn't a mapping for Enumeration right now, so calling the .keys() method wouldn't do the right thing. There are some more bits and pieces of magic: There are some open issues with the ongoing work:

Biella Coleman: Rethinking Blogs: The importance of fewer posts and preaching to the choir

It is hard to believe that I have been blogging for over five years. And what is clear is that being an assistant professor is not all that conducive for blogging and this is materially evident in my sparse posting pattern over the last few months. It has been particularly bad in the last month thanks to a week long international trip, back-to-back sickness over Thanksgiving week, and finally going to Washington D.C. for the AAAs. But this retreat from blogging as well as teaching on so-called Web 2.0 software, like blogs, has made me rethink the value and limits of the craft of blogging and so I am going to take some time (that I feel like I don t really have, but oh-well..) to write them down as I am preparing a short piece for on the politics of Web 2.0 and I hope I can transfer some of these ideas there. So as I have already mentioned, I am an now infrequent blogger. Prior to the era of RSS, this could have meant the death of my blog because if people went to visit my page and there was no new post and then this happened a few more times, they would just stop visiting. The magic of RSS is that it brings the blog post to you and this alters the landscape of possibilities within the context of what has been nothing short of a seismic explosion of blogs. What I am finding and this will be no surprise to anyone is that it is just too difficult to keep up too many of a certain class of blogger the prolific poster who posts medium to long posts and worse, nearly everyday! To make a point about the effects of this, allow me to tell a story: Two blogs I really like are Joe Reagle’s blog on Open Communities as well as Tenured Radical. Both provide captivating posts but I recently unsubscribed to Radical Tenure and not Joe Reagle s. Why? My decision was purely pragmatic. Because she posts way too much, I just can t keep up. If I stop reading her blog for 2 weeks, and then pay a visit via bloglines, I am faced with a blogolanche and I am trying to avoid, at all costs, overwhelming situations. On the other hand, if I stop reading Joe s blog for 2 weeks, there may be one or two posts so I feel like I can spare the time to continue reading. Ironically, I will now visit Tenured Radical every month, much as I did prior to the RSS era, just to take a quick scan and see if there is anything I must read. There is another class of blogs, such as Sivacracy, that update their site frequently but the posts are tidy and short and so I can usually keep up and they provide important news for my projects. But the type of blog that provides longer ruminations has proliferated (and I really like reading those) but I suspect that as the blogosphere has expanded, less people can commit to those types of blogs. In other words, today, you may hang on to more readers, if you only blog 1 to 2 times a week instead of 3-5 weekly posts that are medium to long in length. Now I may be completely OFF the mark with this by generalizing my own experience so I would be interested in hearing people s experiences or better, if anyone could point me to someone who studies these types of pattern, I would really appreciate it. On a related note, last week I taught a now famous piece by Cass Sunstein on political balkanization on the Internet that is in part secured by blogging. His core argument, which I think stands to some degree, is that the blogosphere is less an arena where people with different inclinations and views meet to debate, and thus change their views, but is an arena where your pre-existing ideas are reinforced because you are simply reading and debating with people who hold your worldview. As I mentioned, I think this is true in so far as you don t see people on the left and right engaging in some debate that substantially transforms their ideas. But the argument is faulty or missing something crucial about the nature of politics, in so far as that the so called left or right or so called liberal and conservative positions are truly not unitary so that if different types of liberals/lefties are engaging with each other to change positions and ideas within that group, well then, the critical function of blogging is in fact well and alive. To state using an example, there are plenty of liberals who, in my opinion, could use a little radicalization and perhaps this is happening in the blogosphere because people come across a spectrum of ideas and positions from within their political pole. Finally and this point really is not mine but I am poaching it from Jeff Juris who made it last weekend at the AAA meeting during his presentation on activist videos. One of his findings was that activists were the only ones watching video s documenting protests when hosted on radical political sites like Indymedia. When they were placed on Youtube, the audience expanded considerably: conservatives were also watching them, but they effect was not to make their more sympathetic toward the left and their political points, but simply to reinforce their position, which is evident in the archived comments expressing their great distaste of the left. This is a perfect example of the Balkanization that Sunstein talks about but with an important reversal: it comes from confronting difference not avoiding it! But Jeff made the excellent point that there is a critical function in preaching to the choir: it ensures that the choir will not stop singing! That is, your political passions are not simply ensured, they must be renewed and given the massive amounts of apathy peppering our population, renewal by confronting what you believe in, is vital. So my advice is keep producing posts, keep reading even if it tends to be stuff you already believe in BUT please, post less. Less, I think, is really becoming the new more….

4 December 2007

Ondřej Čertík: M rida - wrap up

From November 28 till December 2, 2007, I attended a Debian QA and release teams work session in Extremadura, which is an autonomous community of western Spain, that managed to install Debian on 90000 computers in every school (technically a Debian based distribution called gnuLinEx) and Junta de Extremadura also sponsored this meeting.

I took photos of all participants, see my first, second and third posts. When I arrived at the Madrid airport where we first met, I set myself a goal to remember all names and faces, so I used my blog to help me and I think I succeeded in the end. :)

See also our wiki page that we used prior and during the meeting.

So what did we do besides throwing candies?


Lucas Nussbaum will send a summary email soon about the meeting, so I'll just speak for myself:


I worked with Gon ri on svnbuildstat, that is a service for building packages and show statistics about lintian/linda/piuparts checks. It for example contains all packages of the Debian Python Modules Team (that I am a member of) and many others. We discussed and started to work on how to create robust buildbots, that can be installed as a regular Debian package with zero (if possible) configuration, so that many people can just install them without pain, thus providing a huge scalability to the project.

We wrote a preliminary patch to pbuilder for killing the build if it exceeds given memory/disk usage. I had to learn the internals of pbuilder and I lost quite some time squashing some stupid bug I caused while writing the patch.

I spent most of my time with svnbuildstat, mostly learning and discussing things. This will be important for the future, but to also have some real results, I also fixed some packages I comaintain:

Together with Kumar Appaiah we fixed the python-numpy package and I had it uploaded, then I learned how to work with quilt instead of dpatch to handle patches in Debian packages, thanks to Holger's webpage, that contains a nice tutorial. Then I switched from dpatch to quilt in python-scipy and backported a patch from upstream svn to fix a segfault bug and had the package uploaded.

Then I finished the Cython package and had it uploaded. Cython is a marvelous package to speed up Python programs and interface C/C++ programs. I greatly recommend to try. If you don't like it, you can try some of at least 10 other ways to wrap C code in Python. I also used quilt in there to backport a patch from the upstream Mercurial repository to implement parsing @classmethods. Quilt is really a pleasure to work with.

Impressions from the meeting

I've been using Debian since 2001 as my only operating system on all of my computers, so I am not a complete beginner. But it never occured to me I could get involved in Debian more than a user and an occasional bug reporter. What a mistake.

I started packaging new things and fixing packages that I need for my work and that didn't work. This got me involved quite a bit in Debian. But in M rida it was the first time I could dring a beer (well, especially wine) with Debian Developers and I found out they are really cool people. They are all very skilled. Also something, that I love about Debian, is that the people involved in it share two common features, that are very important for them - respect to democracy and personal freedom. When I think about it, those are probably the first two items on my presonal list of values.

Of course, everytime there is a group of 1000+ people, there are good and bad people, more and less skilled, but important is the overall atmosphere - and that is as I described. I think Debian is truly unique. There is Gentoo, that has maybe 40 (?) active developers. There is Ubuntu, that has maybe 100 (?) developers, but it's basically a comercial distribution and there is not so many interesting work for non employees of Canonical. There is opensuse and fedora, where I am not sure about the numbers. The atmosphere in Debian can change in the future, one never knows, but as of the end of 2007, I think it's very cool to get involved.

Maybe it's not for everyone, but it's the right place for me.

Evan Prodromou: 13 Frimaire CCXVI

I'm organizing a micro-coworking session here in Montreal for 6 December (15 Frimaire). "Micro-coworking session" is just a fancy way of saying "hanging out together and working at a caf ". Folks will be meeting in the back of Caff ArtJava from about 9AM to about 5PM. More info on the subStation Coworking event page on Upcoming. The event is for people interested/involved in (or supportive of) Station-C, the incipient Montreal coworking facility scheduled to open in February 2008. But everyone's welcome to come by -- heck, we'd have a hard time keeping you away. tag:

Private and public life in the age of Facebook One of the things I find interesting about life on the Internet is the distinction between public and private life. So much of our lives are on-line today; for many of us, the Web is where we make our living, make our friends, enjoy our social life, and plan our off-line activities. But what about those personal activities that don't jibe with our intended professional image? If we have out-of-the-mainstream political or religious views, or unorthodox social activities, how do we keep them to ourselves? How do you talk about things on-line with friends that maybe you don't want your parents or other family to know about -- or vice versa? How do we preserve our reputation in more than one sphere, in situations where those spheres are very different? I think there are a number of strategies for doing this.
  1. Be discreet. In other words, just don't put personal stuff on the Web. Keep up your professional image at all times, and don't use Web sites or tools to make connections in more private ways. This is probably the safest strategy, and the one that most privacy groups and media recommend. But there are some downsides, too. You miss out on the Web's power to enhance your life as a well-rounded human being -- your personal life languishes for the benefit of your professional one. You give up on some important opportunities to connect with other human beings in a deep and meaningful way. Especially if your interests are shared by only a small percent of the human population, it's unlikely you'll run into other people who share them off-line. I also think there's something unhealthy about stifling your personal side for your professional life's benefit.
  2. Use pseudonyms. Another way of being "discrete" -- here, I mean separated into different parts. I think this is one of the most common ways to deal with the problem. Use your "real name" for activities, groups, and opinions that you feel safe presenting to the world at large, and use made-up names or handles for activities you might not feel like discussing at a job interview. This can be very successful, but also nerve-wracking. What parts of life require a "secret identity", and what parts don't? What if one part of your life leaks into another? It can also be tedious to set up, say, two or three different Flickr accounts, two or three Facebook accounts, umpteen blogs, etc. Or, you keep a LinkedIn account for work and a MySpace one for your partying set, and hope that Google doesn't make a link between the two. But you can get sick of managing them, and other people don't know which name or pseudonym to use and when to "out" you to their other friends.
  3. Integrate. By this I mean: let your personal and professional life grow together. Decide what parts of your personal life you're willing to make public, and bring them into your public persona. Parts of your life that you don't feel you can integrate, consider letting go of. I think this can be risky and difficult, but ultimately I think it's the most healthy psychologically for people who spend a lot of time on the Web. Most often, these people either work for themselves and don't have to answer to others, or they work in industries where offbeat or out-of-the-mainstream lifestyles are tolerated or encouraged (or the need for highly-skilled people makes those "quirks" easier to ignore). Or they just gamble that nobody at their work or in their family is really checking (quite often the case).
  4. Wait for better software. I think the main reason that this is a problem is that social software developers aren't very good sociologists. Or, rather, we focus on the software rather than on the social. It would be nice to see the next generation of Web services support the multiple facets of a person's life. I'm an Open Source fanatic, a Web developer, a wikitista, an entrepreneur, a father, a Burner, a Montrealer, a man, a prankster, a partier and a cook -- among many other things. How can social software, or a federation of services, let me reflect these different aspects of my personality to my friends, coworkers, colleagues, relatives and strangers? Could I define finer-grained relationships with others than just "friend", and choose what parts of my life to feature or downplay with each? It's a fascinating design and implementation question, and my hope is that someone will take on the challenge in the future.
I think this is a situation where our society and our software both need to evolve and change. It would be nice -- very nice -- if edgy politics or weirdo culture didn't hurt your chances of advancing in your chosen field. And if friends, family and colleagues could accept us all for who we are, in all our parts. But it will also be nice if software and software usage patterns on the Web let us find a way to adapt to that, too. People have lots of different parts and lots of different personae that they inhabit at different times and in different contexts -- it would be great to match our social software more to that reality. tags:

One-liners Some other things to note:
  • Montr al has had an insane amount of snow in the last few days. I dug out our car for about 90 minutes this morning, and drove for hours in snow-blind traffic. Not an easy time, but boy the city is lovely like this.
  • I'm doing a talk on extending MediaWiki at the PHP Qu bec meeting this Thursday, Dec 6. Meeting info is here.
  • Pictures from Montreal Santarchy are available on Grimmwire's Santarchy Montreal 2007 set. Great group, fun crowd, loooooong night. Oh boy.
  • Speaking of SantaCon, Santarchy in Second Life sounds totally nutso.
  • My server overload problems seem to be getting better. I moved Vinismo to its own server on Amazon Elastic Compute Cloud. I also moved SonaUiki and the Br leurs site to GoDaddy, where I have a ridiculous number of free Web hosting credits. It worked surprisingly well, and GoDaddy supports PmWiki out-of-the-box. Nice! Update: Apparently GoDaddy adds a whole bunch of ads in on their free Web hosting. I didn't notice; I have Adblock Plus installed. Gar. I'll have to move these sites back pronto.
  • My light and convenient Toshiba Port g R200 has been throwing I/O errors. So I gotta get a new hard drive. Good news: the thing's still under warranty (yay!). Bad news: I gotta drive through this miserable weather to a place in St. L onard to get the HD replaced. Boo!
tags:

3 December 2007

Michael Prokop: git[-svn] in 30 minutes

… or something like that… I planned to write a short note about how to start with using git-svn so I can provide a pointer to some of my colleagues. It turned out that git has too many nice features that you should be aware of. :) Hopefully my notes (now being a reference for myself as well, thx to gebi for all the help and feedback) are useful anyway. If you think something (more or less essential, or at least something most of us should be aware of) is missing: please feel free to mention that in the comment section of my blog entry, thanks. Disclaimer: I’m still happy with mercurial for what I - and we at grml in general - use it: linear, but anyway distributed development. git on the other hand provides some really nice features. Rebasing and branching with git is really great - so non-linear development just works. As usual: use the right tool for the right job. git is a bit complicate to use. Not only but especially in the beginning. On the other hand I’m not such a big friend of subversion. If you wanthave to use subversion (Graz University of Technology for example provides a svn service to their students and employees) but prefer to work with git instead you should be aware of git-svn. git-svn gives you bidirectional operation between subversion and git. First of all make sure you have all you might need when working with git. Make sure to use a current version of git (I’m refering to version >=1.5.3). Just execute the following command line on your Debian system to install all relevant packages:
aptitude install \
git-buildpackage git-core git-cvs git-daemon-run \
git-doc git-email git-gui git-load-dirs git-svn \
gitk gitweb qgit
Now let’s start with some general and basic configuration:
# Remove directories from the SVN tree if there
# are no files left behind, configure it globaly:
git config --global svn.rmdir=true
# Want some more global, personal git configuration?
for line in  
  user.name=Michael Prokop 
  user.email=foo@example.invalid 
  color.diff=auto 
  color.diff.new=cyan 
  color.diff.old=magenta 
  color.diff.frag=yellow 
  color.diff.meta=green 
  color.diff.commit=normal 
do
  git config --global $line
done
Check out man git-config for much more details about configuration options. First tip: set ‘g’ as an alias for git so you don’t have to type that much. I’ll write the long version in the following examples so copy/paste works for everyone. Make sure to use the short options of git itself as well: use ‘git co’ for example instead of ‘git checkout’. You can define your own aliases inside git as well - either manually in ~/.gitconfig or running something like:
git config --global alias.st status
Enough pre-configuration for now. It’s time to checkout the SVN repository:
# Check out the SVN repository and set 'svn/' as
# prefix for the branches:
git svn clone -s --prefix=svn/ \
https://svn.tugraz.at/svn/$project foobar && 
cd foobar
# Adjust svn:ignore settings within git:
git svn show-ignore >> .git/info/exclude
# List all branches:
git branch -a
# List all remote branches:
git branch -r
# Rebase your local changes against the
# latest changes in SVN (kind of 'svn up'):
git svn rebase
# Checkout a specific branch:
git checkout $branch
Ok so far? But what do we have to do if we want to work on the upstream source and are allowed to commit/push directly to the repository? Let’s see how to work on that without using branches:
# Hack:
$EDITOR foobar
# Check status
git st[atus]
# List diff:
git diff [foobar]
# Commit it with a commit message using $EDITOR:
git commit -a
# Now commit your changes (that were committed
# previously using git) to SVN, as well as
# automatically updating your working HEAD:
git svn dcommit
But what should we do if we do not have commit rights? Let’s create our own branch and send a patch via mail to upstream:
# Make a new branch:
git checkout -b mikas_demo_patch
# and hack...
$EDITOR
# Commit all changes:
git ci -a -m 'Best patch but worst commit msg ever'
# ... and prepare patch[es]:
git format-patch -s -p -n master
# Now send mail(s) either use git-send-email:
git send-email --to foo@example.invalid *.patch
# ... or if you prefer mutt instead (short zsh syntax):
for f in *.patch ; mutt -H $f
You got a mail from someone else and would like to incorporate changes from the attached patch in your repository? Just store the mail in a seperate mailbox (use save-message in mutt for example, keybinding ’s’ by default), then execute:
# Apply a [series of] patch[es] from a mailbox
git am /path/to/mailbox
Want to work on a seperate branch and rebase your work with upstream?
# First of all make sure to use recent sources...
# So pull when using plain git:
git pull -u
# .. or when using git-svn use:
git svn rebase
# Then create a new branch:
git checkout -b mika
# Hack:
$EDITOR
# Commit:
git ci -a -m 'Best patch but worst commit msg ever'
# Switch to master branch:
git checkout master
# Pull again when using plain git:
git pull -u
# .. or when using git-svn use:
git svn rebase
# Finally switch back
git checkout mika
# Now rebase it with plain git using:
git rebase origin/master
# ... or when using git-svn:
git svn rebase
# Now check out the last 5 commits:
git log -n5
Another branch-session might look like:
git co -b foo
$EDITOR
git ci -a -m 'foo changes'
git co master
git co -b bar
$EDITOR
git ci -a -m 'bar changes''
git co foo
git rebase bar
git log -n5
git st
git branch
Pfuhhh? Right. :) Now it’s time to check out another cool feature: git stash, which is just great when pulling into a dirty tree or when suffering from interrupted workflow. Demo:
git stash
git pull / fetch+rebase
$EDITOR # fix conflicts
git commit -a -m "Fix in a hurry"
git stash apply
git stash clear # unless you want to keep the stash
git reset rocks as well:
# List all recent actions:
git reflog
# Now undo the last action:
git reset --hard HEAD@ 0 
How to get rid of branches?
# Delete a branch. The branch must be fully merged:
git branch -d remove_me_branch
# Delete a branch irrespective of its index status:
git branch -D remove_me_branch
# Delete a remote branch:
git push reponame :branch
Repack a git repository to minimize its disk usage:
git pack-refs --prune
git reflog expire --all
git repack -a -d -f -l
git prune
git rerere gc
Use git cherry to find commits not merged upstream. Another really cool feature is the interactive rebasing: git rebase –interactive Make sure you are aware of gitk: Screenshot of gitk … and don’t forget to set readable fonts for gitk, like:
[ -r ~/.gitk ]   cat > ~/.gitk << EOF
set mainfont  Arial 10 
set textfont   Courier 10 
set uifont  Arial 10 bold 
EOF
If you prefer a Qt based interface check out qgit. Useful ressources:

1 December 2007

John Goerzen: Visiting Indiana

It was two weeks ago now that we hopped on an Amtrak train in the middle of Kansas at the bright and early hour of 3AM, bound for Indiana.

This has been our third trip with Jacob. He's 14 months old now. We never really enjoyed long car or airplane trips before we had a baby, and haven't really had the desire to try a long car trip since. So we try to take the train, or if time is short, fly.

Jacob enjoys the train. There's lots to see and do. The one thing he doesn't like doing is waiting for food to arrive in any situation, so when we have sit-down meals in the diner, things can get challenging.

We arrived in Indiana the same evening and spent a few days with Terah's dad out at the farm.

Jacob enjoyed grandpa and grandma:

img 3944

img 3961

Jacob got his first ever ice cream there. Despite the concerned "unknown food alert" look, he opened up quick for another bite.

img 3946

The big hit of the visit there were chickens. I've never seen Jacob so thrilled about watching something before. He was so excited he was just moving his arms all around, almost jumping up and down. Here he is watching them:

img 3977

img 3984

Terah wants us to get chickens now. Just because we still have a chicken house left...

On Tuesday, we went north to spend a few days with Terah's mom. On the way up, it became overcast. Terah's mom calls it the winter "permacloud", which is the best description of it I've heard yet. I didn't believe Terah at first when she said that they don't see the sun for 3 months in winter up there, but I believe her now.

Jacob found a rocking chair just his size there, and was able to make it rock. But the big hit of this stop were refrigerator magnets, at Jacob height.

img 4023

He spent a long time with them, and got pretty good at working with them, too.

He also thought he ought to check out the camera in great detail. So of course, the camera checked him out.

img 4032

Terah's mom wanted to spend some time with Jacob, so on Wednesday, Terah and I headed up to Niles, MI to visit some antique shops. We found some postcards from small towns in Kansas dating back to the 1930s, an old metal fan (still works), a wooden "apothecary box" with pull-out drawers, and some furniture we might have purchased if we were closer to home.

For the first time ever, Terah was the first one to say "aren't you done shopping yet?" She was getting tired, so we started heading back. Magically her energy returned as we approached the road leading to the South Bend Chocolate Co. factory and retail store, so we headed in that direction. The next tours didn't start for almost an hour, so we bought some chocolate, looked around a bit, and then left.

Terah's mom had a good time with Jacob while we were gone.

img 4053

Thursday was the O'Connor Thanksgiving. Terah's grandma and some other relatives were there. Here's Jacob with his great grandma:

img 4064

Jacob enjoyed Thanksgiving dinner, and managed to keep finding things to munch on all afternoon.

That evening, we went over to Terah's Yoder grandparents and spent a few days there. Not long after we arrived, Terah's uncle showed up and brought his adopted greyhound with him. Jacob was very excited about this, though the dog wasn't so sure about Jacob.

Eventually the greyhound calmed down and Jacob got to see him up close and pet him. Jacob didn't even mind getting his whole face licked.

img 4107

The next morning at breakfast, Terah's grandma had set out the high chair that she used as a girl for Jacob to eat in. I got some pictures, but Jacob was far more interested in asking to have food ready to eat.

img 4110

Here's Jacob with his Yoder great grandparents:

img_4129.jpg

Later Friday, it was the Yoder Thanksgiving. Jacob got plenty of attention. He also was looking VERY CAREFULLY for Waldo.

img_4151.jpg

Jacob wasn't feeling the best all week, but despite having a busy week and feeling not so good, he did really well. He has been walking with help now, holding on to one adult finger with each hand. He really enjoys that, but is short enough that adults have to bend over a bit to help him. I imagine several people had sore backs after the week was over, including us.

On the train trip home, I took him to the lounge car to go walking. Usually he likes to walk as fast as he can for as long as he can, but there he would only go a little bit at a time. He'd stop at each group of chairs to look at the people, and most of them were really happy to see him, too. After he was done with the lounge car, we walked back through the coaches to our seat. As long as he kept walking, he again would stop at each row of seats to make friends with anybody that wanted to.

We tried to find a nice place to go for lunch during our layover in Chicago. But let me tell you, downtown Chicago -- at least the part near Union Station -- is dead on Sunday and the fact that it was just after Thanksgiving probably didn't help. We wound up finding a place in Union Station to eat. Jacob fussed for awhile, then went to sleep on my lap (he rarely manages to go to sleep while being held). Then on our connecting train back to Kansas.

It was a fun and busy week, but it's nice to be home too. Our train arrived in Kansas at 3:15AM Monday morning. So we went home to catch a few more hours sleep before going to work. As I went outside that morning, we had a gorgeous Kansas sunrise. As the sun was coming up, it was lighting the underside of the clouds with a vibrant deep red and orange color. The whole sky to the east was lit up like that, and felt so warm and inviting on a bitterly cold morning.

Christian Perrier: Heading to FOSS.in

Tomorrow morning, I'll leave for Bangalore to attend FOSS.in, the major FLOSS event in India (for BLR people, my arrival time is 07:30 on Monday). That will be my first time in India, so probaly a lot to discover and learn. Also, of course, many online friends to meet in real life, which is always something one enjoys. I'll have two talks (in a row!) there. One is my first time talking about "Contrbuting to Debian". I hope I will make it interesting for attending people. The main goal is explaining that there are much much more ways to contribute to Debian than one would imagine, and roughly say that becoming a DD is far from being the only way to contribute. The other talk is my standard i18n talk, slightly more focused on localization for languages from India (yes, with the maps, of course). Sam Hocevar is also coming and giving talks. I cross fingers for people there to not be bored about our damn French accent. I'll be really delighted to share this with Sam who is someone I really appreciate (and, actually, even more since he is doing good job as DPL). Of course, I know that the most interesting will be BOFs and informal discussions as well as booths visits and the like. Everybody knows that India is the paradise for people working in i18n: so many languages to cope with! I already know it will be too short, I'm afraid, but see you in BLR !

29 November 2007

Adeodato Sim : Encouraging small contributions in Debian talks

I’m in Merida for the QA meeting, and the Spanish speaking people here (Ana and me), plus Holger, were asked by the organization to give a talk in the University. During Q&A after the talk, one teacher mentioned that, after having received several talks about Debian by various people, she was a bit disappointed that they all resulted so DD-centric, as if all that could matter was becoming an official Developer. I promised her that in future talks I would make very explicit that even the smallest contributions are welcome in Debian, be them bug reports of a tiny patch, and that I would blog encouraging other speakers to do the same, if they’re not doing it already.

Daniel Burrows: Ikiwiki and git

Getting ikiwiki to work correctly with git seems to be a bit of a black art. I thought I should probably document what I've discovered in the hopes of saving somebody else the trouble of figuring it out the hard way. This only covers getting the basic setup working; in particular, I don't know how to set up the CGI (so you can have a publically editable wiki, for instance), so any information specific to doing that is not included.
  • Make sure you have the latest version of git. Despite what its package dependencies say, ikiwiki in sid or backports depends on having a more recent git than was distributed with etch. If you don't do this, you'll get a confusing error message: fatal: Not a git repository: '.git'.
  • Make sure you are using two git repositories:
    1. A master repository which you push directly into using git push. This repository must be a bare repository (one without a working directory).
    2. A subordinate repository in which ikiwiki actually runs. This repository must contain a working directory.
    A mistake I often make is not creating the master repository as a bare repository. Thankfully, this is easy to fix. Just move the master repository out of the way, create a bare clone in its place, then remove the old master:
  mv master master-tmp
  git clone --bare master-tmp master
  rm -fr master-tmp
  • Make sure that the rcs option is enabled in ikiwiki.setup and set to git.
  • Make sure the post-commit wrapper is enabled:
  wrappers => [
    ...
     
      wrapper => "/absolute/path/to/repository/hooks/post-update",
     ,
  ]
If the path is not absolute, I seem to get errors from  ikiwiki .
Another tip I've found useful is to have two ikiwiki.setup files: one for previewing on my own computer and a separate one (containing all the git magic and a few changes to settings) for publishing on the Web. I've adopted the convention of calling the published setup ikiwiki-site.setup to avoid confusion.

Daniel Burrows: Moved to ikiwiki

As of this posting, my blog has moved to an ikiwiki instance on my own server. I made this change for several reasons, with the primary ones being that
  • I can edit my posts offline in any editor I want. Since I often work offline, this is a huge advantage for me.
  • I can use revision control to manage the site.
  • The data that is valuable to me (i.e., my posts) is under my control and in a format that is easy to extract.
  • ikiwiki is also a nice tool for managing a Web site, so I can kill two birds with one stone (once I actually write a Web site, that is).
Obviously some of those could be acheived using blogspot, with a sufficiently complicated workflow, but ikiwiki makes this painless and natural. The major downsides seem to be:
  • ikiwiki doesn't support blog comments. For the time being, please email me with any comments on my blog posts and I'll post them myself. My email address is Daniel_Burrows@alumni.brown.edu.
  • The Emacs Markdown mode has some annoying flaws, such as not understanding Markdown lists.
I haven't set gitweb up yet, so there are no history links available. Once I feel confident that I understand the security implications of using gitweb, I'll see how to enable it.

28 November 2007

Russell Coker: Creepy Social Networking

Cory Doctorow wrote an interesting article about social networking [1]. One of his points is “Imagine how creepy it would be to wander into a co-worker’s cubicle and discover the wall covered with tiny photos of everyone in the office, ranked by “friend” and “foe,” with the top eight friends elevated to a small shrine decorated with Post-It roses and hearts“, another concerns the issue of forced “friends” where colleagues and casual acquaintances demand to be added to a friends list. He speculates that the reason for social networking systems to be a fad is that once too many people you don’t really like force themselves into your friends list then you will feel compelled to join a different service. I believe that the practice of ranking friends is simply a bad idea and wonder whether anyone who has completed high-school has ever used it seriously. If you publicly rank your friends then you will alienate other friends (particularly any who might have ranked you more highly than you ranked them). Everyone who has used social networking systems has discovered the pressure to avoid alienating people that you don’t actually like. It seems obvious that alienating people who you do like is even more of a problem. In my previous post about Better Social Networking [2] I suggested having multiple lists on your social networking server that are published to different people. That would allow segregating the lists as a way of dealing with some demands to be listed. People who are associated with work (colleagues, managers, and in an example Cory used students at a school where a teacher worked) would be on a work list. The work list would point to the work profiles of other people which would match whatever the standards are for the industry in question (which would still allow quite a range, the standards for sys-admins of ISPs differ significantly from those for primary school teachers). I’m sure that someone who worked for an ISP in Amsterdam would understand that a work-based friend request made to someone who teaches primary school in a part of the world that is religiously conservative would understand why that request would be declined (but the same person might add them to a personal friends list). Another way of alleviating such problems is to not require that listing be bi-directional. Current social networking systems involve one party making a friend request to another which is listed as pending in the GUI for both parties. The options are to either leave it in that state (which is an annoyance) or reject it (which may cause offence). With a uni-directional listing one party would add the other and hope for the best. If they aren’t obsessive about such things they may not even notice that the other party didn’t reciprocate. Also it would allow for famous people receiving links from many people to their public profile without any expectation of reciprocation. Of course a distributed social networking system such as I suggest would inherently have uni-directional links as there would be no central repository to force them to be all bi-directional.

Andrew Pollock: [tech] Two years of Python

As last Wednesday was the second anniversary of me joining Google, I thought it an opportune time to reflect on how I've found learning Python. It's no big secret that Google is a Python shop. I'd been meaning to learn it a for a while prior to joining Google, but never found enough reason to other than because it seemed to be the cool new language. If I had a task that required me to write a script, I could do it in Perl in 30 minutes, or spend a day trying to wrap my head around how to do it Python. I think I'd known and been writing Perl in some form or other for about 9 years. I've hardly written any in the last two, which is a bit sad. I even bought Perl Best Practices shortly after moving over here, and haven't gotten around to reading it. The only Perl I write these days is for personal tasks to try and stop myself from going totally rusty. Anyway, I thought I'd write down some of my observations of Python, from a "veteran" Perl programmer's perspective. Not that I consider myself to be a shit-hot Perl coder by any stretch of the imagination... No punctuation I really like the lack of punctuation. It makes the code look a lot cleaner. I go back to Perl and my eyes bleed after trying to dereference a reference to a scalar, or something like that. It's just ugly in Perl. No curly braces/indentation for blocks The indentation thing isn't so bad. If you're using vi, you really need something along the lines of
set shiftwidth=2
set smarttab
set autoindent
set expandtab
in your ~/.vimrc What I do miss is being able to bounce on the % key to find the beginning and ending of a block. I've heard rumours of a way to configure vi to do something similar for Python code, but I haven't gotten around to finding out. There seems to a general opinion that if you're writing a block that is so big you can't find the beginning and end of it, you're probably doing something wrong. String concatenation It's always struck me as bizarre how the most obvious way to concatenate a string in Python is also one of the least efficient. In fact, there's whole studies been done into different methods of string concatenation and their efficiencies. Prototyping is easy Now I may just be ignorant of some Perl shell here, but the number of times I've written a quick Perl script in /tmp to do some proof-of-concept thing is immeasurable. The fact that you can just fire up a Python interpreter and try something quick and dirty to see if it's syntactically sane, or does what you expect is fantastic time saver. ipython makes it an even more pleasant an experience. No CPAN I was initially a bit disappointed that there wasn't something like CPAN for Python modules. In practice, using Debian, I haven't found this to be that big a problem though. List joining is wacky I still find it weird that you don't join a list by a method of the list, you do it by a method of the string you want to use to join the list together with, that is, I think it should be mylist.join(" ") when it's really " ".join(mylist). That's just always struck me as unintuitive. urllib2 doesn't hold a candle to libwww-perl I think even last time I checked with Python 2.5, it's impossible to make a HEAD request. The mind boggles. No setuid support I can't complain too much, I think I heard somewhere it's going away in Perl as well, but it was certainly very convenient to be able to write setuid Perl scripts. I miss that convenience in Python. Not that one has to write setuid scripts all that often. Regular expression handling is painful It's about on a par with Java. You just can't beat Perl's =~ operator. "There's more than one way to do it" versus only one way to do it Perl's always had the adage of there being more than one way to do things. I think that has been its downfall in terms of readability. Heck, I've written some monstrosities that I've looked back on in a month's time and wondered what on earth I was thinking at the time. I think it's far easier to write readable Python than it is to write readable Perl. I think that's about everything. I never did any real object-oriented programming in Perl, and so I tend to take a procedural approach to things in Python as well. I haven't written any massive bodies of code in Python (although I did help maintain one for about 18 months). I like Python. It's become my first choice for writing random scripts now. Now I look at Ruby like I used to look at Python when I knew Perl quite well. Ruby has some nice things (like Perlish regular expression handling), but it brings back all that punctuation noise again. I'm not in a huge rush to learn it, even though there's a lot of hype around Ruby on Rails. I think I'd rather investigate Django or Pylons

27 November 2007

Steve Kemp: Find me somebody to love

Debian Admin
It looks like the fine DebianAdmin.com site is at it agian: Word-for-word copyright infringement by the user "admin". See the other cisco articles for more infringements. (OK I'm still bitter their site is pimped all over the place, including wiki.debian.org, and their name is confusingly similar to my sites...)
Apache SQL
After yesterdays frustrations with SQL::YASP I moved to parsing logfiles to an temporary SQLite database. I now have a tool which you may use to load an arbitary number of Apache logfiles to, and query via SQL. It looks something like this:
asql> load /var/log/apache2/acc*
Creating tables
Loading: /var/log/apache2/access.log
Loading: /var/log/apache2/access.log.1
asql>   SELECT referer,COUNT(referer) AS number from logs GROUP BY referer ORDER BY number DESC,referer
- 4807
http://localhost/stats/ 2
http://foo.ocm/stats/ 2
asql>
Very useful :) A Debian package is available if you're interested in testing / using it, as is a mercurial repository. The package now stands at 0.4 and is essentially done. It has tab completion on filenames and does enough for me. It might be nice to allow it to auto-read certain files on startup, or persist the database but I'll not bother unless people ask for it.

Next.

Previous.