Search Results: "nate"

25 October 2006

Isaac Clerencia: Two weeks to US elections

As you may know, the future of the US world is again at stake in two weeks. Elections for the United States Senate and the United States House of Representatives will be held on November 7. Most general indicators are favorable to the Democrats (only 40% approve Bush administration, 46% vs. 34% think that Democrats would handle Iraq better than the GOP, 55% think US shouldn’t have invaded Iraq), and it seems they will likely get a majority in the House (latest polls show a 13-18 seats Democratic lead). Democratic Senate majority sounds far-fetched though. First of all, the members of the US Senate (which has 100 members, two per state, regardless of population) are elected by classes. The Senate is formed by three classes, so in this election only a third of the senators are challenged, which makes a turnover more difficult. Right now the Senate is composed by 55 Republicans, 44 Democrats and 1 Independent (who usually caucuses with the Democrats). Only 15 out of the 33 contested seats are held by Republicans, so Democrats would have to gain 7 of those 15 to get a majority (as a tie is broken by the Senate President, who happens to be the Vicepresident of the US, Dick Cheney). There are four close races that should be taken into account (Tennessee, Missouri, Virginia and New Jersey). Democrats would need to win three out of these to achieve majority. The amazing fact is that according to the latest polls they can make it. I’m not really fond of Democrats either (IMHO they are as right-winged as usual European right-winged parties), but lots of Dem Senate candidates are taking solid anti-war positions, which is quite good. In addition, I would say that anything that can take some power out of Bush hands it’s good news for the world. I just hope the anti-GOP wave is big enough. So, please, fellow American reader, on November 7th, vote the GOP out of the Senate and the House :)

24 October 2006

Ben Armstrong: Apt verb

In the English language, it is so trivial to create new words. In no domain is this quite so evident as the world of computers. Thus, informally amongst Debian users, you’ll often hear “apt-get it” or simply “apt it” which has the virtue of being equally apt a term for using aptitude. Now, I have no problem with people using these verbs. They’re precise, if a bit geeky. But really, shouldn’t there be a more general verb to cover this activity? Back when apt was new, and nobody else was installing packages this way, the lack of a general term made sense. But these days, in certain user communities, you might hear “yum it” instead. How many variants does the English language need? One per apt-like installer? Compare this with the evolution of instant messaging. Back when ICQ dominated the field, “ICQ” was synonymous with instant messaging. These days, although you might occasionally still hear people say “ICQ me” or “Jabber me” (where the protocol is important, because both participants must have access to that specific service) we can more generally say “message me,” encompassing in one fell swoop all possible protocols. Or if you prefer, the awkwardly geeky but more precise term, “IM me” (though arguably slightly less useful than “message me” because it seems to exclude irc, the king of all chat systems). So, what’s the equivalent verb that means “conveniently installing software from one or more software repositories by merely asking for the package by name”? My mind draws a blank.

Wouter Verhelst: Conversion in progress

Sometimes the things you want don't happen until you stop trying so hard. For as long as we've had Intel-compatible computers here at home, my parents have been running Windows. At first I didn't care—this was before I had even heard about Linux, let alone install it—but as I became more and more involved in Linux, I wanted more and more for them to make the change, too. Especially given how I'm still supposed to be responsible for making sure their machine keeps running; if I wasn't, I wouldn't care as much. These are the approaches I've taken to try to convert them, and why they failed: All in all, my message is this: if you want to convert people like my parents—who couldn't care less about all this freedom stuff and whatnot, shit just has to work for them—to Linux, then you should make sure that they have a reason to use it. They didn't use it when I tried to push them behind the curtains. They didn't use it when I tried to push them openly. They only decided to use it when, eventually, they had a solid reason to use Linux: there were applications there that weren't available on Windows. Of course, there's nothing in gnucash, the gimp, or scribus that prevents me from installing it on Windows. But installing software on Windows is such a pain—and, well, I did have a hidden agenda.

Jonathan McDowell: More E3 bits in mainline

Tony tagged 2.6.18-omap1 yesterday. This has nearly got to the point where all the "easy" devices on the E3 are supported out of the box. I need to clean up the modem bits for inclusion - currently it's done with early_serial_setup which I'm sure is wrong but my attempts to do it with a platform_device haven't met with much success. I'm sure half an hour with a hammer will do the trick. That basically leaves the more intrusive or non fully functional drivers; Matt Callow's mailboard and camera work and Mark Underwood's sound driver (unfortunately still not complete :( ). All of these are currently against 2.6.16. I tried to get the sound working under 2.6.17 but didn't get anywhere with it. If I can manage to find some time I'll try again with 2.6.18. Not that I have a lot of time at present it seems. Spent last week in Northern Ireland, Cambridge, London and Reading and this week I've got LinuxWorld (I'll be on the Debian stand, of course). I've had a bunch of things to try in terms of getting SA1110 UDC working for the Balloon which should probably take priority over the E3 sound. Meh. Can I have more hours in the day? Or a teleport would probably be better.

Martin F. Krafft: On the last legs of a monopoly

