Search Results: "tar"

25 January 2009

John Goerzen: Review: The Economist

A few months ago, I asked for suggestions for magazines to subscribe to. I got a lot of helpful suggestions, and subscribed to three: The New Yorker, The Atlantic, and The Economist. Today, I m reviewing the only one of the three that I m disappointed in, and it s The Economist. This comes as something of a surprise, because so many people (with the exception of Bryan O Sullivan) recommended it. Let s start with a quote from the issue that found its way to my mailbox this week:
A crowd of 2m or more is making its way to Washington, DC, to witness the inauguration of Mr Obama. Billions more will watch it on television. [link]
Every issue, I see this sort of thing all over. An estimate, or an opinion, presented as unquestioned fact, sometimes pretty clearly wrong or misleading. For weeks before Jan. 20, and even the day before, the widely-reported word from officials was that they had no idea what to expect, but if they had to guess, they d say that attendance would be between 1-2 million. In the end, the best estimates have placed attendance at 1.8 million. Would it have killed them to state that most estimates were more conservative, and to cite the source of their particular estimate? That s all I want, really, when they do things like this. I knew going into it that the magazine (to American eyes) essentially editorializes throughout, and I don t have a problem with that. But it engages in over-generalization far too often and that s just when I catch it. This was just a quick example from the first article I read in this issue; it s more blatant other places, but quite honestly I m too lazy to go look some more examples up at this hour. I do remember, though, them referring to members of Obama s cabinet as if they were certain to be, back before Obama had even announced their pick, let alone their confirmation hearings happening. One of my first issues of The Economist had a lengthy section on the global automobile market. I learned a lot about how western companies broke into markets in Asia and South America. Or at least I think I did. I don t know enough about that subject to catch them if they are over-generalizing again. The end result is that I read each issue with a mix of fascination and distrust; the topics are interesting, but I can never really tell if I m being given an accurate story. It often feels like the inside scoop, but then when I have some bit of knowledge of what the scoop is, it s often a much murkier shade of gray than The Economist s ever-confident prose lets on. Don t get me wrong; there are things about the Economist I like. But not as much as with the New Yorker or the Atlantic, so I ll let my subscription lapse after 6 months but keep reading it until then.

Chris Lamb: Matching IPs with regexes conCIDRd harmful

Some rather unfriendly software (Munin, lighttpd, etc.) require that IP ranges are specified using regexes instead of the usually more convenient CIDR notation. The following code converts instances of that notation to a regular expression. The generated pattern assumes that the input is a valid IPv4 address; that is to say, matching 0.0.0.0/0. Patches for common prefix optimisation greatly appreciated.
def cidr_to_regex(cidr):
    ip, prefix = cidr.split('/')
    base = 0
    for val in map(int, ip.split('.')):
        base = (base << 8)   val
    shift = 32 - int(prefix)
    start = base >> shift << shift
    end = start   (1 << shift) - 1
    def regex(lower, upper):
        if lower == upper:
            return str(lower)
        from math import log10
        exp = int(log10(upper - lower))
        delta = 10 ** exp
        if lower == 0 and upper == 255:
            return "\d+"
        if delta == 1:
            val = ""
            for a, b in zip(str(lower), str(upper)):
                if a == b:
                    val += str(a)
                elif (a, b) == ("0", "9"):
                    val += '\d'
                elif int(b) - int(a) == 1:
                    val += '[%s%s]' % (a, b)
                else:
                    val += '[%s-%s]' % (a, b)
            return val
        def gen_classes():
            floor_ = lambda x: int(round(x / delta, 0) * delta)
            xs = range(floor_(upper) - delta, floor_(lower), -delta)
            for x in map(str, xs):
                yield '%s%s' % (x[:-exp], r'\d' * exp)
            yield regex(lower, floor_(lower) + (delta - 1))
            yield regex(floor_(upper), upper)
        return ' '.join(gen_classes())
    def get_parts():
        for x in range(24, -1, -8):
            yield regex(start >> x & 255, end >> x & 255)
    return '^%s$' % r'\.'.join(get_parts())

24 January 2009

James Morrison: SimTower

I found a reference on the 'net about a week ago about SimTower. I remembered playing it a long time ago and thought it would be fun to try again since I hadn't beaten it. so I found my old copy and started playing. I've acheieved TOWER status in the game in 9 years.

The basic plan I used to beat the game was to build as wide as possible and to use 3 normal elevator shafts per 15 floors, 8 stairs and 2 escalators. Primarily my building was all offices. For the there are two sets of stairs going up 3 floors from each lobby. There is also an escalator going down from the lobby for each set of stairs and one more set of stairs going down a floor from the escalator. For the floors that have stairs going to them, there should be no elevator for that floor.

Now there are only 9 floors left that need elevator transportation. The best strategy I figured out for these floors was 3 elevators, each hitting 5 floors. That way each floor got one elevator shaft and a 3rd elevator shaft provided a bit of extra transport.

The 14th floor in each set is a good place to put cafes, and shops. I put a couple cafes and shops in, a security office at on one end, then put some offices in to use up some of the remaining space on the outside of the building. I left a bunch of space between the cafes and offices.

