Search Results: "bage"

5 November 2006

Aigars Mahinovs: Game On!

For the last couple weeks I have been concentrating on things related to my studies and on some events related to it. I posted pictures from these events on my Flickr photostream: a colleague from the institute finished his PhD and we had a goodbye dinner, my supervisor invited me to his son’s first birthday party. Also my friends Bunja and lastguru came to UK. With one I took photos of a night playground and squirrels and with other one some photos of the Eye and Babbage’s brain. However the main theme of this post is the Game On! exhibition in the London’s Science Museum. They have the best games playable there starting with the classic Pong, Lara Croft, Bomberman, Mortal Combat and up to Halo 2 on XBox 360. Even my non-gamer friend lastguru found a thing to drool upon - his childhood obsession: Elite. Elite! Update: Almost forgot to mention - the exhibition is great: it shows the evolution of gaming and allows to experience the most important games again and it also brings a huge amount of joy to anyone who has ever played these games before - the return to childhood is imminent. I never expected that something as simple as the original Pong can be so exciting in a good company. Very recommended!

23 October 2006

Andrew Pollock: [life/americania] Egad. They've banned Vegemite!

Apparently I should be outraged. Reasons I'm not: I have an enormous stash from when we moved over here, and the micro-kitchens at work don't have bread, so Vegemite on toast isn't part of my breakfast regimen any more. We have bagels every other Friday, but I found them too heavy, so haven't bothered with Vegemite for a long time. But seriously, WTF?

16 October 2006

Joey Hess: paraphrase

You might think that an organisation of over 1000 very smart people could do better. I certianly thought so -- until I sat through one of the Debian debates on -vote. Many of the participants acted the age they must have been when they first learned the mnemonic "Garbage In, Garbage Out." They argued, often quite belligerently, from their own narrow perspectives, unable (or unwilling) to see the situation from anybody else's point of view. [...] bureaucrats, not programmers.
Paraphrased from Rick Fienberg's editorial in November's Sky & Telescope, describing the IAU Pluto definition. The parallel seems amusing, especially since both cases involve silly votes.

29 September 2006

Antti-Juhani Kaijanaho: Graph reduction

Graph reduction is the basic operational model of lazy functional programming. The idea is that the program is represented as a huge λ-term abstract syntax tree, and the program is executed by performing outermost-leftmost β-reductions to this tree, and whenever a subtree must be replaced by another tree (such as, when performing the substitution operation), the root node of the replacee is overwritten by the root node of the replacement (or a redirection node pointing to the replacement) instead of making copies (the body of an abstraction still needs to be copied, of course). The effect is the familiar laziness: when a function refers to its parameter more than once, the argument term is shared between the parameter references instead of making copies, and so any reduction in any one of them is shared by all of them. For some strange reason, I decided I must write a set of C functions that demonstrate graph reduction. I wrote them, and then in order to test them I expanded them to become a complete implementation of λ-calculus (extended with integers) graph reduction. The program can be found here; it is written in portable ANSI–C. It is able to show the complete trace of reductions. It is intended for demonstrating the technique, and therefore is effectively a stupid interpreter and does not implement any of the sophisticated optimization techniques that industrial-strength functional language implementations routinely use. Example usage:
$ cat examples/fib
TRUE = t.f.t
FALSE = t.f.f
IF = x.x
NIL = x. IF x TRUE NIL
ISNIL = x. x TRUE
CONS = car. cdr. x. IF x FALSE (y. IF y car cdr)
CAR = cell. cell FALSE TRUE
CDR = cell. cell FALSE FALSE
MAP = f. xs. IF (ISNIL xs) NIL (CONS (f (CAR xs)) (MAP f (CDR xs)))
AT = n. xs. CAR (DROP n xs)
DROP = n. xs. IF (n = 0) xs (DROP (n - 1) (CDR xs))
TAKE = n. xs. IF (n = 0) NIL (CAR xs (TAKE (n - 1) (CDR xs)))
FIBS = CONS (CONS 0 1) (MAP GENFIB FIBS)
GENFIB = pair. CONS (CDR pair) ((CAR pair) + (CDR pair))
FIB = n. (CDR (AT n FIBS))
$ ./graph-reduction -t -S10K -H1M examples/fib
graph-reduction 1.0 by Antti-Juhani Kaijanaho, report bugs to antkaij@mit.jyu.fi
[heap_size=1048560,stack_size=2621440]
examples/fib> FIB 3
[...]
1 + (1 + (0 + (f[4].f[4]) (y[11].(x[5].x[5]) y[11] 0 1) (t[3].f[4].f[4])))
1 + (1 + (0 + (y[11].(x[5].x[5]) y[11] 0 1) (t[3].f[4].f[4])))
1 + (1 + (0 + (x[5].x[5]) (t[3].f[4].f[4]) 0 1))
1 + (1 + (0 + (t[3].f[4].f[4]) 0 1))
1 + (1 + (0 + (f[4].f[4]) 1))
1 + (1 + (0 + 1))
1 + (1 + 1)
1 + 2
3
examples/fib>
(In the trace output, each bound variable is annotated by a scope identifier that effectively allows me to ignore variable caputure problems.) I plant to further extend the language to handle algebraic data types and simple pattern matching, to get rid of the noise of simulating these concepts in the traces. Technically, perhaps the most interesting part of the program is that it contains a fully portable copying garbage collector.

13 September 2006

Clint Adams: Broke out of the old apartment, always wanted a monkey

