Search Results: "agi"

1 December 2005

Daniel Burrows: Linguistic Contortions

I thought I had seen everything when it came to ways of resolving the problem of gender-specific pronouns in English. But on the way back from Wisconsin yesterday, I read a copy of David Brin's Sundiver (otherwise an interesting story) and was proved wrong.

Usually the problems you run into with English revolve around the pronoun he: its use in a gender-ambiguous context is disputed and there are various ways of avoiding it. The word man has similar problems, although it's a lot easier to find acceptable gender-neutral replacements. But in this story, Brin actually used man in situations where the person indicated was known to be female! This leads to such eye-popping lines as:
He took her arm and introduced her to Fagin and Jacob.

Sophonts, this is Helene deSilva, Confederacy Commandant here on Mercury, and my right-hand man. ...
And if that doesn't strike you as odd, here's my personal favorite:
Occasionally a man, male or female, would lean forward and peer at some detail on a screen, ...
Ow! I had to read that sentence three times before I was sure I hadn't mistaken the words.

Clint Adams: Creep-y

I've always looked at Radiohead fans with the same sort of non-understanding that comes when Rush fans try to explain to Rush haters that what makes Rush really, really awesome is the deep insight and cleverness in the lyrics. Some small advice: never let a PhD in philosophy do any songwriting. I don't hate Radiohead. I just don't understand why anyone would like them. It was my understanding that there were about as many Radiohead fans as, say, fans of Mudhoney. Imagine my shock and confusion when I discovered that there seem to be quite a few more people on Last.fm listening to Radiohead. Fine, I thought. Everybody's got a copy of Creep sitting around that they listen to every once in awhile for reasons of nostalgia. That does not appear to be the case. There is a group called Extensive Musical Taste . Note that their top artist is Radiohead. There is a group called People with inconsistent musical taste - who yet prove a certain indy-attitude . I don't know what that means, but their top artist is Radiohead. There is a group called Die Hipster Die . Radiohead is tied for number one. Someone else has noticed this particular trend, and has created a group called Radioheads_Not_Our_Top_Artist . Bless these people for not having Radiohead as their top artist. Radiohead is their #2 artist. Whee! Last week the DD group had Radiohead at the top. I have no idea why it fell so far after that. Maybe it's a scrobbler fuckup. I could stop singling out Radiohead, and broaden this to the other bands hovering at the top of nearly every group chart: The Beatles, Death Cab for Cutie, Pink Floyd, and so on. Oddly, this thing isn't very popular. Sure, you may be thinking. Radiohead sucks, but what's the problem? . The problem has to do with the effects of globalization on world cultures. In Jihad vs. McWorld it says that okay, well, I don't know what it says because I've never read it. Nevertheless, Benjamin Barber claims that Democracy is the solution to the evils of both globalism and tribalism. This is a fantastic idea if you happen to be in denial that Democracy is just a perverse form of tribalism. So guzzle down your McDonald's, listen to your Radiohead, wash it all down with some Coca-Cola that you bought at Wal-Mart, put on your Old Navy sweatshirt and head over to Starbucks to drink a frapmooccino while you obsess about American politics even though you live in an obviously-superior country, then go home and watch Friends . That's easier than being someone with musical taste. P.S., Radiohead being on South Park is no excuse. P.P.S., Buttercup is not a Radiohead fan.

David Pashley: Return of Accessors vs. public member variables

Steinar, Imagine a Word class:
class WordA  
   public:
      char * word;
 ;
class WordB  
   private:
      char * word;
   public:
      void setWord(char * w)   word = w;  
      char * getWord()   return word;  
 ;
WordA worda; 
worda.word = "WordA";
WordB wordb;
wordb.setWord("WordB");
printf("%s %s", worda.word, wordb.getWord());
Fine, this works well. Now imagine that you want to change word from a char * to a std::string to stop you dealing with pointers. For the WordBclass you only need to change the getWord function. You don't need to change any of your class's users. For the WordA class, you have a problem because you can't automatically convert from a std::string to a char *, so all your users have to change from object.word to object.word.c_str().
class WordA  
   public:
      std::string word;
 ;
class WordB  
   private:
      std::string word;
   public:
      void setWord(char * w)   word = w;  
      char * getWord()   return word.c_str();  
 ;
WordA worda; 
worda.word = "WordA";
WordB wordb;
wordb.setWord("WordB");
printf("%s %s", worda.word.c_str(), wordb.getWord());
This is the punishment you get for exposing the internal details of your class to your users. Please ignore any specific mistakes in my examples; the principles work the same with different types.

Clint Adams: Comunicaci n

