Search Results: "zed"

2 March 2008

Christoph Berg: New toy

Soon after Bernd Zeimetz joined our company, he infected me with the geocaching virus. In the meantime, I bought a GPS receiver, and am now endeavoring around the town and the nearby woods, searching for caches. There's not that much free GPS and/or geocaching software around. gpsd works quite well, but I don't take my computer to the woods ;) Viking is very nice for visualizing waypoints and sorting them in categories, but is still somewhere between alpha and beta state. gpsbabel reads and writes a zillion different file format and talks to a vast array of receivers, but often needs several attempts to upload data to mine. Things are moving fast though and the GPS community looks active. Last week I started looking into OpenStreetMap and already added a few roads in my neighborhood. Compared to commercial maps, there's still much to do, especially for smaller tracks and features like foot bridges or woods outside bigger cities. I'll keep collecting GPS data :) For the free software side, neither OSM's online editor worked here (flash), nor the recommended tool for local use (java), so I tried merkaartor (qt4) which works nicely. It also has some bugs, but feels very usable (though sometimes slow). Starting from upstream's debian/ dir, building packages was straightforward, and after some more editing, packages are now in unstable. (The svn repository is in collab-maint, contributors welcome.)

1 March 2008

Anthony Towns: Been a while...

So, sometime over the past few weeks I clocked up ten years as a Debian developer:
From: Anthony Towns <aj@humbug.org.au>
Subject: Wannabe maintainer.
Date: Sun, 8 Feb 1998 18:35:28 +1000 (EST)
To: new-maintainer@debian.org
Hello world,
I'd like to become a debian maintainer.
I'd like an account on master, and for it to be subscribed to the
debian-private list.
My preferred login on master would have been aj, but as that's taken
ajt or atowns would be great.
I've run a debian system at home for half a year, and a system at work
for about two months. I've run Linux for two and a half years at home,
two years at work. I've been active in my local linux users' group for
just over a year. I've written a few programs, and am part way through
packaging the distributed.net personal proxy for Debian (pending
approval for non-free distribution from distributed.net).
I've read the Debian Social Contract.
My PGP public key is attached, and also available as
<http://azure.humbug.org.au/~aj/aj_key.asc>.
If there's anything more you need to know, please email me.
Thanks in advance.
Cheers,
aj
-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.
On Netscape GPLing their browser:  How can you trust a browser that
ANYONE can hack? For the secure choice, choose Microsoft.''
        -- <oryx@pobox.com> in a comment on slashdot.org
Apparently that also means I’ve clocked up ten and a half years as a Debian user; I think my previous two years of Linux (mid-95 to mid-97) were split between Slackware and Red Hat, though I couldn’t say for sure at this point. There’s already been a few other grand ten-year reviews, such as Joey Hess’s twenty-part serial, or LWN’s week-by-week review, or ONLamp’s interview with Bruce Perens, Eric Raymond and Michael Tiemann on ten years of “open source”. I don’t think I’m going to try matching that sort of depth though, so here are some of my highlights (after the break).
Hrm, this is going on longer than I’d hoped. Oh well, to be continued!

David Moreno Garza: As it was expected, I moved from MovableType crazyness into Tumblr. Ha, so this is now a tumblelog...

As it was expected, I moved from MovableType crazyness into Tumblr. Ha, so this is now a tumblelog (the world of Intenet sometimes amazes me :P). And as it was expected I brough Blog::Normalize::Tumblr into life. Blog::Normalize is becoming a nice little toy I like to play with. My imported data came from MovableType which was came from Wordpress. Cleanly enough, I d be able to export Tumblr posts (or categories/tags or anything else in the future) into Wordpress again and that d be a nice circle. B::N::Tumblr was made, differently from the other blogging systems modules I created before, by scrapping, that s the transparency that the model of B::N would give users and developers. After I made the whole scrapping work, and by tracing my HTTP traffic, I realized that Tumblr has an API which allows to read and write posts, lol. I d be starting using it soonish and creating WWW::Tumblr, maybe even today. TextMotion support is also on the way. B::N 0.0rc2 should be mirrored by CPAN soon.

28 February 2008

Lucas Nussbaum: Google Summer of Code s real goals?

There’s an interesting discussion about Google Summer of Code going on debian-devel@. The question can be summarized as “Should we allow current Debian contributors to be students in GSOC?“? The GSOC FAQ says:
Google Summer of Code has several goals:
  • Get more open source code created and released for the benefit of all;
  • Inspire young developers to begin participating in open source development;
  • Help open source projects identify and bring in new developers and committers;
  • Provide students in Computer Science and related fields the opportunity to do work related to their academic pursuits during the summer (think “flip bits, not burgers”);
  • Give students more exposure to real-world software development scenarios (e.g., distributed development, software licensing questions, mailing-list etiquette).
The problem is that those goals are clearly conflicting: Another problem is that in the past, some students that were also debian contributors had problems organizing themselves: they used some of their GSOC time to work on their usual Debian tasks, leading to results that were a bit disappointing. But it’s possible that this is mainly a management problem (however, mentoring people takes a lot of time, and only students are paid, not their mentors). How do you deal with that in your project?

25 February 2008

Martin Zobel-Helas: Assimilated

Pia im Debian Strampler Thanks to the colleagues at credativ for this nice romper suit. No Tags

24 February 2008

Russell Coker: EeePC for a Teenager