So K. called me a brat, and rightly so. Now I could go on about the bizarre dysfunctional ways A. and M. keep trying to drag me into their extramarital insanity, but that would be overuse of initials. I could tell you about Fatslaps and his plans to splatter Harry with onions, but Harry is whimpering just about the right amount. I'm talking about Harry, not Harry. I could do a Marxist literary criticism of The Garbage Pail Kids Movie, but something disturbing happened to me, indirectly leading me to have a flashback. It was another century, though not more than a couple miles away. As with all progress , some things are better now, and some things are worse. Maybe that's just how I see it. It's stereotypically geriatric to reminisce about the past, accentuating the positive, but it's stereotypically me to only comment on the negative. So in the interest of stalling, here comes a m lange of the two. Value judgments are left as an exercise for the reader, assuming the prostitute/lover question isn't still getting top billing. Warren Zevon was still alive. Nouvelle Vague hadn't released any albums yet. I only knew one person who spoke Brazilian Portuguese. I hadn't seen Rent yet. I used to eat a lot more Colombian food. I refused to eat tomatoes. Actually, I ate quite a few things then that I don't now, and quite a few things now that I didn't then. I don't remember what I ate that night, but it wasn't Kraft dinner ; I'm sure of that. I know because I went to see a free concert as performed by the Barenaked Ladies. The concert was free because they were almost completely unknown. I was introduced to them a while before, by a dirty, dirty slut who squealed with delight because the lyrics featured words such as erection . It took me years of recovery to be able to appreciate that song. Years. If she hadn't, I would have found out about them through Minna Bromberg because she does a cover. One of the people I was with shouted out to Steven Page, calling him by the wrong name. If being a starstruck poseur weren't enough cause, I think the error would have made me implode from embarrassment. He took it on the chin. I know this Canadian who keeps telling the same tired old story that the Barenaked Ladies is the only Canadian band to ever become famous outside of Canada. He uses this dubious claim to segue into his bit about how The Tragically Hip is really popular in Canada, but unknown everywhere else. I tell him that I've heard of The Tragically Hip. He doesn't believe me. I try telling him that I've never heard of Moxy Fr vous or Rush, at which point he breaks down and admits that everyone has heard of Rush. Then we repeat the conversation a month later. So BNL did get all famous and mainstream and STUFF. That night, they urged everyone in the audience to promote them so they could GET PAID and sell out to The Man. I must confess not comprehending their earnestness and the gravity of the situation. I also never expected them to be played on Z100. Boycott ClearChannel. They're sellouts now, but they weren't then, and a good time was had by all. At the time, If I Had $1000000 might've been their most popular song. AS SUCH, the more rabid fans in the audience had brought boxes and boxes of macaroni & cheese, as well as a stuffed monkey or two. These items were flung at the stage, at appropriate times, frightening the band. I don't believe that anyone threw a green dress. Now, Canadians are funny people. They like to flap their heads and do medleys and covers and rap gratuitously in the middle of concerts. Well, Rush doesn't, but Moxy Fr vous and BNL do, and that's enough for me to make a sweeping generalization, because Rush can be disqualified purely on the mullet factor. You probably don't know this, but If I Had $1000000 is a song which gets a lot of variation and perhaps improv. For example, the owner of the remains will vary, and they'll vamp the introduction with the lyrics of some other song. You can hear it on the Rock Spectacle album, where they lead in with Grade 9. That night they did Prince's Raspberry Beret. We swooned. We swooned.

25 August 2006

Erich Schubert: Fun with google.

Talking about logic, and where people fail at understanding it... Fun with stupid Google queries - Is there any page about Google and not Google? Wonder how big the Google index is? Google OR -Google. (I'm aware that the count is imprecise, it's just funny that this query is actually processed.) Now let's look at MSN. google 64741016
-google 4669973284
okay. that should make "4734714300"... google OR -google 5156927770 - oops, magic new hits.
-google OR google 68735504
So where are the 5 billion pages that have "google or -google" but not "-google or google"? And how about MSN OR -MSN - there can be only one. askdjfhsakdf OR -askdjfhsakdf - top result for this garbage word: Google! askdjfhsakdf OR -askdjfhsakdf Google results are consistent. I wonder what their sorting is in this case... random? hash function? age? Remember Googlestossen? Like Googlewhack, but with scoring. There must be only one hit with both words; score = # of hits with word 1 * # of hits with word 2

2 August 2006

Evan Prodromou: 15 Thermidor CCXIV

I'm at the Wikimania hacking days today. We drove down from wt:Montreal through wt:Vermont and wt:New Hampshire on Monday, stopping overnight in the beautiful town of wt:Lincoln (New Hampshire) in the White Mountains. Amita June had a crappy ride on Monday -- she was unhappy and uncomfortable and let us know it at every possible opportunity. We stopped in wt:Saint Johnsbury, VT for dinner, and she got some time to walk around and play, but beside that she was crabby. Tuesday morning was much better -- she had a big bagel from the Comfort Inn's breakfast buffet, and her Sleepy Bear teddy bear, and she was happy. Sleepy Bear is winning the war for hearts and minds in our house -- it's the bear that she's starting to sleep with more and more, and she makes a happy squeal when she sees it. This could be good or bad news. Anyways, we made it down to wt:Cambridge (Massachusetts) aaaalmost in time for the beginning of Hacking Days. HD is the technical pre-conference for the more sociological and content-oriented Wikimania. I thought it was going to be mostly MW committers and Wikimedia sysadmins, but it's turned out to be huge. I think there are about 40-50 people here -- a just gigantic group. Anyways, I was sitting in the One Laptop Per Child office meeting room with about 30 hackers yesterday morning. I was about 20 minutes late, but I managed to find a seat anyways. Everyone was giving introductions, and up stand David Recordon, Jonathan Daugherty, and David Strauss, all of whom say they're there to help me with the OpenID MediaWiki extension. As everyone's talking, I realize wp:Ward Cunningham is sitting right in front of me. The guy sitting next to me stands up to introduce himself, and says, "I'm Dan Bricklin, who many of you may know as the inventor of the spreadsheet..." Jeez. Anyways, the talk has been fast and furious. Yesterday was a long discussion about the state of Wikimedia servers, the upshot of which, for me, was: Holy Shit, Wikimedia is a big project. I managed to talk to a ton of people, including Travis Derouin of wikiHow, Jason from Wikia, all the OpenID folks, etc. etc. Jonathan Daugherty and I actually got some hacking done, which was great. tags:

