Search Results: "reg"

30 August 2007

Russell Coker: Identifying the Distribution of a Linux System

I just needed to test something so I mounted the filesystem of one of my Xen domains in the Dom0 and chroot’d into it (I didn’t need the overhead of running a DomU for a quick test). Then strangely I found that my chroot environment had no apt-get and no dpkg installed. After a small amount of thought I realised that I had accidentally mounted the filesystem for a Fedora image instead of a Debian image. It seems to me that it might be a good idea for distributions to have shell scripts replacing the package tools for other distributions. For example dpkg on a Fedora box could be a shell script that runs echo “This system is running Fedora, you want to use rpm instead of dpkg”. Such a command would have saved me a couple of minutes of thinking. This may sound trivial, but if you consider the number of people who make such mistakes (and the even larger number of people who don’t realise that there is even more than one package tool in existence) then wasting a few K of disk space on every system to help them seems like a good idea. The minimum size of new hard drives that you can purchase seems to be 36G nowadays. So it’s not as if this would really cost anything. Please leave comments to tell me if I’m being sensible or silly. If the idea is regarded as good I’ll start filing bug reports.

Enrico Zini: gpl-and-business-faq

GPL and Business FAQ I sometimes happen to be in a dialogue like this:
X: According to GPL, you can sell copies of your software at any price you want, right? Me: Right. X: But your customers can in turn sell copies of your software at any price they want, right? Me: Right. X: So, the only way a GPL developer can make money is by charge for development of their software? Me: Not only for development: also for maintenance, improvements, customisation, installation, training, gadgets, support...
The market is quite big, actually. In fact, one can even make business by selling the software in a box, if one makes a box that people would like to have (for example, including things like useful documentation, a few gadgets, a support contract and a pony). The idea is that the business of selling software alone is a useless extortion that provides no particular benefit to the user (and in many cases, no particular benefits to the developer either). If you put that aside, there is a plethora of ways to charge the customers more, and for things and services that are useful to them and make them happy. Actually, if you develop a GPL software for someone who is then happy about it, they may then pass it on to other people in the same sector. Who then maybe need help with installation, support, maintenance, custom features, training, gadgets and ponies. If your software hits the spot, a niche market can end up growing by itself. The last discussion on this topic then ended up with another question:
X: Ok. But to do a good job you have to be many people at once: for example you sometimes need to be a sysadmin as well as a developer. Me: Yes. Being many people at once is what starting a company is all about.
He complained that answers like these could not be found in the Selling Free Software article of FSF: in the meantime I'll publish them here. The license of this post is GPL. The FSF and any of their regional chapters are welcome to use all or part of this text, with or without modification as they see fit, alone or included in documents that use any license they see fit, even some of the not really free ones they use sometimes, such as the one used by Selling Free Software itself :-P

29 August 2007

Russell Coker: The Silly BMW 745h

BMW has released a new prototype hydrogen powered car. The bmwworld.com web page about it claims the cruising range is 190 miles. Added to the 400-mile range of the normal fuel tank, the 745h can go 600 miles between fill-ups. The first issue is that 10 miles are not accounted for (maybe it finishes the 190 miles of hydrogen power at the top of a hill). But more seriously the hydrogen needed to drive for 190 miles would take as much space as petrol needed to drive for 646 miles (hydrogen needs 3.4* the volume to store an equivalent amount of energy). I wonder if that BMW has any space left in the boot/trunk? Now we have some green bloggers praising BMW. An internal combustion engine that burns hydrogen will not give no emissions other than water vapour, it will produce some nitrogen oxides. The processes to produce hydrogen for fuel all consume unreasonable amounts of energy (more than is required to charge a plug-in hybrid). BMW demonstrates their level of interest by giving the cars to some celebrities. This gets some PR but no analysis of the performance. They also introduce the prototype based on one of the most expensive models (the 745) which you almost never see on the roads. If they produced a 318 or 520 that ran on hydrogen it would demonstrate some level of interest in getting this working for the mass market. If BMW wanted to make their cars more environmentally friendly they would start by adopting some of the technology from the Prius. Rumour has it that part of Toyota’s plan to make money from Prius development is in licensing the technology that they patent. A couple of years ago I test drove a BMW 316 and a Prius. The Prius was very quiet and gave a smooth ride (you might call these luxury features), and also gave decent performance (it’s widely regarded that luxury cars should perform well - pity the BMW 316 is a slug). In Australia the concept of “badge engineering” of cars is well established. When government subsidies favoured large manufacturing runs the Ford Laser and Mazda 323 were essentially the same car. Maybe BMW could adopt this concept and sell a re-badged Prius i-tech with a few extra luxury features as a BMW 4 series (it’s a much better car than the 3 series BMW). Finally bmwworld.com has an amusing FAQ about hydrogen power, here are some of the mistakes that they make:
  1. They say “About 45 billion kilograms (50 million tons) [of hydrogen] is produced every year enough hydrogen to fuel 250 million fuel cell cars“, but only if the average fuel-cell car uses 180Kg of fuel per year. According to Wikipedia hydrogen has slightly more than 3* the energy density per mass than petrol, so 180Kg of fuel would be equivalent to 540L of petrol per year. The Australian Bureau of Statistics states that in 1996 the average annual distance travelled by car (it’s not clear whether this is per car or per person) was 14,600Km while among the countries listed the lowest was Japan with 10,130. When efficiently using hydrogen in a Prius (that is quoted as using 5.4L of petrol per 100Km) you might expect that 540/5.4*100=10,000Km could be travelled on the 180Kg of hydrogen. So the FAQ claim that 250M cars could be powered by the current hydrogen production would only apply if the cars are of Prius efficiency and driven the typical distances of Japanese drivers, or the cars were 46% more efficient than the Prius and driven in the Australian manner. Of course in the US things are even worse with 17,862Km being the average distance driven which means that their hypothetical fuel-cell car would need to be 78% more efficient than a Prius.

  2. They state that “the majority of merchant hydrogen is produced by a process called steam methane reforming“. Why not just run cars on methane then? Anything that burns can be used to fuel cars, and methane has a much higher boiling point than hydrogen so it would be easier to store and transport (see the Wikipedia page on methane).

  3. In regard to hydrogen production they say “about 95% of the total global hydrogen production is captive meaning it is used at the site where it is produced“, that is of course because it’s difficult and expensive to transport hydrogen.

  4. The final amusing fact is that it is noted that most hydrogen comes from fossil-fuels. What problem are they trying to solve here? Hydrogen isn’t going to help the environment if it comes from fossil fuels, it will be more expensive than other fuels. Apart from getting government grant money for BMW it doesn’t seem to do any good.