Yo te hablo de poes a
y vos me pregunt s
a qu  hora comemos.
Lo peor es que
yo tambi n tengo hambre.
The following is dedicated to Og Maciel, whose life apparently would be empty and meaningless without it.
There was a couple
Not an underwater couple that controlled the sea
But a couple of people on land
Who courted one another with the magic of haiku
They sent haiku across the country
Every day
Until the philotes
Brought them together physically
Then the Great State of California
Pronounced them legally wed
Because it either didn't know
Or didn't care
That poetry is supposed to rhyme.

Matthew Palmer: A trace mixin for Python

Although I am by means an expert Python programmer, I do dabble -- at the moment, I'm dabbling fairly heavily in a project for work. I had need, as you do on occasion, for a call trace (I called this method, it returned X, I then called this other method, it returned Y, and so on). Astoundingly, I got no answer when I asked on #python, as I would have expected this sort of thing to be a gimme -- even possibly including it as a core language feature. But nary an answer was forthcoming. Searches for mixins or magic function calls which might solve my problem were similarly fruitless. I resigned myself to manually sticking print wrappers around the function calls of interest, but that got old real fast (especially after I spent about a half-hour chasing my tail because I'd forgotten to return the return value after I printed it). As usual, my subconscious saved the day. On the train home this afternoon, I suddenly had a brainwave, and the code which I've reproduced below appeared almost fully-formed at my fingertips. It's times like this that I really enjoy programming. Now, of course, someone will pop up and say "oh here it is over here", or "you just set the __trace_me_baby__ attribute on your object", but I can console myself with the fact that I know a lot more about grubby Python internals than I did before. The code: (a pre-saved version is also available).
# tracemixin.py
#
# A python mixin to trace the calling of methods.
#
# Copyright (C) 2005 Matthew Palmer 
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#   or see http://www.gnu.org/licenses/gpl.html
#   
"""
A mixin class to permit the tracing of method calls on an object.
This class, when mixed in, overrides the default operation of method calls
so that requests to call methods which have been listed in the
self._traced_methods list will be printed with their arguments and return
values.  Also included is a simple call depth indication, using indents.
Tracing of particular methods can be turned on and off on a per-object basis
by simply including or removing the method's name in the _traced_methods
list on the particular object.  Whole classes can be traced by setting
the list as a class attribute.
To include this class, simply make it the first class name in the list of
parent classes when defining a new class, like so:
class Something(TraceMixin, RealParentClass):
You could probably leave the TraceMixin in your production code, although
it'll slow execution down by a bit.
Complete usage example:
from tracemixin import TraceMixin
class RandomTask(TraceMixin):
	def x(self):
		print "X!"
	
	def y(self, arg):
		print "%s Y!" % arg
		self.x()
x = RandomTask()
x.x()
x._traced_methods = ['x', 'y']
x.y('why?')
Output:
X!
::y(why?)
why? Y!
  ::x()
X!
  =>None
=>None
"""
class TraceMixin(object):
	_traced_methods = []
	_depth = 0
	def __getattribute__(self, attr):
		if attr in object.__getattribute__(self, '_traced_methods'):
			self.method = attr
			attr = '_trace_proxy'
		return object.__getattribute__(self, attr)
	
	def _trace_proxy(self, *args):
		realmethod = object.__getattribute__(self, self.method)
		if realmethod and realmethod.__class__ == self._trace_proxy.__class__:
			print "%s::%s(%s)" % (self._depth*'  ', self.method, ', '.join(args))
			self._depth += 1
			rv = realmethod(*args)
			self._depth -= 1
			print "%s=>%s" % (self._depth*'  ', rv)
			return rv
		else:
			raise AttributeError

Clint Adams: Comunicaci n

Yo te hablo de poes a
y vos me pregunt s
a qu  hora comemos.
Lo peor es que
yo tambi n tengo hambre.
The following is dedicated to Og Maciel, whose life apparently would be empty and meaningless without it.
There was a couple
Not an underwater couple that controlled the sea
But a couple of people on land
Who courted one another with the magic of haiku
They sent haiku across the country
Every day
Until the philotes
Brought them together physically
Then the Great State of California
Pronounced them legally wed
Because it either didn't know
Or didn't care
That poetry is supposed to rhyme.

30 November 2005

Arnaud Vandyck: What about Classpath 1.1?

Yes, we already talked about it sometimes: what is the compatibility target of GNU Classpath with the official Sun’s Java classes library? Everybody skipped JDK1.0. About JDK1.1, there are two objections: the first is who does still use JDK1.1?; the second is with all those progresses in Swing, XML and all the API’s that are not in JDK1.1, it’d be a strange idea to remove all these API’s from Classpath! Imagine the work of all the hackers involved. I can understand the two points and I even agree with them. But we have at the time I write this entry Classpath is 99.78% compatible with the JDK1.1 API! OK, you can say that Classpath is 97.61%, but there is still some non trivial work to be done in packages javax.swing.text, javax.swing.text.html, and maybe in some other packages. The point of this blog entry is: Couldn’t someone ask Sun for passing the TCK1.1 with Classpath? The someone could be Debian (of course, I have to ask other developers, the DPL and maybe the SPI) if the license of the TCK is acceptable and if it’s not too expansive. But well… it’s for TCK1.1!.. It shouldn’t be so expansive ;-) I’m sure the results of the TCK, even if it’s the 1.1 could help GNU Classpath developers to make the code more compatible with the Sun’s one, and that’s what we want!