I was asked for advice from a non-technical person about buying a laptop for their 15yo daughter. They were looking to spend $200 or $300. I suggested that stretching their budget to $500 for a new EeePC would be a better option than the risks associated with a second-hand laptop (laptops are all different in their hardware). I also suggested that waiting a few months to see what happens with the new EeePCs might be a good idea. There are rumours about the development of new EeePC models with bigger screens, this would be a benefit for those who can afford it, and for those who can’t the current model may drop in price. They took that suggestion very well and I suspect that they weren’t planning to purchase in the near future anyway. I asked for advice on the LUV mailing list [1] for further suggestions that I could offer. One suggestion was that larger laptops of a more traditional design have been driven down in price recently and might be worth considering. I will have to mention it, but suggesting that someone who wants to spend $200 should spend $500 seemed enough of a stretch, suggesting that they spend $700 or more might not be taken well. Of course there is the weight issue that Matt raised in a blog post [2]. The last thing I want to do is to convince people not to buy computers for their children! A complaint was raised about the size of the keyboard in the EeePC (personally I wouldn’t want to use anything smaller than the T series Thinkpad I’m using now). In a quick google search the best information I could find about average finger sizes was the Danforth Diamond blog [3] which says that in the US women average a ring size of 6 while men average 10. According to the ring sizing page on the same site [4] that means ring finger diameter of 16.5 and 19.8mm respectively. So it seems likely that given the same level of typing skill an average woman could happily use a keyboard that’s 83% the size of the keyboard that an average man uses. Of course there’s a lot of variation between individuals, for example my fingers are thinner than average and I prefer a full-sized keyboard. One thing I recommend when considering a keyboard (or a laptop) is to type your name a few times quickly. Typing something about a quick brown fox will take some thought, but typing your own name requires no thought so you can concentrate on the feel of the keyboard. Using this method it is very easy to go to a store and determine whether a laptop is likely to suit you. The screen resolution and size is a significant issue, one EeePC owner described it as “too small to do anything useful“. Rumour has it that the next version will have a screen that’s a significant increase in size and resolution. A final interesting comment was about the social aspect of owning a laptop. The suggestion was made that a teenager who owned the smallest (and possibly cheapest) laptop in class might have other kids tease them about it. I will be interested to see comments on this issue, it had never occurred to me that the laptop use in schools would be high enough for the ownership of any type of laptop to be a cause for harassment. Also I’m not sure which would be considered as being of lower status, an old second-hand laptop or a new low-end laptop. I’m pretty sure that owning either would be considered to have higher status than having no laptop. A quick scan of the GraysOnline.com.au auction site suggests that a second-hand Pentium-M laptop (a few years old) could be purchased for about $550 and a Core 2 Duo based laptop might go for about $700. So it seems unlikely that for less than $500 you could buy something suitable for a novice user (something that will just work with recent software). I’m not planning on offering the full IT support package that I offer to my relatives so I can only recommend things that can be self-supported. Of course as the people doing the buying seem to have no definite plans for the use of the computer then anything they buy will fail in some way to meet the requirements that they discover. :-# Update: fixed a bad link.

Jaldhar Vyas: The 2008 Things Jaldhar Discovered Last Year That Everyone Else Knew About Already Awards

And the Golden Sombrero goes to... Another awards show took place today but nobody is paying any attention to that. All of Hollywoods elite can be found at the King Plaza Buffet in Jersey City for the 80th annual Things Jaldhar Discovered Last Year That Every Else Knew About Already Awards. (Known in the industry as "the Golden Sombreros") Here is a list of the winners. Game: Hungry Hungry Hippos This game is awesome! But don't play with three year olds. They cheat. Book: Discworld series by Terry Prachett When The Color Of Magic came out in 1983, I dismissed it as merely "The Hichhikers Guide to Mordor" but last year I read it again and this time it grew on me. Since then I've been steadily reading the whole series since June at an average of one a week. Music: Rammstein Smell the umlauts! I have no idea what they are actually going on about but this is what Metal is supposed to sound like. Mental Condition: Oedipus Complex All of sudden last October or so, my son started screaming and crying whenever I got anywhere near my wife and he would cling to her like the proverbial limpet. Then three months later, just as suddenly, he stopped. Very strange, not to mention creepy. Linux command: grep --color=auto Everyone knows GNU ls can be colorized but did you know the same is true of GNU grep? I didn't. Why wasn't I informed of this earlier? L. Ron Hubbard Lifetime Achievement Award: Coke Zero I used to drink way more Coke than was good for me so I decided to give it up. Diet sodas don't taste very good so I was resigned to not drinking soda at all. Luckily for me Coke Zero has no calories or sodium but does have caffeine and a taste like actual Coca-Cola. Perfect!

Mike Hommey: Testing the crazy idea

So, MadCoder had doubts about the crazy idea, so I took a little time to do a test with a package I maintain, namely, xulrunner. First, take all the deb files in the history of the package (at least, everything that is available on snapshot.debian.net today).
wget -O - -q http://snapshot.debian.net/archive/pool/x/xulrunner/binary-amd64/Packages.gz gzip -cd > list
awk '/^Filename:/ print $2 ' list xargs -I wget http://snapshot.debian.net/archive/
Next, commit all these in a different repo per package name :
perl -e 'use Dpkg::Version qw(vercmp); sub v my $f = $_[0]; $f =~ s/.*_(.*)_.*/$1/; $f print sort vercmp(v($a), v($b)); map s/^Filename: .*\///; $_ grep /^Filename:/ ;’ list while read f; do
    pkg=$ f%_*_*
    [ ! -d $pkg ] && mkdir $pkg && ( cd $pkg ; git init )
    cd $pkg
    ar -x ../$f
    mkdir data control
    tar -C data -zxf data.tar.gz
    tar -C control -zxf control.tar.gz
    git add data control
    git commit -q -m $f
    rm -rf data control data.tar.gz control.tar.gz debian-binary
    cd ..