Gunnar Wolf: Gl cklich in sterreich!

Good comrades, great chat, greater motivation.
Some good Scotch whisky, a good friend who was lumped along with me in .br by mere chance. A very good time.
A strong whisky aftertaste and numbness in the mouth. My first couple of pages of Terry Pratchet - Thanks a bunch!
My mind wanders, I go over all the nice and dear things and people
Maybe tomorrow I should restart my reading? I know Pratchett is not supposed to make much (rational) sense, but still... Although I've enjoyed this couple of pages, I'd rather let the whisky wear out before continuing with the gollem owner's life and tribulations, with his friendly treatment for his plausible but honorable assassin...
Today I saw quantum superpositions mixed with special relativity in a small (less than 200 lines) Perl module. Positronic variables go back in time, yay! Damian Conway rules.
Time to sleep, yes, if tomorrow you want to be in time for the lightning talks. Oh, BTW: great honor, great honor: One of the lightning talkers requested /me to sit on the front row "to have a friendly face to look at". Have to comply, have to do.
But... Last reflection before going away: What a better way to describe bliss in Vienna (oder auf Deutstch, ich glaube - gl cklich in sterreich;) than to go to sleep while listening to the neighbour's fucking-loud music? Of course, his fucking-loud-music is just the-Balkan-music-you-seem-to-love, so everything's berfine!
Thanks to everybody who made this possible. Specially to the Austrian friends.

Jeff Bailey: Ready to ride again!

We're in Albuquerque, NM now and have been for a couple of days. We made such excellent time across Oklahoma and Texas that we were able to stop and take a break for three nights.

Texas: Holy *crap* is Amarillo a dirty place. We spent three times what we've spend on any hotel this trip in order to get a place that we were sure was insect-free. And what we wound up with was a place over top of a bar. Luckily it wasn't all country, so we didn't mind too much. It was also (surprisingly) the best breakfast I'd had on the trip. They did hash-browns on a griddle, and had lots of ketchup (do I have to spell it catsup now?), tabasco, and pepper to go on it. Weirdly, they also had pre-mixed peanut butter and honey. Otherwise, the truck stop we stopped at had cockroaches on the floor, the bottled-water bottles were dirty on the outside, and the place smelled like an airport tarmac.

We left early and headed out to Albuquerque. Aside from the fact that whoever laid out the roads was certainly drunk at the time (We drove around in circles three times trying to get to a hotel we could see, but not find a way to legally drive to before giving up and going to a different hotel) this place is really pretty. I came here for my last meeting as a Regional Organising Consultant for Young Adult and Campus Ministry and got a chance to see a bit of the place and really wanted to show it to Angie. Instead we decided we'd had enough of driving and traveling. This hotel has laundry facilities and the town has a Whole Foods Market, so we stocked up on microwaveable foods, washed our clothes, watched TV and I finally finished Harry Potter during a nice long bath.

The next day (Yesterday), we headed out to the Puebo Cultural Centre to see the art pieces and learn a little about their successful resistance against the spanish resulting in actual land grants to the 19 local groups. We also got to see how different groups have influenced them over the years, with ancestry tracing something like 12,000 years back. From there we managed to find the old town and got to see the type of architecture that I wanted to show Angie. The little pink houses don't *just* exist in DisneyLand. ;) We went to a restaurant that looked really familiar - I think we ate there when I was here last. We had some wonderful New Mexico food and I introduced Angie to what the local sopapillas are like. Here's they're large puffy things, whereas the sopapillas in Texas and back home look like soft tortilla chips.

I've started uploading some pictures to Flickr, but it turns out that I hadn't done so since before Juniper's wedding and have over 400 pictures to send. Between hotel wireless being slow and f-spot being a fragile piece of crap I managed to upload something over 100 pictures of Leif to the family-only archives before giving up. I'll probably post the Opus pictures up on Facebook rather than flickr so that it's easier for other Opusers to find them

The next target is Flagstaff, AZ for Thursday night. We're meeting Karina and her husband for a day of wandering around the Grand Canyon, so we'll see if there's some interesting things between here and there. I suspect there will be. =)

*hugs*, all! Less than a week until I start my new job! I'm excited!

28 August 2007

Russell Coker: The Silly BMW 745h