29 November 2005

John Goerzen: NiMH Rechargable Batteries and Charger Review

I've been using NiMH batteries for quite a few years now. Ever since my first-ever digital camera came with a free AA charger and four free rechargable NiMH batteries. I'm still using that charger, and it's been almost 10 years. I have a few complaints about my existing charger. It won't charge AAA batteries, and it doesn't have a discharge feature. Without that, it can be difficult to avoid shortening battery life due to the memory effect which even NiMH batteries are susceptible to. Also, it charges batteries in pairs, which can result in various charging problems when dealing with batteries of uneven charge or uneven storage characteristics. Also, many of my batteries were old. So, I set out to find a better charger, and to find the best current NiMH batteries. The Charger A little Googling revealed a very useful page at Steve's Digicams. They suggested the Lacrosse BC-900 Advanced Charger. I ordered this unit from Thomas Distributing and must say it is a very slick unit. It has four main modes: charge, which does a simple charge-until-full; discharge, which will discharge then charge a battery; refresh, which discharges then charges the battery repeatedly until no increase in capacity is measured; and test, which checks the condition of the battery. The charging and discharging current is fully configurable. I opt for a gentle, slow 200 mA charging current. But others can increase it to many times that. The BC-900 has a built-in temperature cutoff circuit, so it will pause charging if your batteries are about to overheat. The BC-900 can charge up to 4 AA or AAA batteries simultaneously. Each battery is charged individually, and each battery can have its own mode and charging/discharging current set. The unit comes with some starter NiMH AA and AAA batteries, plus a carrying case for batteries and the charger. Thomas Distributing also added four more free AA NiMH batteries (nice). Batteries I found the Great Battery Shootout site to help with choosing batteries. I eventually chose Maha Powerex batteries and have been happy with them as well. They come in various different capacities (including some larger than are listed on the shootout page) and Thomas Distributing had good prices. Hope this helps if you're planning on using rechargable batteries.

Andres Salomon: stop screwing w/ my ATM card!

I received a new Debit/ATM card in the mail the other day. I didn’t think anything of it, until I looked at my old card; it wasn’t due to expire for another 2 years. Ok, that’s odd. I looked closely at the new card, and it said “PayPass” on it. I looked closer at the packaging that arrived with it, and discovered what this PayPass thing was. “…Debit MasterCard Card with PayPass has built-in chip and antenna technology, as well as a standard magnetic stripe. The card and specially-equipped PayPass terminals communicate payment card details using very short range radio waves.” At this point (and at the risk of being compared w/ RMS), I started to feel uneasy. So this new card has an RFID chip? That means I don’t actually need to swipe it, I can “pay” by just being in range of a reader? Wait a minute, this is a Debit card; that means I’m not afforded the protections that a normal credit card offers. If someone manages to swipe $200 from me simply by walking close to me, that comes right out of my bank account; I can’t just do a chargeback. That’s money that gets stuck in limbo while I argue w/ the bank about my lost funds. As a matter of fact, I don’t even *need* a Debit card; all I really use this for is an ATM card, I have credit cards for actually paying for things. Some googling turned up the actual range:
“The PayPass card’s embedded tag operates at 13.56 MHz and has a short read range of 2 to 3 centimeters.”
So, it looks like someone would have to be very close to read it, but it certainly seems to be a real possibility. Grr. I doubt there’s any way to turn this off. This is actually kind of scary. I had planned to cancel this bank account soon anyways, but this is simply more motivation to do so. Hopefully my new bank doesn’t consider this a good idea.

28 November 2005

Radu Spineanu: Shoot the movie industry

A couple of years ago i watched a really interesting movie. It was apparently about nothing, but in fact it was rather deep, and not a cliche. The story of two persons, stuck in an unfamiliar place who found each other and started spending time together in this pretty magic place. The action was placed in Tokyo, and the whole idea was based around it's beatiful scenery. The movie is called 'Lost in Translation'.
'.