done
Finally, evaluate sizes for each package, respectively, of all .deb files, their content imported in git (only the .git directory, including the index ; some space could be gained removing it), and the “optimized” git repository (after git gc, without modifying delta depth or window size, which may even improve the result)
awk '/^Package:/ print $2 ' list sort -u while read p; do
    du -c --si $ p _*.deb tail -1
    du -s --si $p
    cd $p; git gc ; cd ..
    echo
done
17M total
16M libmozjs0d
4.7M libmozjs0d
34M total
31M libmozjs0d-dbg
14M libmozjs0d-dbg
4.7M total
7.1M libnspr4-0d
1.3M libnspr4-0d
9.2M total
12M libnspr4-0d-dbg
2.8M libnspr4-0d-dbg
25M total
28M libnss3-0d
4.6M libnss3-0d
81M total
61M libnss3-0d-dbg
21M libnss3-0d-dbg
15M total
16M libnss3-tools
3.1M libnss3-tools
288M total
265M libxul0d
146M libxul0d
2.0G total
1.8G libxul0d-dbg
1.1G libxul0d-dbg
5.1M total
6.8M python-xpcom
1.1M python-xpcom
2.5M total
5.6M spidermonkey-bin
861k spidermonkey-bin
13M total
14M xulrunner
2.0M xulrunner
3.3M total
5.9M xulrunner-gnome-support
979k xulrunner-gnome-support
So these packages, stored in git, take between 15 and roughly 50 percent of the .deb size, which may be a nice improvement. Il would be interesting to know how these numbers evolve with time. Some files, such as the changelog.Debian.gz files, would also benefit from being stored in plain text instead of gzipped form. Note git gc took a while and a lot of memory for libxul0d-dbg. Also note these don’t include delta files that would be necessary to recreate the original .deb file, but this shouldn’t make a huge difference.

23 February 2008

MJ Ray: Current Issues / Weston-super-Mare Post Offices Threatened with Closure

A list of post offices under threat has been published on a LibDem web site.  I can't tell how accurate this list is - the official one will be published on the 26th (Update: the leaked list was correct) - but it includes my three nearest post offices (by travel time).  I'm amazed by this.  What idiot drew up this list?  Are they trying to create Post Office deserts?

How would these closures affect you?  If it's bad, sign the petition and get ready to answer the consultation and tell your local community.

21 February 2008

David Nusinow: Where I've Been, Where I'm Going

After about two weeks I'm finally able to come back to Debian, which feels good. After my last package upload was botched (and gracefully recovered by my teammates) I realized that I needed to step away for a little bit.

I'm currently in my fifth year of my PhD program. For those who don't know how such things work in the US, I have a small committee of people (my thesis committee) who act as advisors and gatekeepers on my work. They're the ones who gauge my progress, and ultimately give me permission to write my thesis and receive my doctorate. I'm supposed to meet with them every 6 months, and it had been over a year since my last meeting. Because I'd like to actually graduate one day, I was rather nervous about having the meeting. I was more nervous than I realized, and the botched upload reflected that.

Anyway, to make a long story short, the meeting went as well as I could have hoped for and my committee seems to be happy with my progress. I'm looking to get a paper out in the spring, and they'd like to meet with me again in three months time (which will absolutely fly by) to assess where that paper is at, and how things are going. At that point, I wouldn't be surprised if they tell me to write my thesis and graduate.

What I do after my dissertation work has been weighing on my mind for years and years, and it's obviously coming to a head. My boss will let me stay on as a post-doc in the lab for a while, which I may do depending on other job opportunities and progress on my projects. Ultimately though I need to make a decision that's familiar to a few others in my position. Do I stay in science or go try and work on free software for a living? I honestly don't have an answer yet, because I love them both.

I see tons of incredible opportunities in my field right now, and while I'm not the only coder interested in synthetic biology, I'm one who's positioned to get in on the ground floor of the science in a very real way and have a significant hand in shaping its future. On the other hand I spend my free time devouring computing literature, not biology literature, as well as producing software and things related to it. I do this because I enjoy it, and I know I enjoy it on a deeper level than the biology. Would I enjoy it this way if I did it for a living? I've got no idea, since I've never coded professionally.

I'm coming up to the fork quite fast now, and I'll have to choose soon. I know I'm lucky because I do have the chance to choose for myself, but that doesn't make it any easier.

John Goerzen: Death sure is cost-effective, isn't it?

I just read Death Be Not Proud (But It Is Cost-Effective) by Chez Pazienza. In his story, Chez talks about his stay in the hospital to have a marble-sized brain tumor removed. Across the room during his stay in neuro ICU, he saw a person far worse off than himself: staples all around his head, barely able to stay conscious, unable to speak. After a few days of this, Chez asked the nurse what had happened to the other person.

It was the same thing.

The difference? Chez had good insurance, and the other person didn't. So Chez got the modern surgery with the latest technology, and the other guy got the Neolithic version. The other patient's family came to visit, clearly heartbroken at his condition, not knowing whether he'd ever be the same. And knowing that even if he'd survive, he'd have years of physical therapy ahead of him.