BMW has released a new prototype hydrogen powered car. The bmwworld.com web page about it claims the cruising range is 190 miles. Added to the 400-mile range of the normal fuel tank, the 745h can go 600 miles between fill-ups. The first issue is that 10 miles are not accounted for (maybe it finishes the 190 miles of hydrogen power at the top of a hill). But more seriously the hydrogen needed to drive for 190 miles would take as much space as petrol needed to drive for 646 miles (hydrogen needs 3.4* the volume to store an equivalent amount of energy). I wonder if that BMW has any space left in the boot/trunk? Now we have some green bloggers praising BMW. An internal combustion engine that burns hydrogen will not give no emissions other than water vapour, it will produce some nitrogen oxides. The processes to produce hydrogen for fuel all consume unreasonable amounts of energy (more than is required to charge a plug-in hybrid). BMW demonstrates their level of interest by giving the cars to some celebrities. This gets some PR but no analysis of the performance. They also introduce the prototype based on one of the most expensive models (the 745) which you almost never see on the roads. If they produced a 318 or 520 that ran on hydrogen it would demonstrate some level of interest in getting this working for the mass market. If BMW wanted to make their cars more environmentally friendly they would start by adopting some of the technology from the Prius. Rumour has it that part of Toyota’s plan to make money from Prius development is in licensing the technology that they patent. A couple of years ago I test drove a BMW 316 and a Prius. The Prius was very quiet and gave a smooth ride (you might call these luxury features), and also gave decent performance (it’s widely regarded that luxury cars should perform well - pity the BMW 316 is a slug). In Australia the concept of “badge engineering” of cars is well established. When government subsidies favoured large manufacturing runs the Ford Laser and Mazda 323 were essentially the same car. Maybe BMW could adopt this concept and sell a re-badged Prius i-tech with a few extra luxury features as a BMW 4 series (it’s a much better car than the 3 series BMW).

Holger Levsen: nine days later

I'm now only down to 55 unread mails, but I'm happy, as I'm now in the region where those mails mean actual todo stuff.

And, this weekend I've been mostly offline, having fun at a free festival. Thus enjoying my second day without internet this year and my first day without speaking or reading/writing english - though I enjoyed that much less :-)

Joey, thanks for your suggestion to turn down the frequency of polling mails. I'm happily polling every 30 minutes now too, and thinking of going down to every 60 minutes.

Joerg Jaspert: UMTS (3G) in Linux - very simple, better than in Windows!

I got my UMTS (3G) card on monday and started to play with it. And from what I could read about the windows software that comes with the card - I am glad to have Linux. After all the only thing I had to figure out was the fact that everything just works and I just have to point my dialup app at the right interface… In Windows you have to install tons of megabytes of bullshit, possibly with ten reboots. Ha. For future reference, mainly for me but possibly others too - lets write down what I have: I got a Vodafone Option card, Model GE0201. It’s one for the new-style ExpressCard Slots, so it ships with an adapter to the older CardBus standard. Inserting the card into its slot (already in the adapter) the following dmesg output appears:
[15930.197929] pccard: CardBus card inserted into slot 0
[15930.198371] PCI: Enabling device 0000:06:00.0 (0000 -> 0002)
[15930.198385] ACPI: PCI Interrupt 0000:06:00.0[A] -> GSI 18 (level,low) -> IRQ 18
[15930.198416] PCI: Setting latency timer of device 0000:06:00.0 to 64
[15930.198424] ohci_hcd 0000:06:00.0: OHCI Host Controller
[15930.198480] ohci_hcd 0000:06:00.0: new USB bus registered, assigned bus number 6
[15930.198507] ohci_hcd 0000:06:00.0: irq 18, io mem 0x8c000000
[15930.764279] usb usb6: configuration #1 chosen from 1 choice
[15930.764308] hub 6-0:1.0: USB hub found
[15930.764320] hub 6-0:1.0: 2 ports detected
[15931.276444] PCI: Enabling device 0000:06:00.2 (0000 -> 0002)
[15931.276460] ACPI: PCI Interrupt 0000:06:00.2[A] -> GSI 18 (level,low) -> IRQ 18
[15931.276827] PCI: Setting latency timer of device 0000:06:00.2 to 64
[15931.276836] ehci_hcd 0000:06:00.2: EHCI Host Controller
[15931.277145] ehci_hcd 0000:06:00.2: new USB bus registered, assigned bus number 7
[15931.299893] ehci_hcd 0000:06:00.2: irq 18, io mem 0x8c001000
[15931.299916] ehci_hcd 0000:06:00.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[15931.300351] usb usb7: configuration #1 chosen from 1 choice
[15931.300523] hub 7-0:1.0: USB hub found
[15931.300535] hub 7-0:1.0: 2 ports detected
[15934.837567] usb 6-1: new full speed USB device using ohci_hcd and address 2
[15935.033681] usb 6-1: configuration #1 chosen from 1 choice
[15935.036577] option 6-1:1.0: GSM modem (1-port) converter detected
[15935.036751] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB0
[15935.039703] option 6-1:1.1: GSM modem (1-port) converter detected
[15935.039813] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB1
[15935.043067] option 6-1:1.2: GSM modem (1-port) converter detected
[15935.043482] usb 6-1: GSM modem (1-port) converter now attached to ttyUSB2
Inserting the adapter alone already gives the output up to timecode 15931.300535, so it doesn’t seem to be a simple adapter only. I wonder what I get when I use it with random ExpressCard devices. (Not that I have any other than the option card atm). Looks like the card registers 3 GSM modem ports. Only 2 are usable, so don’t try to use ttyUSB1, doesn’t work anyway. In case the system doesn’t like the ports one may need to reload the usbserial module telling it the vendor and product id it should work for, but I did not need to do it. Now, getting online. The actual act is very simple, just let me write down some more detailed text as background info: There are 2 usable “modem” interfaces one can use. I chosed to use ttyUSB0 for internet connections, leaving ttyUSB2 to other apps. Like - getting status information or sending/receiving short messages. The first step one has to do is unlocking the card with your pin. The command for this is AT+CPIN=xxxx, replacing xxxx with the actual pin. (Type it into a minicom if you want). The card will “login” into the mobile system and change its flashing lights from “both lights flash” to “only umts light flashes”. Its also useful to tell your card which net to use for future connections. So type AT+CGDCONT=1,”IP”,”web.vodafone.de” and you did select the Vodafone net. There are a few other AT commands where you can tell the card the preferred way of operation, ie. should it prefer UMTS(3G) or GPRS connections or should it only support one of those:
at_opsys=0,2Only GPRS
at_opsys=1,2Only UMTS(3g)
at_opsys=2,2Prefer GPRS over UMTS(3G)
at_opsys=3,2Prefer UMTS(3G) over GPRS
I did use the 3,2 setting, but there may be situations where you want other settings. Type AT+CSQ to see your current signal strength. After having done all those preparations we want to get connected. Simple. Dial *99***1# and the card will connect. You only need to talk a bit of PPP and you have net. Of course noone wants to do all this by hand, so lets use wvdial for it. Its simple. Take the following config:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
[Dialer pin]
Init3 = AT+CPIN=xxxx
[Dialer umts]
Dial Command = ATD
Carrier Check = no
Phone = *99***1#
Password = doesntmatter
Username = noonecares
Stupid Mode = 1
Init4 = AT+CGDCONT=1,"IP","web.vodafone.de"
Dial Attempts = 2
With it you type wvdial pin, wait a second and type wvdial umts and you have a working internet connection. Hit Ctrl-C to disconnect. Yes, thats all thats needed. Plugin card, type wvdial pin && sleep 1 && wvdial umts and have fun. Now, what to do with the second “modem” on the card. You could use it to get status info about your connection, like signal strenght. You could also point wammu/gammu at it and send or receive SMS. Ok, well. Wammu has a little bug currently and doesn’t really like the option card. I mailed its maintainer already and got a patch back, which fixes half of the problem, so full support should be there soon. (Guessing with the time he needed for the initial patch it should be there within days at max… :) ). Trying a KDE app (*shudder* :) ) named kmobiletools one can read SMS without any patch. One can even send SMS. But kmobiletools can’t delete SMS stored on the card.). Finally - testing the stuff in a real life situation: My trip to work, which is about 1.5hours in a german train (ICE). I am impressed, it’s way better than I feared. I was online for the whole trip, about 90% of the time with UMTS (3G), 8-9% GPRS and for 2% the card didn’t had any signal. Which was to be expected, having a multi-kilometre tunnel soon after trip starts. The card never lost its PPP connection and all applications did run fine. The card does have *huge* buffers for data, the 2% nothing did give me a ping time maximum of 150.000 ms but not a single lost package. Thats also what one experiences when the card switches from UMTS to GPRS - ping time goes up for some time until GPRS takes over, then it continues without any trouble and every pending stuff is send. (Except that GPRS ping times are slightly larger, of course). Soooo, summary for me is: It’s worth the money, as I can use it for about 3 hours every day I go to work. Sometimes thats 4 hours, depending on the time I leave work (bad train times). Having a price of about 40EUR per month for a real flat it sounds acceptable for me. PS: The only thing one should never try is to run pccardctl eject. While the kernel tells you it eject a card - you will end up with a zombie process, forever. And also unable to get the card working again, you have to reboot. So - just stop the apps accessing the card and then just unplug it. Sounds bad, but is the working way…