The first 15 floors are special since those floors should have 3 floors of offices, 6 floors of hotel rooms, one housekeeping station per floor, and a service elevator between the hotel floors. Then topped off with offices.

The basement floors had shops, cafes, restaurants and a cinema on floors b1 and b2. Parking was on floors b3, b4, and b5. The recycling centers were on floors b6 and b7, then the metro was on floors b8, and b9 with the metro taking up b10. I also put shops and cafes on floors b8 and b9 with the metro.

For the express elevator I tried to have on each express elevator go to the basement floors and 1 above ground floor. This way floor 15 and floor 30 has separate elevators shafts. Each elevator had as many elevator cars as it could take.

Using this strategy I used 63 above ground floors to get to 15k people and had 128 million dollars. I didn't lower the rent on any offices until I was building up to floor 100 for my cathedral, where I lowered prices on many offices between floors 45 and 60 where I did lower the price to keep tenants. I did lower the price on some hotel rooms much earlier in the game.

You can browse with my wide tower.

Brice Goglin: Debian/X.org notes - Howto Input-hotplug?

I have been wondering for a while how to get X.org "input-hotplug" to work, but I never actually tried before today. It is actually fairly easy, once you know what to do. Requirements First, make sure you have the evdev X driver installed (xserver-xorg-input-evdev). You might want to use X packages from experimental since things are much more recent than in Lenny or Sid these days, and upstream improved input management in the meantime. Then, if you are not running a pre-packaged kernel, check the the evdev driver is enabled and loaded in your kernel (CONFIG_INPUT_EVDEV). Telling hal what to do with input devices Now, you need to tell hal how to configure your input devices. Actually, you do not have much to do since latest xserver-xorg-input-evdev packages bring what you need. hal reads all fdi files under /usr/share/hal/fdi/policy to find out how devices should be configured. If you run lshal and look for input, you should see that the evdev is planned to drive your input devices. However, if you look at keyboard devices in lshal (look for input.keys), you will see that the US layout is used. To switch to another layout, you can add some overriding rules as a new *.fdi file in /etc/hal/fdi/policy/. For instance, to get French layout:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keys">
      <-- Enforce XkbLayout=fr and XkbVariant empty -->
      <merge key="input.xkb.layout" type="string">fr</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>
Thanks to this, you can enforce XkbLayout, XkbVariant and friends as usual in /etc/X11/xorg.conf. Don't forget to restart hal after modifying some fdi files. Then run lshal, and look for Xkb, you should find your setup there. Note that you can add some matching rules to configure some devices with different setups if needed. Just need to read the output of lshal and find something like a hardware identifier to match on. You can find some documentation about these rules by looking at the existing fdi files in /usr/share/hal/fdi/policy/20thirdparty/, and in the upstream x11-input.fdi (note that input.xkb.foo is the actual recommended syntax instead of input.x11_options.XkbFoo). Touchpads If you have a touchpad and want to use the synaptics driver, installing the xserver-xorg-input-synaptics will bring another fdi file. /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi matches input.touchpad in the device capabilities in hal. Now the synaptics driver will be automagically loaded for your touchpad (instead of evdev for regular mice). Again, you can override this rule in /etc/hal/fdi/policy/ and you can add many configuration options for synaptics as well. See /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi to get an example. Fortunately, you will not have to manually take care of the above /etc/hal/fdi/policy/ file for ever. The plan is to have hal look at the Debian console configuration and get at least the keyboard layout from there automatically. Telling the Xserver to talk to hal Now, you need to tell the Xserver to use what hal wants. Basically, you want to remove everything about keyboard, mouse and other input devices from your xorg.conf. Just drop all InputDevice sections and all references to them within other sections. With recent Xserver versions, options AllowEmptyInput and AutoAddDevices are enabled by default (otherwise, you might have to add them in the ServerFlags section). For more documentation, you want to read Peter Hutterer's blog, especially this post and this one. By the way, if you don't want this input-hotplug thing and you want to run a recent Xserver anyway, you should set AllowEmptyInput and AutoAddDevices to off in the ServerFlags section. Update: Fixed the way to manage fdi files, fixed the syntax of input.xkb.foo rules, added a paragraph about synaptics, and organized things in sections. Thanks to everybody's comment.
(Permanent link)

Brice Goglin: Debian/X.org notes - Xserver 1.6, Intel 2.6.1, ... what's up in XSF?