The Swiss postal service tried to deliver an express parcel yesterday at 12:50. Since I was not home but rather engaging in what many workers do around that time eating lunch I got a note instead, with instructions on how to obtain the delivery: I can collect it at the central post office, which is about 15 minutes by public transport from my place, or I can pay 10 Swiss Franks for a second delivery. I decided to first find out who tried to send me such important stuff and called their number; no answer. My phone tried on auto-dial every few minutes all of yesterday afternoon and this morning; no dice. Finally, just now, I got someone on the line, 22 hours after the delivery was made, and I found out that the delivery is not as express as the sender thought, so I asked the guy whether he couldn't just make it regular, registered mail, which would come to 6 Franks. He said he could not do that, he could only make a second delivery for 10 Franks. Given that public transport and time would exceed those 10 Franks, I agreed and asked him to send someone this afternoon between 15:00 and 19:00 hours. "Oh, I am sorry, but we cannot schedule deliveries; your parcel will be delivered within the next 24 hours." Unfortunately, since the parcel was sent by registered mail in the first place, it is also not possible for me to have it sent to e.g. the university office, or some other place where people are basically around throughout the day. Hence my only option is to make my way to the central post office to collect the parcel. The private carriers may still be a little more expensive (though the difference is shrinking), but they seem a lot more competent: if a delivery cannot be made, the carrier returns the next day within a specified time window. If the delivery still cannot be made, you are asked to call in and arrange for a third delivery, or a pickup. No extra costs are incurred. It's high time that the private carriers finally deal with those companies who continue to rest on the laurels of their former monopolies. And this applies to other branches as well, e.g. telecommunications. NP: Porcupine Tree / Voyage 34 Update: Cate tells me that not all private carriers are as good others, and I agree: DPD, for instance, will also not agree on a time of delivery. And another benefit of the regular post office: unless it's an express parcel, you can pick up the package at the nearest post office on the next day. With private carriers, pick up is usually outside of the city. For express parcels, I can kind of understand why they keep them at the central office for pickups it's open most of the day until 22:00 hours at night, and even on Sundays. Still, I would have preferred to pick it up at a closer post office.

23 October 2006

Evan Prodromou: 1 Brumaire CCXV

First day of Brumaire -- the foggy month -- today, and the Montreal weather seems bound and determined to fulfill the promise of that gray name. The day of pomme (apple), which reminds me that we&aposve wanted to go apple-picking in the Autumn since we arrived in Quebec a few years ago. But something seems to push us inside on October and November days. Locals say that the best way to confront Winter is face-first, getting outside and being active in the snow. I&aposm not sure; it&aposs never worked out that way for me. We had snowfall a couple of days ago; in the middle of a rainstorm big wet clumps of snow started falling from the sky. I was working out at the gym around the corner from our house, and people in the weight room went to the windows to watch the snow fall. Halloween is the traditional day for the first snow for Montrealers; more than a week early was kind of fantastical, like a long-odds horse winning a race. tags:

Mo&apos blogging I can&apost say why, but my production has dropped off precipitously on this blog in the last week or so. Partly it&aposs had to do with an increased workload; also, being out of town for two long weekends in wt:Hudson (New York) and wt:Halifax (Nova Scotia) threw me off my pace. And I&aposve felt some pressure to cover these trips and other things going on in my life, which has kept me from writing short sharp posts. But mostly I think it&aposs a case of keeping up a feedback loop for myself. When I&aposve made a blog post, I watch for responses on Technorati or Planet Debian. I add one more thing or one more post. I get in the habit of blogging and then it comes more naturally in short bits and movements. I guess it all comes down to the typical but hard-to-remember suggestion: if you want to do something, you have to do it. tags:

