Search Results: "sto"

13 November 2007

Gerfried Fuchs: Bourne Ultimatum

Today I have been to the "Bourne Ultimatum". I bought myself the first and second part on DVD just recently to remind myself of what was going on, I even planed to watch it with some dear friends but all I received were meaningless promises, and before it stops screening I went on my own—just to stumble upon an old friend in the cinema who was going to watch the movie himself with his brother. Anyway, I was really looking forward to this part, given that I really enjoyed the former two parts—and I wasn't disappointed at all. It is a really worthy final part of this trilogy. Julia Stiles had a bit bigger part in this one which was an added enjoyable addition, and the scenes in Madrid were really quite thrilling. All thumbs up!

Andrew Pollock: [life/americania] Trip to Boston (well Cambridge really)

The week before last I spent in Cambridge. I didn't really see a lot of the place (although we ventured out on the T to have dinner in Boston a few times). I quite liked what I saw of the place though. I like any city with half-decent mass-transit. I think ever since I saw the MTR in Hong Kong I've really liked big subway systems. Ones that run so often you don't need to have a timetable. What I saw of Boston felt like New York without quite the same size and pace, which made it feel slightly less intense. I'd go visit again.

Andrew Pollock: [debian] My First Ubuntu Developer Summit

I've been procrastinating writing about my Boston trip, for no particular reason. A bunch of us went to the Boston Ubuntu Developer Summit (in Cambridge, actually) for work purposes. We currently derive from the Long Term Support releases, and Hardy Heron is going to be an LTS, so I wanted us to get more involved directly, particularly at this stage of the game, rather than after it's already a done thing. Anyway, the reason I'm writing this in the "Debian" category is I found the whole thing to be totally awesome. Debian should do something similar. Rather than being a conference, this was essentially a week of 1-2 hour small-group meetings to discuss various features for Hardy. I thought it worked pretty well. I'd never seen gobby used before, and it's basically a poor-man's Google Docs (although one could argue it handles real-time collaborative editing better). They had VoIP up the wazoo. You could dial into a conference bridge to just listen in, or you could dial a different bridge to participate. Every room had a Polycom conference phone in it. That seemed to work pretty well. I think the main reason I think Debian could take a leaf out of Ubuntu's book on this was it helps resolve potentially controversial technical decisions very quickly. Rather than having a two week protracted flame war on a mailing list, you can have a 30 minute rational debate in person and move on. So I've no idea how this UDS stacked up to previous ones, but I was very impressed by the whole thing. I'm in total awe of Scott James Remnant and Colin Watson for not having burned out by now. Doing a release every 6 months, with all the associated stuff that goes around it (i.e. running a UDS) has got to take it out of you.

Michael Janssen: How long until we have laptops with no moving parts?

Today I was reminded about a thought I was having earlier this year by a twitter from Garrick Van Buren about the new ultra-thin MacBooks. It seems altogether likely that the next laptop computer that I buy will have no moving parts. Currently the only moving parts in the MacBook that I have now are in the optical drive, the fan, and the hard drive. This is of course not counting the moving parts which I move myself - the buttons to actually interact with it and the lid. Apparently the optical drive in the laptop is going the way of the floppy drive in laptops, so there is only the fan for the CPU and the hard drive. Hard drives are also heading toward the realm of non-moving parts with solid state drives gaining acceptance and size. You can now get a 32GB solid state flash drive for pretty cheap, and they are sure to go in the direction all storage goes - faster, larger, and cheaper. That only leaves the fan which cools the CPU. It is not impossible to run a high-end computer without a fan nowadays, but unfortunately the heatsinks required in order to keep the most crucial part of the computer without burning up. The OLPC hardware is already in some ways the wave of the future - there are no moving parts at all. Unfortunately it is also completely underpowered and it's not possible to run a ton of programs on it. I'm not sure that a solid-state laptop for the general public will ever be possible with the general increase in computing power, but if it happens, I would bet it happens in the next 5 years.