Wouter Verhelst: NMBS accident

Gotta have a first time for everything, I guess... I took the 20:24 train home last night. This connection isn't an immediate one; it requires me to switch trains in Antwerp Central. Usually, that train arrives there right after the one to Essen—the next one I have to take—has left, requiring me to wait in Antwerp Central for the next train, half an hour later. I usually avoid the :24 for that reason, but this time I thought I'd do a walk through the Antwerp city center to spend the time waiting. As I arrived in Antwerp, I saw that the train to Essen hadn't left yet, so I thought I'd hurry up and make it for that train. As it turned out, there was no need for me to hurry... Just as I had found a seat on the train, some staff member arrived in our coup to tell us that the train would be significantly delayed because an accident had happened somewhere before Kapellen (read: someone had been ran over by a train). After some half hour or so, it was announced that we'd be driven to Antwerp Berchem, and that we'd there switch to buses. Now this isn't the first time that my train is delayed because of an accident, suicidal or otherwise, which needed to be cleaned up; but it was the first time that they put me on a bus instead. Interesting experience, that. The trip took only 20 minutes, whereas it usually takes 10 to 15 minutes by train (depending on the exact train you take), or 30 minutes by regular bus service. Those 20 minutes include a significant detour that the bus made for some reason which isn't entirely clear to me. I sure hope I never have to experience this type of delay from the cause side of the event, though...

Andrew Pollock: [opinion] On hydrogen powered cars

Russell Coker very effectively debunks hydrogen for fuel. In my opinion, the only reason the oil companies and various shall we say pro-oil governments are getting behind hydrogen is because they know it's completely untenable. They can say "but look over here, we're researching clean energy" knowing full well that it's years away (if at all). It's a diversion, that's all. Meanwhile, we've had perfectly viable electric cars in the mid-1990's, yet fast-forward ten years, and apparently it's only just become commercially viable to have hybrids. Talk about regression. Something's really wrong with the world.

26 August 2007

Russell Coker: Never IRC as Root