BarCampMontreal Montreal&aposs BarCamp event turned out to be even better than I anticipated. I got up late on Saturday morning and I wasn&apost at the downtown location till quarter to 10. It was held in Fred Ngo&aposs swing dance studio, Cat&aposs Corner, on the power-centre block of 400 Ste.-Catherine. The studio had tables and chairs and a reception area set up, and it turned out to be a great venue -- lots of room and a big feeling because of the mirrors on the walls. I got there just in time to catch Chris Hand of Zeke&aposs Gallery give an excellent talk about collecting art and participating in art culture in Montreal. Not only was it extremely informative, but it charged me up to be more involved in Montreal&aposs art scene. It also set a great tone for the rest of the day -- talks at the event ranged from alternative voting systems to art and research projects to technology surveys to demos of new products and Web sites. It kept the entire thing really fun and refreshing -- different parts of your mind used at different times. I was glad to see that Heather Kelley and Damien had come; I&aposd made a point of inviting them, so it was good to see their faces. They did one of the first presentations, about their upcoming games-and-art event, GAMMA, at SAT on 9 November 2006, straddling the gap between the industry-oriented Montreal International Games Summit and the gamer convention Festival Arcadia, not to be confused with Montreal&aposs other top export, The Arcade Fire. Man, games are hard. Anyways, they demo&aposd a game they&aposre developing for GAMMA in which the gameplay action responds to arbitrary musical input; they&aposve got several teams of developers who are putting together games to fit this criterion. Interesting concept, fun and cool. There were a ton of great discussion, but I think my favorites for the day have to include Hugh McGuire&aposs talk about the excellent Librivox project; Anne Goldenberg&aposs presentation on Wikigraphe, which I&aposd seen before but which continues to boggle; Austin Hill&aposs discussion about raising money and building Zero Knowledge; and Sylvain Carle&aposs talk about successful consulting. The best part of the talks was that I came away feeling smarter and with new projects I wanted to work on. S bastien Pierre&aposs demo of data-mining del.icio.us tags in revealicious made me think hard about wp:data clustering algorithms (something I&aposve wanted to work on for a while). Patrick Tanguay gave a great talk about co-working setups in other cities, with the aim of starting one here in Montreal. As a near-independent worker who&aposs getting tired of his home office, this was a pretty fascinating idea, and I&aposm hoping to follow-up. And Simon Law&aposs talk about Web 2.0&aposs negative influence on Open Source software gave me a lot to chew on for my visit to the Web 2.0 Conference coverage I&aposm doing for Linux World. All in all, I thought the event was the best that BarCamp has to offer. Montreal has such a rich technology and Internet culture, and some of the smartest people in town were at the event. All our major tech sectors were covered, and people interested in hacking, yakking, and entrepreneurship were in a nice balanced attendance. We were all in one room together, which kept up a good atmosphere, and we had only 15 minutes per talk, which kept things well-varied and interesting. If I had any criticisms, it would be merely that I can think of so many people I wish had been there. There are a lot of women involved in Montreal technology and Internet culture who weren&apost in attendance, and Montreal&aposs majority francophone community was underrepresented. But I think those are outreach problems that need to be handled for the next time around. Fred Ngo is already talking about BarCampMontreal2, which may or may not be coordinated with RecentChangesCamp. Yesterday&aposs Montreal Gazette had an article called Geekfest comes to town which featured a photo of Heather and Damien in the print edition. Simon Law got an excellent BarCampMontreal photoset on Flickr, and also invited me out to take photos together (fun). There&aposs a BarCampMontreal post-mortem for those interested in a follow-up discussion. tags:

N Dollars... American! One of the funny things about Canadians is that when they talk about a large amount of money, they suffix the dollar amount with the word American to let you know that it&aposs really a large amount of money. Like, "I just ordered this t-shirt online and it cost me thirty-five dollars... American!" or "He moved to New York and now he&aposs making 85 thousand dollars a year... American!" It&aposs less of a punchline than it used to be -- American dollars used to trade at about 1:1.5 or 1:1.6 to the loonie, but now it&aposs hard to find 1:1.2. Still, Canadians talk about American dollars like D&D players talk about platinum pieces. They&aposre just a qualitatively different currency. I note this because I joked about in previewing Austin Hill&aposs talk at BarCampMontreal, and he did note that they raised $80 million American for Zer0 Knowledge. I had to stifle a laugh during the talk. Austin writes - Hi Evan. Yeah that&aposs funny. I may have mispoke - we raised $55 million american which at the time was important to distinguish because that was $80 million canadian. Just wanted to be clear. Loved your presentation BTW tags:

Project Blackbox Everybody&aposs all abuzz about Sun&aposs innovative design in their new Project Blackbox. It&aposs a datacentre that&aposs built into a big shipping container; whenever you need a datacentre you can just ship one of these blackboxes to wherever you need it. I have to admit that it&aposs an amazing piece of in-your-face metaphor. I mean, when a company is shipping tech jobs overseas, they can make it all the more poignant by actually taking the jobs and putting them in this big shipping container and stenciling "JOBS" on the side and packing it on a cargo ship and sending it off into the sunset. JOBS And you don&apost really use these big containers unless you&aposre shipping something faaar away. If your job is in that box, man, you can just kiss it good-bye, because baby it&aposs gone. Maybe the best way to ship out one of these jobs containers would be to have a big bulldozer that comes through the middle of town, crushing the community infrastructure under its treads, and then picks up the big shipping container full of tech jobs and carries it off to a big ship in the harbour (rolling over some more schools and houses and small businesses) and then sends it off to somewhere crazy and foreign where they keep monkeys as pets as a matter of course. In any case: good job, Sun. I hope this works out great for you. tags:

22 October 2006

Martin Michlmayr: Testing GCC 4.2 on ARM

On Friday, a branch for GCC 4.2 finally got created, which means that we will hopefully see a release in a few months. The branch should have been created ages ago but the number of regressions just wouldn't go under 100 until recently. During that time, basically since I completed my tests with GCC 4.1, I've been busy testing snapshots of 4.2. I've mainly been testing on em64t (amd64), powerpc and ia64, but I also did some runs on alpha, mips, mipsel, s390 and sparc. Recently, I started testing it on ARM. Being an embedded architecture, ARM isn't terribly fast compared to some other architectures. However, Intel's IOP line is quite interesting and is used in a number of NAS devices. They typically include SATA and often have expandable memory. The device some ARM people are currently working with is the Thecus N2100. A port of debian-installer is underway but more on that later. Since my N2100 is not permanently connected to the Internet, Riku Voipio kindly gave me access to his to do some GCC tests. I started several weeks ago using gcc-snapshot 20060922-1 and it has been compiling happily since. I sort packages by their age, starting with old packages, so while there has been quite a bit of progress since I started, lately it has been going quite slowly. With about 2000 packages compiled in 3.5 weeks, I reckon that GCC 4.2 will be released before I've compiled the full archive. I've therefore been thinking of using distcc to speed the process up. The idea is to run the build process natively on the ARM box but use distcc to perform the actual compilation on another box, namely on a fast machine that has an ARM cross compiler. Unfortunately, I don't have access to such a setup right now. However, I strongly believe that this is a good alternative to test GCC on slower systems and in fact Bill Allombert is currently testing whether it could be used for the m68k port. Finally, Intel's new IOP 34x CPUs are also interesting for this kind of work given that they feature a cache and go up to 1.2 GHz with two cores. P.S. If someone is interested in fixing bugs, I have tagged package bugs related to GCC 4.2.

