Search Results: "sf"

12 June 2007

Antti-Juhani Kaijanaho: On recursion

Note: This entry has been edited a couple of times (and might be edited in the future) to remove errors. Thanks to Benja Fallenstein for critique. My previous post about recursion drew some comments. This is a topic that frequently confuses me, and there is a lot of confusion (some of it mine) in the blog post and its comments. On reflection, it seems prudent to examine what recursion really is. Consider the following recursive definition: 0 is an expression; if T is an expression, then sT is an expression; nothing is an expression that doesn’t have one of these two forms. Now, it is clear that 0 is an expression. It is equally clear that sssssK is not an expression. In some applications, it makes sense to consider infinite expressions like “…ssssss0“; that is, an infinite number of ss before the final 0, and in others it doesn’t. Is that infinite utterance and expression? It does have one of the forms given in the definitions, so it is not forbidden from being an expression, but neither is there anything in the definition requiring that it is. It is helpful to do this a bit more formally. Let us translate the self-referential definition into a set equation: The set of expressions is the set E that satisfies the equation

E = 0 ∪ se e ∈ E

But this definition is bogus! There are more than one set E that satisfies the equation, as remarked above, and thus there is no “the set E”! We need to fix the definition in a way that makes the set E unique. The key question is, do we want to regard the infinite utterance discussed above as an expression. It is simplest to just say “the set of expressions is the smallest set E that …” if we want it to not be an expression, and if we want it to be an expression we should say “the set of expressions is the largest set E that …” Let us make the following definitions:
Consider the set equation S = … S …, in which the set S is alone on the left-hand side and occurs at least once on the right-hand side. This equation is a recursive definition of the smallest set S satisfying this equation, and a corecursive definition of the largest set S satisfying this equation.
Thus, a definition like

E = 0 ∪ se e ∈ E

is not recursive because of its form; it is self-referential. By itself, it is an ambiguous and thus bogus definition. We use the words “recursive” and “corecursive” to indicate the intended method of disambiguation. A rather nice example of this can be seen in the treatment of algebraic data types in strict (ML-style) and nonstrict (Haskell-style) functional programming languages. Consider the declaration (using Haskell syntax)
data IntList = Nil   Cons Int IntList
This can be read as a set equation as follows:

IntList = Nil ∪ Cons n x n ∈ Int ∧ x ∈ IntList

Now, as a recursive definition, it is restricted to finite lists as found in ML, but as a corecursive definition, it also allows infinite lists as found in Haskell. (It unfortunately fails to address the question of bottom-terminated lists, which also can be found in Haskell.) As it happens, the technique is not limited to set definitions; but to generalise it, we need to discuss a bit what we mean by the terms “smallest” and “largest”. In a set context, a set is smaller than another set if it is the other’s subset. Notice how this makes the ordering partial, that is, there are sets that are not comparable (for example 1 and 2 ; neither is smaller than the other, but neither are they equal). A collection of sets does not necessarily have a “smallest” set (that is, one of the sets that is a subset of all the others). However, we can always find the lowest upper bound (”lub” or “join”) of a collection of sets as the union of the sets, and the greatest lower bound (”glb” or “meet”) as the intersection of the sets, and if the lub or glb is itself a member of the collection, it is the smallest or largest set of the collection. Haskellists will find things instantly familiar when I say that the smallest element of a mathematical universe (if it exists) is called bottom and is denoted by ⊥; somewhat less familiar will be that the greatest element (if it exists) is called top and is denoted by ⊤. A partial function is any function that needs not be defined everywhere. For example, f(x) = 1/x is a partial function on the reals (it is not defined for x = 0). We can form a partial ordering of (partial) functions having the same domain and codomain by specifying that f is smaller than g if f(x) = g(x) for all such x that f(x) is defined. Sometimes it will make sense to specify that f is smaller than g if f(x) is smaller than g(x) for all such x that f(x) is defined. Now, it happens that all collections of functions have a lub; and in particular, the partial function that is defined nowhere is the smallest function (the bottom function). Now, with this definition of “ordering” of functions we can apply the definitions of recursion and corecursion to functions. For example, consider f(x) = f(x) + 1. The bottom function (defined nowhere) qualifies, since undefined + 1 is undefined; thus it is the smallest solution to the equation and thus this equation is a recursive definition of bottom. However, consider f(x) = if x = 0 then 1 else x*f(x-1): any solution to this equation must have f(0) = 1 and thus the bottom function is disqualified. In fact, the smallest solution is the factorial function, and thus the equation is a recursive definition of factorial. In the comments to my previous entry, I was asked whether the Haskell definition “ones = 1 : ones” is recursive. Of course, the question in itself is nonsensical; whether it is a recursive definition or something else (such as corecursive) depends on what the programmer intends. I will interpret this question as whether the equation is a recursive definition of the intended result, the infinite list of all ones. First, observe that we can order Haskell lists (including the special “undefined” list) partially as follows: l1 is smaller than l2 if l1 is undefined, if they both are empty lists or if a) the first element of l1 is smaller than the first element of l2 and b) the tail (the list with the first element removed) of l1 is smaller than the tail of l2. The undefined list does not qualify as a solution for “ones = 1 : ones”. No finite list qualifies either. The infinite list of all ones does qualify, and it is the only solution; hence, the equation is a recursive definition of the infinite list of all ones; it is also a corecursive definition of the same list. Finally, let us consider the question that started it all: what should we make of the definition “recursion: see recursion”. First, note that a equation x = x admits all elements of the universe as a solution; hence, the proper reading of “recursion: see recursion” as a definition is that it is ambiguous and hence bad. It is a recursive definition of the bottom element of the universe (whatever that might be for a dictionary), and a corecursive definition of the top element of the universe (whatever that might be). In any case, it does not define recursion (unless of course, the concept of recursion is the smallest or the largest concept in the universe of concepts).