I really enjoyed the movie, and most of all the two actors. One of them was Bill Murray, and the other one Scarlet Johansson. Scarlet Johansson, even though she was only 18 (i think) when she shot the movie, portreyed a young woman left alone in this unknown universe, who tries to find herself (sounds cheesy, but it's not).

And then came this day, when i had some free time and dediced to see 'The Island'. I have never wanted to kill myself more. Basically ObiWan finds out he's a clone, escapes from the military bunker while in the proccess taking his cloned girlfriend with him, and then frees all the other clones. Also in the movie you can find out that MSN will rule the world, Cisco the telephony, and Puma the shoes industry.

Now about Obiwan's girlfriend who is interpreted by miss Johansson. She is the regular stupid innocent blonde (too many adjectives?), who everyone wants to have sex with. Her role in the movie is probably to look good and have a sex scene with Obi. I mean what the hell ?

The movie thing is probably nothing new under the sun, and i accept the quality of today's movies. I think it was just sad to see somebody i really liked, and thought maybe i would enjoy nice movies with, become another random actor.

Bleah...

26 November 2005

Anthony Towns: Queue Building

The biggest difference between the hypothetical security queues and the existing byhand and new queues is that they need to be autobuilt; it’s not really feasible to try saying whether a security update is acceptable if there’s still some possibility it’s not going to build on half our architectures. Additionally, it means that there are two queues that need to be built, rather than just one. The way accepted autobuilding works isn’t too complicated, fortunately. There’s a directory where symlinks are made to uploaded packages and sources, and a Packages files (for all architectures) is generated, as is a Sources file, all of which are made available to buildds. They’re also added to the regular unstable Packages and Sources files and passed to quinn-diff and wanna-build. In order to avoid unnecessary breakage at transitional points (such as when a package moves from accepted to unstable proper), packages are kept in the accepted autobuild directory for a day or so afterwards. There’s also the issue of including the .orig.tar.gz from the archive along with the .dsc and .diff.gz from accepted for uploads that aren’t new upstream versions. Security accepted autobuilding adds two extra wrinkles. The first is that packages being autobuilt can’t be generally visible to other users on the security host, which includes the web server that’s supposed to get the packages to the security buildds. So instead of symlinking, copies have to be made, and care has to be taken to ensure that doesn’t accidently leak information in the process. The second trick is that security needs autobuilding of multiple suites (oldstable and stable, and hopefully testing as well), whereas for the regular archive, it’s sufficient to autobuild unstable packages from accepted, and leave the rest until the daily pulse run. This particularly means that uploads from accepted need to be moved into separate directories depending on the target suite, so that the buildds don’t accidently build a package for woody against the libc from sarge. At a gross level, generalising to supporting autobuilding of multiple queues is therefore straightforward: extend the “accepted_autobuild” table to include information of what queue the files are from (which implies a name change is appropriate), extend the configuration file to allow you to specify which queues should get autobuild handling for which suites, and finally add the code to actually do this when packages are moved into and out of the appropriate queues. Hurray for simplicity! But there’s one little bit of complexity still to bother us. We know we need different directories and Packages files for different suites, but do we need it for different queues as well? Worse, we need different chroots on each autobuilder for each suite, do we need different chroots for each suite for each queue? The latter could well be a complete showstopper. One reason why we might need to treat the queues we’re considering separately is that they have different secrecy requirements: embaroged updates can’t be visible to anyone, even people working on the unembargoed security updates in parallel, and yet the buildd has to forward its logs on to someone to be signed. If embargoed and unembargoed packages are built in the same chroot, by the same buildd, from the same queue, how do the logs magically go to the right person? That’s not necessarily easily answered; currently the hope is that it’ll be okay to have a single shared queue and set of buildds and chroots, and have all the logs forwarded to a single address, at which point they can be redirected to the appropriate security team members by procmail. The assumption this is based on is that there’ll already need to be some magic to do that for the builds themselves once they’re uploaded and need to be moved into either the embargoed or unembargoed queue, so the same thing should be possible with the build logs. Pending further surprises though, that’s enough to move onto the next phases, which is generalising dak to cope with arbitrary queues.

Anthony Towns: The NIv2 Plot

So having found time to catch up satisfactorily on the implementation, time to get back into the blogging. After working out what you actually want to do, the next step in implementing stuff, in my book, is to make sure you fully understand the context of the stuff you’re trying to change. In this case, the “unapproved” queue concept comes from some thoughts from quite a while ago that come under the heading “NIv2” for “new incoming v2”. For reference, the original “new incoming” was the switch to separate queues for new, byhand, and accepted packages, which was followed by a notable update shortly after to make accepted autobuilding possible. That setup works, but has a few problems. One is that packages sit in accepted for quite a while (up to a full 24h), and occassionally in that time it can become inappropriate to actually add the package to the archive – for instance if it’s a build of a package that’s then removed from the archive. This results in an UNACCEPT, and requires manual intervention, since potentially it can result in weird inconsistencies, such as bug closures. Another is that files in the various queues aren’t tracked in the database, which can result in files (particularly upstream tarballs) being lost or left behind, and also requires some unpleasant special casing in the code. A final concern is that one of the bigger time sinks in the daily pulse is the apt-ftparchive scan, which is actually just doing work that’s already been done in order to allow packages in accepted to be autobuilt. Put all those concerns together with the ones mentioned last week, and you get the impetus for NIv2. The principle of that is to put stuff in the queue into the database properly, simplify it, extend the queuing support to deal with different queues, and move stuff from accepted directly into the pool every quarter hour, though only pushing to buildds that frequently, leaving updates of Packages files and mirror pushes to still be daily, or every few hours or whatever. This is what that bit looked like in the dak TODO:
[hard, long term] unchecked -> accepted should go into the db, not a suite, but similar. this would allow katie to get even faster, make madison more useful, decomplexify specialacceptedautobuild and generally be more sane. may even be helpful to have e.g. new in the DB, so that we avoid corner cases like the .orig.tar.gz disappearing ‘cos the package has been entirely removed but was still on stayofexecution when it entered new.
Obviously, it needed to get defined a little more clearly than that to work out how much the changes for the security queues I’m interested in depend on the other changes, and what they actually mean in detail. After some IRC discussion we came up with more or less the following summary of what NIv2 actually means:
How NIv2 should work. q/accepted goes away; once packages are accepted, they get added straight into the pool and the database. At this point they’re added to a micro-suite for the buildds, and so apt-ftparchive can cache the package contents; and a symlink tree is made up so incoming.d.o works. The micro-suite might or mightn’t be a fully fledged suite in the database. Presumably it wouldn’t be visible in dists/ though. The micro-suite probably should contain packages uploaded to unstable for X hours, where X is 48 or 2x pulse-interval or similar. This means UNACCEPT is impossible and apt-ftparchive takes less time in cron.daily. q/byhand and q/new get new friends: q/sec-embargoed, q/sec-unembargoed, q/stable-updates. Rather than checking for “byhand” entries, or a lack of overrides; uploads get diverted to those queues if they’re uploaded to security or stable, and get moved out of there when a security team member or stable RM (ie, Joey) runs an amber/lisa-esque command. This means sec-embargoed and sec-unembargoed need to be autobuilt. This also means that proposed-updates can be a full suite, and point releases can be a matter of (a) adding proposed-updates to stable; (b) removing old versions from stable; (c) removing packages that have to be dropped; and users can put “stable + proposed-updates” in their sources.list reasonably sanely. This also means that REJECTs from accepted (security) or the archive (p-u) aren’t needed. It means the queue ends up looking like:
    unchecked      [uploads go here, insecure]
    holding        [secured]
    new            [waiting NEW processing]
    byhand         [waiting byhand processing]
    stable-updates [waiting stable RM approval]
    done           [.changes files for accepted packages]
    reject         [.changes, .reason and rejected stuff]
    bts_version_track [data for BTS]
with q/accepted disappearing and q/proposed-updates and q/old-proposed-updates being replaced by the stable-updates / oldstable-updates queues.
One of the nice parts about this is that it breaks down fairly neatly into three sets of changes: supporting additional queues, removing the accepted queue, and tracking queue stuff in the database. It does make those changes more or less dependent though – the new queues need to be autobuilt in the way accepted is at present; so it makes sense to add the queues before removing accepted so as not to lose the queue autobuild support. The above actually can be simplified a little further – instead of managing a microsuite for changes since the last update, it’s possible to add accepted packages directly to the real suite; and generate the Packages files needed for autobuilding by querying packages accepted to unstable in the last 24 or 48 hours, simply by adding a field to track upload time for binaries as well as sources. In any event, this thus makes generalising the queue autobuild support the next challenge.

25 November 2005

Simon Law: Montr al geeks


Casa Magica
Originally uploaded by sfllaw.
There's this artists collective on St-Laurent, across from La Sala Rossa. They call their place Casa Magica, and it's really quite groovy. They've got this cozy living area with an open plan. The kitchen is separated from the living room with a tiled countertop someone built themselves. It's decorated in that way with splashes of paint, splashes of light, and furnishings that look like they grew there. I showed up at this place to meet some people in the Free Software world. I've been in Montr al for about a year and I still don't know very many hackers in the city. So when I got invited to Les 24h SQIL, I decided to show up and meet some people. I went up St-Laurent to a non-descript red door with a poster about SQIL on it. "This must be the place," I thought as I tried the door. Upstairs, I was greeted by a living room full of random people: some sitting in front of computers, some chatting away, and one guy fiddling with a projector. I wandered around in a state of confusion until I was introduced to Robin. Robin Millette seems to do a lot of work for FACIL, which is an organisation for promoting free content in Quebec. He introduced me to a bunch of people, like Simon Raven whom I helped with finger-ldap. I met Fran ois from Quebec City, who was interested in Nitix. There was Nicolas who is a Java developer that writes web-based applications. And other people like Alex, Yan, Marco and Matthieu who seemed nice but I can no longer remember what they do. I returned later in the week to Robin's birthday party where I happened to meet Fabien, who is a consultant that does work on Firefox and Yannick who's a Ph.D. student at McGill. We had a good time talking about quantum computing and how to design a programming language for quantum computers. Good geeky times were had.

24 November 2005

Jonathan McDowell: Network installing FreeBSD

So, Black Cat Networks have a bunch of nice dedicated servers and I've been working on various network installs for them. Debian was of course easy; there's a nice netboot.tar.gz that has everything you need (including configs for serial consoles). Fedora Core was a bit harder; there's mention about network boots and installs, but not a lot of docs. A pxelinux entry like:
label fedora
	kernel fc4/vmlinuz
	append initrd=fc4/initrd.img ramdisk_size=8192 console=ttyS0,9600n8 serial
does the right thing, with vmlinuz and initrd.img coming from http://download.fedora.redhat.com/pub/fedora/linux/core/4/i386/os/images/pxeboot/. Fedora's a bit annoying in that it doesn't offer you a selection of mirrors to network install from though, so you need to have worked that out for the install. FreeBSD however, was much harder. Firstly, there aren't any decent docs about it that I could find. Secondly, it really wants to use NFS, even though TFTP will be required anyway for the PXE boot stage. So, I ended up recompiling the pxeboot loader with LOADER_TFTP_SUPPORT enabled and LOADER_NFS_SUPPORT removed (though it still tries to do NFS mounts it seems). Of course, you can't do this under Linux easily. Nor can you do it on FreeBSD 4.10 it seems (I was recompiling the FreeBSD 6 loader). However you can on FreeBSD 5.4. You need the lib and sys source trees to do so. Or you can have my prebuilt copy, freebsd.0. pxelinux config looks like:
label freebsd
	kernel boot/freebsd.0
assuming you put it in a boot subdirectory under your tftpboot root dir. You then need http://ftp.uk.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/6.0/6.0-RELEASE-i386-bootonly.iso to get the rest of the /boot contents from. Burn it to CD or loopback mount it or work whatever magic does the trick for you to get access to the files in that image. Then copy all of /boot on it to boot in your tftproot. You don't actually need boot*, cdboot, loader or pxeboot, but they're all small files. Then, add the following to loader.conf:
boot_serial="YES"
console="comconsole"
kernel_options="-h"
vfs.root.mountfrom="ufs:/dev/md0c"
So, now you can type "freebsd" at your pxelinux boot prompt and it'll boot up the installer. Rock. I don't quite understand why I had to include the kernel_options line above - I thought setting boot_serial would do that for me. However, it works. With the only real pain being having to recompile pxeboot and the lack of docs. Which I've now sorted for you. ;)

23 November 2005

Antti-Juhani Kaijanaho: Nostalgia

Date: Mon, 17 Apr 2000 03:07:13 +0300
From: Antti-Juhani Kaijanaho <gaia@iki.fi>
To: "Debian developers' misc list" <debian-devel@lists.debian.org>
Subject: RFC/ITP: Constitution of Finland

On IRC I proposed packaging the Constitution of Finland.  Among other
things, it would be an example of a good Constitution :-)  The response
on IRC was positive; what do people think here?