It has been a while since my last post here. Not because nothing happened, but mostly because I did not have time to do much for X. Fortunately, Julien is taking good care of X in Debian so we are still close to latest upstream bits. Obviously, due to Lenny's freeze, everything is happening in experimental these days. Xserver 1.6 The release Xserver 1.6 is expected in the near future. 1.6-rc1 (1.5.99.901) entered experimental recently. Both video and input driver ABIs changed and very few drivers have been rebuilt so far. So if you're not running Intel or Radeon, you might not be able to upgrade yet. Please be patient :) You might have heard that many things are happening in X.org these days: DRI2, kernel-modesetting (KMS), RandR 1.3, ... Everything is not ready yet, but it's getting close for real. Radeon 6.10.0 and Intel 2.6.1 Radeon driver 6.10.0 was released in early 2009. As usual, it brings many fixes, and improvements for modern boards (see Alex Deucher's blog for details). However, Radeon is not ready for above DRI2 and KMS yet. Most of the development for these new features is first done in the Intel driver, which got recently bumped to 2.6.1 as well. DRI2 DRI2 is the new Direct Rendering Infrastructure. The most noticeable change from the user point of view is support for Redirect Direct Rendering, which basically means that your 3D application can be wobbly/transparent in Compiz. See Kristian H gsberg's blog for details. If you want to try DRI2 on Intel, you have to enable UXA as the acceleration architecture in xorg.conf (Option "AccelMethod" "UXA" in the Device section). DRI2 will then be enabled automatically. Then, it may or may not work, depending for instance on the hardware. I get a black screen at startup on i865 while i945 works fine until I start Compiz (the server suddenly exits for some reason then). Note that you probably want to upgrade your Mesa packages to experimental as well here (7.3 has been released recently). Of course, running git snapshot of various components (Mesa, libdrm, kernel drm, Intel driver, ...) may help since the released versions seem to not be entirely ready yet. But, things should may be ready to use for everybody in the near future. Kernel Modesetting The other nice feature that makes a lot of noise in X.org these days is Kernel modesetting (KMS). It moves the management of mode (aka resolution+rate) into the kernel. It helps support for switching between different users' sessions, enables reporting of kernel messages (oops, panics, ...) while X is running, and reduces the need to blank the screen during boot (since the kernel can setup the display early and X doesn't have to change it later independently). KMS testing requires a bleeding-edge kernel (2.6.29). Using a git snapshot of the drm stack is probably a good idea as well since I couldn't get KMS to work on 2.6.29-rc2 here. Again only Intel will support KMS soon, but other drivers will follow. Panning is back (aka RandR 1.3) Xserver 1.6 brings support for the 1.3 version of the RandR X extension. Among other improvements, it reintroduces one feature that many users miss since it was removed back in Xserver 1.3 or so. "Panning" (often referred to as "Virtual Desktop") gives the ability to move the display within a larger screen when the mouse approaches from the border. Instead of being configured with the Virtual option in xorg.conf (this option means something else nowadays), it may now be enabled/tuned with xrandr --panning. You'll need the latest libxrandr2 and xrandr utilities to do so (the latter is not uploaded yet).
(Permanent link)

Sami Haahtinen: New tricks

"You never call, you never write. I hardly know you anymore." Yes, I've been meaning to write up on several things. For some time now, I've been a happy VIM user and a while back I ran in to a blog post where someone mentioned a new feature they found in VIM which got me to explore the vim-scripts package. There are a lot of scripts out there that extend VIM far beyond what it can do by default. And it's quite powerful even without the scripts. One of the neat little scripts I decided to install by default was surround, it allows one to easily replace surrounding parenthesis, tags or quotation marks. There are a lot of scripts in the vim-scripts package, but it's not always clear how to enable the scripts. Thats where vim-addon-manager comes to play, it provides a vim-addon command that allows you to easily enable or disable the scripts. I'm still trying to grasp the full potential of all the new commands available, but it certainly appears that I'll be having even more fun writing stuff. It's kind of odd, at first when you start to use vi-like editors, you struggle. But in the end it's just such a convenient way of editing files that it really does grow on you.

Ingo Juergensmann: I did it!

Oh, well... although I said that I'll wait some more time until I upgrade the firmware of my Seagate Barracuda ES.2 ST31000340NS drives, I did it today!

=== START OF INFORMATION SECTION ===
Device Model: ST31000340NS
Serial Number: 9QJ2VT98
Firmware Version: SN06
User Capacity: 1,000,204,886,016 bytes


And well, it still works.

/me happy :-)

Lior Kaplan: Open Content Awarness


My relation to open source and free software made me aware of the license issues not only on software but also on content. Debian thoughts about the GFDL where one of the first issues I encountered, and also the use Wikipedia does with that license. Today, I try to make all my writings open content with the GFDL or with Creative Commons. I started with changing the license of all my guides to GFDL and asking other to so in one of my websites: guides.co.il. This is much more noticeable in my university where I send my papers with CC, mention the quotes from wikipedia are under GFDL and so on, while most people don t even think about licensing their works. This year I had the opportunity to lecture one of my classes about open source and free software in information science and open content is very related phenomenon with a lot of ties to open source. Talking about open content and universities - it s a shame not all content created with public funding is required to be released as public domain or open content Anyway - go and open your content. Make it available to evryone. Posted in Free software licenses

Uwe Hermann: Recovering from a dead disk in a Linux software-RAID5 system using mdadm

RAID5 failure As I wrote quite a while ago, I set up a RAID5 with three
IDE disks at home, which I'm using as backup (yes, I know that
RAID != backup) and storage space. A few days ago, the RAID was put to a real-life test for the first time, as one of the disks died. Here's what that looks like in dmesg:
raid5: raid level 5 set md1 active with 3 out of 3 devices, algorithm 2
RAID5 conf printout:
 --- rd:3 wd:3
 disk 0, o:1, dev:hda2
 disk 1, o:1, dev:hdg2
 disk 2, o:1, dev:hde2