Biella Coleman: Hunting and Gathering on the Internet

This morning I got back to an article that has been on and off my work-plate for a year now, one that I have to turn in to a discussant for my 4S panel as well for an edited collection of articles on the intersection between art, activism, and biopoltics. Part of my efforts meant attacking a virtual “stack” of articles and one of them was one of best journalistic articles I have read in a long time. Exceedingly clear prose is combined with good references, hard numbers and just the right amount of passionate verve to make reading actually fun and not just another nameless, faceless cog in the academic research wheel. The article mentioned a couple of interesting studies that while sadly not linked from the article (but I am going to take that was an editorial and not authorial decision), they were pretty much cake to find by doing a little poking and prodding on the Internet. So for example, one of them was published on PLoS Serotonin and Depression: A Disconnect between the Advertisements and the Scientific Literature and stands pretty strongly on its own right. But what is even better are the long list of citations (many with links) that would otherwise be frankly, a *total* time consuming bitch to find like the correspondence between the FDA and pharmaceutical companies: # Food and Drug Administration Division of Drug Marketing Advertising and Communications (1997) Effexor warning letter. Rockville (Maryland): Food and Drug Administration. Available: http://www.fda.gov/cder/warn/june97/effexor.pdf. Accessed 14 October 2005. Total gems given to you right there on a silver plate. That is what I love about Internet based research… On the other hand, this extreme access is not always so peachy. The amount of data now available can be experienced as a totally mind-numbing, frightening, chaotic infolanche (as one of my old adivsors liked to call it), which translates into a lot of academic hunting and gathering not to mention all the sorting, sifting, cataloging, and then of course trying to remember what the heck you have just amassed in the first place, even with the aid of tags and all I am not sure if things have gotten easier or harder because this is all I personally know but what I do know is that there are times when I just love the hunt, losing myself for hours, following links, gathering articles, enlivened, exicted about research and there are others when the woolly mammoth of infomartion gets the better of me.

21 October 2006

Andreas Schuldei: Math problem

Dear Lazyweb!

I would like to find the symbolic solution for XT0, YT0, dSX, dSY, qX and qY to this set of equations, in a numerically stable way:

XT0 + real_X1*dSX*Cos[qX] + real_Y1*dSY*Sin[qY] == own_X1,
YT0 - real_X1*dSX*Sin[qX] + real_Y1*dSY*Cos[qY] == own_Y1,
XT0 + real_X2*dSX*Cos[qX] + real_Y2*dSY*Sin[qY] == own_X2,
YT0 - real_X2*dSX*Sin[qX] + real_Y2*dSY*Cos[qY] == own_Y2,
XT0 + real_X3*dSX*Cos[qX] + real_Y3*dSY*Sin[qY] == own_X3,
YT0 - real_X3*dSX*Sin[qX] + real_Y3*dSY*Cos[qY] == own_Y3