Then there was the story of the girl whose insurance company denied a liver transplant, calling it "experimental", sending her to her death. He says:

Regardless of what Fox business-creature Neil Cavuto may have to say on the subject, healthcare and profit are two thoroughly antithetical concepts. Giving CEOs the authority to stand on the edge of the arena and issue a final thumbs-up or down while we lay incapacitated or dying is like charging a lion with protecting the Christians.


I entirely agree.

19 February 2008

Martin Zobel-Helas: How to release properly

Pia Hi, i am Pia Zobel and I watched the sun rising today for the first time. I was born 8:29 CET, 51cm in size and 3050g in weight. Mum is well, though it was a C-section. No Tags

17 February 2008

Biella Coleman: On ARPA s 50th Anniversary

ARPA just turned 50 and Ronda Hauben, long time author on the politics and culture of the net, has written a nice reflective piece on the significance of the organization of ARPA. Challenging the idea that military roots had dug into the organizational logic of the ARPA institution and especially the ARPAnet, she instead provides the following narrative:
The organizational structure of ARPA made possible the creation of the
computer science research office within ARPA begun by Licklider. That
office has demonstrated the importance of the support for basic
research in the field of computer science. The IPTO supported a
general area of research, one with a far reaching impact. The
achievements of this research office were not specific defense related
applications, nor were the goals narrowly aimed at defense specific
applications. If this reality is not recognized, however, it is
possible to mistakenly attribute significant computer science
achievements to defense specific objectives. A common and widespread myth exists that the Internet has grown out of
a defense specific objective, i.e. from the goal to create a computer
network that could survive a nuclear war. This is a striking example
of how a false narrative can spread and gain public credence. This false narrative finds its roots in the failure to understand that
ARPA was not an agency created for defense specific applications, but
to support the basic research which would lead to new concepts and
ideas.

15 February 2008

Joerg Jaspert: PostgreSQL Continuous Archiving and Point-In-Time Recovery (PITR)

A nice feature from PostgreSQL are “write ahead log” (WAL) files. Quoting from the PostgreSQL website they describe every change made to the database’s data files. […] if the system crashes, the database can be restored to consistency by “replaying” the log entries made since the last checkpoint. This basically enables online backup of your database cluster. And as you end up having the complete log of all actions within your database(s) you are also able to go back in time to any point you like. I won’t write a complete howto about it, as the PostgreSQL docs are pretty good, just some notes how I did my setup, as a kind of reminder for me when I have to do it again.
There must be a place to store WAL files which ends up not being on the same machine, otherwise it doesn’t make much sense. For me that means scp to a different host, but an NFS mount or some storage array or drbd device might also be an option. Much of the following is for the scp method, but easily adaptable to other storage methods. I need a target user on the host I copy files to, and as I did the setup for the pentabarf database running on host skinner, I helpfully named it pentabarf-backup. The copy process can’t be interactive so the postgres user on the database host needs to have a passwordless SSH key to login to the pentabarf-backup user on the backup host. To limit my bad feeling about “passwordless key to login” I restrict the key by adding
from="skinner.debconf.org,72.32.250.224,72.32.79.241",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty 
in front of it while copying it to the pentabarf-backup users .ssh/authorized_keys file. I need a few directories, namely pentabarf-WAL-skinner, pentabarf-tarballs and pg_xlog-skinner for the stuff to backup, created in the home of the pentabarf-backup user. Next step is to tell PostgreSQL our wish to have online backups. Add the following statements to your postgresql.conf, adapting the values to your needs:
archive_command = 'ssh backup test ! -f pentabarf-WAL-skinner/%f && rsync -az %p backup:pentabarf-WAL-skinner/%f'
checkpoint_timeout = 1h
archive_timeout = 12h
The above tells PostGreSQL that i want it to archive the files using ssh to my backup host and transfer files with rsync (via ssh), but only if they do not exist yet. It also tells it to archive the files at least once every 12 hours. The effect is that WAL files get copied over when they are “full” or after 12 hours passed, whatever happens first. Don’t set it too low, as the file will always have the full, fixed size and you waste space transferring mostly-empty files. In case you are concerned with the possibly slow speed of a network link, the PostgreSQL site has the following to say about this: The speed of the archiving command is not important, so long as it can keep up with the average rate at which your server generates WAL data. Normal operation continues even if the archiving process falls a little behind. I haven’t had a problem with the speed yet. A 16MB file every (at least) 12 hours isn’t that bad. Now that we have done all the setup and are able to transfer WAL files, we need a base backup to start with. Issue a SELECT pg_start_backup(‘BASE_BACKUP’); as a database superuser and then backup the database cluster by backing up the whole clusters data/ directory (and every other location if you use tablespaces). When you are done issue SELECT pg_stop_backup(); and you are done with your base backup. You might want to exclude pg_xlog/ to save space, you don’t need it.
As I’m lazy I use a script (written by Peter ‘weasel’ Palfrader), you can get it here, but whatever you take is fine. If you use the script just make sure to adapt the variables in the script to values that fit your system. From now on you should do such base backups in regular intervals, I run them once a week, as recovery does need the last base backup plus all WAL files from then on. Doing regular base backups limits the amount of WAL files you need to keep around / you need to replay.
Reading the above you might find that there is a window of up to 12 hours from which I do not have backups. True, and to make this window way smaller, I am using another script (also written by weasel), get it here, together with an init script. This synchronizes the pg_xlog/ directory to my backup host every 5 minutes, so in case of a server crash I can replay everything up to the last 5 minutes. Recovery using WAL files This is pretty simple, and also good documented at the PostgreSQL site again. For my scenario it basically boils down to
  1. Stop postgres
  2. Move away the cluster.
    mv /var/lib/postgresql/8.2 /var/lib/postgresql/8.2_old
  3. Restore the backup dump, be careful to have the file rights correct. For the above described setup that means copy and untar the latest tarballs created weekly.
  4. Recreate pg_xlog:
      mkdir /var/lib/postgresql/8.2/main/pg_xlog
      chown postgres:postgres /var/lib/postgresql/8.2/main/pg_xlog
      chmod 40700 /var/lib/postgresql/8.2/main/pg_xlog
      mkdir /var/lib/postgresql/8.2/main/pg_xlog/archive_status
      chown postgres:postgres /var/lib/postgresql/8.2/main/pg_xlog/archive_status
      chmod 40700 /var/lib/postgresql/8.2/main/pg_xlog/archive_status
     
  5. Copy possibly unarchived WAL files from /var/lib/postgresql/8.2_old/main/pg_xlog into the newly created pg_xlog.
  6. Copy all the WAL segment files that are needed over from the backup host. That should be all the files on the backup host, directory pentabarf-WAL-skinner/. You should be able to limit it by taking all those files >= the latest *.backup file.
  7. Create a recovery command file recovery.conf in the cluster data directory. You may also want to temporarily modify pg_hba.conf to prevent ordinary users from connecting until you are sure the recovery has worked. The content of recovery.conf is
          restore_command = 'cp /tmp/pg-WAL/%f "%p"'
         
    Make sure that the file location you specify is the location you put the WAL segment files into in the prior step.
  8. Start the server, it will go into recover mode and proceed to read through all the archived WAL files it needs.
  9. Look at the database and decide if you like what you see.