[...]
hdg: dma_timer_expiry: dma status == 0x21
hdg: DMA timeout error
hdg: 4 bytes in FIFO
hdg: dma timeout error: status=0x50   DriveReady SeekComplete  
ide: failed opcode was: unknown
hdg: dma_timer_expiry: dma status == 0x21
hdg: DMA timeout error
hdg: 252 bytes in FIFO
hdg: dma timeout error: status=0x50   DriveReady SeekComplete  
ide: failed opcode was: unknown
hdg: dma_timer_expiry: dma status == 0x21
hdg: DMA timeout error
hdg: 252 bytes in FIFO
hdg: dma timeout error: status=0x58   DriveReady SeekComplete DataRequest  
ide: failed opcode was: unknown
hdg: DMA disabled
ide3: reset: success
hdg: dma_timer_expiry: dma status == 0x21
hdg: DMA timeout error
hdg: 252 bytes in FIFO
hdg: dma timeout error: status=0x58   DriveReady SeekComplete DataRequest  
ide: failed opcode was: unknown
hdg: DMA disabled
ide3: reset: success
hdg: status timeout: status=0x80   Busy  
ide: failed opcode was: 0xea
hdg: drive not ready for command
hdg: lost interrupt
hdg: task_out_intr: status=0x50   DriveReady SeekComplete  
ide: failed opcode was: unknown
hdg: lost interrupt
hdg: task_out_intr: status=0x50   DriveReady SeekComplete  
ide: failed opcode was: unknown
That's when I realized that something was horribly wrong. Not long after that, these messages appeared in dmesg. As you can see the software-RAID automatically realized that a drive died and removed the faulty disk from the array. I did not lose any data, and the system did not freeze up; I could continue working as if nothing happened (as it should be).
 md: super_written gets error=-5, uptodate=0
 raid5: Disk failure on hdg2, disabling device.
 raid5: Operation continuing on 2 devices.
 RAID5 conf printout:
  --- rd:3 wd:2
  disk 0, o:1, dev:hda2
  disk 1, o:0, dev:hdg2
  disk 2, o:1, dev:hde2
 RAID5 conf printout:
  --- rd:3 wd:2
  disk 0, o:1, dev:hda2
  disk 2, o:1, dev:hde2
This is how you can check the current RAID status:
 $ cat /proc/mdstat
 Personalities : [raid6] [raid5] [raid4] 
 md1 : active raid5 hda2[0] hde2[2] hdg2[3](F)
       584107136 blocks level 5, 64k chunk, algorithm 2 [3/2] [U_U]
The "U_U" means two of the disks are OK, and one is faulty/removed. The desired state is "UUU", which means all three disks are OK. The next steps are to replace the dead drive with a new one, but first you should know exactly which disk you need to remove (in my case: hda, hde, or hdg). If you remove the wrong one, you're screwed. The RAID will be dead and all your data will be lost (RAID5 can survive only one dead disk at a time). The safest way (IMHO) to know which disk to remove is to write down the serial number of the disk, e.g. using smartctl, and then check the back side of each disk for the matching serial number.
 $ smartctl -i /dev/hda   grep Serial
 $ smartctl -i /dev/hde   grep Serial
 $ smartctl -i /dev/hdg   grep Serial
(ideally you should get the serial numbers before one of the disks dies) Now power down the PC and remove the correct drive. Get a new drive which is at least as big as the one you removed. As this is software-RAID you have quite a lot of flexibility; the new drive doesn't have to be from the same vendor / series, it doesn't even have to be of the same type (e.g. I got a SATA disk instead of another IDE one). Insert the drive into some other PC in order to partition it correctly (e.g. using fdisk or cfdisk). In my case I needed a 1 GB /boot partition for GRUB, and the rest of the drive is another partition of the type "Linux RAID auto", which the software-RAID will then recognize. Then, put the drive into the RAID PC and power it up. After a successful boot (remember, 2 out of 3 disks in RAID5 are sufficient for a working system) you'll have to hook-up the new drive into the RAID:
 $ mdadm --manage /dev/md1 --add /dev/sda2
 mdadm: added /dev/sda2
My new SATA drive ended up being /dev/sda2, which I added using mdadm. The RAID immediately starts restoring/resyncing all data on that drive, which may take a while (2-3 hours, depends on the RAID size and some other factors). You can check the current progress with:
 $ cat /proc/mdstat 
 Personalities : [raid6] [raid5] [raid4] 
 md1 : active raid5 sda2[3] hda2[0] hde2[2]
       584107136 blocks level 5, 64k chunk, algorithm 2 [3/2] [U_U]
       [>....................]  recovery =  0.1% (473692/292053568) finish=92.3min speed=52632K/sec
As soon as this process is finished you'll see this in dmesg:
 md: md1: recovery done.
 RAID5 conf printout:
  --- rd:3 wd:3
  disk 0, o:1, dev:hda2
  disk 1, o:1, dev:sda2
  disk 2, o:1, dev:hde2
In /proc/mdstat you'll see "UUU" again, which means your RAID is fully functional and redundant (with three disks) again. Yay.
 $ cat /proc/mdstat
 Personalities : [raid6] [raid5] [raid4] 
 md1 : active raid5 sda2[1] hda2[0] hde2[2]
       584107136 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