Mathematica seems to not come back at all when asked for a solution, Maxima (in Debian) refuses cooporation, Maple produces a solution by approximating Sin and Cos with polynoms (which is not good enough for the whole range of [-Pi .. +Pi] and furthermore is not numerically stable.

This is for finding the parameters for the transformation between two different coordinate systems of maps. The real_* and the own_* coordinates are three identical points on both maps. A numeric solution (with simulated annealing from the gnu scientific library) exists but seems to be not exact enough. See also http://www.posc.org/Epicentre.2_2/DataModel/ExamplesofUsage/eu_cs35.html

Per Olofsson: acpi-support vs hibernate

I used to use the acpi-support package. It originally comes from Ubuntu. The problem is, it really does a *lot* of weird things when suspending and resuming. There are all sorts of workarounds for broken drivers and hardware. And in the end, all these hacks only made things worse: it actually worked better if I just did "echo mem >/sys/power/state" than if I used acpi-support.

I guess this is an Ubuntu thing, hack around everything and try to make it work. It gives fast results. In Debian, I think there's often a kind of opposite perspective: if the driver is broken, fix the driver, don't add ugly hacks. Both approaches of course have their pros and cons.

But now, I have switched to the hibernate package. I like it a lot better, because it isn't just a collection of shell scripts. You can actually configure which workarounds you want to enable, and how you want things to be done. I don't know why Ubuntu didn't simply use this package instead of inventing their own. Maybe hibernate wasn't around at the time.

In the long term, there really needs to be distribution-independent suspend/hibernate interface though. The current situation is less than ideal. Maybe pm-utils will fill this gap.

Update: Oh, I forgot. acpi-support is configurable, but not in a particularly intuitive way, at least not when compared with hibernate. Or maybe it's just my irrational taste.

Update: What I meant to say here actually, I think, is that hibernate is a lot easier to configure and much better documented. You can in a much easier way control exactly which workarounds/hacks you want to apply. And the options are described in the manpage for hibernate.conf. Editing /etc/default/acpi-support is a lot less flexible and a bit confusing.

Hanna Wallach: stereotypes, causes, and math performance

Article in Science (abstract, full text) on how women’s math performance is affected by whether they are considering genetic or experiential accounts for the stereotype of women’s underachievement in math. Stereotype threat is when exposure to a self-relevant stereotype (e.g., regarding something like gender or race) causes someone to behave in such a way that perpetuates the stereotype. The authors of this article wanted to determine whether the causes given for women’s underachievement in math (namely, genetics or experience) affected women’s math performance, i.e., whether stereotype threat was affected by the causes given for that stereotype. (Note that the study was NOT intended to address the question of whether there are innate sex differences in math performance.) To test this, women were given a math test, then an essay to read, and then another math test. The essay either claimed that math-related sex-differences are genetic, experiential, or don’t exist. The women who were given essays stating that math-related sex-differences don’t exist or are due to experience significantly outperformed women who were given essays that claimed genetic causes. Interesting, huh? (Thanks to Julia for pointing out the article.)

20 October 2006

Axel Beckert: The mouseless side of X

Although I like the idea of a tiling and completely keyboard focused window manager, I never fell in love with Ion because the default keybindings weren’t really intuïtive (to me). A few months ago I noticed, that ratpoison is also a tiling and completely keyboard focused window manager, only with much more intuitive usage: If you know screen and it’s keybindings, you also know ratpoison and it’s keybindings: Just exchange Ctrl-A with Ctrl-T. This sounds perfect for usage on my low performance laptops, where I have small screens and usually also no virtual desktops in use. There’s only one thing which annoys me in ratpoison: If I use a mostly mouse driven application like e.g. a webbrowser with ratpoison, I have no problems to click on links, even if the webbrowser is not in the so called “current frame”. But if e.g. click into an input field, I usually notice much too late that while the mouse works fine in the browser, keyboard focus is still in some other window. Currently they all use flwm, the Fast and Lite Window Manager. So what I would need is a tiling and keyboard focused window manager but with “focus follows mouse” politics. And since the laptops on which I intend to use such a window manager, all have a touchpad or thumbstick, the mouse there counts as keyboard focused, too somehow, doesn’t it? :-) I wonder, if an ion3 could be configured to use the same keybindings as ratpoison. That would probably fulfil this desire. On the other hand, there are browsers which are fine without mouse. lynx or links2 for example, so the focus problem I have with ratpoison wouldn’t occur. But what if I need or want a keyboard driven and full blown webbrowser? Ok, Firefox as well as Opera are not that bad in keyboard only use, but they still are focused on the mouse using user. But Gecko wouldn’t be Gecko, if there wasn’t some Gecko based browser with this features: On the ratpoison website I found a link to a very interesting Firefox plugin which makes Firefox a complete new browser, a keyboard driven webbrowser named Conkeror. It has no toolbars at all, no (visible) tabs, no menus, no nothing — it shows only the website in fullscreen, a status line and a multipurpose command line — exactly like the mini-buffer of GNU Emacs. But not only the layout, even the keybindings are very emacsish: C-x C-f opens an URL in a new buffer -eh- tab, C-x 5 C-f opens an URL in a new frame (window), C-x C-v opens a new URL in the current tab (buffer) with the current URL as editable default value, C-x b switches to another tab, C-x k kills -eh- closes a tab, C-x C-b lists all open tabs, l goes back (remember the Emacs info reader, eh?), C-g quits accidently requested dialogs or stops loading a web page, Ctrl-s and Ctrl-r give you forward and backward i-search, C-n, C-p, C-f and C-b scroll, etc. Even M-x works, e.g. will M-x revert-buffer reload the web page. (Unfortunately Esc-x doesn’t work. Yet.) And for vi freaks, there is even M-x use-vi-keys. There’s even one lynxish keybinding: \ lets you view the source. And although it’s one of the strangest webbrowsers I saw yet, I somehow like it and also would like to see it in Debian as package, since it is the perfect companion for ion or ratpoison. Looking through apt’s package cache as well as the wnpp bugs, I haven’t found any hint on somebody already packaging it, so I’ll have a look on it and on how to to package a Firefox extension for Debian. BTW: While looking through the wnpp bugs, I found bug #335459, which is the ITP flock, an also Gecko based browser with a lot of cool features for blogger who like social network tools. Another nice thing I found today in Debian was the xfonts-artwiz package whose small fonts are very suitable for small resolution screens, especially if a tiling window manager is used with a e.g. 800×600 resolution. Unfortunately they aren’t available in a charset with German umlauts. Apropos tiling window managers: Anyone tried pconsole with an automatically tiling and resizing window manager? I wonder if it’s usable. At least on MacOS X with its cascading window positioning algorithm, pconsole is a pain. — But even without cascading windows, MacOS X is a pain for keyboard users. Just think of its default behaviour when using the tab key inside a form mask: It will skip all buttons, all checkboxes, all radio buttons and all select boxes. Argh!