Of course the procedure can be slightly adapted, so you end up with a database state from 2 weeks ago. Or 3 days. Or whatever you may need (and have WAL files for). There are many possibilities, and there is a lot of text on the PostgreSQL page that I don’t want to duplicate here, so please read it. Also, I’m not using this as the sole and only way to backup my database(s), they are all still dumped into SQL files every day. This is just additional.

Stefano Zacchiroli: XQuery and XSLT 2.0 with Debian

XQuery 1.0 and XSLT 2.0: news and how to use them in Debian (long post about the second generation of the XSL family and how to use the related languages in Debian)
The 2nd generation of the XSL family At the beginning of 2007, W3C released a family of interrelated specification: XPath 2.0, XSLT 2.0, XQuery (1.0). The 3 specifications are based on the very same underlying data model which (finally!) supports typed values and exploits them to some extent, for example permitting some form of static type checking in XPath and XQuery. Types usually come from XML Schema, with both built-in and user-defined types supported. A brief overview of the 3 specifications and what they change in the state of the art follows. XPath 2.0 XPath 2.0 basically consists in XPath 1.0 + 3 new macro features. The first one is a revamp of those language features which are dealing with types, in order to better integrate them with the new typed data model. XPath now has operators to check whether a value belongs to a given type (so yes, type information are kept at run time), and to cast them from one type to another. The basic new type constructor is now the sequence, which replaces the old node-set solving many annoying issues, such as the impossibility of having a node ordering other than document order. The second feature is the improvement of standard library of functions which was ridiculously small in XPath 1.0; it is much better now. Additionally, 2nd generation languages (XSLT 2.0 and XQuery) now support the ability to define functions which will then be visible to inner (XPath) expressions, pushing yet forward the possibilities of plain old XPath. Functions can now also declare types in their signatures (for their arguments and return value) and untyped arguments will be automatically casted to them upon invocation. Hence, even if you are not using an implementation which assigns types to your XML trees, once you "enter" the typed world calling a typed function (almost all standard library functions are decently typed) you will be able to stay there avoiding annoying casts everywhere. Finally XPath 2.0 has turned into a powerful purely functional language and is now powered by constructs like conditionals, for-each loops, existential/universal quantifiers, and existentially-quantified comparison operators for sequences. Here is a complex expression to hwet your appetite (or scare you away ...), comments come as (: smiley faces :)
for $book in /bookshelf//books
return
  if ((every $author in $book/authors/author
       satisfies $author/nativeLang eq "it_IT")
      and $book/lang eq "it_IT")
  then $book
  else ()
(: think about the trouble of writing this in XSLT/XPath 1.0 ... :)

XSLT 2.0 XSLT 2.0 is what I would call a "bug fix release" of XSLT 1.0 + the routinary reworking of the language to deal with typed values, which is not sensibly different than what has been done for XPath 2.0. The fixed "bugs" are several, starting from the annoying issue of result tree fragments. They are basically tree snippets that in XSLT 1.0 you were able to generate for future use. Unfortunately they were not thaaat reusable, given that you were not even able to navigate them with XPath operators! Now the specification is much more clear and distinguishes final result trees from ordinary variables, which can now contain sequences of (navigable) tree nodes. Another important "bug" fixed is the new ability to output multiple documents with a single XSLT stylesheet: it marks the end of stupid extra post processing to be added in pipeline to a XSLT processor. Other minor "bugs" fixed are a limited amount of backtracking capabilities among imported templates, regular expression support directly in the language, and powerful grouping constructs on the lines of SQL's GROUP BY (but much more powerful). Here is a template snippet exploiting the latter feature:
<xsl:for-each-group select="*" group-starting-with="h1">
  <div>
    <xsl:apply-templates select="current-group()" />
  </div>