Michael Prokop: Error handling: ENOSPC

Hopefully fuzz testing is well known nowadays, right? But did you check how smart your software can handle ENOSPC - the ‘No space left on device’ error? I like stress testing software (to be honest: no, not really). Yesterday I debugged a problem regarding zsh history writing on ENOSPC. Usually I use the grml Linux live-cd for stress testing (often running inside Qemu, Virtbox, VMware,…) like in:
dd if=/dev/zero of=/tmp/home.lo count=1000
losetup /dev/loop1 /tmp/home.lo
mkfs.ext3 /dev/loop1
mount /dev/loop1 /home
mkdir /home/grml
chown grml: /home/grml
Now after restarting the shell session of user grml I can play with ‘No space left on device’ situations. (Notice: I adjust the count=… according to what type of application I want to test.) Too many applications don’t really cope with the ENOSPC situation. Firefox for example is very funny, depending on the situation it either just segfaults when trying to start up, or decides to not start up at all and just exits with ‘1′. See the relevant strace output:
mkdir("/home", 0700)                    = -1 EEXIST (File exists)
access("/home", F_OK)                   = 0
mkdir("/home/grml", 0700)               = -1 EEXIST (File exists)
access("/home/grml", F_OK)              = 0
mkdir("/home/grml/.mozilla", 0700)      = -1 ENOSPC (No space left on device)
access("/home/grml/.mozilla", F_OK)     = -1 ENOENT (No such file or directory)
exit_group(1)                           = ?
Opera also just exits when already running and receiving an ENOSPC - I encountered data loss (for example the transfer history got lost) more than once. Very "funny" to see how applications like dillo, joe, wireshark,… behave in the ENOSPC situation. Not. Oh, your application handles ENOSPC just fine? Then continue testing with read-only filesystem, using NFS, removing files randomly,…

11 June 2007

David Welton: Dunbar's number and online communities

It's widely known that online communities tend to follow a certain pattern if they are successful. They get larger, and beyond a certain point, they start degrading. Slashdot, digg, reddit, usenet - there are countless examples. My idle thought for the day: how might one go about reconciling the vastness of the internet with Dunbar's number.
Dunbar's number, which is 150, represents a theoretical maximum number of individuals with whom a set of people can maintain a social relationship, the kind of relationship that goes with knowing who each person is and how each person relates socially to every other person.
The ideal system would work to expose you to all the new and interesting things you can find only by interacting with a large group of people, yet keep the actual community aspects (comments, for instance) small, in order to facilitate happier, more interesting and productive communities, rather than the vicious circle turd-flinging matches that a lot of popular sites seem to descend into. I don't have a clear idea of how that might be accomplished at a practical level, but the idea interests me as a way to create something that grows a lot, yet doesn't become unpleasant.

David Welton: Pluto Meeting

The Pluto Meeting in Padova was fun to speak at. It was good to see people I haven't had a chance to see in a while, and I was very impressed that the organizers managed to put the whole thing together in under a month. That's no mean feat! I gave a talk on economics and free software, a subject that I find fascinating. I went there expecting to get a few more questions or people pushing back against what I had to say, given that a lot of the people present were "of the FSF persuasion" in terms of their beliefs, but for some reason that didn't really materialize. Too bad, because it could have been interesting. In any case, we had a great time back in Padova for a few days!

Martín Ferrari: Debconf 7

Ah, finally I'm at Teviot, keeping up with mail and hacking a little. The place is wonderful, as is the hostel. The whole city seems taken from a fairy tale. There are a little too much regulations, and security cameras, but well... A word of advice to other travellers: avoid Iberia at all costs! The fuckers caused us a hell of problems, we arrived 14 hours after what was initially planned, we had to wait long hours in airports, chase our luggage, argue with many employees... On the bright side, the delay of the first flight caused a change of company for the next two flights. The moment we went to the KLM desk in Barajas, all of our problems vanished. Talk about customer satisfaction!