Martin F. Krafft: Freeing the primary IP address

I have a machine in Singapore and have been asked to switch it to another IP address (don't ask...). Due to numerous reasons, I do not want to reboot the machine, so I am faced with the task of switching the primary IP address of a remote host via SSH. Fun. In the following remote identifies the remote machine, local the workstation from where the SSH session originates. 1.2.3.150 is the old IP that I have to free, and 1.2.3.200 is the new IP. 1.2.3.129 is the router IP and since it's a /25 network, 1.2.3.128 is the network address. I'll be using the ip command from the iproute package exclusively. ifconfig must DIE! The first step of this endeavour is making sure that traffic to your new IP is not going to be caught by the packet filter. This is simple enough:
remote# ip addr add 1.2.3.200/25 dev eth0
local# nc 1.2.3.200 22
SSH-2.0-OpenSSH_4.3p2 Debian-3~bpo.1
We have thus added a secondary address and verified that it can communicate, at least receive packets on port 22. However, since it is a secondary address, it depends on the primary address and will be removed if you remove the primary from the interface. We thus need to get tricky:
remote# ip addr del 1.2.3.200/25 dev eth0
remote# ip addr add 1.2.3.200/32 dev eth0
Note how we're adding the address with a /32 netmask instead. This makes it independent of the current primary address. Now the fun begins. Close the SSH session and log in to the new IP:
remote# exit
local# ssh root@1.2.3.200
And remove the primary IP; yes, you heard me:
remote# ip route
1.2.3.128/25 dev eth0  proto kernel  scope link  src 1.2.3.150
default via 1.2.3.129 dev eth0
remote# ip addr del 1.2.3.150/25 dev eth0
remote# ip route
default via 1.2.3.129 dev eth0
Gotta love Linux: it saved the default route because it was still reachable from the 1.2.3.200/32 address, and only removed the link-local route. We could stop right here for there is no real reason why this machine should have a link-local route or even know about the network to which it is attached; but we won't... instead, we'll add the new address again (a second time), now with a proper netmask:
remote# ip addr add 1.2.3.200/25 brd 1.2.3.255 dev eth0
remote# ip addr del 1.2.3.200/32 dev eth0
remote# ip route
1.2.3.128/25 dev eth0  proto kernel  scope link  src 1.2.3.200
default via 1.2.3.129 dev eth0
After modifying /etc/network/interfaces, the deed is done. The next time I do this I might consider a safety net of the form:
remote# echo 'ifdown --force eth0; ifup eth0'   at now + 10 minutes
But that would only have been half as fun. Of course it goes without saying that the above comes without warranties, if you try it out, you do so at your own risk. :) NP: Neurosis / The Eye of every Storm Update: It's been proposed to just run:
remote# ip addr del 1.2.3.150/25 dev eth0; \
  ip addr add 1.2.3.200/25 dev eth0; \
  ip route add default via 1.2.3.128