Btw, another nice utility you might find useful is hddtemp, which can check the temperature of the drives. You should take care that they don't get too hot, especially so if the RAID runs 24/7.
 $ hddtemp /dev/hda
 dev/hda: SAMSUNG HD300LD: 38  C
 $ hddtemp /dev/hde
 dev/hde: SAMSUNG HD300LD: 44  C
 $ hddtemp /dev/sda
 dev/sda: SAMSUNG HD322HJ: 32  C

23 January 2009

Josselin Mouette: On the good use of compiler warning flags

The gnome-power-manager developers like clean code. Actually, more than clean code: code that will not generate a single nitpicking warning. The package builds with the following C compiler flags:
-Werror -Wcast-align -Wno-uninitialized -Wall -Wformat-security
Sometimes the compiler is more clever than the coder On the SPARC architecture, -Wcast-align really starts to mean something. Unlike most other architectures, any alignment error on here will leave you gather your teeth spread on the floor after you ve been hit by a SIGBUS. It tries to catch at build time alignment errors resulting from a cast between pointers to different types. Together with -Werror, it triggered a first FTBFS bug. The error occured on the following code:
        if (XRRGetOutputProperty (brightness->priv->dpy, output, brightness->priv->backlight,
                                  0, 4, False, False, None,
                                  &actual_type, &actual_format,
                                  &nitems, &bytes_after,  ) != Success)  
                egg_debug ("failed to get property");
                return FALSE;
         
        if (actual_type == XA_INTEGER && nitems == 1 && actual_format == 32)  
                *cur = *((int *) prop);
                ret = TRUE;
         
        XFree (prop);
        return ret;
More precisely, the error occurs when casting prop (which is an array of pointers) into an int *. The compiler is clearly right. The alignment requirements are different for a pointer and an integer; therefore, casting a pointer to a pointer into a pointer to an integer will always work, but dereferencing the pointer later will possibly cause a crash. Turning this expression into a memcpy leads to code that should always work. Lesson learned: do not design APIs where an array of pointers can actually store integers. Have you ever heard of opaque structures? and sometimes it is not This was not enough and a second FTBFS bug showed up. Here, the error happens in the following code:
static inline GstBuffer *
gst_buffer_ref (GstBuffer * buf)
 
  /* not using a macro here because gcc-4.1 will complain
   * if the return value isn't used (because of the cast) */
  return (GstBuffer *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (buf));
 
GstBuffer is a structure which contains a GstMiniObject at the beginning. Therefore, you conduct operations on the GstMiniObject through a mere cast. The first cast (GstBuffer GstMiniObject) is fine, but in the second cast (GstMiniObject GstBuffer), the compiler suspects a problem, since the alignment requirements on GstBuffer are stronger than those on GstMiniObject. The compiler is wrong because it didn t read the API documentation; otherwise, it would have known that gst_mini_object_ref can only return NULL or its argument, which means there can t be any loss of alignment. Since there are no function attributes to express such complex things, we are still forced to rely on the developer having correctly read the documentation. Way to go, compiler. Lesson learned: there are good reasons why some warnings are not part of -Wall. Especially, it is dubious to use them with -Werror. Does anyone know whether it is possible to apply -Werror only to some of the warnings and not to all of them? It would sound like a useful improvement.

Daniel Kahn Gillmor: target disk mode (sbp-2 mass storage host mode?)

One very convenient feature of Apple's hardware is the ability for their workstations to enter target disk mode. This effectively transforms the machine into a glorified ieee1394 (firewire) block device, which can then be manipulated from outside the machine using the standard SBP-2 protocol. Is there a way to provide this same functionality from a running GNU/Linux machine? For example, i have a GNU/Linux system with a block device attached to it. I would prefer if the block device was available to a neighboring machine, but (for whatever reason) i'm unable to physically move it. However, i'm able to link the two machines via a simple ieee1394 connection. A "virtual target disk mode" server (or would it be better to say "an SBP-2 mass storage target service over an ieee1394 link"?) would be really useful. One thing that occurs to me is that i could do some sort of networking abstraction over the link (using eth1394?), and then use something like vblade (an ATA-over-Ethernet target service) to provide a virtual block device to the remote host. However, this requires the remote host to run an operating system capable of dealing with these (more obscure) protocols, and i'd like this to work for any remote machine that knows how to deal with generic SBP-2 ieee1394 mass storage. I know that in general GNU/Linux is at least as powerful and capable as the firmware that Apple ships ;) But it's possible that our community just hasn't gotten around to implementing something like this. Is this the case? My attempts to search for it haven't turned up anything, but it's entirely possible that i'm reading the wrong docs (or reading the docs wrong). Any pointers?Tags: firewire, ieee1394, sbp2, vblade

Sylvain Le Gall: OCaml meeting 2009, subscription about to end