Ben Fowler blogs about the issues related to running IRC as root. Google searches for (irc client exploit) and (irc client “buffer overflow”) give a number of interesting web pages. Many of the exploits require the user to perform an action that’s slightly unusual, but why take a chance? The advice to not run as root while generally sensible (run everything with minimum privileges as much as possible) is IMHO not very useful in recent times (and probably was never very useful). Generally when a user is worried about system compromise they are not worried about attackers having direct hardware access, the ability to corrupt system files, etc. They are worried that the attacker might read their email and access other personal files. Therefore the instruction should be “don’t run IRC as root or as any account that has access to data which is important to you“. It’s not difficult to start an X-term that runs “exec su - ircuser irc” or “ssh -t ircuser@localhost irc“. Note that the -t option is required for ssh to make it allocate a pty even when receiving a command to run. Note also that in the case of su you need the exec option so that if the irc client is compromised and tries to perform a ioctl(0, TIOCSTI… based attack then it won’t succeed. In any of these methods make sure that X access is not granted. Until we get Security Enhanced X working in a viable manner any process that can display an X window on your screen can own you totally. There are of course relatively safe ways of doing X, I have previously documented how to configure the Xephyr X server (replacement for Xnest) to allow a process with a different security context to safely display a graphical window on your desktop. Generally I recommend not using a graphical X client on an untrusted network (IE anything other than an Intranet IRC server). I prefer to do my IRC in an account that’s not even on a machine that I care about and have it run screen so I can disconnect and re-connect from anywhere in the world. When I first got SE Linux in Debian to be useful (when I could boot and run all programs without problem) I logged on to some IRC channels related to Debian with the security context of root:user_r:user_t. I admit that my actions in this regard could possibly be described as trolling, but I wanted to demonstrate what SE Linux can do. Unfortunately of the many people who told me off for logging in to IRC as root, none of them wanted to hear an explanation of why user_r is safe in this regard. I expect that most of them were running their IRC client in the same Unix account that was used for their email etc (and probably most of them had GPG keys accessible from such an account). Sigh, it’s so easy to run IRC as a different user - in fact it’s probably the easiest of all network client programs to run in such a manner. There’s no reason not to.

Andrew McMillan: I have finally chosen a new name: DAViCal

After much wading through possible names, none of which really excited me, I have finally chosen "DAViCal" as the new name for my CalDAV server that was previously called RSCDS, or the "Really Simple CalDAV Store". In the end, I chose DAViCal because it: That was about the hardest part of preparing for the 0.8.1 release, and now that I've done that I should manage to make the changes to the packaging, though I have no doubt that the old name will appear in all sorts of places for a while yet. Choosing names is an important business, and I should know that from the length of time we spent agonising over names for our children, discarding all sorts of things because they had silly abbreviation collisions (like the "Royal Scottish Country Dance Society" :-) Even then, I think we got the kids names wrong, and the big one should be called "Thumper" with the little one called "Sly", but perhaps that's just a temporary annoyance and in time the names that we registered for them will fit them better. I also recall Grant once saying that you should never use the word "Simple" in the name of your project, and he should know. DAViCal is no longer particularly simple, although I have attempted to hide the complexity from the user as far as that is possible, and will continue to do so. Once I get out version 0.8.1 of DAViCal I will finally upload it to Debian, proper. This version has some important enhancements to its DAV spec compliance which are going to be needed by some future versions of Mozilla, and probably other things too, so it's important to push it out as soon as possible now.

Russell Coker: Solar Hot Water - Not Expensive

The Australian has a new Environment writer named Matthew Warren who has a history of doing PR work for the coal industry. This has the potential for insightful articles based on knowledge of what the industry is doing or for PR work for the coal industry masquerading as journalism. Unfortunately it seems like the latter is what we are getting. Matthew’s latest effort is an article claiming a $6.5 billion cost to home-owners because of an “effective ban” on electric hot water systems that Labor might impose. Unfortunately he doesn’t clearly state what an effective ban is, but does note that apartments are exempt. The specific claim that is used as the basis for the article is that solar hot-water systems cost $2,800 more than electric systems, and that after the solar hot-water rebate ($1,000) the additional cost would be $650,000,000 per annum, and that a period of 10 years would be required to replace all hot-water systems thus giving a cost of $6,500,000,000. So I presume that he expects that there would be 650,000,000/1,800 hot water systems installed per year which would be about 361,111. According to the Australian Bureau of Statistics there were 6,744,800 households in Australia in 2003. Matthew’s article states that about 40% of homes can have gas hot-water systems fitted that comply with the proposed new regulations, given that and the exemption for apartment buildings let’s assume for the sake of discussion that 50% of homes would require a solar hot-water system. Assuming that each household has a separate hot-water system that means that for these claims to hole we need an average expected lifetime for a hot water system of 6,744,800/2/361,111 = about 9.3 years. If the currently installed hot-water systems are expected to be replaced in 9.3 years then we can expect that hot water systems tend to survive for an average of about 18.6 years. I wonder if that number is correct (some google searching didn’t turn up an answer). One of the disadvantages of old-fashioned media is that they tend not to include calculations or cite sources adequately so we can’t easily verify or disprove their claims, I wonder if this is deliberate… Matthew admits that using a solar hot water system can be expected to save households $300 per annum in electricity expenses, I presume that this is based on current energy prices and that the savings can therefore be expected to increase as energy prices increase (we have a lack of water which is increasing the cost of producing electricity from coal). Let’s assume for the sake of discussion that the typical home-owner has a mortgage, the Commonwealth Bank is currently advertising mortgages with a rate of just over 8%, the way things work is that there are various criteria for getting a discount rate which most borrowers can meet so the result will be slightly below 8%. If a solar hot water system costs $1,800 extra to install and the money comes from a mortgage then every year it will cost the home owner about 8% of $1,800 which is about $144 (a saving of $156 per annum). If the solar hot water system saves the home owner $300 per annum then at any interest rate below 300/1800 (16.66%) they will make money. If there was no government subsidy and the entire $2,800 extra was paid by the home owner then at 8% interest it will cost $224 per annum (a saving of $76 per annum) and the interest rate would need to increase to 300/2800 = 10.7% to make it break even. So for solar hot water to not save the home-owner money we need to have a significant increase in interest rates (which incidentally would bankrupt many home owners), AND to have electricity prices remain the same (which would require even more of our tax money to be spent on supporting the coal industry). Finally Matthew complains that the solar hot-water rebate could cost the government $4 billion over the course of the scheme (the next 10 years). This sounds like a lot of money until you think about the 9 billion dollars a year that the government spends on subsidies for the coal, oil, and gas industries! On the current course the government would spend 90 billion dollars of our tax money subsidising polluting industries that cause climate change, but Matthew opposes spending 4 billion subsidising technology that prevents pollution and reduces climate change.

25 August 2007

Russell Coker: Does Having Fewer Rules Inspire Hard Work?

I was recently talking to a client about the lack of guidelines for acceptable personal use of office resources in his company. He rejected the suggestion that he provide any real rules or guidelines (apart from some old rules that most employees were not aware of and of which there was no procedure to remind them to periodically read). He said that he only wanted to hire motivated people who wanted to work, and that people who need rules should work elsewhere. The results of his approach seem reasonable, everyone who works for him works really hard. In return his attitudes towards employees are more relaxed than most employers, among other things he is very supportive of employees who desire career opportunities greater than his company can offer. I have been wondering whether rules alone can make people lose interest in working, or whether it’s the type of person who doesn’t want to impose rules that inspires hard work. My experience is that when working for people who have a rule-free environment I tend tend to work really hard, and that when working for companies that have lots of rules I find it difficult enough to get out of bed in the morning - let alone become motivated to do any work. I am interested to see comments from other people, both workers and managers. Is my experience common in this regard?

Martín Ferrari: Last GSoC update

It's been a long time without saying any word, my project completely drained any free time! So it's finished, as long as GSoC goes, but Pancut n still is a work in progress. What happened is that it turned out to be a lot more difficult that what I expected, so during the second part of the program —when I would write all the tests— the schedule ran away. Anyway, the tool is in a fully functional state: you can try it now and it —$DEITY forbids— will not crash on you; but it will not be able to spot many errors yet. So, if you can, please install it and try it out! Bug reports are welcomed, and code will be greatly appreciated. I've set up a debian repository with binaries (i386) and sources where you can grab it from, with all the dependencies, or you can check out the SVN repository. Bear in mind that it depends on a version of libcdio that's still not in the archive, so that can also be found in my private repository. As expected, my work with this tool doesn't end here; I will continue hacking on it as soon as I end my vacations; which brings me to the other subject of this post... Tomorrow I'll be leaving Lisbon, heading north to Porto and then the northern region of Spain: Galiza, Asturias, Euskadi and Catalunya; ending later in Madrid. After Spain I'll visit a friend in Paris and money and time will determine what I'll do after that. I am very excited, I love travelling and I really need some rest. PS: also I moved this blog to blosxom, which I expect to heavy hack on when I get back. Tags: Planet Lugfi, Planet Debian, Programaci n, Debian, Viajes

Joachim Breitner: TTF-Glyph in pdflatex output

For a project of mine, I had the dire need of getting the Unicode character (U+26B0 COFFIN) in a PDF file created with pdflatex. I could find no latex package that provides this or a similar character, so I had to do it myself.There are some HOWTOs on how to use a TrueType font in pdflatex, but all of them thought that you are trying to use the font for your regular text, not just for the one strange glyph. So based on these, here is what I did:All in all you need to keep the files burial.enc, burial.sty, burial.tfm and t1burial.fd in the directory of your TeX file. I did not check how to install the files globally.If you think this is done horribly wrong, please feel free to tell me how it should be done instead.

Russell Coker: Designing Computers for Small Business

Dell just sent me a letter advertising their new Vostro line “especially for small business“. They say “we listened, then we listened some more” and explain that it’s based on feedback from people in small companies. The problem (which should be familiar to everyone who has ever done any consulting work) is that people don’t ask for what they need! Ask someone what they want in a computer system and the first thing that they will ask for is a fast CPU and a low price, the colour of the box will probably be higher on their priority list than the option of a backup. Dell have proved this by advertising their small business machines by advertising cheap desktop machines for small business use. Here is a list of the features that I consider essential in small business systems (based on my experience working for dozens of small companies):
Reliable operation. Using a relatively inexpensive machine as both a desktop machine and a server for the company network is very common in companies with less than 10 people. The Dell PowerEdge Tower systems are reasonably cheap (as little as $800AU - $100 more than a low-end Vostro in the base configuration, although the Vostro includes a bundled monitor). The PowerEdge machines have ECC RAM as a standard feature (avoids data loss due to memory errors) and can be delivered with hardware RAID support (SATA-2 or SAS) and a variety of backup options. A low-end tower PowerEdge server with 250G of hardware SATA RAID-1, a 160G removable disk for backup, and an extra gigabit-ethernet port costs $2015. Such a machine would do really well as a server for a small company while also being quite good as a desk-side workstation (the cooling fans would probably be louder than on most workstations but the money saved would be worth-while for most small businesses). If Dell was to promote PowerEdge tower machines (maybe under the label “Vostro Servers”) it would be good for customers and should be profitable for them. The next thing that Dell should consider is a laptop with ECC RAM. Many small businesses start out as a sole trader with a laptop. Data loss on such a machine would be catastrophic. At the design stage ECC RAM would not be difficult to add - if there was a company that produced such RAM (I expect that Dell could purchase enough volume to drive the creation of new memory modules). Another laptop issue is the reliability of mass storage. Laptops tend to get dropped and hard drives tend to break when dropped. Lenovo sells a “ThinkPad Serial ATA Hard Drive Bay Adapter” which allows two hard drives in a Thinkpad which could be used for RAID-1 (if you don’t want a built-in DVD drive). I chose to use regular backups instead of buying the extra hardware for RAID-1 but it would be good if other companies offered such options - especially when promoting their products to small businesses (who often don’t do regular backups). Even Lenovo could improve things in regard to their potential RAID-1 support in Thinkpads by promoting this feature (instead of just having the hardware listed as an optional extra with no mention of why you would want it) and offering a default install with RAID-1. Better still would be hot-swap RAID-1 in a laptop (which would be quite easy to do if the expansion bay was changed to use USB as it’s method of connection). Of course RAID-1 only covers you in the case where the drop is only enough to destroy one disk or if it causes partial damage to both disks but doesn’t destroy the same section of data on both disks. The next big thing for laptops will be flash storage. One of the major advantages of flash is that it’s almost impossible to destroy it by dropping it. I would rather have my important data on a flash storage than a hard drive (it also saves electricity and therefore makes the battery last longer). The option of having flash as the primary storage device and a hard drive for files that are larger and less important would be useful to most small businesses. Of course hardly any small business owners will ask for this, they will probably ask for a machine that has a fast CPU. Sometimes when developing a product you have to design something with the features that customers need and get the sales and marketting people to convince the customer of the benefits of the features. Even though the number of people who understand the technology and will jump at the opportunity to buy good things (such as me) is rather small, the number of people who can understand once it’s explained to them is quite significant. I’m sure that if Dell released a new line of computers with the slogan “reliable machines that don’t lose your data” instead of “good-looking new machines” then they would get some interest. After writing this post but before publication time I happened to be speaking to the owner of a small business on the topic of choice of computers for a company such as his. He seemed convinced of the benefits of a better machine to replace his current desktop PC that is running as a server (it’s yet to be seen whether he considers the benefit to be worth the cost). I wonder if Matt Domsch reads my blog…

24 August 2007

Simon Richter: componentization tutorial #1: understanding what we are trying to do

This is the first post of a series on componentization, starting with a brief explanation of the problem(s) we are trying to solve. I expect some familiarity with programming in general, but no specific knowledge of any particular system; the terms "DLL" and "shared library" are used interchangeably. When you are writing a DLL, you are essentially committing to support whatever interface you are exporting forever. So it better be good on the first try. DLL hell is what happens if it was not good, and you end up making an incompatible change. The obvious way an interface can be "not good" is when you need to touch the header files that define it in order to implement some new functionality. You can get away with a few things, like the addition of new functions, if you can somehow make sure that users will always have a recent enough version of your DLL around, but in general any change to the interface is going to be incompatible. The traditional Unix way of solving the issue has been renaming the library. When you link a program against a shared library on a system that uses the ELF format, the linker looks inside the library for the SONAME field, which tells it what name the library wants to be known under, and the program will then attempt to load this file at startup (which usually is a symlink to the latest compatible version). This "official" name of the library usually contains a number (sometimes more than one), and when there is an incompatible change, you simply change that number, and the new version of the library can be installed in parallel with the old. There are additional mechanisms, like symbol versioning support, that allow a single library to provide different "versions" of exported functions, and have the program specify the desired version for each symbol. To run a system like this, one generally needs to keep track of programs' dependencies; this generally happens in the package manager with more (Debian) or less (Red Hat) support from package build scripts. If you built your system from scratch, you end up doing this work yourself. That's why you had highly paid system administrators in the old days, and very short shell scripts to replace them (with various degrees of success) in the current age. In the Windows world, things have been a bit different, because except in large installations, you generally do not have a clueful, benevolent system administrator who will take care of these things; rather, you have users that expect your software to work without having an insight into the inner workings. In general, software developers have not been taking chances and simply shipped all the DLLs they needed along with the main program. When they installed these DLLs into the same directory as the program, things were fine, if they installed them into the WINDOWS directory, not so much, because when you had two conflicting versions of the same DLL, you had to decide which one to keep, and a program that would only work with the one that you threw away would simply fail in curious and interesting ways. This is the original definition of DLL hell — you cannot do it right. To make matters worse, this is not the only way an interface could change. When you define a platform, you write up an "Application Binary Interface" (ABI) document that details conventions that should be followed; for example, the ARM processor does not have a dedicated stack pointer register, so the ABI document for Linux on ARM says that R13 is to be used as a stack pointer, functions may thus expect it to point to memory that is readable and writeable, and memory with an address lower than the stack pointer is considered "free". When the function is done, it is supposed to jump to the address in R14, which happens to be the register the ARM's "Branch with Link" instruction sets to the address of the instruction following it. If the function takes arguments, the ABI says where to find them, and if it returns a value, it also tells where to place that. For everything not in the ABI document, the compiler author gets to choose. The ABI document usually attempts to be rather minimal, so it defines how C functions are to be called, and calls it a day. Anything not in the C standard is not guaranteed to work between different compilers (or even different versions of the same compiler). That includes C language extensions such as the "long double" data type, language features in C++ and Java such as namespaces, nested types and exceptions, and the data structures used by the C library's malloc() function. The latter makes life difficult even for pure C programmers, as it disallows releasing memory from a different module than the one it was allocated in, because the different modules may link to different C libraries. In essence, this means you are not supposed to export anything from a DLL that is not a C function, and even then, there are additional requirements. You could in theory export data objects, but that is discouraged, as it exposes an implementation detail. Now, we're in a bit of a dilemma here. There is lots of interesting code out there that is not necessarily written in C, we'd like to reuse it and we don't want stuff to break. The Linux approach so far has been "we simply pretend the problem does not exist", and this has been working to a large extent, simply because everyone uses gcc, and when the ABI extensions the gcc people had made changed, recompiling everything that uses these extensions makes the problem go away. This has several drawbacks. For one, it mandates that the tools used to rebuild everything and keep the installation consistent be written in C or handle the transition gracefully (for the curious who have a Debian system handy: look at libapt-pkg's SONAME), and it also requires that we have the full source code for everything not just available but buildable in an automated way. Within the context of a Linux distribution, both of these are true, so we have survived the last major ABI transitions without too many losses. So we need an extension of the ABI document that specifies how modules written by different people and compiled with different compilers can interact. These are commonly called component models, and, to quote Andrew Tanenbaum, "[t]he good thing about standards is that there are so many to choose from". Next: "componentization tutorial #2: CORBA and COM"