Sam Hocevar: Bits from the DPL: DebConf, DSA

on my way to EDI I m stopping for a few days in London before I continue to Edinburgh and I should arrive at DebCamp on Wednesday evening or Thursday morning, depending on whether we travel by train, bus or plane. I m really looking forward to seeing everyone and I hope to have enough time to talk about everything we want to do and set up this year, be it the game team or the core teams, the website or the technical committee... DSA team I eventually got feedback about DSA team candidacies from the various members of the current team. I am relieved that the very idea of adding more people was not met with too strong objections, but now who exactly is going to be accepted is a whole other story. I ll keep you informed.

10 June 2007

Daniel Burrows: Dear Lazyweb: Mercurial Python API

So, in the midst of trying to convert some Darcs repositories to Mercurial repositories (see here for the reason), I hit an "interesting" bug: tailor processes "rename" patches by deleting the renamed file. A little debugging later, I get to this simulation of what tailor does:


>>> from mercurial import hg,ui
>>> uio = ui.ui(debug=True,verbose=True)
>>> r = hg.repository(ui=uio, path='.', create=True)
>>> f = file('A', 'w')
>>> f.write('Some data\n')
>>> f.close()
>>> r.add('A')
>>> r.commit(text='Add A')
A
'i\xe9\xb4\xc8\x9d\xb8\xeb\xbe\xb1k\xae\xb1\x182\xa9ao\x80\xd0'
>>> r.copy('A', 'B')
B does not exist!


Huh? Of course B doesn't exist, that's why I want to create it! So, we look at the code in localrepo.py to handle copying...


def copy(self, source, dest, wlock=None):
p = self.wjoin(dest)
if not os.path.exists(p):
self.ui.warn(_("%s does not exist!\n") % dest)
elif not os.path.isfile(p):
self.ui.warn(_("copy failed: %s is not a file\n") % dest)
else:
if not wlock:
wlock = self.wlock()
if self.dirstate.state(dest) == '?':
self.dirstate.update([dest], "a")
self.dirstate.copy(source, dest)


Double huh?


  1. Why is this method checking whether the destination exists before it does anything? It appears to me that this is actually necessary; just disabling this test leads to a crash later.
  2. How does mercurial work at all with such huge breakage in its core code? Does /usr/bin/hg use a different implementation of the repository code than mercurial.hg?
  3. Why, in the name of $DEITY, is this a warning and not a fatal exception? One example of what happens when you don't signal to your users that you're ignoring them is this bug: tailor happily goes ahead and removes the original file, safe in the knowledge that mercurial has copied it to the new location. Except, of course, that mercurial hasn't actually copied it. Whoops.


I'm hoping that someone will tell me that it's just too late at night for me and I'm being an idiot. Please tell me this. It would make me very sad if code like that was in my VCS.