The subscription will end on January the 25th, for people willing to come to this unique OCaml event, this is your last chance !!!! We have 40 participants for now. I am quite happy with this number because it is almost the same as last year -- except that we do it in Grenoble rather than Paris. Anyway, I see that a lot of people who were there last year, will come back to this year events. There is also a few more people, in particular more from CAML consortium members. I have stepped down from the first talk about OCamlCore.org in favor of Stefano Zacchiroli. Zack has really helped me on this project since the begin (with Pietro Abate and Romain Beauxis). I am very happy that he can do the talk. I will do myself, a talk about my last project for Talend. This was a great project targeting to be as fast as a standard C application but in OCaml. The point is that OCaml helped me to do quickly a working prototype and then optimize it for speed. All in all, after 6 months I was able to deliver Talend with a working and fast application. This kind of release cycle is harder to achieve in other programming language. OCaml compile time verification helped me a lot. I hope that in the last remaining 2 days, some more people will subscribe. Wiki Subscription

Y Giridhar Appaji Nag: Gurudwara Tarn Taran Sahib

About 25KM from Amritsar is Tarn Taran. Tarn Taran was founded by the fifth Sikh Guru, Guru Arjun Dev who also built a Gurudwara there and named it after the town. The Gurudwara has the largest Sarovar (lake) among all the Sarovar's across all Gurudwaras. The place is calm, peaceful and a treat to the senses. I was there one winter morning and took some pictures.

The Sarovar:

Tarn Taran Sahib Sarovar

And a few more pictures from the Gurudwara:

Tarn Taran Sahib Tarn Taran Sahib Tarn Taran Sahib Tarn Taran Sahib

Michal &#268;iha&#345;: ICQ fun

For legacy reasons (it's still most used IM in Czechia), I still use ICQ. Few days ago AOL again started to block some users (especially in Russia) and disconnected time to time others using non official clients. They do such things quite regularly, however the problems are usually quite easy to fix once somebody figures out what exactly do they check. So it just forces all clients to adjust some bits in the protocol initiation and it works again. Does it really make sense to complicate things this way? How about finally opening it? Or providing Jabber gateway?

Axel Beckert: MBC09: The Day Before

Helped my parents moving the first half of the week. Left there at Thurdays around 9am. Drove 45min to Zurich. Removed everything bicycle related from my daypack. Left the TomTom at home. (Google Maps on the E51 has to sufficed and sufficed so far.) Crammed cloths for three days in. Was at Zurich Main Station around 11:40am. My plan was to take the direct ICE train from Zurich to Hamburg Dammtor. Bought a Rivella for the journey. First suprise at the platform: No ICE train. Instead a Swiss InterCity. The staff told us due to a defect in the ICE train, we have to go to Basel SBB with this train, then switch trains there. No carriage numbers and reservations valid here. Hrmpf. For luck, there where not that many people in the train. No power sockets though. Next surprise at Basel SBB: No ICE train here either. We re advised to switch to a German InterCity and then switch again a few kilometers later at Basel Badischer Bahnhof (aka Basel, German Station ). There then finally waited an ICE labelled as the initially expected ICE 72 from Zurich to Hamburg Altona. Even the reservations were displayed, departure was though 20min later than the original ICE 72. The voice from the speakers told us that this is a replacement train which came empty from Zurich. WTF? The next time the voice explained the situation, it was a replacement train coming from Interlaken Ok, DB is not as insane as I believed for about half an hour. ;-) Worked though the git tutorial and the git glossary on the train since in future I ll use git in some of the OSS project I m working together with Conkeror beyond others. Also had a conversation with some doctor from University Hospital Zurich who has chasing as hobby. (WTF?) The train arrived about 45 minutes late at Dammtor, so I first checked in in my hotel ( Hotel am Dammtor , very close to the MBC09 venue) and then walked to Hamburger Botschaft where the twitter reading was already running, hoping to meet someone I know and having dinner afterwards. Guided by Google Maps on my Nokia E51 it took longer than expected to walk there. And it was windy and raining. The twitter reading venue was quite full, but I still found a place where I saw most of the screen. At least the reminder of reading was quite funny: #famouslasttweets. They closed with a tweet similar to And then there s also identi.ca . :-) I was told it wasn t that funny at the beginning. Didn t find anyone I really knew, just sticked to a group talking about being hungry. When we met @igorette on our way to some restaurant and he recognised me, I found out that @muhh was also in the group I m heading though Hamburg. We had a nice dinner at Schmitt Foxyfood, I had GrillGold (Pommes Frites) with WuchtBrumme (Currywurst) and Fritz Cola. After dinner, @moeffju drove me and some other guy to our hotels. So the first evening was already very interesting despite the usual lateness of Deutsche Bahn.

Kartik Mistry: Breaker


* I have started breaking commitments so often. It really hurts when you do it often and I am very depressed by myself at moment. But, good things in life so far: + My new digital photoframe has arrived. Thanks to Chintan for it. + We have started to make some furniture for home (ie my longterm pending thing: Computer Table!) + Kavin is becoming so smart, he has started speaking some random words and identify and duplicate things I do (no, not Debian packaging yet!) + My macbook has 4 GB RAM now. The incident is here (Sorry, its in Gujarati only!).

22 January 2009

John Goerzen: Hope