The future of MediaWiki This morning Brion Vibber and Tim Starling gave a discussion about the future of MediaWiki. The story? More cool features, I think. The OpenID will be part of it; incorporating a WYSIWYG editor like WikiWyg or FCKEditor into the software. Also, more [[wp:AJAX]-y features, which are coming up through the codebase right now. I think in a large way MW's future is going to be outside of Wikipedia proper. Some of the cooler developments using the MW as a platform include WiktionaryZ and Semantic MediaWiki, both of which provide a structured data substrate to wiki pages. They're not compatible, which I think is something that needs to happen at some point in the future, but they're very promising for future projects. Another big class of projects is bots -- like PyWikipediabot or some of the "vandal fighting" bots and interfaces, e.g. Tawkerbot. I think that MediaWiki is drifting from being a monolithic browser app more into a Web-based service, which will be really productive from a content-production and -maintenance point of view, but which is extremely challenging from the social point of view. Finally, I think the great explosion in the world of customized MW extensions and skins is meaning a real marketplace for expanding the software is happening. I think this is pretty fabu, also. Some people have been discussing formalizing this ecology into a CPAN or JabberStudio-style site for hosting and organizing MW extensions. We'll see what happens with that, but if it comes around, I hope that it's named $wgForge. Maj and Amita June are running around Boston today... very slowly and carefully. They've got a brutal heat wave on here, and people are fainting and collapsing like wilting flowers. I think they're going to go places that have air conditioning, like museums and so forth. tags:

5 July 2006

Daniel Burrows: Not Bavaria, but still fun.

With today being a federal holiday, Kate and I decided to take a four-day weekend and head to Leavenworth. This is a little town up in the Cascades that calls itself Washington's Bavarian village, and seems to be part of the complete Seattle experience -- everyone around here has visited it at least once. The short description is that while the Bavarian theme is a bit of a gimmick, there's good hiking in the area and some good food (if you don't mind the touristy atmosphere).

NOTE 1:

Why is this post written in the present tense? 'cos I felt like it.

NOTE 2:

For the convenience and sanity of people reading this on aggregators like Planet Debian, this saga is broken into segments.

Day 0

We get a late start leaving Redmond and drive along some pretty spectacular scenery on Highway 2 East ... although after living here for a while, I've become somewhat inured to spectacular scenery. Another craggy mountain with snow-spotted alpine meadows, thousand-foot waterfalls, and blankets of pine forest? You woke me up for THAT? But even by the standards of the Pacific Northwest, this is a scenic drive.


Kate has picked out a short hike about halfway to our destination, but when we pull up to the trailhead we learn that a Northwest Forest Pass is required to park. We decide to cut out that hike and make a note to buy a pass when we get a chance. Probably they're sold in Leavenworth. Further on we see a little picnic area with a path going back into the woods. We decide to stop there for lunch and follow the trail, which turns out to be a pleasant loop through a patch of forest and up to a decent-sized waterfall.

We arrive in Leavenworth in the afternoon. The town has done an impressive job of building a city center of half-timbered buildings in what looks to me like a reasonably German style (bearing in mind that my last visit to Germany was about ten years ago when I was in high school). They even have a two- or three-story clock tower. After checking into the bed-and-breakfast where we're staying, we head downtown to explore.


Leavenworth, at least in the city center, looks very Bavarian from the outside. It's a little less impressive when you actually go in the buildings. Most of the shops sell generic American tourist junk -- shirts that say I can only please one person per day. Today is not your day. Tomorrow doesn't look good either., kitschy statues (women holding beer tables on their breasts), etc. However, while I see very little that's recognizably Bavarian in town, there are some stores with nice selections of work by local craftsmen and artists.

After looking around a bit, we head to the Andreas Keller Restaurant for dinner. We have a nice meal of j gerschnitzel, sp tzle, red cabbage and knackwurst while listening to (live!) accordian oom-pah. I am surprised to see the Chicken Dance mixed in with the rest of the performance, but Wikipedia says that this was composed in Switzerland in 1950s for the accordion under the name Der Ententanz. Live and learn.

After finishing dinner, we walk back to the bed-and-breakfast and get an early sleep.

18 June 2006

Daniel Burrows: Unsubscribing from most Debian lists.

After six (seven?) years of being almost continuously subscribed, I have decided to finally remove myself from most Debian mailing lists. While I don't intend to actually unsubscribe, I even doubt I will continue reading -private. No, strike that. I especially doubt I will continue reading debian-private.


This is not a decision that I wanted to make or took lightly, but two ongoing problems, combined with my own lack of free time, have convinced me that it is the best route:


(a) Virtually all the traffic on the lists is useless. I don't think this was the case when I subscribed, but it certainly is now. The few interesting technical or procedural tidbits that I can find are buried under (and within) piles of messages that are useless flames, off-topic discussions, kooky threads, or mails that combine two or more of the above.


(b) The tone and content of the lists is increasingly hostile, personal, and aggressive. Based on what I see on the lists, Debian is not a friendly project these days. I'm sad to say it, but being able to block the rest of the Project (except bug reports, of course :) ) out will not only increase the time I have for Debian, it will increase my motivation to work on it. A lot.



The straw that broke the camel's back here was that after finally getting my Internet access back a couple weeks ago, I decided to catch up on Debian list mail this weekend. After spending a significant fraction of my free time just wading through the sludge and reading the most useful and interesting-looking of the mail that people had spewed onto the lists, I realized that I would have been far better off doing something more useful, enjoyable, and productive with my time ... like, say, picking lint out of my carpet by hand, or committing Postal Service regulations to memory.


I'm still of two minds about the whole issue: while I blamed the lists above, there are plenty of major contributors to Debian who have full-time jobs and still manage to not just read all the garbage on the lists, but actually reply to a lot of it. So I can't help feeling this is partly due to my own inadequacy or advancing decrepitude (I turn 26 in just a few months; isn't that about when your brain atrophies? ;-) ) -- but regardless, I think that I personally can't justify the "expense" of staying on the lists in terms of the benefits I get from doing so.

4 June 2006

Michael Janssen: Pet Peeve #2: Microsoft Excel and Unicode

Recently I was working on an application for ICRA2006 and I needed to output some data to be read by Excel. This would seem like an easy problem, just output in CSV and Excel can open the text just fine. Unfortunately Excel has one of the most backwards implementations of international character support that I have ever worked with. Being nieve to this, I simply tried UTF-8. I was greeted with multiple strange characters in the place of my normal umlauted and tilde-d letters. A quick search turned up that when Excel reads a CSV, it assumes that it is in ASCII or . However, you can import the CSV as a text file and select it as unicode. This is where my real pet peeve is: You can't select the character set of a CSV in Excel. You have to rename the file as a .TXT file and go through a wizard, basically spelling out that yes, it is comma separated and yes, this is the data I want to import. There's one drop down box which specifies the character set. Of course Unicode is supported there.

In the search for a solution to this problem which didn't involve a 10-step process for the customer, I discovered the Unicode marker which is supported by Wordpad, but amazingly, does nothing but add a bit of garbage in Excel. The sad part is that I can be almost certain that the next version of Office will continue to have this problem. My only hope is that somehow the XML format will be open enough to just create a native Excel file.

24 May 2006

Andres Salomon: Actually, they re kinda bland till you scoop sugar on em.

Last night, I opened up a jar of Mott’s Apple Sauce and proceeded to eat half the jar. At some point, I looked at the ingredients; basically apples, high fructose corn syrup, and water. Just how much high fructose corn syrup? I looked at the nutrition facts and realized that I was eating 25g of sugar *per serving*. 5 servings (which is how many are in the jar) would have amounted to eating 125 sugar packets! I tossed the rest of the jar in the garbage. The apple sauce was a lot more appealing when I thought it might actually be healthy. [edit] No, I don’t normally eat a jar of apple sauce; the rest of the food is packed away in boxes, however. Looking at the unsweetened apple sauce, it looks like it has 12g of sugar in the apples themselves. So to correct my figures, eating the jar would have amounted to eating 65 sugar packets, plus some apples.

12 April 2006

David Welton: Ruby vs Tcl, round 2

Ding ding. (Round 1 - for those who missed it) Kidding aside, remember that I like and respect both of them. Libraries In the first article, I mentioned that Ruby has a lot of momentum, which is a pleasant change from Tcl's relative 'uncoolness' amongst the Web 2.0/O'Reilly/"next big thing" crowd. That said, there are still places where that momentum hasn't taken it. I set about writing some code that I'd wanted to play with that involves sending some email. Something that's very easy in Tcl: http://tcllib.sourceforge.net/doc/smtp.html (towards the end of thepage). Python seems to have a pretty complete email system too, for that matter: http://docs.python.org/lib/module-email.html. So it appears that, based on a sample of one attempted task (how's that for statistics?), that Ruby is still lacking a few things in its standard distribution. Note that this functionality is available elsewhere (TMail, to cite one), but email is ubiquitous enough that it ought to be in the standard library. Command line swiss-army knife While Ruby's OO system gives it a head start when you need to create a larger system with distinct parts, it can still be used as a quick'n'dirty scripting language for quick one-off jobs. From the man page:
% cat /tmp/junk
matz
% ruby -p -i.bak -e  $_.upcase!  /tmp/junk
% cat /tmp/junk
MATZ
Very handy. Tcl's command-based syntax just isn't quite as quick for those sorts of operations, so Ruby wins hands down here. I've suggested that the Tcl folks distribute a second program that takes a lot of the Perl-style command line arguments for this sort of work, but the idea doesn't seem to be of much interest. C API's On another tack completely, one of the things that originally drew me to Tcl was its very, very nice C API. It's documentation is clear, and thorough, and the API itself lets you get involved in pretty much any aspect of the language that you want. This makes sense, because when Tcl was originally created by Dr. Ousterhout in the late '80ies, the idea was to create a scripting language as a C library that would be loaded into other programs. The language has always been faithful to its heritage, and to this day I find it lots of fun to merge Tcl with C code. I have to admit that I don't know the Ruby API all that well, but what I have looked up looks pretty nice. To a certain degree, it's comparing apples and oranges, because Ruby requires you to deal with the very object oriented nature of the language, whereas Tcl is a lot more direct. The Programming Ruby book's coverage of the subject also leads me to believe that Tcl really gives you access to more stuff (interpreters, channels, events, and many other parts of the system). Ruby seems to take an approach that might best be described as letting you write Ruby in C - meaning that you create Ruby objects, use their methods, get their values, and so on, but you're still really dealing with Ruby. This has a certain elegance, but sometimes it's necessary to muck about with things at a lower level. I don't know how it works out in practice, but Ruby has a bit more infrastructure in place for actually building extensions once you've created them. Tcl has "tea", which is a set of m4 macros, but anyone can tell you that the auto tools are not much fun to work with (going to the dentist is more fun) - anything that keeps me away from them is welcome. Garbage collection One of the more interesting aspects of the different approaches to C interoperability is the fact that Tcl uses a simple, robust, straightforward reference counting system to keep track of, and throw away resources that are no longer used. Ruby has a mark and sweep garbage collector, which is probably more sophisticated, but also more complicated, and requires a bit more support from the programmer initially. The benefit is that once things are set up, they require less keeping track of, because you hand off memory management to the computer. From the end user's point of view, Ruby wins here, but if you happen to be writing a C extension, I could see it being more difficult to write and debug to this API, although Tcl has its own warts, one of the worst of which is the fact that Tcl values must be convertible back and forth to strings, so that for things like a file handle that can't really survive the round trip, because it's just a pointer, you use a hash table and some sort of string to hold onto the object:
 "file1" -> int fd1
 "file2" -> int fd2
which makes it impossible to GC these values. I suspect that both approaches have their merits - Ruby's is more elegant, but Tcl's is simple and rugged. Licensing Bouncing back to something completely non-technical, Ruby's licensing is either the GPL, or their own license. If I understand things correctly, you can get around the GPL's "viral nature" by simply renaming things, if you have a need to include Ruby in a proprietary product:
  1. You may distribute the software in object code or executable form, provided that you do at least ONE of the following: a) distribute the executables and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. b) accompany the distribution with the machine-readable source of the software. c) give non-standard executables non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author.