Gunnar Wolf: Have a very, <em>very</em> nice day!

And no, I don't mean Mao.
How was Thursday 23 for me?
6:30 Wake up, knowing it will be a long day. No, don't get those delicious extra 15 minutes of sleep.
8:00 Arrive to work, ~90min earlier than usual, to finish the Rails app you have to demo at 10:00
10:00 Meeting with the Institute's Director, Academic Secretary and Technic Secretary to show them the system for following the internal inter-tematic colloquium information workflow. Thankfully, they were happy with it.
11:20 (20 minutes after scheduled): As several academics have said they are interested in getting to know Linux, I'm giving a series of introductory sessions on Debian to them. So, I went with some of them through the Etch installation. Of course, mostly everything was fine. What was not? Resizing a Windows partition is still a step that requires several jumps through hoops (i.e. booting Debian LiveCDs, some console-based interactivity which I wanted to avoid...), and... Well, d-i does not time out if the selected mirror is not responding. Will file a bug, yes. Anyway...
14:30 Managed to leave the lab working, with no damages. Went to the bank to check some data and to have a quick lunch.
16:00 Get back to the institute. Jos Luis, from Difusi n y extensi n was already waiting for me to show a set of components for the Comas-based system we use for tracking attendance to the Institute's activities
16:45 The people from AMECIDER arrived so I could show them my proposal for their new website. Can you believe most of the websites I host are still completely static HTML, and, what's even worse, generated by the $ despiseful_adjective Dreamweaver? Yes, I am proposing them to move over to Drupal
17:30 I finally received another person, one of the people that's attending my Thursday lessons, wanting me to help with some Linux questions. What's Linux's killer app for my Institute's researchers? Believe it or not, a not-brain-dead PDF reader. They are amazed that, using Gnome's Evince, they can just copy-paste bits of PDFs into their documents (and the fact that pasting tabular data into OpenOffice's Calc allows for an easy import feature - Yesterday I spent ~1hr with this researcher importing data generated by the International Monetary Fund into his work), and they are even more amazed with the gnome-screenshot they can directly include graphics from such documents without redrawing them.
19:45 (45 minutes behind schedule): Went to the Astronomy Research Institute, to meet with Sergio, H ctor and Eric, to decide on bits of the implementation of the new gear we will be putting in nisamox, our dear and faithful ftp.mx.debian.org mirror. Thanks to everybody! We will soon tell you what we got and what we did with it, it's mostly settled by now.
20:30 Had the first of some... Four calls regarding yet another system I have been working with for the ICME conference, to be held in Mexico in 2008. Several pushing details that need my attention and work, bah :-/ Have to work on them...
21:00 Got home. Did a couple housekeeping activities (i.e. take out the trash, buy some food...). I was too burnt out to start making my bags for going to Vienna (I'm leaving tonight!), work on the pending systems I have to work on, or even stay awake.
Leaving work for a week to go a conference is always fun and great... But man, it's stressing!

Russell Coker: Water Prices and Scarcity

Due to climate change and population increases we are having increasing problems with the water supply in Australia. Peter Lieverdink suggests that we have more options for water supply including treated sewage similar to the Netherlands here he grew up. However I believe that in Australia we already do what he proposes (put treated sewage in rivers and then use the same rivers for the water supply). It’s just removing the middle step (of having the treated sewage in a river) that is controversial. I recently examined a water bill for my house. Among other things it said that my water use was slightly above the average for houses that use water efficiently and significantly below the average for typical water use. The funny thing was that most of the expenses on the bill were not actually related to the amount of water used. My bill for a quarter was $54 service charges for sewerage and water (of which $39 was sewerage), $30 for sewage disposal, $26 for water, and $14 for drainage. So the cost of disposing of sewage was greater than the cost of getting fresh water and the sewerage service charge was the largest single item on the bill. Australia supposedly has a capitalist economic system in place (except for the communist policies related to farming and the protection of some industries such as car manufacture and coal mining). Surely the right thing to do is to make water expensive enough that people have a financial incentive to conserve it! The first thing that should be done is to make the majority of the value of a water bill received by a typical household be determined by the amount of water used. This could be achieved by reducing the fixed components of the bill to something small (EG $20 per quarter instead of $98 for me) and then increasing the cost per kilo-litre (EG from $0.85 to $2.50). The end result would be that people who use average amounts of water would pay about the same amount as they do now and people who use less than the average amount would get smaller bills, while government revenue would remain the same. The next thing to do is to have different tarriffs for different quantities of water used. The first 50L per day could be free (water for drinking and cooking is a right), between 50 and 450L per day (451L per day being regarded as efficient water use for a house with four occupants and a medium garden) could be at slightly more than current prices, and usage greater than 450L per day could be significantly more expensive. The current situation is that everyone is going to pay through taxes for desalination plants and other expensive methods of producing new fresh water. Having people pay for what they use is the capitalist way.

Next.

Previous.