Our power alone cannot protect us, nor does it entitle us to do as we please. . . Our security emanates from the justness of our cause; the force of our example; the tempering qualities of humility and restraint. - Barack Obama, inaugural speech, Jan. 20, 2009
This, right here, is why, for the first time in my life, I actually feel good about an American president. Why I have hope about our government for the first time in years. Why I m glad I used a vacation day to sit on the couch and watch TV yesterday. On the occasion, once every 4 or 8 years, that is a celebration of American strength, power, and pride, we see our new president speaking of humility, of peace, of moral leadership, this is something remarkable. Past presidents have used occasions such as these to speak of crushing our enemies, of wanting people dead or alive, of grand government promises that turned out to triple the national debt. Obama spoke of extending the hand of friendship to anyone that would unclench their fist. He spoke that we had kicked the can down the road too far, and now we ve reached the end of the road. We have to stop thinking that we can have everything: low taxes, expensive programs, and a large military, simply by mortgaging our future. And he leveled with us: we all are in this together, and all have to work to make it better. Conventional politicians assumed it would be political suicide to say even half of what Obama has said. Yet he went out there and did it. He was blasted during the campaign by people on both sides of the political spectrum for being just words . He s the first presidential candidate that meant what he said about bringing Americans, and their representatives, together. The shock in Washington has he invited gasp! both an openly gay bishop and an anti-gay evangelical minister to give prayers was telling. It s as if people were saying, Wait, he really MEANT that? Yes, he did. Let s hope he can pull it off. And as Rev. Lowry concluded with his benediction:
With your hands of power and your heart of love, help us then, now, Lord, to work for that day when nations shall not lift up sword against nation, when tanks will be beaten into tractors, when every man and every woman shall sit under his or her own vine and fig tree and none shall be afraid, when justice will roll down like waters and righteousness as a mighty stream. . . Let all those who do justice and love mercy say Amen. (amen) Say Amen! (Amen!) Say Amen! (AMEN!)

Joerg Jaspert: Bugs, Bugs, Bugs and a nice speed improvement

This all started when a DSA (Debian SysAdmin (those with root rights on all .debian.org machines)) wanted to upgrade the kernel running on our ftp-master host. It was shortly before dinstall, but hey, there it went, and the machine rebooted into a 2.6.28. Besides murphy taking his share making the machine fsck its huge filesystem that is all fine. What wasn t fine was the result we found. An odd one. Suddenly one tool we run during our dinstall run decided to blow up. Well, it did nt break, it just went dead-slow. Usual runtime had been about 5 minutes before, now we had over an hour - and only about 20% of the work was done. YUCK. Thats sure not going to work. Reboot in a 2.6.27 kernel did not show this problem, going back to .28 had it again. Which meant we had yet another reboot to get a working system. At which point investigation of the problem started. Turns out that pythons popen2.popen2 function is closing all available filehandles before it forks. Thats all fine and also what you usually want. Problem is (and all the glory to have found the cause goes to Peter weasel Palfrader) that the .28 kernel included a patch titled rlimit: permit setting RLIMITNOFILE to RLIMINFINITY (0c2d64fb6cae9aae480f6a46cfe79f8d7d48b59f) that allows, as the title implies, to set the limit for number of files to infinity. More citation from weasels mail: Closer investigation showed that the broken default ulimit did not apply to system processes (like stuff started from init). In the end I could establish that all processes that passed through pam_limit at one point had the bad resource limit. Apparently the pam library in Debian etch (4.0) initializes the limits to some default values when it doesn t have any settings in limit.conf to override them. Turns out that for nofiles this is RLIMINFINITY. Commenting out case RLIMITNOFILE in pam_limit.c:267 of our pam package version 0.79-5 fixes that - tho I m not sure what side effects that has. Debian lenny (the upcoming 5.0 version) doesn t have this issue as it uses a different pam (version). So, whatever the fix might be for etch, if any, there is no way we Ftpmaster can force DSA to live with a 2.6.27 kernel forever on our host. As the problem occurs when using popen2 - lets get rid of it. Luckily popen2 was used in dak by people that either did not know the gzip module python has, or it has been there since before that exists. Don t know, but that made removing popen2 a not too hard deal, done by our newest addition to the Ftpteam, Mike O Connor, stew (Thanks!). A pretty nice side effect is a huge improvement to the speed of the tool Prior, using popen2, it took around 5 minutes to do its job. Now using the gzip module we are down to some 44 seconds. Yes, below one minute, but well, must have some effect if you stop forking a thousand times and all that thousand times close all (1024) available filehandles But that alone isn t enough. There was a second tool also using popen2 (thankfully only once instead of a million times). Fixing that tool got its runtime from 2 minutes down to 0.7 seconds. Yes, less than one second, getting the same result out. Thats the gain you get from not going like get a tempfile, zcat foo > tempfile, filehandle=open(file), dowork including reading its content but foo=gzipfile.readitscontents, dowork(foo) . I like it. And am now sure that avoid popen2 at nearly all costs, if you can is a good motto. :)

21 January 2009

Axel Beckert: Tablet Amora runs on the OpenMoko FreeRunner (updated)