This may well work, especially if run within a screen session (I've had times when the shell did not execute subsequent commands after being cut off from the controlling tty). However, this method does not guard against typoes. Or did you spot the typo in the above set of commands? The method I provided above seems resilient to typos as no command ever affects the current connection.

Martin F. Krafft: Loop-mounting partitions from a disk image

Every now and then, I have a disk image (as produced by cat, pv, or dd) and I need to access separate partitions. Unfortunately, the patch allowing partitions on loop devices to be accessed via their own device nodes does not appear to be in the latest (Debian) 2.6.18 kernels the loop module does not have a max_part parameter, according to modinfo. So this time I sat down to come up with a recipe on how to access the partitions, and after some arithmetic and much swearing at disk manufacturers, and especially the designers of the msdos partition table type, I think I have found the solution, and the urge to document it for posterity. It's all about the -o parameter to losetup, which specifies how many bytes into the disk a given partition starts. Getting this number isn't straight forward. Well, it is, if you know how, which is why I am writing this. Let's take a look at a partition table, with sectors as units:
$ /sbin/fdisk -lu disk.img
You must set cylinders.
You can do this from the extra functions menu.
Disk disk.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
      Device Boot      Start         End      Blocks   Id  System
disk.imgp1   *          63       96389       48163+  83  Linux
disk.imgp2           96390     2056319      979965   82  Linux swap / Solaris
disk.imgp3         2056320    78140159    38041920    5  Extended
disk.imgp5         2056383     3052349      497983+  83  Linux
disk.imgp6         3052413    10859939     3903763+  83  Linux
disk.imgp7        10860003    68372639    28756318+  83  Linux
disk.imgp8        68372703    76180229     3903763+  83  Linux
disk.imgp9        76180293    78140159      979933+  83  Linux
The first few lines is fdisk complaining not being able to extract the number of cylinders, since it has to operate on a file which does not provide an ioctl interface. The first important data are the units, which are stated to be 512 bytes per sector. We take note of this value as the factor for use in the next operation. Let's say we want to access the 7th partition, which is 10860003 sectors into the disk, according to the fdisk output. We know that each sector is 512 bytes, so:
10860003 * 512 = 5560321536
Passing this number to losetup produces the desired result:
# losetup /dev/loop0 disk.img -o $((10860003 * 512))
# file -s /dev/loop0
/dev/loop0: Linux rev 1.0 ext3 filesystem data
# mount /dev/loop0 /mnt
[...]
# umount /mnt
# losetup -d /dev/loop0
If the partition really holds a normal filesystem, you can also let mount set up the loop device, and manage it automatically:
# mount -o loop,offset=$((10860003 * 512)) disk.img /mnt
[...]
# umount /mnt
And since there's aparently no means to automate the whole process for an entire disk, I hacked up plosetup. Enjoy:
# plosetup lapse.hda .
I: partition 1 of lapse.hda will become ./lapse.hda_p1 (/dev/loop0)...
I: plosetup: skipping partition 2 of type 82...
I: plosetup: skipping partition 3 of type 5...
I: partition 5 of lapse.hda will become ./lapse.hda_p5 (/dev/loop1)...
I: partition 6 of lapse.hda will become ./lapse.hda_p6 (/dev/loop2)...
I: partition 7 of lapse.hda will become ./lapse.hda_p7 (/dev/loop3)...
I: partition 8 of lapse.hda will become ./lapse.hda_p8 (/dev/loop4)...
I: partition 9 of lapse.hda will become ./lapse.hda_p9 (/dev/loop5)...
# ls -l
total 0
lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p1 -> /dev/loop0
lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p5 -> /dev/loop1
lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p6 -> /dev/loop2
lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p7 -> /dev/loop3
lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p8 -> /dev/loop4
lrwxrwxrwx 1 root root 10 2006-10-20 13:25 lapse.hda_p9 -> /dev/loop5
# plosetup -c .
# ls -l
total 0
(this post is dedicated to Penny for no other reason than the tunes I am listening to right now) NP: Fly My Pretties / The Return of Fly My Pretties Update: Be careful about the $((...)) style arithmetic. dash manages to overflow at 32bit. zsh and bash seem to get it right. If in doubt, use perl or a calculator.

19 October 2006

Wouter Verhelst: Wireless networking

Warning: useless rant follows Since about two years, my main machine is an Apple Powerbook G4. These come with builtin wireless ("Airport Express"), but for a long time there were no Linux drivers for these things. Instead, I had bought myself a USB wireless thingy; one based on a ZD1211 chipset, for which there is a free driver contributed by the company that designed the chipset. The driver needs non-free firmware, but I don't give a flying **** about that. The unfortunate thing about the driver is that it was written in a style that makes it hard to be accepted by the kernel developers, so that didn't happen. And won't for a while. As a result, the driver sometimes breaks upon kernel upgrade, which is a shame. But when it does work (which unfortunately is not 'now'), it works great; the throughput is about as much as I could expect from my 11M wireless access point. The alternative now is to use the Airport Express driver. Unfortunately, this driver only exists because some binary-only driver that existed for Linux somewhere was reverse-engineered. As a result, the driver isn't very good; it sometimes crashes on me (in which case the only thing I can do is power down my laptop and boot it up again), and when it does work only has a throughput of about 60kB, at best. Which is not very good (a 10Mbit network can easily reach about 10 times that speed; and yes, I did verify that I'm running at 11Mb/s, not at 1). I'm very grateful to Zydas for providing a GPL-ed driver for their hardware. If only companies such as nVidia, ATI, and broadcom would give up their crack pipe and behave similarly, then this world would be a much better place. But I'm not grateful to Zydas for just providing a dump of their CVS repository and leaving it at that; getting a driver into the Linux kernel is not that hard, it just takes some persistence. Had they done that, I would've had working wireless now. Real working. grmbl. Update: Seems the situation is better than I thought. It had been a long time since I last tried the bcm43xx driver. Last time I tried it it was a piece of crap; when I tried it a few days ago, it was also a piece of crap. Apparently, though, that was just bad luck, since the driver in 2.6.18 is buggy (but it should be fixed in 2.6.18.1). And for the Zydas driver, apparently it made it into the kernel mainline while I wasn't looking. Only it doesn't work for me, probably because the hardware is breaking down (if I hold it in a peculiar way, it gets detected as a broken USB1 device rather than a working USB2 device, which is not good...). That, or my access point is playing tricks on me. That wouldn't be the first time, either. I guess an apology is warranted here. Sorry.

Kai Hendry: Where was I?


School children learning about Free software
I feel a little stupid for my last post about my unstable machine. It was the hardware to blame and my hard drive finally crashed during a Linux conference in Mendoza, Argentina. Typical. At the conference there wasn´t much new for me and I regret that I didn´t get organised enough to give a talk about the Web and WHATWG stuff. Though I did manage to meet good people and talk about some topics that are of interest to me. As usual the fabulous friendly CafeLUG geeks from Buenos Aires were there, led by the wonderful DD Marcela. I also met an inspiring guy from Cordoba who founded a successful software company that works with free software. His brother gave a great talk about it at the conference. I really love to see Free software power people to start a business. Oh and about my thinkpad X40 hard drive replacement. With the help of another new friend Fredrico from Mendoza, we called up IBM in Buenos Aires and arranged a new hard drive and a battery within 5 days! I didn´t know if my machine was under warranty still, phew. Unfortunately IBM called the next day saying they didn´t have any stock and the wait from the US is about 2 weeks. Since I have no idea where I will be in two weeks (ok, probably Sao Paulo, Brazil) I cancelled that request and now I have found a free Windoze (hopefully not trojaned) terminal just over the Andes, in Santiago Chile. Tough life!

Kai Hendry: Where was I?


School children learning about Free software
I feel a little stupid for my last post about my unstable machine. It was the hardware to blame and my hard drive finally crashed during a Linux conference in Mendoza, Argentina. Typical. At the conference there wasn’t much new for me and I regret that I didn’t get organised enough to give a talk about the Web and WHATWG stuff. Though I did manage to meet good people and talk about some topics that are of interest to me. As usual the fabulous friendly CafeLUG geeks from Buenos Aires were there, led by the wonderful DD Marcela. I also met an inspiring guy from Cordoba who founded a successful software company that works with free software. His brother gave a great talk about it at the conference. I really love to see Free software power people to start a business. Oh and about my thinkpad X40 hard drive replacement. With the help of another new friend from Mendoza, we called up IBM in Buenos Aires and arranged a new hard drive and a battery within 5 days! I didn’t know if my machine was under warranty still, phew. Unfortunately IBM called the next day saying they didn’t have any stock and the wait from the US is about 2 weeks. Since I have no idea where I will be in two weeks (ok, probably Sao Paulo, Brazil) I cancelled that request and now I have found a free Windoze (hopefully not trojaned) terminal just over the Andes, in Santiago Chile. Tough life!

MJ Ray: JDLL and how bubulle upset Julien

To try and make it easier for non-Francophone Anglophones to understand this complaint and response in English, an attempt at translating the email is below. Errors are all mine:-
Our community (Debian) has a defect: the noisiest (and evidently the most extreme) are always the most visible. It is very regrettable that the people who say they represent Debian at JDLL, who are always only some of the 70 French developers of a thousand-developer project with many thousands of contributors, can have given you this totally false image. Their provocation was totally purile, even if the subject is a true subject of discussion. Unfortunately, this sort of position will always exist. I hope simply that the people who have been shocked by this childish behaviour and the also-totally-purile comments appearing in 24 hours on various blogs will have the intelligence not to fall in the same trap as their opponents, notably the easy amalgamation. Extremism doesn't always win in Debian (and not even as often as that), compare the last votes: http://lists.debian.org/debian-devel-announce/2006/10/msg00018.html http://lists.debian.org/debian-devel-announce/2006/10/msg00017.html and so on. I would appreciate it if this appears in your blogs to temper a little the unacceptable comments that you have received from certain people... and I allow myself to give you respectively meetings at the next Solutions Linux to discuss all this calmly over $BEVERAGE. [ENDS]
I think posting the above without making it clear that it is a one-man initiative and apparently sent without consulting those criticised was downright sneaky and always going to offend. The daft acts of people at JDLL cannot be corrected honourably by more daft acts! The message also seems to me to suggest that it's somehow extreme to object to the Mozilla Corporation using trademarks to stop Firefox and friends being freely-modifiable free software (by requiring inclusion of material with no copyright permission to modify) and to try to dictate what goes into distributions. Unlike the firmware problem, Mozilla's trademark terminators are an obvious and active practical problem for debian maintainers and downstream. I hope the Mozilla fans who were upset by such a "childish" non-obvious reminder [JPEG, 70Ko] about the MozCorp trademark offensive will bring MozCorp into line. If not, I hope that the next time is better satire that informs more people and avoids the "purile" tag.

18 October 2006

Martin F. Krafft: HP LaserJet 3052 anyone?

I am about to buy a HP LaserJet 3052 for my home office. Unfortunately, I have not been able to find any reviews of it, and while the feature set looks quite convincing, I'd feel much better if I'd know people are happy with it... Are you? Are you not? Please drop me a line if you own this device. NP: No-man / Dry Cleaning Ray

Chris Anderson: Y Combinator

It's official, a friend and I have submitted our application to Y Combinator for the winter submission deadline. Hopefully within the next week we'll be lucky enough to make it at least to the interview process in MA. Unfortunately, my ANSI Common Lisp book is back in Ohio at the moment so I won't have a chance to bring it along and proclaim my inner fanboy when we meet with Paul Graham and Co. It will be interesting to leave work at my current internship early on a Friday to fly to MA for this opportunity though. I'm lucky I'm finished here in Washington by December.

Alas, I may never graduate at this rate. But at least the ride has been thrilling and informative. If anyone has participated in the Y Combinator program and has any advice / wisdom to impart I would be grateful if you passed it along to chris[at]nullcode.org.

Next.

Previous.