People will be pointing out that the optical drive being missing is a new and novel concept and that Apple is pushing the boundaries of laptops, but they are hardly the first ones to ship a laptop without a optical drive. The world of sub notebooks have been taking out the optical drive in their smaller models for a while now. One model that I've seen around quite a bit is the Sony PictureBook which got quite a lot of press because it featured the Transmeta Crusoe chip. There are also a number of other sub notebooks which don't have a drive. However, I don't believe that the drives will be replaced by flash drives or network installs - there will always be a need for boot media for completely broken computers. The common solution in the sub notebook world is to just have a drive which attaches when it's needed, in the mode of the first drives. The solution which uses flash drives is not likely to happen anytime soon - software isn't getting any smaller, and the cost of flash media isn't falling quickly enough to catch up with the cost-effectiveness of pressing CDs.

MJ Ray: Cyclocross: Pijnacker

After the comments on a recent post, at least one reader should be happy that RAI Sport Sat (free-to-air 13e) have a quarter-hour show of last weekend’s third cyclocross World Cup event at Pijnacker from 18:40-18:55 CET today (Tuesday).

12 November 2007

Sune Vuorela: Debianized splashscreens

Disclaimer: splashscreens should be avoided and programs should start faster. Some programs are just too slow so a splash screen is needed. Wouldn’t it be cool if all programs that showed splashscreens actually showed a splash matching the same theme as your desktop environment and your display manager? This might going to happen. Besides OOo, amarok and the gimp, which other programs uses splash screens? And where do they store their splash screens? Artists: This is also your clue to consider it. I don’t have much artist skills, but I have some ideas for the implementation. To show off something, I can start here: debianized logout of kde The plan is of course to make it as easy as apt-get install debianized-splashscreens to get debianized splash screens - and apt-get remove to get the original splash screens back. Oh - and of course easily to change for derivatives who wants some other styling.

Theodore Ts'o: I love it when things Just Work

I am currently in the Hilton Portland & Executive Tower hotel, and since I fly entirely too much, I got upgraded into a room which contains a printer. Thinking that I would try using it, I hooked it up to my laptop (running Ubuntu Gutsy), selected System->Administration->Printing on the desktop, and then clicked on New Printer. To my astonishment, when the dialog box came up, the system had already autodetected the fact that I had an HP OfficeJet KX60xi printer connected to the parallel port, had recommended which driver I should use, and a few “next” and “continue” clicks later, the printer was installed, and 15 seconds later I was able to print to it. Users of MacOS systems are probably used to such things, but this was faster and easier than what Windows asks of users who want to install a new printer. Coming from a Unix background, I would have been quite pleased if I was able to set up the printer after manually select the printer type and driver from a dialog box. Simply not having to su to root, edit some config files, and then restart some daemons, would be a major advance. But this completely exceeded my expectations. Well done to everyone in the CUPS and GNOME community who worked to make this possible!

David Welton: The Economist on Business Books

Kicking ass in an unflat world is The Economist's take on recent efforts in the world of business books. As the creator of Squeezed Books, their opinion was of interest to me. As is often the case, they don't disappoint, with lines like
Things to bear in mind as you do, he says, include the need for your company to have purpose, to seek out ideas from the fringes, and to embrace the democratising power of the internet none of which will be news to anyone who has been in business for more than a few minutes.
What really caught me eye, though, was this:
There is also growing demand from overloaded executives for shorter books. So in January Harvard will launch a new hardback series, Memo to the CEO , covering subjects such as lessons from private equity and the future of strategy. Each book will be about 100 pages long and will cost $20. In a similar vein, Harvard has adopted the approach taken by iTunes to pop albums, and has started to sell individual chapters of books online an idea that has been a hit with academics in particular.
A lot of good business books take a sensible central idea, and then proceed to fluff it up to a length where it can be published as a book. Often, this makes for a good read, as the anecdotes and case studies and whatnot are interesting, but for those in a hurry, or simply wanting to know what the basic point of the book is about, it's just padding. So, it looks as if the idea behind Squeezed Books is a good one, now I just need to get better at attracting more people to contribute summaries, and discuss the books on the site. One thing I've done to that end is stipulate that the summaries are available, unless otherwise noted, under a creative commons license.

MJ Ray: Get Safe Online and security through obscurity