<xsl:for-each-group>

XQuery XQuery is the end of the chains imposed by XML-based syntaxes. Why the heck one has to use an XML syntax (as in the above snippet) only because she is manipulating XML tress is one of the mysteries of XML technologies which have always been floating around in my head. XQuery is the (supposedly) SQL equivalent for databases of XML documents, but is actually much more than that. I depict it in my head as the XML manipulation language with a syntax I can finally stand. Technically it is XPath 2.0 (say 80% of the whole language) + some extra ingredients (say 20%); so remember that every XPath 2.0 expression is also a XQuery expression. The main extra ingredient is the so called FLWOR expression (to be read: "flower expression", which in addition to the "smiley faces" used for comments gives a "back to 1968"-flavour to the language .... erm FLWOR/flower/flavour, no pun intended). A FLWOR expression is very similar to SQL's SELECT-FROM-WHERE: it lets you generate a tuple stream by iterating on sequences (F: for clauses), binding expression values to names (L: let clauses), filter out tuples which do not satisfy a required condition (W: where clause), order the survived tuples (O: order by clause), and finally return a sequence built using the residual tuple stream (R: return clause). The other interesting extra ingredient is the ability to build the XML snippets you want to manipulate. Within XQuery you do that using plain XML syntax (the only place where a sane-minded programmer actually wants to see it!) which also supports a classical interpolation mechanism to embed expressions which will be evaluated inside XML snippets, and also the other way around. A canonical XQuery example is:
for $t in doc("books.xml")//title,
    $e in doc("reviews.xml")//entry
where $t = $e/title
return <review>  $t, $e/remarks  </review>
(: braces denote the escaping context where XQuery expressions will
   be evaluated inside snippets; plain XML syntax is used for the
   other way around :)

But remember: XQuery for XML is much more than SQL for RDBMS, thanks to the implicit templating mechanism implemented by interpolation, and thanks to several language features fostering modularity (user-defined functions, library modules, XPath 2.0 standard library, ...) you can basically do with it any kind of XML manipulation you can imagine. I don't think I will ever write myself any other single line of XML output in DOM or XSLT ...
Cool, how can I use it in Debian? ... if only this stuff were decently supported in the open source world. Last time I checked, the author of most parts of the GNOME toolchain for dealing with XML (libxml2, libxslt, ...) was not intentioned to implement XSLT 2.0, not even mentioning XQuery. This comes as no surprise, the whole GNOME XML toolkit is written in C, and XSLT 2.0 / XQuery have reached a level of complexity and formal specification which usually entails a higher level approach. So on the GNOME side we are stuck. The other open source implementations of XSLT 2.0 / XQuery I'm aware of are Saxon and Galax. Saxon is an XSLT 2.0 and XQuery implementation written in Java, which is unfortunate per se. Additionally, it is also unfortunate that it is only partially open source. Indeed, Saxon is split into SaxonB (for "basic") which is open source under the Mozilla Public License and SaxonSA which is commercial. While SaxonSA is a fully conformant, XML Schema-aware processor, with support for static typing, SaxonB is a basic-conformant processor with no type-aware features and actually much less optimized than SaxonSA. This is annoying. (Much more annoying is the fact that SaxonSA's author is the only editor of the XSLT 2.0 specification and that instead of his mail address the specification includes an URL pointing to the website selling SaxonSA ...) Galax is an open source (IBM CPL / Lucent license) OCaml implementation of XQuery which is not fully conformant to the specification (though it gets quite close) which is type-aware and implements static typing. The only XQuery / XSLT 2.0 implementation available in Debian at the time of writing is SaxonB. The binary package is libsaxonb-java, kudos to Michael Koch and the Debian Java Maintainers for having packaged it (and to have stood some annoying pings of mine :-) bug #408842). To execute XQuery code you just have to aptitude install libsaxonb-java, prepare a query.xq file containing your query, and then execute something like:
CLASSPATH=/usr/share/java/saxonb.jar \
java net.sf.saxon.Query query.xq

note that the information in README.Debian are still referring to old Saxon versions, see bug #465894 which proposes a more up to date README.Debian. Similarly, to perform a XSLT 2.0 transformation you have to do something like:
CLASSPATH=/usr/share/java/saxonb.jar \
java net.sf.saxon.Transform -ext:off -s:input.xml -xsl:style.xsl -o:output.xml

Do not remove the -ext:off flag when processing untrusted stylesheets!, see bug #465885 for the reason. I've written some handier (1-liner) shell script helpers which remove the need of invoking java manually. They are attached to bug #465894 and I've proposed their addition to the saxonb package. Using them the above invocations become:
saxonb-xquery query.xq
saxonb-xslt -ext:off -s:input.xml -xsl:style.xsl -o:output.xml

Galax in Debian ... well, since long time I've been planning to package it (the ITP has been filed some months ago: bug #447984) and the authors sent me a newer version than what is available online to gather feedback before the long overdue final release. Unfortunately I've been lagging behind in finishing the packaging (which is tricky due to the need of binding libraries to several different languages: OCaml is native, but there is also Java for example). Hopefully this post will give me some renewed motivation for finishing the work ...
References
Acknowledgements Thanks to godog for his helpful comments.
Update: the helpers I've proposed have been accepted into the official package, I've also made available their manpages. Also the pending changes to README.Debian has been accepted. Kudos again to Michael Koch for his quick feedback on my patches!