So it seems that you're ok if you just call it something else. However, the license goes on to talk about several other files in the core distribution:
  1. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under this terms. They are gc.c(partly), utils.c(partly), regex.[ch], fnmatch.[ch], glob.c, st.[ch] and some files under the ./missing directory. See each file for the copying condition.
Looking through the LEGAL file in the distribution shows that there are files distributed under other terms. Of course, they're all free software, but some are LGPL, some BSD, and a few others for good measure. Tcl's licensing, on the contrary, requires very little understanding. The language was developed at the University of California, Berkeley, and the license remains BSD. This goes for many of the libraries and extensions as well. If you need to embed a language in your proprietary system, Tcl and its libraries present no problems whatsoever. Of course, I prefer to work with open source code and communities, but that's not possible 100% of the time, so it's always nice to know things are free and clear, should that need arise. Internationalization This is something the Ruby folks know they need to fix, and are working on, so it's not worth dwelling on it much, but it is a proud point for the Tcl community. Tcl has had very nice i18n setup for many years, at this point - since the 8.0 release. It's built into the language, so that everything works with it. You have commands to set encodings of IO channels, and even munge strings. Tcl wins here - no contest. As I continue exploring Ruby, I think I'll find more stuff to compare with Tcl, so we won't ring the final bell just yet.