Since Finnish laws are specifically not protected by copyright (see
Finnish copyright law), the law is free and can go to main.  There is
an English translation at http://www.om.fi/perustuslaki/3313.htm.
I am researching its copyright status.

Assuming people are okay with this, and the copyright issues around the
English translation are resolved, I will package Constitution of Finland
to woody.

-- 
%%% Antti-Juhani Kaijanaho % gaia@iki.fi % http://www.iki.fi/gaia/ %%%

                    I'm moving IRL on May 2, 2000.
               New contact information on the home page
Do you remember this infamous thread? :) For some reason, it has almost completely been censored off the Debian mailing list archives. I digged my own archive and put the thread online in a mailbox. Have fun with nostalgia and AJK-bashing :) Maybe this will help to reestablish the thread in the archives; who knows?

Antti-Juhani Kaijanaho: Diploma

QVOD DEVS OPTIME VERTAT
EX LEGIBVS VNIVERSITAS JYV SKYL ENSIS ATQVE EX DECRETO
AMPLISSIMAE INFORMATICARVM IN EA VNIVERSITATE FACVLTATIS
ABSOLVTO OMNI SPECIMINE LEGITIMO PHILOSOPHIAE MAGISTER CREATVR OMNIBVSQVE HVIVS DIGNITATIS IVRIBVS PRIVILEGIISQVE ORNATVR
IN VBRE JYV SKYL A. D.
XI KALENDAS IVNIAS ANNO MMIV
VIR PRAECLARISSIMVS ANTTI-JUHANI KAIJANAHO PHILOSOPHIAE CANDIDATVS
QVOD FACTVM
NOMINE MEO SVBSCRIPTO ET SIGILLO VNIVERSITATIS ADFIXO
EGO CONFIRMO
LEGITIME CONSTITVTVS PROMOTOR JAAKKO LEHTONEN
This is what I got today in mail. I had participated in absentia in the University's promotion, which happens every four or five years or so. The above is the text of my new diploma. I am now really philosophiae magister.