Amora ( A MObile Remote Assistant ) is a client/server suite which allows you to remote control an X desktop using a bluetooth enabled mobile phone. Initially there was only a Symbian client (running e.g. on nearly all Nokia E and N series phones), but J2ME clients are under developement, too. Then there is Tablet Amora (aka Tamora), an Amora proof of concept client for the Maemo platform which runs on internet tablets like e.g. the linux based Nokia N770, N800, and N810. Since Maemo isn t that far away from what runs on the OpenMoko, getting Tamora working on the OpenMoko, too, suggested itself. Maemo seems to use the deb package format, too, just slightly extended (e.g. by package icons), so it wasn t even that hard work to adapt the existing Maemo packaging to build, install and run on Debian, too. So that s how Tamora looks on the OpenMoko:
The packaging is still far away from Debian standards (throws tons of lintian warnings and the source package generation is b0rked), so yet there are no prebuilt debs available, but you can checkout amora-client from the Subversion repository and build the package from there:
 $ svn checkout http://amora.googlecode.com/svn/trunk/amora-client/maemo/ amora-client
 $ cd amora-client
 $ debuild -uc -us
 $ cd ..
 # dpkg -i amora-client_0.1-2maemo+openmoko_all.deb
For running and installing tamora you need packages from the pkg-fso APT repository on alioth. And to build it, you need the libedje-bin which is available from the pkg-fso repository for at least the armel architecture, or else from Debian experimental. You can add these repositories to your sources.list as follows:
 # PKG FSO repository
 deb     http://pkg-fso.alioth.debian.org/debian unstable main
 deb-src http://pkg-fso.alioth.debian.org/debian unstable main
 # Debian Experimental
 deb     http://ftp.ch.debian.org/debian experimental main
 deb-src http://ftp.ch.debian.org/debian experimental main
Since Tamora is yet only a proof of concept client, currently only the following remote functions are available: This should though at least suffice for a presentation with the OpenOffice.org Presenter. To use Tamora to remote control your Debian laptop, you need a bluetooth dongle (or builtin bluetooth support) and amora-server installed as with the Symbian S60 (3rd Edition) Amora client, too. Update, 23:51 libedje-bin seem not available in the pkg-fso repository for every architecture. You ll also find it in Debian experimental. Updated the sources.list section above appropriately. Thanks to Sebastian Montini for pointing out this problem.

David Welton: More Github

Before I get started, I want to make it quite clear that I have no problems with Github - au contraire, they provide a very nice service. What my speculation centers around is the social dynamics of Github. One of the Github guys writes a nice response to my original post, here: http://ozmm.org/posts/linux_vs_classic_dev_style.html First of all, apologies for the comment bug. In theory, it has been fixed by the Typo guys, I just need to find the time to upgrade. Chris mentions that it's possible to create a "SourceForge style" project on Github. I see that it's possible to add collaborators, so I guess that's what he means. I still find it a bit ugly to have things at .../davidw/... but that's not very important if the URL is at least stable, rather than hopping around to whoever has the latest fork and updates of the code in question. In my other post, I talked about people being less interested in doing what it takes to contribute to existing projects, rather than forking them, unless it's really called for. Here's a concrete example of how things might go wrong. At my current consulting gig, we were looking at utilizing actionwebservice to do some SOAP stuff. That code is not part of Rails anymore, but that's not the problem - surely someone has decided to take up maintenance of the gem, right? Well, yes... but let's look:
root@fortrock:~# gem1.8 search -r actionwebservice
*** REMOTE GEMS ***
actionwebservice (1.2.6)
datanoise-actionwebservice (2.2.2)
dougbarth-actionwebservice (2.1.1)
nmeans-actionwebservice (2.1.1)
So we have the original, clearly out of date, and three others. Yuck... I guess we'll use the 2.2.2 one, but who knows if perhaps the others contain some good stuff too? Let's Google it. http://www.google.com/search?hl=en&q=actionwebservice The first link is to a RubyForge project, which is basically dead. A few links down, there is a link talking about a more recent version, at the Datanoise site. However, it's one of many. Confusing. If you go to the github page for the datanoise version of actionwebservice, the README has this:
The latest Action Web Service version can be downloaded from http://rubyforge.org/projects/actionservice
Hrm. We were just there and that doesn't seem quite right... Sure, it's an easy enough oversight to ignore, but it adds to the confusion. Now, this is not really a serious problem, but do you see how it could get worse over time, as various people fork the code, write blog entries, and so on? It would get harder for someone interested in utilizing the code in question to ascertain which is "the" version. It's not hard to imagine situations where two forks add different bits of useful code. Typically, in situations like this, new users, those who don't know the code at all, are also the people least able to look through all the diffs and changes and log entries and what not in an attempt to merge any changes that might be useful. This leads to a "paradox of choice" type of problem. Another consideration, this one more positive, is that perhaps people are putting code in Github that, in the past, might have simply remained on their own computers, with no effort whatsoever to share it, so in that sense, Github might be doing people a service by at least making the code public. However, even in that case, if the service fills up with code that people have simply "thrown over the wall", rather than creating a genuine open source project, with a community, communication channels, and so on, it could get a reputation for having code that you have to handle with care, as a lot of is just stuff slapped up there without much thought to quality or continuity. Anyway, the Github guys have done a nice job with the service, and I'm sure they'll continue to improve it. Who knows, perhaps they have some good ideas about mitigating some of these potential problems that they'll be rolling out soon.

Next.

Previous.