1 April 2006

David Nusinow: I Can't Believe I'm A "Manager"

Via reddit (which kicks the crap out of slashdot and digg): What I've Learned From Failure.

The link above is a long, but fascinating piece. I've had to become a lot more interested in how to manage software projects since taking on Xorg maintainance, and the same lessons seem to scale up well to how Debian as a whole manages itself. This article talks about some of the major problems that I've seen myself deal with, and the experiences of this guy echo my own over the past year very strongly. Here's a few examples:

"Getting away from weak teams, another source of failure is the omnipresent threat of "chickens." A chicken is not necessarily a weak individual, but a sign of a weak management structure. A chicken is an individual who has significant authority over your project, but does not make a personal commitment to the success of the project. Significant authority includes the authority to impose constraints on the team."

I like this and I've noticed it in the XSF and in Debian as a whole. People are free to work on what they want how they want, and this tends to work out well for us. But we also have no structure in which people must actually commit to what they do. As such, there's no accountability. This frees Debian developers from the preassure of having to work on something they don't enjoy, but it also creates abandoned packages, ignored bugs, and frustrated release schedules. In the past I've described a need for a stick in addition to a carrot for Debian developers, and the sentiment here echoes that idea. I've spoken with Manoj about his conception of personal responsibility in Debian, and I think it may truly be the bedrock on which Debian needs to rest. I still don't have a good mechanism for this yet though.

"Another sign of a weak team is poor development hygiene. There are dozens of development practices that seem trivial to the inexperienced outsider or to the manager focusing on "big wins." Examples of development hygiene include source code versioning, maintenance of an accurate bug or issue database, significant use of automated testing, continuous integration, and specifications that are kept current (whether incredibly detailed or high-level overviews)."

This is a something I myself have had a problem with over the past year. Branden was extremely good about keeping the XSF svn repo and the BTS up to date and well managed. I've done just about the opposite over the past year, and it's bitten me a few times. This however, was a conscious decision on my part, knowing that I was so far behind upstream that it was going to be hard to effectively manage the BTS without a recent codebase deployed to our users. So I focused on packaging instead, and luckily that road is nearly finished. Also fortunately, everyone else in the XSF managed the BTS for me, most notably (in alphabetical order by last name) Julien Cristau, Michel D nzer, Eugene Konev, and David Martinez Moreno, and they've managed to keep it relatively tidy. I'm going to spend some serious effort over the coming months to clean out the BTS so it's more manageable both for users and developers again. Luckly our SVN repo is in good shape still, so for the most part we're doing pretty well here. Debian as a whole also seems to be doing better at this, with lots of public svn repos springing up on alioth.

"It's mandatory to fail early. You need to know you're in trouble right away. That's essential when taking over an existing project or starting something new. You have to find out how you're doing within weeks. Not quarters, not months. The longer you wait, the more inertia the failure will have."

We're getting better at this, and I've sort of made it my mantra for this release cycle. Get things in to experimental as fast as possible, and then when I've fixed the majority of the bugs that show up there, put it in unstable as fast as possible. It worked out well for all the releases I've done so far and I'm going to keep doing it. Michel is really pushing me to keep CVS (or git as of Real Soon Now) snapshots from upstream in experimental, and I really like this idea and plan to follow through with it for this reason. This also echoes some of aj's ideas about speeding up development pace. Hopefully he'll implement them whether or not he becomes DPL, because I think they're going to be important for Debian as a whole.

"Dates are sacred."

We learned this during the sarge release cycle.

"The net result is that I've tried to find the happy medium where I generate weekly management reports on projects. A management report is something that is used to actually make a decision. Everything else is garbage. I've learned that when I haven't had management reports for a project, failure has resulted."

This is an interesting idea. It sort of echoes how I try and provide status updates on my blog, as well as the "Bits from" emails, but perhaps something more like this would be useful. I may try and play with this idea in the near future.

There's a lot more in there, but this entry already got way too long. Hopefully there's some food for thought in there for everyone who's interested in how Debian is run. The Debian development model has carried us very far, but I can't shake the feeling that we need to make some critical changes for it to continue. This will require a certain degree of boldness, but in order to fix the problems with the project I think we just need to clench our teeth and go for it. With that, I'll leave you with one last line from the above: "And if you decide to make changes, have the courage to go 100% with your gut. I've failed more than once when I watered down my convictions in order to appease dissenters. The only thing worse than evangelizing change and failing is looking back and realized you might have succeeded if you'd held firm on your convictions."

1 February 2006

David Nusinow: X.Org: Oops

Last time I blogged about the libglu situation, which I explained was necessary because of the C++ ABI transition in changing over from gcc3 to gcc4. libglu is the one library written in C++ in all of the X.Org source tree, so it was the only one that had to be broken.