14 February 2008

Holger Levsen: Dance like no one is watching

Yesterday I decided to add a nice layout to my local ikiwiki setup. So I browsed the CSS market and choose a layout originally developed by Erwin Aligam, which you can see at Winnies blog in action.

And then the expected/desired effect kicked in: inspired by the nice layout I cleaned and reorganized the contents until late at night. Eye candy can be useful indeed!

And for those wondering about the title of this post: it's also the title of my local wiki :-) Dance and look up the full quote!

11 February 2008

Neil Williams: Cross-building Debian

With the necessary bugs now filed, there is a real chance that Lenny can be a usable cross-building platform.
The next task is to upload emdebian-tools 0.8.1 (which includes the scripts I used to prepare the patches for those bugs) and start on improvements to emsandbox.
I plan to follow the method used by balloonboard.org to improve debootstrap so that the tarball created by emsandbox contains a real filesystem, without .deb files, with all packages unpacked and then simply copy the files across and run dpkg --configure -a. (in theory).
So far, only done this in a "manual and hard-to-do-again" way and I haven't been able to get X running yet (kernel issues). I'm looking to write the scripts to create the new installation tarball first - I'll fix the packages themselves later. Emdebian won't be making these tarballs available for download (each is too specialized) so the scripts will create each tarball when needed.
That's the plan anyway . . .

(Oh, BTW, most of the patches for those bugs were created on this HP laptop which I so recently criticized. The wireless still isn't working and the power adaptor gets damned hot but apart from that, I'm happy-ish with it.)

5 February 2008

Jaldhar Vyas: Let Me Show You My Hegemons