This is mainly a comment on the BBC report of the Get Safe Online campaign - the campaign seems to have some good advice, such as securing wireless networks (WPA at least now!), and their website is more useful than other gov.uk ones I've seen, but some comments in the report just seem strange, like "a date of birth and address details were enough for someone to set up a credit card in another name" - if that false credit card would affect us, then we need to fix the credit card issuers, not stop posting details online! Trying to hide details is well-known as security by obscurity and it's not much security at all. I'm disappointed if that's a major focus of Get Safe Online's message. What about trust and encryption advice? Also, many people don't have a choice whether our details are posted online. They are already posted by government agencies like Companies House and then that information is bought and republished by private companies. So, we're not adding much to the risk by using social networking. Finally, it's rather amazing that some Secured Web Browsers can't access much of the content on www.getsafeonline.org because of their careless use of Flash and client-side scripting on their site. Are they safe themselves? Get Safe Online will be travelling around the country offering advice on how to stay safe and secure when using the internet. They're in Bristol tomorrow - if I don't feel nearly as bad as this any more, maybe I'll go visit them and see if the reports are accurate.

Eric Dorland: Goodbye Bytemark, Hello Slicehost

I've just gotten a 256slice from Slicehost and I will deleting my UML instance with Bytemark. I was a customer of Bytemark's for a number of years, and I was happy with them. I had the smallest VM they offered and was just using it to run my DNS, postfix (and clamav and amavis) and a couple of tiny websites. The 75M of RAM the VM has just isn't up to these tasks anymore, with fairly frequent OOMing. Although they upgrading their smallest VMs to 150M six months ago, I still hadn't been upgraded to that new size, which is one of the main reasons I looked for other options.

So Slicehost seems to have a good reputation and having gotten my slice last week I can say that's it's wayyy faster than my setup with Bytemark. Even if I had stayed with Bytemark I would have 100M less RAM and it would have been more expensive (darn you weak American dollar). I really liked Bytemark, they've been supporting DebConf for at least a couple of years. I wish them success, but at this point they're offerings just competitive anymore.

The one thing I really miss from Bytemark is their DNS slave service. You could run your own BIND and have Bytemark's nameservers be slaves to it. Slicehost only has a hosted DNS service. But this is a small quibble compared to all the upsides.

John Goerzen: Christmas Is Just Around the Corner

Last week ended in a rather annoying way. Apparently my car had developed a flat tire overnight one night, and I left while it was still dark the next morning, and didn't notice it. I had driven on it all the way to work with it fairly flat, which damaged the tire (but not the wheel). So that needed to be replaced, and it was still under warranty from the place I bought them, which is 45 minutes away. We had a family gathering on Saturday, but couldn't be there all that long because we had to get to this place before it closed.