:-( --- sad Daniel

Pierre Habouzit: git 1.5 on alioth

thanks to Rapha l again. git gc, nice hooks, branch tracking, ... all this is yours. Now that git-gc is on alioth, as alioth has a gitserver (and hence provides a not dumb transport like http), please run git gc from time to time so that repositories keeps beeing small (hi XSF ;p) FWIW I also will maintain git-core backports on bpo starting ... now. [sorry for the closed comments, I can't stand spam on my blog anymore]

Wouter Verhelst: The world according to spammers...

Now if only.

Chris Lamb: Sudoku solver in PostScript

There seems to have been a bit of fuss over this Sudoku solver implemented in SQL. In Easter 2005, when Sudoku fever kicked off in a big way in England, my Dad started writing a solver implemented in PostScript which I then modified so that it could perform backtracking. I also wrote a C# solver for my phone around the same time and later sneakily won a competition with it - I am now barred from entering competitions in that paper. Anyway, here is an example PostScript board (PDF version). It was labelled “Fiendish” in The Times. The board can be easily changed at the top of the PostScript file. NB. Best results are achieved if you view the PostScript directly in a viewer such as gv or GSview as you actually see the process of backtracking in solving the puzzle, the recursion depth and the set of possible symbols for each square — most PDF viewers are terrible at displaying the process as they seem to render inside the wrong thread. (In terms of solving the puzzle, we both found that by enforcing the simplest constraints and then ‘guessing’ was far easier and more efficient than performing any of the complicated constraints typically employed by human solvers. I’m certain I am not the first to notice that attempting to emulate the brain’s method of solving a problem is usually a short-sighted approach for a computer.) There are few other goodies in the file: replacing the final autotest with autotestR will recurse using the right-most possible symbol - if you get the same board with both of these then the initial board has a unique solution. Also, if you can get your hands on a true PostScript printer, printing the file will mean the puzzle is solved in hardware. Enjoy :) . I’m looking forward to DebConf7! UPDATE: Added PDF version.

Enrico Zini: things-not-to-do

Things not to do with lvm and crypto At least as of june, 2007, you should never do this: "...I need some encrypted storage space...":
lvcreate -L1G -n test vgname
cryptsetup luksFormat /dev/vgname/test
cryptsetup luksOpen /dev/vgname/test test1
mke2fs -j /dev/mapper/test1
mount /dev/mapper/test1 /mnt
# ...copy important data to /tmp...
"...oh, I need more space...":
lvresize -L+1G /dev/vgname/test
# cryptsetup resize test1 did not seem to
# work, so why not try this instead:
cryptsetup reload test1 /dev/vgname/test
resize2fs /dev/mapper/test1
Message from syslogd@localhost at Sun Jun 10 13:17:37 2007 ... localhost kernel: journal commit I/O error
"...oh damn. What happened?":
umount /mnt
mount /dev/mapper/test1 /mnt
EXT3-fs warning (device dm-13): ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure EXT3-fs warning (device dm-13): ext3_clear_journal_err: Marking fs in need of filesystem check.
"...let's check it then...":
umount /mnt
e2fsck /dev/mapper/test1
"...what the hell is going on?":
e2fsck -fy /dev/mapper/test1
"...$ & ! ^ @ $ ( Y ^ Q ! @ % # !!!".

Evan Prodromou: 20 Prairial CCXV

What a great day. The weather in Montreal has been fantastic the last few days -- we've had sunny, hot, clear days with showers at night to clean up the air. It's been really spectacular to be out. Of course, this is the time of year that Montreal really shines -- festival season. It kicks off this weekend with the Grand Prix du Canada, which includes a giant party in the downtown area, on St. Laurent, and in the rest of the city as well. In my neighborhood (old and new), we have the Nuit Blanche sur Tableau Noir, a street fair that closes down av. Mont-Royal for auto traffic from June 7 to June 10th. There are huge murals painted on the street itself, and every business, retail outlet and restaurant expands onto the street, while people rove up and down all day and all night. And soon we get the International Fireworks Festival, which kicks off in only two weeks. One of the hallmarks of summer in this city is that just about every Wednesday and Saturday there's a gigantic fireworks show on le Ste. H l ne, at La Ronde amusement park. You can see the lights all over the city, and feel the thumping in every house and bar. It's disconcerting and awe-inspiring. We've already started having Piknic lectronik events, with another going tomorrow. Wow. tags:

SXSW talk online So, my talk at South by Southwest 2007 is now available online as a podcast. You can get the audio at the sxsw.com site and you can follow along on the OpenOffice.org or Powerpoint slides at Talks/SXSW07. I liked listening to this recording, although I realize that I need to do some speech practice for future talks. I say "ummmmm..." after every sentence in this talk, which would probably drive me crazy if I were listening to it. I'm surprised that the applause at the end is so strong -- I'd probably have thrown food at this guy. tags:

Wikimania On that note, I'm glad to point out that my and Maj's talk for Wikimania 2007 was accepted. I guess that means we'll be going to deliver it in Taipei. The subject is Extending wikis with social networking tools. We're going to cover Wikitravel Extra: our motivations for it, implementation issues, and results. It's going to be pretty interesting. tags:

9 June 2007

Axel Beckert: .org registration rules arbitrariness

For about nine years, my domain deuxchevaux.org was hosted (which means web, DNS and a catchall e-mail forward) by Internett at Saarbr cken. Although it was a sponsered hosting without much support I was quite happy with their service. But especially my ideas and demands regarding spam filtering grew out of the possibilities of a mass hosting solution. Since I run my own web, mail and name servers for a while now, it was no question that also deuxchevaux.org should become self-hosted. Since I run a root-server at Hetzner and their “robot” also offers domain handling, I planned to transfer deuxchevaux.org to them. Therefore I first had to register my two DNS servers (sym.noone.org and virt.noone.org) with them. In the documentation there was a note that for .org domains, name servers in a .org domain have to be registered with the same registrar. And just a few hours after registering the name servers via their web interface I got a mail from Hetzner Support that the domain of my name servers are not registered with Hetzner and so I cannot use them form .org domains. Asking for the cause of this rule, I got the answer that this is a rule by Hetzner’s upstream registrar, Cronos AG. Well, since I don’t understand such arbitrarily looking rules, I was looking around for another registrar with usable web interface. On the DaLUG mailing list, someone recommended eDNS. Since their single user account is free of setup and monthly fees, I signed up with them and started playing around with their web interface. When I tried to transfer deuxchevaux.org using the Auth-Code, I got the response that the transfer failed and when I clicked on “Details”, I got “$VAR1 = [];” as detailed information about the failure. Data::Dumper says hello. I wrote them and asked if they can tell me, what that should mean last Thursday and got no answer so far. I don’t think, I’ll register domains with them anymore. So where to try it now? Someone recommended GoDaddy, but I neither like their website (way too much targeted on beginners and mainstream) nor do I want to apply for a credit card or a PayPal account to be able to pay their bills. So a bill from my UML hoster Korypet (aka VD Server) caught my eye: They were lowering prices for registrations at some top level domains (and in comparison to the recent lowerings at eDNS the new prices also apply to existing contracts) including .at and .org (and I only have .at, .ch and .org domains). I didn’t knew they also do domains outside of selling them in packages with UML hosts. So I wrote to Korypet support, if they offer a web interface for domain handling and got a reply less than two hours later: Not yet, but they’re working on it. Until then, I can request domain handling tasks by e-mail to their support. Since I know their UML managing web interface – which works fine – and since I’m happy with their support, service and prices since years (I’m customer there since 2003), I replied with all the necessary data for the transfer. Well, the transfer failed, too. But in comparsion to Hetzner or eDNS, they made the effort to exactly find out, what happened. So what did happen? The rule which the Hetzner support guy told me that it was from their upstream registrar wasn’t from there but from Public Internet Registry (PIR) itself. And the rule seems to match not that often, so that many people involved in domain registration don’t know about it (and usually neither understand its existence when they hear about it). Also I have no understanding for this harassment and so I felt the strong urge to get one over on them. Korypet suggested several solutions fitting my needs (i.e. the usage of my DNS servers for my domains). They even offered A records under some of their PIR registrered domains pointing to the IP addresses of my DNS servers for no fee, but luckily some A records under my own .ch domain sufficed. So the transfer was successful on Friday evening, 6pm local time, my own mail server (running Postfix) was happily rejecting a lot of spam to (and even from) non-existing users (which came in over the catch-all before) as well as hosts greeting with not fully qualified or invalid HELOs and greylisting others via David Schweikert’s Postgrey. The number of accepted mails and recognized spam sunk immediately by approximately factor four on the whole mail server, although deuxchevaux.org isn’t the only domain that receives mail there (but was the only one which had a catch-all before). So in the long run, I’ll probably move all .org and .at domains over to Korypet since they have not only fair prices but also a competent and individual support. (And yes, this is a recommendation. ;-)

5 June 2007

Martin-Éric Racine: Open Tuesday in Helsinki

Two days ago, I attended the first occurrence of Open Tuesday, an Open Source event building upon the established First Tuesday concept: people from a given industry gather on the first Tuesday of every month for some informal chat and networking. The meeting usually starts with the company that sponsors that particular month's event presenting their latest business concept or product. For Open Tuesday, this means Finnish players in the FOSS industry. I was particularly pleased with the wide variety of private and public sector representatives that attended this first event and found the exchange of ideas extremely stimulating. The fact that promising job leads also crept into some of the conversations obviously added to my satisfaction as well. Besides, several notorious developers like icon designer Tuomas Kuosmanen and Debian's very own Lars Wirzenius were also spotted among the crowd, which was very nice indeed. Anyhow, if you are working in the Finnish FOSS industry or if your FOSS business often takes you to Helsinki, you could hardly go wrong joining in on the fun. Definitely recommended!

David Welton: Paul Graham and the Opportunity Costs of Startups

Anyone who hasn't read them should have a look at Paul Graham's collection of essays: http://paulgraham.com/articles.html They're not all winners, but there's a lot of good stuff there, especially where he talks about things he knows intimately: startups and "hackers" (in the sense of programmers). I'm not sure if he actually ever comes out and says that startups are the way to go for enterprising hackers (he may not, infact), but his enthusiasm for that route is infectious. It's a route that was fantastically successful for him, and so it's natural that he thinks highly of it. However, the "opportunity costs" are also important to consider. In other words, what else could you do with that time, as a young and bright coder? I think the world, and possibly Linus Torvalds himself, would have been worse off had he dedicated himself to creating a company. He's a bright guy, and might not have done too badly with a startup, but Linux is really one of a kind in the success that it's had. Same thing goes for other bright people who have dedicated themselves to technology in some way (Guido van Rossum, Ruby's 'Matz', Andrew Tridgell come to mind), in the process creating something very cool that has come back to reward them, in the end. On the other hand, while the idea of Arc is interesting, my guess is that the world is better off with Y Combinator, and Mr. Graham certainly seems to have done well by himself with the company he founded and sold to Yahoo. The question is: what kind of person should do what? Some of the personality traits are doubtless similar between the two categories. Or perhaps there isn't much difference at all, and it's motivation that counts. Perhaps the most important thing is the people you know. Apple's two founding Steves might not have did what they did without one another, whereas Linus was able to capitalize on the internet to leverage his own creation, without having to work closely with a business partner. I don't have the answers, nor do I think they are clear or easy, although I'm sure that motivation does count for a lot in terms of overcoming what people don't expect you to be able to do.

4 June 2007

Evan Prodromou: 15 Prairial CCXV

I'm sitting in our suite in the Doubletree on Times Square in New York City, catching up with some email and generally trying to pull myself together. It's been a remarkably busy week and this is the first time I've been able to sit down to blog for a while. We moved to our new house at 4690 rue Pontiac last Wednesday, and most of my time last week was taken up either packing things (clothes, computers, dishes), unpacking the same things, or taking things that I didn't want to pack/unpack to various charitable organizations. Our move-in went smoothly -- the hardest part was moving our old fridge and stove to our new house, then moving the fridge and stove and deep freeze from our new house to the old apartment for Julia and Antoine to use. The new house came with a lot of new goodies, too. We bought a new couch for our new livingroom, and a new king-size bed for our new bedroom. On top of all that, I signed us up for Vid otron cable Internet instead of our old reliable Bell Canada DSL, and it's turned out to be quite fast and easy to use. So on top of the excitement of having a new place to live, there have been a lot of new toys to play with. Thankfully, our cats and our daughter have adapted quite well to their new environment. Amita June has a new bedroom, but she's been through so much travel -- hotel rooms and friends' homes -- that she's able to sleep just about anywhere. Topaz and Xe (the cats) don't usually adapt very well, but Maj kept them in the upstairs bathroom for a few days The thing that's surprised me the most about moving into the new house is how seldom we go upstairs. All our bedrooms are downstairs, as well as the new office/den, and we seem to get a lot of our needs met down there. The upstairs area is really really nice, though: lots of light and air. But the stairs are a real energy barrier. I guess my legs are going to get stronger and I'll get used to running up and down them several times a day. Probably the biggest disappointment of the move-in was that our new paint job, which had been so lovingly planned, got pretty marked-up in certain parts of the house -- specifically, the halls and stairs. We'll be doing some touch-up painting ourselves, but it is still kind of a bummer to see all these nicks and scratches on the otherwise pristine walls. tags:

Train in vain We're in New York City for the awards ceremony for the Webby Awards. Wikitravel won the Webby award for best travel Web site of 2007 -- quite an honor. We came right after our move-in, so it feels a little rushed. We're just here for about 72 hours. We'd thought about going down to visit family in New Jersey, but we really need to finish getting unpacked and settled in to the new house. We're planning on coming down for a relaxed family visit in NJ later this summer, instead -- maybe combining it with a trip to the Jersey Shore. Although there are plenty of flights between Montreal and New York, and it's only about a 6- to 8-hour drive, we decided to try something different this time. We took the Adirondack (Amtrak) train, which runs down the shores of Lake Champlain and the Hudson River Valley. My theory was that the train trip would let us stretch our legs, read, and get some work done, and that AJ could run around and enjoy herself, rather than being cooped up in a car or airplane seat. Although the train was the slowest option (it's scheduled as a 9-hour trip), it might end up being the most comfortable. I think the results were mixed. Indeed, the trip was a comfortable one, and Amita June got to run up and down the aisles and climb all over the empty seats. However, we got stopped at the US border due to an elevated terror alert, and what was supposed to be a 30-minute scheduled customs stop dragged into a two-and-a-half hour inspection. By the time we got to New York, we were more than two hours late. Among other things, this meant that I missed the opening cocktail reception for the Webbies, which was kind of a bummer. It was dumping down rain in torrents when we finally got to Penn Station, though, so I think that the rooftop reception probably wasn't all that much fun. I got soaked trying to get us a cab, but we had a decent ride to our hotel -- the functional but unexciting DoubleTree Suites on Times Square. We had a hard time finding a hotel that would be even remotely affordable, in Manhattan, and had junior suite rooms. Suites are great when you're traveling with a toddler -- it means you can put them to bed at 8PM and then go in the other room to stay up the rest of the evening. We had a decent room-service dinner -- Caesar's, nachos, 2 Heinekens -- and crashed out. This morning I woke up to a text message from my friend Ben Cerveny. He's also in New York for a few days -- he figured out that we were both going to be here using the cool Dopplr service. I rousted up Maj and Amita June -- late sleepers, lately -- and we all went down to Greenwich Village to meet Ben at The Grey Dog. The caf had decent coffee and pretty hearty breakfasts. We stayed for about 2 hours. We ambled over to the Center for Architecture to check out a few exhibits and stretch our legs. It turned out to be a great place to bring a toddler -- not too crowded, and pretty noise-tolerant. Amita burned herself out running through the exhibits. We left Ben behind and headed back to the room for naps and computer time. I was going to try to go to the Webby event for film and video tonight, but there was some complicated signup thing I was supposed to do, and I ended up failing to do it. It's probably just as well -- Maj isn't feeling great. So we're going to just get some dinner together and call it an early evening. tags:

Certifi.ca re-certified For the last month I've had a TODO item on my list: New SSL cert for certifi.ca. Of course, I let it slide and slide -- definitely not an urgent item, right? Well, not until the cert expired last Sunday. Oops. It took me a while to get certifi.ca a new cert -- I wanted to get it with the name of the new corporation I've started to manage my OpenID sites, called Control Yourself, Inc. or, in French, Contr lez-vous, Inc.. (I'm not even sure if contr lez-vous makes any sense, actually.) The folks at Comodo had a hard time with the Quebec corporate registration and asked for a lot of extra documentation, which dragged things out a few days. On top of that, I got distracted by the move, so I haven't had much time to think about SSL certs. But I got the cert late last week, and ended up with another problem: when I replaced the old cert and "ca-bundle" files with the new ones, Apache mysteriously failed to start up -- at all. It just kerploded with no error log information. I was unable to find any documentation on why this would be the case. I spent some extra time debugging this afternoon, and came to an embarrassing conclusion. The program I used to feed a password to Apache (using SSLPassPhraseDialog) was giving it the password for the old key. Doh! Fixing that made Apache start up just fine. I wish I had a good way to attract Google searches for this, but maybe this sentence will work: If your Apache server with mod_ssl fails mysteriously right after startup, make sure that the passphrase is generated correctly. tags:

Creative Commons shrinks a bit Kudos to Creative Commons, who have retired their controversial Developing Nations and Sampling licenses. Critics have pointed out that all CC licenses allowed a basic universal right -- verbatim, non-commercial copying -- except for the Sampling and DevNations. I think the move has helped to focus CC somewhat. Although Creative Commons started as a way to explore novel methods for letting people share certain rights to their works, this move will set a baseline for what's an acceptable CC license and what's just not enough. As Lawrence Lessig says in the announcement: There is a strong movement to convince Creative Commons that our core licenses at least permit the freedom to share a work noncommercially. Creative Commons supports that movement. We will not adopt as a Creative Commons license any license that does not assure at least this minimal freedom at least not without substantial public discussion. It's a good idea, and I'm glad CC is taking this tack. I hope that those people who've criticized CC in the past for not having such a baseline will take the opportunity for a rapprochement. tags:

Funds for Standout Jobs Congrats to Montreal entrepreneurs Fred Ngo, Ben Yoskovitz, and Austin Hill. Their new high-high-end recruiting engine, Standout Jobs, just got an angel round of funding to the tune of $1.5 million. Yeah, they're only Canadian dollars (see Journal/1 Brumaire CCXV), but that means a lot more today. Fred, Ben and Austin have all done a lot to advance the local technology community. I'm glad to hear that their project is taking the first steps to success. tags:

3 June 2007

Bernd Zeimetz: hi, planet && iso8859-15 to utf8 with netatalk magic

hi, planet && iso8859-15 to utf8 with netatalk magic Hi, Planet!
Welcome to my blog, and thanks to Martin for subscribing me. I m not going to bother you with any details about me, if you have any questions feel free to ask me on freenode or oftc (in case you re wondering: my nick is bzed).


After a longer time of planning we ve upgraded our main file server at work: New machine, new storage (7TB - woohoo!), Etch instead of Sarge and UTF-8 for file names instead of ISO8859-15. Everything not a too complicated thing, except for renaming the about 10,000,000 files from ISO8859-15 to UTF-8 in a proper way.
In theory this is easy, as convmv happily takes care of the problem. But this did not work for us unfortunately, as we re not only providing NFS and Samba services, but also AFP (Apple_Filing_Protocol) via netatalk. Years ago you had to choose ISO8859-15 if you wanted to allow your Apple and Windows users to see the same, non-broken file names - not only because AFP didn t support UTF8 before version 3, which came out with OSX1). Normally you d think that a server would not allow a client to write a file with a file name which includes not supported characters - again, OSX and netatalk go their own way here:
Characters which are not supported by the underlying file system are character(!)-wise encoded using the CAP encoding. So we had to find a way to Luckily netatalk ships the uniconv(1) util2) which is able to take care of this problem. It also updates the CNID3) Database at the same time. There s two things you need to take care of in case you re using the dbd CNID backend: Be careful: uniconv assumes that all colons in a file name are part of a CAP encoded character. That s not a problem as long as you have only Mac and Windows clients accessing your server, as both systems do not allow colons in file names. In our case we found a number of cache files from Nautilus (which is running on our sunray/Solaris web-surf terminals as default browser) with colons in the file name. I hope no user will miss them ;-) Including a final synchronisation of all files to the new storage, about two hours it took uniconv to convert the file names and a aunch break, we were finished after about 14 hours of work. Until now it seems that our users didn t notice the change at all, except for those who realized that they have much more free space now. Looks like a successful weekend so far! :-D 1) and uses a NFD variant of Unicode normalization (UTF-8#Mac_OS_X), but netatalk takes care of this and translates it into the NFC form, which is used on most other platforms 2) it s called netatalk-uniconv in Debian and shipped with netatalk 3) Catalog Node ID, another crust from old Mac OS versions

1 June 2007

Cameron Dale: May-31-2007: HTTP Range Requests

I wasn't sure if some/many/all Debian mirrors responded correctly to HTTP/1.1 range requests for only part of a file, so I ran a test on them (download part of the etch Release file). These type of requests will be useful for downloading missing pieces from packages in the BitTorrent-like downloader that I'm writing. Here are the results of my test on the 221 HTTP mirrors:
Status Description Count
200 Full Data 1
206 Partial Data 208
302 Document has moved 2
404 Not Found 2
Couldn't Connect 8
Total 221
So only one mirror (debian.csie.nctu.edu.tw) was unable to support the range request and instead returned the entire file. It seems like using range requests will be fine, though I'll have to think about some kind of error checking for that one lonely mirror that's not like the others. There was also one mirror that responded with an old Release file. It seems like debian.ihug.co.nz has not been updated since etch was released.

30 May 2007

Neil Williams: gpe-expenses and forking gnucash

gpe-expenses is now stable enough for a 0.1.0 release - the NEW queue is really short so it should be in unstable soon.

In order to support the developing gpe-cash (and later gpe-invoice) application(s), the package has been split into a (small) binary and a new shared library - both licenced only under the GPL v2 or later.

The binary depends on libqof1, as before (GPL v2 or later). The new shared library contains the QofExpenses and GpeCurrency objects. QofExpenses is registered with QOF to provide data storage and queries. GpeCurrency is based on the Palm Default Currency Table. http://pilot-qof.sourceforge.net/manual/ch06.html#defaultcurrencytable. This provides a much simpler interface to standard currencies whilst retaining GnuCash data compatibility.

Splitting the objects out allows gpe-cash to share live data with gpe-expenses, reading expense data into double-entry accounts and allows gpe-cash to use sane currencies that can still be converted to GnuCash commodities. gpe-cash will itself contain one or more shared
libraries that include the double-entry financial objects, ready for gpe-invoice to collate data from gpe-contacts, gpe-calendar and gpe-expenses, create invoices (in SQLite) and post transactions to gpe-cash. Early days, I know, but that's the plan. (Invoices would be rendered in HTML/PDF/foo using scripts in the datafreedom packages.) pilot-qof already includes the basic support for generating an invoice from contact, calendar and expense data.

gpe-cash is a fork of gnucash, splitting the behemoth into small(est) functional units and dropping large sections of code - like reports which can be better managed using packages like datafreedom-perl on the desktop. datafreedom already includes example reports from
gpe-expenses. Even so, gpe-cash may well be a large application compared to other GPE packages. So far, gpe-cash comes in at just over 1Mb installed (including libqof1) but there's more Gtk+ stuff to write yet. (Compare with gnucash where the architecture-dependent part alone is >5Mb without any translations, images or other common files or the extra dependencies.) gpe-cash will have none of the dependency problems of gnucash: it just has the object definitions, libqof1, glib2.0, gtk+, gpe and sqlite. (There is an issue with GConf2 right now but I'm sure I can remove the need for that.)

http://gpe-expenses.sourceforge.net/ (CVS available via SF)

http://cashutil.sourceforge.net/gpecash.php. (SVN available via SF)

David Welton: Missing rails feature: cache everything but this

It's pretty common to have a front page that has content that is very cacheable, except for a little section with something like "signup" or "my page", depending on whether the user is logged in or not. It would be very nice to have a handy solution in rails for this problem, which seems to be a fairly common question. Here's my stab at an answer: cache everything but... However, I'm not entirely happy with it because of the very hacky approach taken to make the render_as_string work - I have to fiddle with an instance variable in the controller:
controller.instance_variable_set '@performed_render', false
Not good. In the thread linked to above, Paul Gustav posts a link about a system for having two different cached pages, but that's not entirely satisfying either, because it gets you from 1 version to 2 versions, but going beyond doesn't look real appetizing. It would be a very nice problem to solve once and for all with a clean solution.

Next.

Previous.