22 November 2005

Wouter Verhelst: Wanted: an NBD dissector for Ethereal

I could probably write it myself, given time, but I'm guessing it's going to cost me a lot more time understanding the Ethereal API than it is going to cost someone else undestanding the NBD protocol. Which is really simple. So, here's a short description of the protocol; now if someone could write me an Ethereal dissector, I'd be very happy. And if you need it, just ask for more information.
"Negotiation" phase:
  • Connection is opened by the client
  • The server sends out the literal string NBDMAGIC to the client (which is the "INIT_PASSWD" in the code and in error messages), followed by the the 'cliserv_magic', 0x00420281861253LL. The NBDMAGIC is there to identify a server; the cliserv_magic may be updated when the protocol changes incompatibly.
  • The server sends the size of the device as a 64 bit unsigned integer.
  • The server sends 128 bytes of zeroes (discarded by the client currently; these are reserved for further use)
(whether or not the above are all in one packet is something I don't know and don't really care about; they're all done using different write calls, so can technically be in different packets)
After that, the client is expected to be happy with the connection (if it isn't, it'll just drop the connection without explanation).
Main data pushing phase:
(I just made that name up, give it a reasonable name please ;-)
  • Clients sends a struct nbd_request to the server (which is defined in <linux/nbd.h>. The fields in that struct are:
    magic (32bit unsigned int)
    must be NBD_REQUEST_MAGIC aka 0x25609513 (again defined in <linux/nbd.h>); if it isn't, the server disconnects (this should really be handled better, but at the moment it isn't; and changing the protocol to do this might be less than trivial). It is possible that previous versions of the protocol used 0x12560953 instead (the header file mentions that as something not to be used, but I don't know where it comes from).
    type (32 bit unsigned int)
    is NBD_CMD_READ aka 0 (to read data), NBD_CMD_WRITE (to write data) aka 1, or NBD_CMD_DISC aka 2 (to request a clean disconnect).
    handle (char array of eight bytes)
    used to uniquely identify a request; this is later sent back in the reply, and can be used to associate a reply with a request.
    from (64 bit unsigned int)
    the offset in the export where the read or the write should start.
    len (32 bit unsigned int)
    the length of the requested read or write.
  • If struct nbd_request.type==NBD_CMD_WRITE, the client will then send struct nbd_request.len bytes to the server, containing the data it wants to see written.
  • Server sends a struct nbd_reply to the client:
    magic (32 bit unsigned int)
    functions similar to struct nbd_request.magic, only its value is supposed to be 0x67446698. Analoguous to struct nbd_request.magic, there's a value, possibly from a previous version of the protocol, which says 0x96744668 instead.
    error (32 bit unsigned integer)
    is zero, unless an error occurred
    handle (char array of eight bytes)
    the exact same value that was received in struct nbd_request.handle
  • If struct nbd_request.type==NBD_CMD_READ, the server will then send struct nbd_request.len bytes to the client, containing the data it read.
As you can see, a very simple protocol really... now if only somebody could write me a dissector—having to dissect it by hand isn't very funny, really.

Steve Kemp: The Chronicles of Steve

Apathy
I’m sleeping a lot more than I should be which is making me pretty apathetic at the moment. Even checking email is a real effort. Let alone replying.
Last Post
As previously mentioned I’m utterly unfranchised with WordPress. This will be my last post using it. All future updates will be made using Chronicle, a simple Perl-based application I’ve been working on for a while. (The best part is the name!) So far I’ve got code to : TODO:
  • Import old comments.
  • Add code to handle displaying/editting/deleting comments.
  • Add some mod_rewrite magic so that all my old links still work.
The application is pretty nice, comprised of several perl modules and built using the CGI::Application base-class. I realise this contradicts the apathetic stanza above …

21 November 2005

Erich Schubert: Are social network services worth a dime?

Social network services (Wikipedia) such as Friendster, Linkedin, OpenBC are one of the top "web 2.0" hypes. I'm very sceptical about them, because I don't see the real benefits for me. (I'm referring to the pure "keep contact with your schoolmates" thing, not stuff which does much more such as serious blogging - e.g. livejournal - or planets such as planet.debian) The typical use case I've heard is much like "Imagine you have made a cool product, and want to sell it to some company. Now you can search for people at that company you know (or a friend of yours knows) and call them, this will help you get a feet in the door", as well as "you can use it for finding a job". I think that's bullshit, and to a large extend because I'd neither be willing to update my information in these services all the time, nor would I be willing to help just everybody here - most likely I'd just delete and ignore the email, and be really annoyed by a call (I'm annoyed by calls anyway)... It's not that I despise social networking per se. But I despise quantity instead of quality. I care a lot for my friends, and I'm in several groups grown around some technical issues; when someone is looking for a job I pay attention for suiteable offers around me; if someone needs something else I do try to help. But I'll only do that for people I'd really call friends. If you just want a quantitative number, last I checked my ranking was #36 in the global PGP keyring, meaning I have the 36th shortest average distance worldwide to verify a cryptographical key. So what? Of course I also tried one of the social networing services given above, joined a group for a university I was at. Even before the adminstrator of that group added me, I got an "invitation" by one "linkaholic". I rejected it, and even considered to report it as "spam" to the operator. I did indeed know that person, but all we had was a flamewar on a mailinglist, and I found him highly unsympatic. So why should I add him to my network? Where are the benefits for me (except that I'll maybe get an annoying call sometime in the future, when I could have forgotten about him)? No, in my opinion this social networking hype is built entirely on a hype, basically saying "look how well-connected I am, everybody knows me, and I know everybody", even when these relationships are only present on the computer, without anything worth being called a "relationship" behind. The flame-war I mentioned earlier was btw. on the topic of Resume/CV books. Which are even worse than this social networking thing, IMHO.

20 November 2005

Matthew Palmer: My First Time Mining Ruby

I'm not usually a grand fan of the latest and greatest fads'' in programming. The only C# I know is the black key next to D#, and I loathe coffee. An IDE in the hands of a poor programmer will still result in crap code. While I do think that agile methods (such as XP) can do well in certain development environments, I certainly don't subscribe to the notion that XP can solve all the world's software production ills. And so on. I do know quite a number of programming languages, and tend to pick up new ones out of intellectual curiousity (although Ada did put a severe dent in that habit) or because a bit of research tells me that the language might be particularly suitable for a particular task (although I've since learned that the actual purpose of PHP isn't dynamic websites so much as bringing the security levels of Linux boxes in line with Windows-led industry standards). I also learn languages because I want to hack on projects written in them, which is motivational, but not a particularly good way to get a deep understanding of a language. Why all of this introspection in a blog? So you have the background to understand how everything about Ruby is different for me, including how I'm getting started using it. I have no interest in hacking on a Ruby-implemented project, and -- although Rails proponents give me an impression similar to that of a horny teenager with a shiny new unlimited broadband account -- I don't have any particular use for Ruby at the moment (I want to write less webapps, FFS, not more!). So, why the hell did I fork out $90 hard-earned South Pacific pesos for a copy of "Programming Ruby: The Pragmatic Programmers' Guide"? A couple of reasons: I'm glad I got "Programming Ruby". The book is superbly organised, reads very easily, and gives you all of the love as and when you need it. Surprisingly for me and a technical book, I read the first section of the book "cover to cover". By the end of it, I came away with a real (if naturally superficial) understanding of the language, and a feeling that I was ready to tackle the world in Ruby. It is a sad state of affairs when the first piece of new programming you can sink your teeth into is some four days after finishing your initial studies into a language, but this afternoon I wrote my first Ruby program in anger. It's quite simple -- just take stdin and rewrite it all on stdout with the lines in a random order. But I wrote it in a new programming language, in about 3 minutes, with nothing more than ri (Ruby's answer to firing up python and typing help(xyzzy), more or less) and "Programming Ruby". I think I also produced a suitably reasonable result:
#!/usr/bin/env ruby
lines = []
while line = gets() do
	lines << line
end
	
while ! lines.empty? do
	idx = rand(lines.length)
	puts lines[idx]
	lines.delete_at(idx)
end
(Any Ruby afficionados out there, feel free to e-mail me and tell me what egregious sins I've committed). I think it looks reasonably neat and clean, it's certainly simple, and the use of real Object Orientation makes for a certain readability (I think the method call lines.empty? is particularly cute, although I did initially consider the use of a question mark in a method name to be a crime against humanity). So, will I be using Ruby more in the future? I think so. There are some features in Ruby which I'm hoping to get a lot more cosy with -- the idea of "blocks" looks particularly interesting, and I don't think the utility of languages that have been designed, top-to-bottom, to really live the OO ideal has been explored enough (you SmallTalk bigots can stop glaring at me now -- really, I mean it -- stop it!). It's far too early to tell whether Ruby will become my "go to" language for random development tasks, but anything that stops the nightmares (where I start thinking about using PHP as a general scripting language) cannot be all bad. And, if I continue to make new webapps, Rails will probably come in handy. Update: HTML <pre> tags don't like having < inside them unescaped. Also, Philipp Kern pointed out that the Ruby documentation browser is called ri (not ir as I originally wrote). Philipp was also kind enough to provide a much shorter version of my original script, which shows the power of Ruby so much better:
 lines = []
 STDIN.each_line    line  lines << line  
 lines.sort_by   rand  .each    line  puts line  
Now tell me that isn't a language worth using!

Next.

Previous.