After we got home, there was a bit of work to do out in the yard. Jacob was tired of being indoors, so I took him out with me. He came with me as I put air in our 5-gallon air tank, and watched as I used the tank to do the monthly tire inflation on our pickup. (When you paid $75 for the vehicle, fixing a tire that only has to be inflated once a month doesn't seem all that cost-effective)

And then he got his first ride in the pickup. We were just moving around trash on the yard, and he enjoyed it. We hopped in and out several times to load or unload things. Though he was very annoyed that I didn't let him use the stick shift while I was driving. My parents said that he sounds like his dad.

We have a bedtime routine for Jacob, and I read a book to him right before putting him to bed every night. This morning, Terah got out the book that I read to Jacob last night. I was in a different room, but Terah is quite sure she heard him say "dada read this!" That's his first sentence (that one of us heard, anyway)

Some of you may have read that my relative Venita had a brain aneurism recently, and remarkably, seems to be recovering from it. Today in church, our pastor said, "I'm happy to report that this morning, Venita called me, asked me to thank everyone for all the prayers, and to ask the choir to sing up to heaven -- and they have." She's still very weak, and just sitting up to eat is a struggle, but she is improving.

Terah and I had invited my two aunts that grew up in what is now our house over to help decorate for Christmas. They were here today, and we spent all afternoon decorating, and we had spent the last couple of days finding decorations. It was a fun time, and the house looks great and feels more like home. We're happy to have had the help thinking about where to put everything, and actually putting things there. The tree isn't up yet, but it will be soon. We're thinking that it will be nice to be decorated early this year, rather than our usual just-before-Christmas decoration event!

It was neat to hear a few stories about how my grandma decorated the place; she died when I was young, and I don't remember her. Jacob, of course, was in on all the action. He watched, played, and threatened to make the nativity scene quite unpeaceful, but more interesting to a 13-month-old.

The Goerzen Christmas will be here this year. The last time Goerzens celebrated Christmas in this house was 7 years ago -- a month or so before I met Terah, as it happens. It seems so long ago in some ways. The house has changed; the 1970s yellow wallpaper is gone, as is the drop-ceiling tile that grandpa had installed to save on the heating bills, as is his wood stove and the metal tractors that he had in his closet that I used to play with when I was little.

But as I sit here typing this post, I'm looking at the spot where I used to play air hockey on grandpa's table during family gatherings -- and whenever else I could convince grandpa to get out his air hockey table for a game. Over in the corner is where he always had his Christmas tree, with the woven wheat ornaments my grandma had made. Terah decided that corner would be perfect for the tree, before she ever knew where it used to be.

Here's a picture I took at that Christmas 7 years ago:



Sitting here right now, looking at all that has changed, and all that hasn't... 7 years wasn't that long ago after all. I'm sure this year will be the first of many happy Christmases to be celebrated in this place.

11 November 2007

Daniel Burrows: ANNOUNCE: cwidget

I've just uploaded the first release of libcwidget to Alioth and NEW. libcwidget is a high-level C++ library for developing user interfaces that run in a terminal using curses as the display and input layer. It uses widget abstractions similar (but of course not identical) to those found in GTK+ and Qt, with signals and slots provided by libsigc++.

Background

Back when I started writing aptitude, I had one general goal:

Just because it runs in a terminal doesn't mean it has to suck.


I tried to apply this in the user interface, but I also applied it internally. The curses programs I looked at before writing aptitude all had very ad-hoc UIs. In many cases the code was structured with each "view" that appeared mapped to a custom C function call; if the author was feeling ambitious, similar-looking screens might be abstracted into a single function call, but the basic structure of the interface still reflected the call graph of the program.

aptitude had a primitive interface abstraction layer from the get-go; over the years, I borrowed ideas from GTK+ and restructured this layer into a full widget set. libcwidget is this code, disentangled from the guts of aptitude and slightly cleaned up. Because of its history, it is missing widgets that aptitude doesn't need (like a multi-line text editor), but it provides an extensible base that you can build upon.

Getting cwidget

The cwidget library is available (both as source and as an i386 .deb) from the cwidget Alioth releases page. There is also API documentation automatically generated from the upstream repository, which, while it is woefully incomplete, should provide some information: I've tried to write Doxygen tags into most of the code I've added in the last 4 years or so.

The upstream code repository is in git (because what fun is a new project if you don't learn a new VCS?) and available here. To retrieve a copy of the repository for yourself, run this command:

git clone git://git.debian.org/git/cwidget/head cwidget

Martín Ferrari: HP 530 review (with Ubuntu)

Yesterday I bought a laptop for a friend, who also asked me to install Linux on it. Since she's not computer-savvy at all, I opted for an Ubuntu. I provide here a short description of the hardware and what to expect regarding compatibility for anyone about to buy one of these. Hardware description
Model HP 530
Part No. GU322AA
CPU Intel(R) Core(TM) Duo CPU T2300 @ 1.66GHz (stepping 12) - 2 MiB cache
CPU flags fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor est tm2 xtpr
Screen 330 mm x 250 mm viewable area, "glossy" wide-screen. 1280x800 pixels.
Video Intel Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller
Audio Intel 82801G (ICH7 Family) HDA
USB Intel 82801G (ICH7 Family) USB2 EHCI Controller
Ethernet Intel 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile
WiFi Intel Corporation PRO/Wireless 3945ABG Network Connection
Optical media Optiarc DVD RW AD-7560A
Hard disk Fujitsu MHY2120BH, 112GiB, max UDMA/100
Problems The only problems I had with the hardware were related to the sound card and the lid. The sound card had exactly the same problem as my Dell Inspiron 6400: it won't turn off the internal speakers when you plug something in the audio output jack. This is easily solved adding the following to /etc/modprobe.d/options: options snd-hda-intel enable=yes model=laptop The problem with the lid is that the screen didn't turn off when the lid closed. Just one time it did work, and stopped doing so after a reboot. Looking with acpi_listen, it seems that the acpi event isn't even generated. I don't know if this is a hardware or software problem. Also, some not very nice things should be noted about it: it has no independent media buttons for volume, suspend, etc.; only the WiFi transmitter kill and the power button, the rest needed a key chord. It has only two USB ports, which nowadays is incredibly few. No LEDs for hard dist, scroll lock or num lock. The audio jacks are on the front, which makes them very unsuitable for any straight plug. Although seldom used, it is nice to have the ability to turn the screen 180 , but this one can't do it. Finally, the battery is tiny: only four cells amounting 2 Ah of capacity. The power consumption seems a little better than my Dell: running on batteries, with low brightness, an idle GNOME desktop gave a reading of 820mA. Watching a movie from optical media in full screen ranged from 1 A to 1.3 A depending on the spinning of the media and the codec. Burning a DVD at 2x took 1.15 A The good After installing a Ubuntu 7.10, almost everything Just Worked . Of course it warned me about the non-free ipw3945 driver, but in seconds network-manager had connected to my home WLAN. Network manager could be a little more smart and turn off the WiFi transmitter when it's disabled by the user, but I guess that's not only an Ubuntu problem :). Most media keys worked out of the box, the WiFi kill switch worked OK, as did suspend to ram and to disk. Video acceleration and obligatory eye candy worked automatically. No problems either with burning a DVD, listening to music, watching a movie or connecting to my home network. The external aspect is not bad, the screen looks good, and the touch pad is very nice: just a matrix of dots over a surface that doesn't show any other sign of being an input method. In conclusion, it shows that it is a very cheap machine, but the drawbacks seem very few comparing to the good price. Tags: Planet Lugfi, Planet Debian, Tecnolog a

10 November 2007

Rob Bradford: Not a hippy but

Howies have an excellent range of ethical and ecologicaly sound clothes. Whilst I was in their shop on Carnaby St I bought a bright orange Nalgene, They sell them to encourage people to use one bottle rather than hundreds or thousands of plastic bottles, to encourage this further they have a tap in their store where you can fill up your purchase. Smart thinking. Their blog is a little bit crazy though. On the way back from Carnaby St I got a bit lost and ended up at Playlounge which sells the cool vinyl toys that adorn OH cental. Whilst I was there I couldn’t resist buying a copy of Clutter Magazine.

Manoj Srivastava: Manoj: The Secret Servant

I bought this book by Daniel Silva last week at SFO, faced with a long wait for the red eye back home, since I recalled hearing about it on NPR, and reading a review in Time magazine, or was it the New Yorker? Anyway, the review said he is his generation s finest writer of international intrigue, one of America s most gifted spy novelists ever. I guess Graham Greene and John le Carre belong to an older generation. Anyway, everything I read or heard about it was very positive. Daniel Silva is far less cynical than Le Carre, and his world does not gel quite as well, to my ears, as Smiley s circus did. The hero, Gabriel Allon, does have some super human traits, but, thank the lord, is not James bond. I was impressed by Silva s geo-politics, though - paragraphs from the book seem to appear almost verbatim in current event reports in the International Herald Tribune and BBC stories. I like this books (to the extent of ordering another 7 from this author from Amazon today), and appreciate the influx of new blood in the international espionage market. Lately, the genre has been treated by lack luster, mediocre knock offs of the Bourne Identity and the engaging pace of the original has never been successfully replicated in the sequels. And Silva s writing is better than Ludlum s.

Manoj Srivastava: Manoj: Adventures in the windy city

I have just come back from a half week stay at the Hilton Indian Lakes resort (which is the second time in a month that I have stayed at a golf resort and club and proceeded to spend 9 hours a day in a windowless conference room). On Thursday night, an ex Chicago native wanted to show us the traditional Chicago pizza (which can be delivered, half cooked, and frozen, via Fed-Ex, anywhere in the lower 48). Google Maps to the rescue! One of the attendees had a car, and we piled in and drove to the nearest pizzeria. It was take out only. We headed to the next on the list, again to be met with disappointment; since making the pizza takes the best part of an hour, and we did not want to be standing out in a chilly parking lot while they made out pizza. So, I strongly advocated going to Tapas Valencia instead, since I have never had tapas before. Somewhat to our disappointment, they served tapas only as an appetizer, and had a limited selection; so we ended up ordering one tapas dish (I had beef kabobs with a garlic horseradish sauce and caramelized onions), and my very first paella (paella valencia), with shrimp, mussels, clams, chicken, and veggies. We ate well, and headed back to the hotel. As we parked, and started for the gate, I realized I no longer had my wallet with me so back to the restaurant we went. The waiter had not found the wallet. Nor had the busboy. The owner/hostess suggested perhaps it was in the parking lot? So we all went and combed the parking lot once, twice. At this point I am beginning to think about the consequences I can t get home, because I can t get into the airport, since I have no ID. I have no money, but Judy can t wire the money to me via western union because I have no ID. I need money to buy greyhound tickets to get home on a bus and then there is the cancelling credit cards, etc. Panic city. While I was on my fourth circuit of the parking lot, the owner went back and checked the laundry chute. I had apparently carelessly draped the napkin over my wallet when paying the tab, and walked away and the busboy just grabbed all the napkins, wallet and all, and dumped it down the chute. Judy suggests I carry an alternate form of ID and at least one credit card in a different location than my wallet for future trips. If that was not excitement enough, yesterday, I got on the plane home, uneventfully enough. We took off, and I was dozing comfortably, when there were two loud bags, and the plane juddered and lister to the port. There was a smell of burning rubber, and we stopped gaining altitude. After making a rough about turn with the left wing down, the pilot came on the intercom to say We just lost our left engine, and we are returning to O Hare. We should be in the ground in two minutes . Hearing the in , a guy up front started hyperventilating, and his wife was rubbing his back. My feelings were mostly of exasperation, I had just managed to get myself situated comfortably, and now lord only knows when we would get another aircraft. When we landed, the nervous dude reached over and kissed his wife like he had just escaped the jaws of death. And he asked if any of us knew statistics, and if we were fine now. (I was tempted to state that statistics are not really predictive, but hey). It was all very pretty, with six fire engines rushing over and spraying us with foam and all. When we got off the plane the nervous dude headed straight to some chairs in the terminal, and said his legs would not carry him further. He did make it to the replacement plane later, though. Turns out it was a bird flying into the engine that caused the flameout. Well, at least I have a story to tell, though it delayed getting home by about three hours.

Eddy Petrișor: nslu2 broken?

Thursday evening, when I came from work I found my nslu2 not working. It is/was a router and a local mirror. I tried to understand what's going on, but I couldn't. Everything looked fine, except that it did not resolve any addresses and the ping to my provider was not giving any results.

I tried to restart dnsmasq, although it seemed it was running fine, and then, in a desperate gesture (after trying to understand what was going on) I thought of restarting networking. I got locked on the outside and was forced to restart the system.

Everything looked to come back to normal. Since it was late, I set myself to investigate the next morning what happened. But yesterday morning, the network was again down and the slug was inaccessible.

Since the only way to restore sanity in such a situation (because I don't have a serial console on the slug) was to reset and hope for the best, I did that.


The slug didn't start anymore. It seemed to cycle through boot -> reset -> reboot. I tried to see what was going on and connected the hard disk to my laptop. The filesystem was clean, although /var/log/boot.0 was a directory (and that directory had the same content as /var/lib/dpkg/info). I manually removed that, but that didn't make the slug boot.


It seems my slug is kind of dead.

Now I would like to know if is there any way to do remotely what flash-kernel does from within debian.

Russell Coker: Postfix with MySQL

I have just got a CentOS system running with a MySQL database to store account data, Postfixadmin [1] to manage the account data stored in the MySQL database, and Dovecot for serving the mail via POP and IMAP. It was a minor annoyance that Postfixadmin is not packaged for CentOS (and doesn’t appear to be packaged for Debian). I installed it under /usr/local and apart from a bug whereby it refused to talk to MySQL anywhere other than localhost it worked well enough. One thing to note is that you must not use AllowOverride None in the Apache configuration section for the Postfixadmin directory as it relies on a .htaccess file to determine who can login as the overall administrator (the person who delegates domain administration rights to the people who run the various domains). Also it was a little annoying that Postfixadmin seems to only be able to talk to a MySQL instance on localhost. The next issue was getting Postfix to talk to MySQL. For some reason (which unfortunately is not mentioned in the changelogs) the Postfix package in CentOS is built without MySQL support, but there is a macro on the second line of the postfix.spec file to enable this. Obviously at some time in the past MySQL support was added to that packaged and then removed. It’s a pity that they haven’t chosen to do what is done in Debian and create separate packages with shared objects to support MySQL, LDAP, and PostgreSQL lookups for Postfix.

Simon Richter: C and multithreading

Ian Lance Tailor started a discussion that has in the meantime reached Planet Debian via Miry and Giacomo. The single-threaded memory model is the only sane choice for languages that are as close to the "metal" as C and C++ are. For a multi-threaded model to work, the compiler needs to have intrinsic knowledge of "locking", and it needs to emit the appropriate code around all accesses to variables that cannot be accessed atomically (which also means that signal handling does not work — the signal might arrive in a critical section). Java uses such a model. In the language, there is the "synchronized" keyword, which can be used either as a modifier on a method definition (locking the object the method is called on), or before a block (locking an explicitly specified object). The lock is recursive, so calling another "synchronized" method on the same object works fine, leaving the last one finally unlocks the object. Memory consistency is achieved by flushing the object before unlocking (so accessing an object that another thread may use without locking it is still undefined behaviour — but class authors can avoid that by allowing access only through "synchronized" methods). I doubt we want the same in C/C++. For one, it adds a recursive lock to each instance of a class or struct, whether needed or not, since the compiler cannot rule out that some code might want to use this object as a lock. Also, the object inclusion and inheritance rules are quite different, as Java does not have inclusion, and only allows simple inheritance. Basically, if I were to emulate Java's rules, I'd need a "virtual" base class to provide the lock, which is a lot of extra overhead since every derived class now needs to keep the offset to the most derived class. The other two big show stoppers are the "intrinsic" knowledge of locking that the compiler must have (it needs to know how to embed a recursive lock into an object, which is an operating-system dependent structure as it stores some thread identifier for the current holder of the lock) and that it becomes a lot more difficult to write signal handlers, as you need to avoid any code that might implicitly lock some object (which is true already, but there is no implicit locking). Java can do that, as they have a virtual machine that provides locking primitives and object lookup (so they can keep the lock separate). There is a change to the memory model I'd like to see though: the concept of an I/O buffer that behaves like regular memory (so load/store coalescing/reordering is allowed), but will be flushed before volatile accesses and re-read afterwards (optionally, with finer grained control). This would work for both hardware accesses (where the volatile access triggers some hardware) and for "hosted" environments (where the compiler assumes that system calls perform volatile accesses), and still allow most optimisations like writing in the hardware's natural bus width. If you want to write reliable multi-threaded code with current compilers, there are two simple rules:
  1. any data structure shared by multiple threads needs to be marked volatile
  2. any access to a shared data structure needs to be guarded by a lock
The accesses to the shared data structure are ordered with regard to the locking functions and cannot be optimized out, which is exactly what you want. The appropriate mental model is that anything that is not declared volatile (or handled by a platform locking primitive) cannot be seen by the other threads.

9 November 2007

Adam Rosi-Kessel: Is the MBTA Killing Itself?

As I stand in a near cattle-car packed South Station, waiting while no trains arrive and no trains depart (”signal difficulties”), I wonder if forces are conspiring to make MBTA service so poor that it enters a death spiral of poor reputation for reliability, increasing fares, lower ridership, less revenue, etc.. One or two long delays or canceled trains in a short time span can be ignored, but after a while it may become impossible for the T to recover the lost goodwill. There’s a saying in trademark law, “once you’ve lost a customer, they’re often gone forever.” Are signal difficulties for real, by the way? More on this topic: this excellent op-ed in the Globe about the importance of mass transit to the local economy and life sciences in particular; contrast with this news about what the T plans as its next big project (hint: “T TV”). Not much good news here, either. Is anyone listening? Technorati Tags: , ,

Next.

Previous.