It turns out we were wrong about that. libglu is indeed written in C++, but Marcelo Magallon pointed out that it only exports a C ABI, and as such it doesn't need to be transitioned. I have admittedly little experience with shlibs myself, so I didn't know such a thing was even possible, and no one else caught it either. The next version of X.Org, which will be uploaded as soon as I can get it built, will have this fixed, and nvidia-glx, and everything that depended on xlibmesa3-glu will hopefully install just fine once that goes in. Sorry about that everyone.

In addition, this upload should have correct MANIFEST files for all arches, which will hopefully allow it to build successfully on all of them. This will allow X.Org to transition in to etch after a week and a half. This will also unstick gnome 2.10's transition in to etch, which is now tied up with X.Org. Daniel Stone helped pull those MANIFEST updates together, which has been a huge help, so you should send him your hugs 'n kisses. There is an issue with libvgahw which a lot of people have reported, which causes problems when you switch to a virtual text console and then back in to X, which should be fixed in this upload as well (you can thank David Mart nez Moreno for tracking that one down before I could even blink). Finally, xterm bold fonts have been looking like garbage, but Eugene Konev came up with a patch to fix that, which I'm working on rolling in right now.

So if all goes according to plan (that's your cue to laugh mercilessly at me) the next upload will move in to testing just fine, leaving us with room to make larger improvements in the X.Org packaging, as well as working towards getting the (currently unreleased) next version of X.Org in to Debian.

30 January 2006

Antti-Juhani Kaijanaho: Counting lines

Insipired by Daniel Burrows’ tests, I decided to do mine. The object is to come up with a Haskell program that performs the job of wc -l as efficiently as possible. My test material is a randomly generated file with all lines less than 80 characters long. Summary: my final idiomatic version is twice as slow as wc -l, and my final nonidiomatic version is as fast as wc -l, or at least within the margin of error. First, the baseline:
$ time wc -l testfile
7798137 testfile
real    0m12.127s
user    0m0.765s
sys     0m0.399s
Then the most idiomatic program. Honestly, I expect it to suck performance-wise:
main = getContents >>= print . length . lines
And it does:
$ time ./wcl1.hs < testfile
7798137
real    1m14.993s
user    0m54.182s
sys     0m0.573s
But only by a factor of six. My first hypothesis is that garbage collection is the culprit. And, indeed:
$ time ./wcl1.hs +RTS -sstderr -RTS < testfile
./wcl1.hs +RTS -sstderr
7798137
25,236,174,340 bytes allocated in the heap
5,070,193,924 bytes copied during GC
117,484 bytes maximum residency (3750 sample(s))
96274 collections in generation 0 ( 26.36s)
3750 collections in generation 1 (  0.74s)
2 Mb total memory in use
INIT  time    0.00s  (  0.00s elapsed)
MUT   time   27.17s  ( 42.72s elapsed)
GC    time   27.10s  ( 33.72s elapsed)
EXIT  time    0.00s  (  0.00s elapsed)
Total time   54.27s  ( 76.44s elapsed)
%GC time      49.9%  (44.1% elapsed)
Alloc rate    928,824,966 bytes per MUT second
Productivity  50.1% of total user, 35.5% of total elapsed
real    1m16.616s
user    0m54.278s
sys     0m0.700s
As you can see, GC takes half of the processing time. Unfortunately, minimizing GC time does not have as big an effect as I hoped:
$ time ./wcl1.hs +RTS -H100M  -RTS  < testfile
7798137
real    1m1.354s
user    0m44.371s
sys     0m1.171s
Here, I’m effectively telling it to use a 100-megabyte heap. A separate GC profiling run tells me that GC time has dropped from 50 % to 1 %. The memory problem seems to be a red herring. What we’re doing here is creating four separately allocated memory cells for each character in the input. Of course, the cells are generated lazily, that is, a cell pair is allocated when the lines function demands another character; it then creates another cell pair to denote the same character in a list of lines. As soon as each line has been counted, the four cells become garbage. This sounds like a lot of work! But apparently it isn’t; I tried a few variations that did away with the stream of input altogether, not much unlike what Daniel did in his tests. Surprisingly, the performance worsened a lot. The lesson: functional programming language implementations, unlike typical imperative ones, are built on the assumption that you’ll be doing a lot of allocation. What I suspect is taking a lot of the time is arithmetic. Haskell’s Int is boxed, and lazy by default, adding a lot of overhead. I hand-fused length and line, yielding a tail-recursive countLines function, and I added the command-line switch -funbox-strict-fields, which enables a few significant optimizations of the laziness of Int. The results were nice:
ajk@kukkamaljakko:~/scratch$ cat wcl4.hs
module Main (main) where
main :: IO ()
main = getContents >>= print . countLines 0
countLines :: Int -> String -> Int
countLines n ('n':r) = countLines (n + 1) r
countLines n (_:r) = countLines n r
countLines n [] = n
ajk@kukkamaljakko:~/scratch$ ghc -O -Wall -funbox-strict-fields --make wcl4.hs -o wcl4
Chasing modules from: wcl4.hs
Compiling Main             ( wcl4.hs, wcl4.o )
Linking ...
ajk@kukkamaljakko:~/scratch$ time ./wcl4 < testfile
7798137
real    0m37.961s
user    0m29.853s
sys     0m0.495s
ajk@kukkamaljakko:~/scratch$ time ./wcl4 +RTS -H100M < testfile
7798137
real    0m25.153s
user    0m13.497s
sys     0m0.803s
ajk@kukkamaljakko:~/scratch$
With a large heap, the program is only twice as slow as the baseline. This is pretty good, considering that the code is still idiomatically functional. The following rather ugly, imperative program does away with the lazy stream and carefully avoids any laziness without doing any too dirty tricks:
ajk@kukkamaljakko:~/scratch$ cat wcl7.hs
module Main (main) where
import Data.Word
import Data.Array.IO
import IO (stdin)
count :: Int -> (Int, Int) -> IOUArray Int Word8 -> IO Int
count 0 _ _   False = undefined -- force ac evaluation
count ac (l,u) _   l > u = return ac
count ac (l,u) ar
    = do a < - readArray ar l
         let ac' = case a of 10 -> ac + 1
                             _  -> ac
         count ac’ (l+1, u) ar
maxn :: Int
maxn = 4096
main :: IO ()
main = do
  arr < - newArray (0,maxn) 0
  let loop :: Int -> IO Int
      loop acc = do n < - hGetArray stdin arr maxn
                    if n == 0
                       then return acc
                       else do acc' <- count acc (0,n) arr
                               loop acc'
  res <- loop 0
  print res
ajk@kukkamaljakko:~/scratch$ ghc -O  -Wall -funbox-strict-fields --make wcl7.hs -o wcl7
Chasing modules from: wcl7.hs
Compiling Main             ( wcl7.hs, wcl7.o )
Linking ...
ajk@kukkamaljakko:~/scratch$ time ./wcl7 < testfile
7798137
real    0m13.431s
user    0m10.342s
sys     0m0.467s
Of course, this program is not Haskell 98, but the nonstandard things it uses are fairly common. As can be seen, this version’s performance is, considering the margin of error, equal to the baseline. The compiler used in this test is The Glorious Glasgow Haskell Compilation System, version 6.4.1, as packaged in Debian sid.

29 December 2005

Decklin Foster: lastfmsubmitd

Apparently, tis the season to be writing your own Last.fm plugin. So here is mine. I finally got fed up with finding and causing bugs in mpdscribble (I am a bad sponsor!) it s written in C with libsoup, blah blah, can t stand C, and so I revived the MPD pseudo-listener I had started on as a replacement for that awful orphaned cacheless one-off we were all using before mpdscribble. I also fixed a few issues that were bugging me, like failing to detect restarts and tag changes. Not wanting to muddy up any of that logic with HTTP gar, I decided to write a separate program to queue, cache and send along song submissions. They re two or three hundred lines of Python each, and single-threaded (yes, that means child writers blocking and hanging around if the network code is in the middle of timing out or backing off. Deal with it! This is UNIX). I m pretty happy with the design, although the implementation is still very rough. This also mimics the model they want to move to for player plugins in general, which is good, because it will be less work for me to implement version 2.0 of the protocol once that is finalized. Additionally, I was able to find a more satisfying way to solve the disconnected-CD-player problem than my previous dreadful method of either using a few kludgey scripts to frob around in my primary plugin s cache or dealing with using cdscrobbler and having to be very careful about one plugin not stepping on the other s toes and invalidating my backlog. So this is the second example program included. (Oh yes, that part uses the Python bindings for MusicBrainz. MB is awesome. The Python bindings are hideous, however straight port of the C++ API. I d probably be better off just dumping the RDF into a real RDF implementation and doing my own cross-referencing, instead of prying it out piecemeal with select queries and non-polymorphic getters and all the other absolute nonsense you have to deal with when writing in a language without high-level data types or garbage collection. But regardless of implementation woes, this has kept me close to the MB metadata for my favorite CDs, and so I ve been busy all week entering and voting on mods (and doing research to justify my changes), which is very satisfying. I have yet to begin the gargantuan task of adding MB tags to my Ogg collection (I know, this is really just a matter of babysitting tp_tagger, but I ve got some work cut out for me to even get to that point).) And of course, once this becomes less prototypey, anyone who likes it can knock all the networking code out of their plugin and use it as their system service . Perhaps if I m agile enough this can become official code! It is at least a mootable proof-of-concept that UNIX systems don t necessarily need a heavyweight libscrobbler to abstract the service stuff out of the player plugin. I won t get my hopes up though. Still a bit unsure about the name. Theoretically it seems the service (you know, the thing we pay money to if we like it) should be Last.fm, while the software and protocols should still be Audioscrobbler, but the distinction does not seem to be drawn very clearly in practice. With the analogous situation of livejournal vs. ljcom you had a grokkable technical delineation (different repositories) as well as other widely used installations besides ljcom (DeadJournal, etc). I really can t see there ever being a competing installation of Audioscrobbler, because licensing the streamables is a formidable investment hurdle, and there s a negative market effect (also, the web site is not open source). But I am also bored of just sticking scrobble onto something else, so I wanted to grab sticking last onto something else before it got old. I haven t the faintest clue what makes me prefer whimsical names for some projects and prosaic ones for others. Note to actual MPD users (all, like, 5 of you): the stuff in the package will not handshake at the moment, as I have not yet gotten Russ to bless the client ID I made up. Will try to catch him tomorrow. Or later today I suppose. It s ready to go now. Next up: Because it s either this or Sound Juicer, I think perhaps it s time to bid adieu to abcde and write a MusicBrainz plugin for jack (jack is nice enough, I just haven t had a truly compelling reason to switch, and there have always been lots of good eyeballs on abcde). FreeDB delenda est.

20 December 2005

Gerfried Fuchs: Harry Potter IV

I'm still alive, thanks for asking. Though it doesn't feel too much like it. The stress at work is rather improving than lowering. But I sort of managed to reach an important step last thursday finally with the bind-to-pdns transition we are doing, so I thought I could present me with some gifts. Interestingly I just were at the bank in the morning to withdraw my christmas money... So I thought I could go to the cinema again. The people with which I was in the cinema before didn't ask me lately to join them anymore, so I have to kick my ass myself anyway. So I drove to the cinema complex, and being not too late was able to go a bit shopping, too. I presented me with three (or four, because one was a double) CDs: Mike Oldfield "Ommadawn", Garbage "Bleed Like Me" and Kylie Minogue "UltimateKylie". Besides I usually prefer albums to Best Of Albums I thought the Kylie double CD was a good deal nevertheless. "Harry Potter and the Goblet of Fire" was the movie I watched, finally. Of course people who read the book will miss the Veela, the Leprechaun, Dobbie!! and various other things. But appart from the usual cutting you get with longer books the movie itself wasn't too bad. I really enjoyed it, especially because I met two friends right before going in and got the promise to go with them to Narnia today. Yeah! Friday was very special, too. I was invited to some christmas party, at viennAventura. I really enjoyed the evening, I fully support their concept. Take a look at the nice christmas flash Diana did for the website as long as you have the chance to!
After some glogg, helping to write a christmas picture story including the photo shooting and decorating their christmas tree with handdrawn glitter balls I went happily home. I took my dog out for a walk, and when we were around the corner I heard my cat cry for me! After a week being outside and almost already thinking of never seeing him again I heard him crying for me like hell! It was sooo great to hear him, I went over to him, picked him up and took him home with me again. Of course I wasn't able to do any work that weekend but only cuddle with him all the time. Fortunately for him he was in a very cuddly mood himself, too. ;) Guess he missed me too.

8 December 2005

Enrico Zini: Making a film out of vncrec output

I have a vncrec output and I need to encode a film out of it. Note: this blog entry is getting updated with the feedback I receive by mail. All the part about recording an X session is being maintained in the Debian wiki. transcode won't work: tried everything, googled a lot: either it exits right away, or I use the dvd delay option and it shows an error from vncrec and does nothing. vncrec can generate xpm files, one per frame. However, imagemagick won't grok them complaining they have an illegal header. And xpmtoppm will complain that there is a line inside the file which is too long. The only thing that can load them is gimp. So, let's script gimp. I came up with this python script that kinda does the trick:
from gimpfu import *
def process (file):
      img=pdb.file_xpm_load("/home/enrico/tmp/cazzeggio/"+file+".xpm", file+".xpm")
      pdb.file_png_save_defaults(img, img.active_layer, "/home/enrico/tmp/cazzeggio/"+file+".png", file+".png")
      # (update) added to dispose of the image to avoid gimp swap to grow
      pdb.gimp_image_delete(img)
for i in range(1, 10000):
      process("img_%05d"%i)
Tested in the gimp python-fu console, it works, with the save and load progress bar popping up all the time grabbing the focus from whatever I was doing. There is a run_mode that can be passed to those file_xpm_load and file_png_save_defaults, however python-fu is happy to let me know that I don't need to bother about it. I searched, searched searched and I found out that this really means that there's no findable way to tell Gimp functions to STFU with python-fu. Now, how do I run that script AND be still able to use my computer? gimp has a nice --batch commandline option, from which it seems to only understand scheme. It has a --batch-interpreter option, but I couldn't find out any possible value that could make --batch understand python. So, it seems that the only way to run python is to either register a plugin, or type it in the python console. And no STFU. So I tried Xnest, so that I could at least iconise the whole thing out of my way. But it seems that xnest is denying connection from all clients I try to run in it. So I've run a VNC server. In the VNC server I run Gimp. Then I fire up the Python console inside that Gimp. Then I paste the script in the Python console. Then it starts working and I close the VNC client to get rid of the popups. Finally, this script helps me delete the big XPM files after they've been converted to PNG:
#!/bin/sh
for i in *.xpm
do
      if [ -e  basename $i .xpm .png ]
      then
              echo rm $i
              rm $i
      fi
done
If there were easier ways to do what I did, please mail me and I'll document them: no matter how I searched, I couldn't find any. Update: it seems that in the Gimp python script, the image doesn't get automatically garbage collected. As a result, the file ~/.gimp-2.2/gimpswap.whatever keeps inflating, so space is not really saved by converting the XPM files to PNG, unless I restart Gimp from time to time. Update: I found a function to deallocate the image: maybe that avoids the growth of the Gimp swap.

MJ Ray: Business Truths

I smiled at "Things I thought" from Bagel Belly Blog more than I have for a while. Much truth there. The Bagel Belly is back on form. Sam Hocevar asks "Is there a task organiser that does not suck?" which I think is interesting - the program is not the organiser. The user is the organiser. The program can only help (or hinder!) not organise. Sometimes obvious is just plain wrong. I used to think it was obvious to answer my messages at the start of the day. I found I lost whole chunks of the day that way. For me, long reading is usually an evening activity, so I guess my mind associated it with going to sleep afterwards. I didn't notice that reading personal email is fine, when I reply to a high proportion of it and act on it. That starts my day with action and I continue being active through the day. Reading mailing lists and newsgroups isn't fine, as I read most of that and don't reply. I switched to reading only personal email in the morning and leaving lists and newsgroups until later in the day, unless there's something obviously interesting. It's made a big difference. Is there a need to rethink email? Bob Geldof rails against emails:
"Geldof said he dreaded seeing lots of e-mails in his inbox, as they imposed an agenda on him, and disrupted his own plans for the day."
This doesn't surprise me in general (is there a less likely email fan?) but does he have a point? Over time, I've moved to treating emails as letters, essays or at least office memos. It's easy to treat them as conversations, but they are not, in so many ways. You can say things in conversations that will haunt you if you ever write them down. In conversation, people accept that sometimes you'll make comments without proper review and reflection, but it's assumed that you have considered your emails, even though most people don't seem to. This is part of why I think the Debian private email "declassification" proposal is unethical if applied to past messages. People didn't expect to have such a wide audience. Similar musings from techdirt, the Register, the Inquirer and Business Week Maybe see also thread patterns from see shy jo which could help you skip though low priority email sooner, and Online forum usage and other addictions, from Steve Pavlina. I wondered if the problems were new to online. Forums can be a bit like newspapers, but while you get a whole day to read a newspaper and there's one hell of a lag on the letters page, you can get a forum update by clicking at any time (even though new editions may be smaller) and your talk-back appears instantly on most forums. - Then someone reminded me about "news junkies" who buy all the newspapers and watch or listen to rolling news. Maybe this isn't a new problem. How was it solved in the past?

2 December 2005

Antti-Juhani Kaijanaho: Small purgatories and minuscule pleasures

The worst possible condition of a walkway is created as follows:
  1. Let snow fall on it
  2. Use a snowplough to clear it up
  3. Rinse, repeat.
  4. Pack the remaining snow tight
  5. Let the temperature be a few degrees above zero Celsius, then let it fall slightly to negative degrees
  6. Let it rain water.
The result: smooth, wet ice. What we call ’skull condition roads’ here in Finland. We had that, minus the final rain, and it was very slippery. I was careful, and didn’t fall (but that’s just luck). In other news, chinese cabbage is very juicy indeed.

Next.

Previous.