New Jersey is one of the states holding presidential primaries on this Super Tuesday and since you asked, I voted for John McCain. The chief reason for my vote is of course the war against Islamic terrorism. Now that we are finally gaining the upper hand in Iraq, we can't afford to elect someone who will fail to see victory through. Mind you this isn't necessarily a reason not to vote Democrat. The anti-war wing of that party has been thoroughly marginalized. Hillary atleast has a commendable reputation for viciousness. Even Obama has made some encouraging remarks (ok that was probably a red herring but I have the audacity to hope you see.) But while the Democrats do not take the anti-war crowd seriously, they do depend on them for a great deal of their funding. A Democratic president might feel the need to throw them some bones inadvertantly screwing up things in the process. On the Republican side, Huckabee might leave tactical planning to Jesus. Romney would toe the line but there is no sign that he has any original thoughts on the matter. While I continue to support the President, it must be admitted that this whole war is stretching out as long as it is because mistakes were made. We need options beyond "staying the course" and "cutting and running" and McCain a military hero and early supporter of the surge could be the one to find them. The other big issue is supreme court appointments. One, possibly two justices may need to be replaced in the next four years. We need to ensure that the court does not veer leftward again as it will inevitably do during a Democratic administration. Here there is a big split in the Conservative establishment. Ideologues consider McCain to be insufficiently pure and worry he will end up appointing another Souter or O'Connor (both appointed by Republicans it should be noted.) Pragmatists point out that McCain is viewed more favorably than Romney or Huckabee amongst the independent and moderate voters who will be crucial to victory and that even the slight chance of a bad choice is better than the certainty of a bad choice if Clinton or Obama get to make it. Social issues are important to many Republican voters and in this area too there is some grumbling about McCain being too liberal. Some have even suggested that if McCain beats Huckabee or Romney, a Democratic victory and four years out of power would be preferable in order to bring the GOP back to the straight and narrow. Although this contingent is loud I frankly don't think they have the influence people think (As evidenced by the actual performance of Huckabee or previous champion Fred Thompson.) When push comes to shove, they will rally behind the party candidate especially if McCain makes a bona fide social conservative (Huckabee himself?) his vice-president. On economic issues, the president's job is to not interfere and let business run itself. I don't see any of the Republican candidates being much different in this regard. Or the Democrats for that matter. [Careful readers will have noticed I have avoided mentioning Ron Paul. Paulestinians, consider this carte blanche to send me your long, rambling, incoherent screeds about how Dr. Paul has the answers to everything. Because God knows I haven't read enough of them lately.] Update: Kevin asks what I think about the candidates in terms of "geek" issues such as net neutrality, DMCA etc. IMO there is not a whole lot of difference between the major candidates on these issues. Republicans one would think would be more beholden to corporations in general. Democrats on the other hand have a closer association with the media who are behind many of the sillier IP laws. Overall, I don't think it ought to be much of a factor in choosing the president even for Free Software types. Rather we should focus on the legislative branch (in Congress as well as the states) which holds the real power here and in the court of public opinion.

30 January 2008

John Goerzen: #1 on Google

I started this blog 5 years ago. In that time, I've written about Linux on the desktop, photography, international peace, version control systems, ice storms, Haskell, health care, rural life, Kansas, and infants.

Today I realized something: I am the #1 hit on Google when you search for smelly ducting. This will take you to a story I wrote back in 2005 about an odd odor in our house. I believe it is my most popular story ever, with almost 100 comments -- and comments continue to trickle in, a few a week.

What's the right word to use for that? When the great worldwide democratizing force that is the Internet collectively decides that your most important blog post is about smelly ducting?

I'm glad folks know what matters. Wouldn't want to worry too much about what's going on in Iraq, Washington, or Kansas if your ducts smell, that's for sure.

Obviously every single Presidential candidate has missed out on a key issue in voters' minds. If only someone would come out with a freshly-scented ducting platform, this country could finally move forward!

Sylvain Le Gall: OCamlMeeting in Paris -- Debian summary

On January 26th 2008, the OCaml community has its first meeting in Europe. There was 5 different talks, including one from me. The meeting was pretty constructive and i think some great things should come out of it. In this post, i will focus on the Debian maintainer point of view. The meeting was organized by me, with the help of Garbriel Kerneis and Vincent Balat. I wish to thank Mme Turgis from ENST/ParisTech who has made possible all this to happen. Introduction: I announce the creation of OCamlCore, a SS2L. It will provide commercial support for OCaml and related products. It will also provide community with some resources (including a GForge, a planet, some SCM repository...) For now, i will open administration to Debian people who wish to help (for root rights) and from the whole community for other task (gforge and general administration). For now, i will choose alone who can administrate and who cannot... This is not a very open position, but this server is also for my company. Xavier Leroy give us a nice talk that has let us see some future direction: But above all, Xavier talked about the fact that there is a lack of manpower at INRIA and invited the community to build tools and other things (including a CPAN like distribution) to make the language more widespread. He also stated that a lot of things will stay in place in the name of backward compatibility. OCsigen Vincent Balat has given us a nice talk about OCsigen, a new framework for programming web application. This program is already in Debian and it is at the root of Debian discussion about moving .cm[ao] into libxxx-ocaml package. This new framework allows to program web application using continuation, which should ease a lot of aspect. It also features static type checking, including static verification of the generated HTML pages. GODI I was impressed to see G. Stolpmann coming to the meeting. Unfortunately, i cannot follow the whole talk, since i have some phone call to make, in order to book the restaurant. From what i have seen, it seems that GODI is growing, in term of manpower. They have some issues with OCaml 3.10, because of camlp4 and some packages. At the end of the conference, he was pushing for a more general use of GODIVA. In particular, it requires to have a very uniform way of building software. It should be the foundation of a build standard for OCaml software. In my humble opinion, i don't agree on this point. Basically, its proposal was based on configure/make all, which is too C style way of doing. It is not bad, but just exclude ocamlbuild enabled software. ocamlbuild Nicolas Pouillard has made an introduction on how to use ocamlbuild. I have discovered how it was working, since i didn't have time to work on this topic. It seems a good thing. I hope to be able to try it at some point. The conclusion was about modifying ocamlbuild to allow the use of multiple plugins. For now, the plugin is a separate file which is compiled first and then loaded, as a special case. Nicolas is looking for a full OCaml way to handle this for multiple plugins. OCaml in Debian I have spoken about different aspect of Debian packaging. After a short introduction and some history about OCaml in Debian, I come to some conclusions/problems: Talking with Xavier give me some additional informations: At the end of the presentation, there were some questions. I discover that many people are ignoring the ABI problem with OCaml and its libraries. They seem to discover that it requires regular rebuild of our packages. I also have a discussion about the fact that Debian binary distribution doesn't fit developers need. It seems that developers prefer to have the source of libraries they compile and also the most recent release. But at the same time, people avoid using GODI, which also have the problem of needing to wait for a particular library to be released... After some discussion, I point that some companies prefer to live in a frozen world, which Debian stable can provide. Living in a frozen world helps company developers to have the same environment from the beginning to the end of a project - which can last years. It also help to avoid build environment de-synchronization between company developers. There was also a question about interaction between installed OCaml package and GODI software. I cannot answer it, expect with a "patches are welcome". OCaml on a JVM using OCaml-Java Xavier Clerc explained us how he has achieved running a full OCaml environment on a JVM. This work was pretty impressive, because he was able to compile OCaml top level and provide it as an applet. This is something amazing (and working). He stated also that this should allow to do some binding with java graphical user interface from OCaml. I was pretty busy with a phone call (to a restaurant for the dinner), so i don't have attend the whole conference. Anyway, the project is promising, but it needs to recompile every library using its compiler. I think this is not suited for Debian for now. Workshop The workshop was shorter than it should have been. This is due to accumulated time shift during the day. However, it was pretty interesting, because everybody can talked almost freely. The initial discussion was about the "Unicode situation". This was a question about Unicode in Unison, but there is no real solution about it. For reader information, unison has problem with filename containing UTF-8 char. In particular when syncing two directories which are on two file system with a different encoding on each. Even if the file can be represented on the two file systems, the comparison (between UTF-8 and ISO8859-15) fails. This is because the comparison is a byte to byte comparison. We discuss further the idea of OSR (OCaml standard recommendation) which was briefly discussed in the morning. I think David Teller (who have also done a great part of the IRC retranscription) was very keen on this idea. I invited Nicolas Pouillard to discuss the three following subjects. About camlp4 documentation, Nicolas told people about the he set up. About ocamlfind and ocamlbuild, he went back to the multiple plugin problems. About ocamlbuild and GODI, Gerd, Nicolas and Xavier tried to build a list of what metadata can be shared. This includes list of files to be installed (PLIST in GODI). Concerning the "feedback from the Gallium", Xavier explains that he has done this in the morning (which is true). I think that Xavier implicitly agreed on the fact that if this kind of event happens again, he can do another talk about future of OCaml. Concerning Summer of Code, I just remind that people can write description of Google Summer of Code project in the cocan wiki. Another one remind about Jane St Capital summer of code. Points concerning common interfaces raise the discussion about OSR. The organization of next year events doesn't raise particular interest. I think people would be interested to have one next year, if something comes out of this meeting.

Next.

Previous.