Search Results: "ana"

17 October 2007

Russell Coker: Lazyweb Posts

A common practice in the blog space is to write posts that ask a question in the hope that someone else will answer it via a comment or a post. This is known as a “Lazyweb Post”. It seems to me that the way of managing such posts could be improved with a little informal cooperation. From now on I plan to tag each Lazyweb post with a Lazyweb Tag, now any reader of my blog can with a single click see all the unanswered lazyweb posts that I have written (I will remove the tag once an adequate answer has been provided or I have discovered and documented the solution myself). Almost all bloggers want to get more traffic to their blogs, the question is how to get traffic of the nature that you desire. Links from blogs that you like are a preferred source of traffic. If a blogger that you would like to receive a link from has a lazyweb tag or category then it provides a good list of ideas for post topics that will get you the links you desire. Such lists would also be good for determining what information is not generally available and which therefore can be used for the topics of original posts. Such tags or categories should also be good for getting answers to lazyweb posts. I’ll start doing this and see how well it takes off.

Adeodato Sim : The joy of libraries, and more

I’m reading Lo raro es vivir by Carmen Mart n Gaite, borrowed from the Library of my University. Somebody decided to amend this copy of the book with sundry fixes to the author’s grammar and spelling. Except that, of course, none are needed, and whoever made these changes can’t actually read (confusing unusual but valid constructs with not valid grammar), and doesn’t seem to have a clue of what an alternate spelling is, either. Joy. But maybe this post is only an excuse to recommend The Orphanage, this year’s Spain’s submission to the Best Foreign Language Film Category (which I really enjoyed!), and to point to Urban Dictionary re today’s xkcd.

Russell Coker: Insider Threats and Small Storage Devices

Danny Angus writes about the potential threat posed by small storage devices with large capacity [1]. His post was prompted by a BBC article about Hitachi’s plans for new hard drives [2], they are aiming for 4TB of data on a single drive by 2011 and a 1TB laptop drive. One thing I noticed about the article is that they made the false claim that current drives are limited to 1TB, the storage capacity is determined by the total surface area which is proportional to the square of the radius and the height of the drive (AFAIK there are no practical limits to the number of platters apart from the height of the drive). So if a 5.25 inch hard drive was to be manufactured with today’s technology it should get a capacity equivalent to at least three times the capacity of the larger 3.5 inch drive. The reason that 5.25 inch drives are not manufactured is that for best performance you want multiple spindles so that multiple operations can be performed concurrently. Using 3.5 inch drives in servers allows the use of more disks for the same amount of space in the rack and the same amount of power. The latest trend is towards 2.5 inch (Small Form Factor AKA SFF) disks for servers to allow more drives for better performance. With 3.5 inch disks a 1U system was limited to 3 disks and a 2U system was often limited to 4 or 5 disks. But with 2.5 inch drives a 2U server can have 10 drives or more. I know of one hardware vendor that plans to entirely cease using 3.5 inch drives and claims that 2.5 inch disks will give better performance, capacity, and power use! In regard to Danny’s claim (which is entirely correct) about the threat posed by insiders. I don’t believe that a laptop with 1TB of capacity is the threat. In a server room people notice where laptops get connected and there are often strictly enforced policies about connecting machines that don’t belong to the company. I believe that the greatest threat is posed by USB flash devices. For example let’s consider a database with customer name (~20B), birth-date (10B), address (~80B), phone number (~12B), card type (1B), card number (16B), card expiry (5B), and card CVV code (3B). That’s ~155 bytes per record in CSV or TSV format. If you have data for a million customers that’s 155M uncompressed and probably about 50M when compressed with gzip or WinZip (depending on which platform is being ripped). No-one even sells a USB flash device that is smaller than 50M, I recently bought a 2G flash device that was physically very small and cheap (it was in the bargain bin). The next issue is, what data might be worth stealing that is large enough to not fit on a USB device? I guess that if you want to copy entire network file shares from a corporation then you would need more than the 16G that seems to be the maximum capacity of a USB device at the moment. Another theoretical possibility would be to copy the entire mail spool of a medium to large ISP. For the case of a corporate file server you could probably get the data at reasonable speed, 1TB of data would take 10,000 seconds or 2.8 hours to transfer at gigabit Ethernet speeds (if you max out a GigE link - it could be as much as five times that if the network is congested or if the server is slow). It’s doable, but it would be a rather tense three or more hours waiting by an illegally connected laptop. For the mail server of a large ISP there is often no chance of getting anywhere near line speed, it’s lots of small reads and seek performance is the bottleneck, such servers are usually running close to capacity (and trying to copy data fast would hurt performance and draw unwanted attention). Another possibility might be to copy the storage of an Intranet search device. If a company has a Google appliance or similar device indexing much of their secret data then copying the indexes would be very useful. It would allow offline searches of the corporate data to prepare a list of files to retrieve later. It would probably be more useful to get online access to the data from a remote site. I expect that an unethical person could sell remote access to someone who is out of range of extradition. All that would be required would be to intentionally leave a flaw in the security of the system. In most large corporations this could be done in a way that is impossible to prove. For example if management decrees that the Internet servers run some software that is known to be of low quality then a hostile insider could make configuration changes to increase the risk - it would look like an innocent mistake if the problem was ever discovered (the blame would entirely go to the buggy software and the person who recommended it). A large part of the solution to this problem is to hire good employees. The common checks performed grudgingly by financial companies are grossly inadequate for this. Checking whether a potential employee has a criminal record does not prevent hiring criminals, it merely prevents hiring unsuccessful criminals and people who have not yet been tempted enough! The best way to assess whether HR people are being smart about this is to ask them for an estimate of how many criminals are employed by the company. If you have a company that’s not incredibly small then it’s inevitable that some criminals will be employed. Anyone who thinks that it is possible to avoid hiring criminals simply isn’t thinking about the issues. I may write more about this issue in a future post. Another significant part of the solution to the problem is to grant minimum privileges to access data. Everyone should only be granted access to data that they need for their work so that the only people who can really compromise the company are senior managers and sys-admins, and for best security different departments or groups should have different sys-admin teams and separate server rooms. Of course this does increase the cost of doing business, and probably most managers would rather have it be cheap than secure.

Miriam Ruiz: Weekend in Lyon: JDLL 2007

On 19th and 20th of October 2007 takes place “Les 9 mes Journ es Du Logiciel Libre” in Lyon, France, around the topics “Individual freedom and free software” and “Free Software for everyone”, the first of which will be analyzed from different point of views: legal, technical, historical, artistic, and others. The second will be addressed through different talks, covering many different aspects and areas of interests, including games. I’ve never been to Lyon before, I’ve been told it’s a really cute city, and I’m really looking forward to see you all, french guys, again there. :)

Chris Lamb: Missing notes in the Mozart s Dissonance quartet K. 465?

The second movement of Mozart’s String Quartet in C «Dissonance», K. 465 has an interesting two bars where it appears that the violin theme is accidentally missing. As highlighted in red on the score, the violin part is devoid of the crotchet/four quavers that the other parts present - the other “missing” bar is at this section’s mirror in the sub-dominant, bar 75. Some printed editions have added the missing notes, claiming that Mozart made a mistake (or overruling him on musical grounds!), but it seems bizarre that Mozart—who even likened the composition of the “Haydn” quartets to a long, labourious fatigue (”lungha e laboriosa fatica“)—would make such an error. The preface to the Neue Mozart Ausgabe claims:
It is unthinkable that Mozart [could] have made a mistake or from absent-mindedness made a slip of the pen no less than four times in such an obvious and important detail.
(The preparation of the original first edition, which Mozart himself presided over, presumably accounts for the other two.) At least one scholar has claimed that the notes aren’t missing at all; they are simply contained within the cello’s notes. I don’t find this explanation particulary satisfying. The NMA goes further by stressing its wish that the original version should be used in performances, which seems to suggest that adding the notes is (or at least, was) a common practice, but I cannot find many recordings with the added notes: my Leipziger, Emerson, Alban Berg, Ysa e, Italiano and Amadeus Quartet interpretations all omit the notes, whilst only the Hagen Quartet add them.

16 October 2007

Russell Coker: War is Bad for the Environment

I just read a nutty post claiming that Neo-Conservatism is good for the environment [1]. The first bogus claim is that Saddam had WMD and war was required because he was a despot. The fact is that the Iraqi government was always repressive, there are many factions in Iraq that don’t like each other and a repressive government is the only way to keep such groups in a united country. The current civil war in Iraq and the effective secession of Kurdistan (which currently seems to be involved in an undeclared border war with Turkey) demonstrates this. Saddam was always a despot, but he did improve the living conditions of most Iraqis - the best way to avoid a revolution is to convince the majority of the population that things will get worse if there is change. I suggest reading the Wikipedia page about Saddam Hussein [2]. The best information on Fourth Generation Warfare (4GW) seems to be on the conservative military analysis site Defense and the National Interest [7]. It covers all the issues related to invading other countries from a conservative point of view. Note that Neo-Conservatives are not Conservatives, the real Conservatives hate the Neo-Cons more than anyone else does. The amusing statement is made that “apologists claim it was one of the most advanced Arab nations” and then a link is provided to information on Saudi Arabian censorship. It’s worth reading the wikipedia page about the history of Saudi Arabia [3], among other interesting facts “the U.S. Army Corps of Engineers built the country’s television and broadcast facilities and oversaw the development of its defense industry” (does the US army share responsibility for the censorship?). It’s widely regarded that if the US military support was removed then the Saudi government would be overthrown. Referring to Saudi Arabia hardly seems like something you want to do if trying to justify occupying other middle-eastern states. An unsubstantiated claim is made that under-developed countries produce excess pollution due to inefficient technology. Unlike some people I try to get some facts before posting so I looked up the wikipedia page on CO2 emissions per capita [4]. It seems that the highest ranking first-world country is Luxembourg at #4, the next is the US at #10. The countries on the list that rank higher than the US have a combined population of about 11,000,000 while the US population is 302,000,000 - some quite mental arithmetic suggests that the US produces about 20 times more CO2 than the top 9 countries on the list combined! It doesn’t seem that having the highest technology is helping the US protect the environment, I guess that they just use it to build bigger cars. The next thing I noticed is the countries that are at the bottom of the list - they are the world’s poorest countries. It seems that countries without much money just can’t afford to burn lots of oil, while countries with lots of money can. No real surprises there. The lowest ranking on the list for a country that is unlikely to be regarded as being in abject poverty is India at position #133. The next lowest is Turkey at position #98 followed by China at #91. As a final point of reference Switzerland is at position #69 a produces just under 27% the CO2 that the US does (on a per-capita basis). According to the CIA World Fact Book Switzerland has an infant mortality rate of 4.28/1000 and a life expectancy of 80.62 [5], while the US has an infant mortality rate of 6.37/1000 and a life expectancy of 78 [6]. I believe that the infant mortality rate and the life expectancy are the two factors that are most representative of quality of life as they are the easiest factors for measuring the overall health of the population. Being healthy is one of the most important factors in quality of life. It seems to me that by all objective measures the Swiss are doing better than the people of the US, yet they produce less pollution and never invade other countries. Probably the most ridiculous statement in the post is “see rapidly dwindling resources wasted on jihad and revolution“. A revolution (locals using force to create a new government) takes little resources and most actions that a more simple-minded analysis might call “jihad” takes almost none. Sending an invasion force to the other side of the world and supporting an occupying army for years does however use significant resources, consider that the Hummvee is the least fuel-efficient vehicle on American roads in terms of work done (trucks and buses use more fuel but carry large amounts of cargo or many people), but it’s also the most fuel-efficient vehicle used by the US army in Iraq. There is the possibility that Jaldhar was attempting satire. If so then I suggest that satire be kept separate from serious web content to avoid confusion about where the satire ends. But if you want some satire about oil then I suggest consulting theonion.com. Before someone accuses me of being impolite, over a year ago the best estimate for the death toll from the occupation of Iraq was 655,000 [8]. Current extrapolations from the previous medical research suggest that the death toll has now exceeded 1,000,000. Regardless of whether the original post was intended as satire or not, I’m not laughing and I don’t feel the need to be polite to someone who makes excuses for such loss of life. Finally as a positive suggestion towards the environment (and any other issue that you may want to discuss), I suggest analysing the issues before writing about them and not blindly trusting other people. When you write a post make objective claims with references to back them up. When you read a post consider the points that are made and the references that are cited. Do the references support the claims? Are there other interpretations of the evidence? Are the reference sites reputable?

MJ Ray: the Cooperative Group Half-Yearly Meeting

I attended my first half-yearly meeting as a member of the co-operative group yesterday evening at 7pm. The event for the strangely-named Kennet and Avon area was held at Jury's Hotel near Queen Square, which is a part of Bristol I've not visited for a while, so I got there a bit early to find it. the co-operative food, The Centre, Bristol I found it easily, which gave me a few minutes spare to visit the co-operative food store on the Centre (pictured), which is the first rebranded one I've seen. It looks light and airy and the staff were friendly. I didn't find everything I was looking for, but after exiting, I noticed I'd not seen around the corner of the L-shaped store! Anyway, the meeting itself was chaired by Peter Begley and was attended by six elected reps, three regional officers, four trading managers (all food?) and about 50 members by my reckoning. There was a comment later in the meeting about the low turnout from Bath - it seems that a meeting for each city had been requested and refused. There was also a comment about lack of transport from Weston-super-Mare, about which I'm not sure: trains between WsM and Bristol are at least hourly. Maybe there should be a shuttle between station and meeting for people who can't walk, but it seems nuts to run a bus from here when trains are faster and have space. Officer Chris Griffiths gave a presentation (with loud music!) about our community support, including windfarms on the co-operative farms, Farm to Fork, the Woodcraft Folk, the Queens Award for Sustainable Development, community chef visits to Ilfracombe and Bath, community challenge, Mukti Mitchell's Low Carbon Lifestyle Tour, Fairtrade fashion shows, Holyland Handicrafts Co-operative at Bath Christmas Market, BAND (D is for Daycare, but I missed the rest), Toy Box Library Bath, Avonmouth Community Centre Association and Oldfield Park Juniors. Frank Jones presented the business interim report, noting that the group has a 2.2% increase of revenue before reinsurance premiums, but the bad weather has hit the insurance arm, reducing the overall profit. Nevertheless, we still paid a total of 38 million pounds to and on behalf of members. The closure of WsM Dolphin Square and the gain of the co-operative pharmacy in Milton were mentioned in passing. There was a short presentation about the constitutional review. The first members' consultation ends on 26 October, so send in your comments soon. There was particular concern about some multi-thousand-pound payments to elected representatives who stand down. Then came member questions, which I'll describe in another post, approval of past minutes, reports of the local co-operative party (success in Bath+NES, 8 councillors in Bristol, loss of 2 councillors in N.Somerset) and presentations to Frank Jones and Simon Crew of 10-year elected service awards. The meeting closed at 9pm.

Benjamin Mako Hill: What I'm Up To

So, I finished graduate school at MIT. I presented some of my thesis work at Wikimania and I'll be posting information, code, and the thesis itself, in the next weeks as I find time. I've decided to focus, at least in the immediate future, on several important projects. Here's what I'm up to: This is, of course, in addition to my work with FSF, Debian, and Ubuntu which I'll be continuing. And talks. And writing. (Yikes!) I'll be keeping my office at MIT (yes, like RMS) for the time being and sticking around Cambridge at least until Mika finishes her degree at Harvard School of Public Health. I'll be in wrapping up projects modes for the next few weeks and months and will be posting about them here as I go.

Marc 'Zugschlus' Haber: A thousand things I never wanted to know about X

In the last few days, I have replaced the two 20 inch CRT monitors that I have hardly used the last years with two 20 inch TFT displays, and my company (finally) gave me a 19 inch TFT display to accompany my notebook display at work. Maybe I should take that as a hint that they want to see me in the office more frequently rather than in my home office which I generously use these days. At home, I built a “new” computer from mainly used parts to drive the two 20 inchers. I have learned a lot about X in the last days, but spent too much time with it. I have been running my Desktop with older X and two CRTs for quite some time, but I hardly ever used it due to the setup of my now ex-flat. Back then, I learned that the “two monitors, one display, one screen, one desktop” option of X was called Xinerama and statically configured: You write down your display layout in xorg.conf and it uses it. Configuration changes mean restarting the X server. KDE notices Xinerama automatically, designates one monitor the “main monitor” and displays its panel there. You can move windows from one monitor to the other one, but changing virtual desktops always changes what both monitors display. This is not really what I want, since I often have “static” contents (news reader, mail reader, chat windows, help screens etc) on one monitor while I do my normal work on the other monitor, which involves changing virtual desktops. So I was rather happy when I learned upon the arrival of the external TFT display for the notebook that you can work without Xinerama. In that case, the X server comes up with one display and two screens, which KDE uses to display two independent desktops which can be independently configured, but can both be accessed with one mouse and one keyboard. For me, this means that I finally can independently change virtual desktops on both monitors, but pay the price that I cannot display a certain virtual desktop on monitor 1 now, and on monitor 2 in five minutes, and that a window opened on monitor 1 is never going to be shown on monitor 2 without serious interference. This looked ok for me. Additionally, you can use different font sizes on the different monitors as defaults, which comes in handy if both monitors are blatantly different in size (which is the case with the notebook and its external monitor). However, with that setup, KDE seems to be challenged when it comes to saving the configuration. Some things (such as desktop background and panel config) seem to save fine, desktop independent, other things (such as open windows and their position) are lost when the session exitst. My daily visit to Kevin&Kell (which used to be in a browser window that was saved with my session) has badly suffered since then. Then, a few weeks ago, somebody talked me into trying the X server from experimental. Which is when my dual-desktop setup ceased working. The nice people on #debian-x told me that Xinerama is a thing of the past, and is currently in the process of being replaced by Xrandr 1.2. The removal of “my” two monitor, two screens, two desktop setup is collateral damage, and if I still want that behavior, the X.org upstream considers this an issue to be handled by the Window Manager / Desktop Environment now. Gee, thanks. That’s what I call a regression. After spending half a day cursing and ranting, and even considering to go back to lenny’s (or even etch’s) X.org, I finally settled on going with the “new” way as I was going to lose my independent desktops sooner or later anyway. Again, with the friendly help of the people on #debian-x, I found out about a lot of advantages of the latest X servers. In most basic cases, the latest X server does not need a configuration file any more. It autodetects your hardware and chooses whatever modes it finds optimal. It does a pretty decent job in doing so. If one wants to influence how the X system comes up, once can always write an Xorg.conf file - the configfileless server even writes the “virtual config file” it uses to the log as a starting point. Additionally, almost everything regarding screen layout can be reconfigured at run time using the xrandr binary from a command line. Even a hardware change (such a new monitor plugged into the powered on notebook) is correctly detected. Cute. This allows me to reconfigure my notebook depending on where it currently is and which external monitor (or projector) is connected. This can be perfected if I find out whether X offers a hook to plug a reconfiguration script into that is called when the X server starts or when the system is waking up from standby or hibernation with the X server running. A lot to do, and great potential for elegant stuff. However, while I am talking about hibernation, this is a downside of the new driver: When the system wakes up from hibernation, the X server sometimes confuses itself enough to become nearly unuseable: I had it become psychotic when plugging in the external monitor (which can do 1600x1200 points) after waking it up from hibernation at the office. The internal display can only do 1400x1050, and the box thought that the external monitor only had 1050 y axis pixels, displaying bit garbage in the lower part of the big monitor, and showing a useable, but unintelligible panel. When opening any browser or any other application with considerable text amounts in the window, all fonts become unreadable once one scrolls down. Restarting the X server helps and everyting is fine. But I do not use hibernation to force myself to log out of X after waking up. After going back to the “one monitor mode”, the X server now thinks that my virtual desktop is 1600x1200 and only shows 1400x1050, with dead space at the right and lower side of the virtual desktop. xrandr does not allow me to reisize the FB below 1600x1200. No idea what’s going on here. In most of the cases, calling xrandr --auto for each output will fix the issues at run time, but sometimes a session restart is needed. Code needs to stabilize quite a bit before becoming useable in production. There are a few disadvantages that will remain: Both monitors will change their contents when the virtual desktop is changed, and both displays will use the same default font size (which might be inappropriate if both displays are of different size). But I think, when the issues are cleared up, that I can live with these disadvantages. The “new” desktop system that I built has a Matrox G450 dual head graphics card, and unfortunately, the Xrandr 1.2 enabled X server from experiemental has shown to be unuseable: Upon some mode changes, the X server goes into an endless loop and proves itself to be unkillable short of SIGKILL. And if it dies, it sometimes pulls the entire system with it. There is a corresponding bug in the upstream BTS, but it hasn’t received any noticeable attention by the upstream developers. So I might find myself configuring one last Xinerama config before I can finally completly migrate to Xrandr 1.2 on the desktop as well. Then I’ll probably need to bug the KDE upstream people to implement a two-desktops-on-a-single-screen feature in one of their future versions so that I can get my independent-desktop-things back. But that’s a far far away future.

Russell Coker: Introverts

I am amazed that I had never read the article Caring for Your Introvert [1] before. One of the interesting points concerned acting like an extrovert (I can do it for the duration of a typical job interview). Another was the issue of recovery time after having to deal with people. When living in hotels (which I did for about 18 months straight in 1999 and 2000) I found that some days I would reach my quota for dealing with people before I had dinner, going to bed hungry seemed like a better option than going to a restaurant. One thing that occurred to me is the lack of apparent introversion among most delegates at computer conferences. It seems that the majority of people who are any good at coding are introverts and you might expect an environment with a majority of introverts to be somewhat quiet. An interview with the author of the article [2] published 3 years later explains this (among other things). Here is a quote:
But once an introvert gets on a subject that they know about or care about or that intrigues them intellectually, the opposite often takes hold. They get passionately engaged and turned on by the conversation. But it’s not socializing that’s going on there. It’s learning or teaching or analyzing, which involves, I’m convinced, a whole different part of the brain from the socializing part. Which describes a lot of the activity at conferences. It’s standard practice for people to walk up and join a conversation that covers an area of technology that interests them and then just walk away when the topic changes. I wonder if any of the social networking and dating sites have a section for Myers-Briggs [3] test results. Via Tim Connors blog [4].

Ross Burton: Mark Thomas

A couple of nights ago (Tuesday, the 8th) I went to see a live Mark Thomas show. A very enjoyable show, he is wonderful at telling stories, making the entire audience collapse with laughter, and then can suddenly make the entire room silent with a serious point about the terrors the Western world manages to inflict on other nations. Lots of interesting facts, like the poor drunk American who is in prison for three years for mentioning the "day of judgement" and "a burning Bush". The number of people dying daily due to lack of action from us. The propaganda about the current war, forced in our faces every second of every day, until the war is over (as far as the media is concerned), at which point it will be ignored and never mentioned again. I am now a proud white ribbon wearer, supporting How About Not Killing Everyone? A small piece of advice from the wise -- if you see MT live, and he starts to talk about John Major and Edwina Curry... look away. Quickly. You shall be haunted for the rest of your days if you do not.

Dirk Eddelbuettel: Some marathon data analysis

A few days after the Chicago Marathon in record-heat, I was wondering just how much more I had been slowing down, and exactly when during the course of the race this occurred. Bigger races like Chicago provide the so-called 'splits' for every five kilometer segment. Helpfully, they also keep these with the archived results which are all accessible via the web. So it was easy enough to collect a sequence of time such as '0:22:34', '0:45:30', ... and so on. And thanks to R, my data slicing and dicing and visualizing tool of choice, it was just a handful of lines to produce the chart below. The chart covers my four Chicago marathons (2004, 2005, 2006 and 2007) as well as Boston (2007) --- the infamous '27.2 mile marathon' seems to have dropped off the net, and the smaller Sunburst does not have 5k split times. (pace comparison chart) The chart shows a few things quite nicely: While it was a tough race, I clearly ran a lot slower than previously, in particular between 25 km and 40 km. So there.

Jaldhar Vyas: Neoconservatism Is Good For The Environment

One of the common criticisms of the war in Iraq is that it was just an excuse to plunder that nations' oil. Of course that wasn't the reason however on Blog Action Day I urge environmentalists to think about why that might have actually been a better reason than the ones the politicians gave. The world supply of oil will probably run out in my lifetime. While alternative sources of energy are being researched, they have yet to be viable on a large enough scale to keep the world economy running at its present rate of progress. For the time being we must depend on oil and it is of vital importance that this precious resource is managed carefully. The problem is that it is not. Whereas civilized countries use energy for good purposes most of the oil is produced in countries which can only be described as evil. Take Saddams Iraq for instance; apologists claim it was one of the most advanced Arab nations, but that isn't setting a very high bar is it? Oil wealth was not used to better the lives of citizens but to prop up a savage and despotic regime. It is the poor and desperate deprived of the ability to take part in free markets who despoil the environment in a struggle to survive. Look at the other major oil producers and there too you will see a veritable rogues gallery. Some of these villains may be motivated by fundamentalism, some by socialism but the effect is the same. The common man in their countries does not get to enjoy the fruits of progress They are forced to muddle along with old, energy-inefficient, pollution-causing tech and their large numbers and vast geographical range undermine any modest environmental gains made by a few middle-class Westerners. How could anyone who cares about the fate of our mother Earth stand by and watch her bounty being squandered by dictators? See rapidly dwindling resources wasted on jihad and revolution? The next time there is talk of war, be environmentally responsible and ask your representatives to make securing oil and spreading capitalism priorities. You owe it to your planet.

15 October 2007

MJ Ray: Ubuntu power study and RBS-NatWest: the global warming bank

Blog Action Day: One issue, one day, thousands of voices
Two things I saw about today: Ubuntu's Power Consumption Tested, by Michael Larabel and HAPPENING NOW! 'Climate refugees' Locked-Up at the 'Oil Bank of Scotland' (So, please take action to tweak your power management and change your bank today!)

Martin F. Krafft: CO and the environment

Today is environment blog action day. I don't like memes or mass actions of this sort, but given a recent discussion on the effects of Al Gore's movie An Inconvenient Truth and everyday/everyone environmental protection on a UL-internal discussion list called "opinions", I feel like sharing my views. The original poster suggested everyone to see the movie and was promptly smashed down by two people who responded along the lines of "the movie has no scientific basis," quoting fancy research on how global warming is not as bad as it's hyped to be, and that CO is not as guilty as everyone claims. None of this research is relevant to what I had to say to this, so I won't quote it, but if you're interested, the Intergovernmental Panel on Climate Change (IPCC) is the place to start. One person went further and compared the CO -reduction hype to communism and criticised how we're expecting everyone to take action on the basis of false claims. I was partly disgusted by (all) those replies, not because they weren't accurate, but because they simply miss the point. And because the entire discussion was just another iteration of talk versus action. It may well be true that CO is not that bad, after all. But it's also true that any reasonable attempt to reduce its emission is not going to harm the environment (not to say that it might actually have a net-positive effect). Or as I put it in the thread:
I don't care for politics, I don't even care for research on this matter. I care for my environment, and I don't need to be a scientist to assume that plastic bags and car exhaust and lights left on when out to the pub are not making it any better. And yet, I am not a militant green. I prefer halogen light bulbs to the energy-saving ones and occasionally I'll be at the supermarket without a reusable bag; I don't condemn people using cars instead of a 15 minute walk to the office, and I still haven't managed to talk to a housemate of mine (no, not my Swiss flatmate), who notoriously leaves lights and appliances running when away. But at least I can say that I think of these issues, without scientific basis, but common sense. And I'll say that a thousand people aware of that will make more of a difference than any politician out there.
Not only do I think about these issues, I also act accordingly. But to be able to do that, I had to become aware of them. In as such, I'll stand by the claim in the discussion: awareness is what we ought to strive for, rather than talking about possible ways to start considering how we could potentially one day make leaps towards the solution of the world's problems, of which the environment is one. Awareness and little steps, which everyone can take: turn off lights and appliances, turn down the heater, use reusable shopping bags, prefer local produce to imported products, avoid fancy packaging, and so on In the thread, I asked "What have you done today to help lessen the burden we place on our environment?" I got no replies. I hope that's because people couldn't be bothered to show off their little contributions to the environment. If that were the case, then we are on the right path. NP: Gazpacho: Night

Peter Makholm: Cool svn enabled prompt

Mike Hommey explains how to get VCS information in his bash prompt. Cool idea but not quite the way I like it, so I did a few more iterations… The main problem is that it doesn’t play nice with symlinks. I often find myself making a large checkout of a the full project and then have symlinks to the parts I’m working with. Minor details is that I don’t like having a bold font in my prompt, I don’t care about the URI-part of the prompt, and I’m only using Subversion. So my quick 5 minutes hack: (See Mike’s blog for the explanations)

# Fancy svn enabled PROMPT
__vcs_dir()  
  local vcs base_dir sub_dir ref get_dir
  get_dir()  
      ( cd $1
        echo $ PWD  )
   
  sub_dir()  
    local sub_dir
    sub_dir=$ PWD 
    sub_dir=$ sub_dir#$1 
    echo $ sub_dir#/ 
   
  svn_dir()  
    [ -d ".svn" ]   return 1
    base_dir=$PWD
    while [ -d "$(get_dir $base_dir/..)/.svn" ]; do base_dir=$(get_dir "$base_dir/../"); done
    sub_dir=$(sub_dir "$ base_dir ")
    ref=$(svn info "$(readlink -f $base_dir)"   awk '/^Revision/   sub("[^0-9]*","",$0); print "rev:"$0  ')
    vcs="svn"
   
  svn_dir  
  base_dir="$PWD"
  echo "$ base_dir/$HOME/~ $ vcs:+[$ref] $ sub_dir "
 
PS1='\u@\h:$(__vcs_dir)\$ '

Christian Perrier: RWC: That will be South Africa-England

...and, really, we nearly never thought that Argentina could win tonight. South Africa was really too strong for them. The only domain where Argentinians dominated were scrums but this was much compensated by their great weakness on line-outs, losing something like 5 or 6 of them. South Africa thus logical won very easily...and Bryan Habana is now the best try scorer all along RWCs, along with Jonah Lomu. He is a really great player, indeed. Much much impressive South Africa: they'll be by far the favourites of the final against England, which they beated already during that World Cup. I said several times that I'm not a deep fan of RSA's play, but I could become one. Their game improved all along the World Cup and today, they probably played their best match. Two remakes next week-end: France-Argentina for the 3rd place and South Africa-England as final. That will be good matches, no doubt...and I hope that Bernard Laporte will change the French team to play against Argentina.

14 October 2007

Christian Perrier: RWC: That will be South Africa-England

...and, really, we nearly never though that Argentina could win tonight. South Africa was really too strong for them. The only domain were Argentinians dominated were scrums but this was much compensated by their great weakness on line-outs, losing something like 5 or 6 of them. South Africa thus logical won very easily...and Bryan Habana is now the best try scorer all along RWCs, along with Jonah Lomu. He is a really great player, indeed. Much much impressive South Africa: they'll be by far the favourites of the final against England, which they beated already during that World Cup. I said several times that I'm not a deep fan of RSA's play, but I could become one. Their game improved all along the World Cup and today, they probably played their best match. Two remakes next week-end: France-Argentina for the 3rd place and South Africa-England as final. That will be good matches, no doubt...and I hope that Bernard Laporte will change the French team to play against Argentina.

Russell Coker: AUUG 2007

Today was the final day of the AUUG 2007 conference [1]. Yesterday I gave a talk about SE Linux for about an hour (not sure exactly as I forgot to make an MP3). AUUG is well known for having conferences with very technical delegates and I wasn’t expecting an easy audience. At the start of my talk I asked for a show of hands as to who has used SE Linux before, about 1/3 of the delegates raised their hand. Someone requested that I poll the audience as to who had used SE Linux involuntarily, it wasn’t what I had planned to ask but it’s best to get these things out in the open so I asked the question. More people raised their hand as being unwilling users of SE Linux than those who had firstly admitted to using it! A theme of the AUUG conference was quality, and I had planned to cover some of the ways that SE Linux improves the quality of code by making certain classes of bugs show up (EG file handle leaks) and by allowing the developers and sys-admins to know exactly what programs are doing. But I ended up explaining why you want to use SE Linux, the concepts of policy analysis tools (as compared to the absence of such tools for Unix permissions), the benefits of MAC and why SE Linux is worth using. I believe that the talk did some good and conversations with delegates afterwards revealed that some of them had done some positive things with SE Linux. Today I wore a T-shirt advertising the root password for my new SE Linux Play Machine [2] which will be online shortly (hopefully tomorrow) which got some interest (AFAIK I’m the first person to wear a root password on a T-shirt). When I have my play machine online I plan to wear the shirt whenever I visit an electronics store or any other location where geeks are likely to congregate. ;) After the conference finished about 1/3 of the delegates went to Ginza Teppanyaki [3] for dinner. Some of the guys wanted to photograph me wearing my shirt. Finally, the conference went pretty well, the delegates and speakers all seemed to enjoy themselves and learn some useful things. Congratulations to the AUUG conference organisers!

Mike Hommey: Adding some VCS information in bash prompt

I don’t spend a lot of time customizing my “working” environment nowadays, like enhancing vim configuration, or tweaking the shell. But when I read MadCoder’s zsh git-enabled prompt, I though it was too convenient to not have something like that. Except I don’t work with git only (sadly, but that’s changing), and I don’t like colours in prompt (and a 2 lines prompt is too much). Anyways, since I have a bunch of directories in my $HOME that contain either svk, svn, mercurial, or git working trees, I thought it would be nice to have some information about all this on my prompt. After a few iterations, here are the sample results:
mh@namakemono:~/dd/packages$
mh@namakemono:(svn)~/dd/packages/iceape[trunk:39972]debian/patches$
mh@namakemono:(svk)~/dd/packages/libxml2[trunk:1308]include/libxml$
mh@namakemono:(hg)~/moz/cvs-trunk-mirror[default]uriloader/exthandler$
mh@namakemono:(git)~/git/webkit[debian]JavaScriptCore/wtf$
The script follows, with a bit of explanation intertwined.
_bold=$(tput bold)
_normal=$(tput sgr0)
tput is a tool I only dicovered recently, and avoids the need to know the escape codes. There are also options for cursor placement, colours, etc. It lies in the ncurses-bin package, if you want to play with it.
__vcs_dir()
  local vcs base_dir sub_dir ref
  sub_dir()
    local sub_dir
    sub_dir=$(readlink -f "$ PWD ")
    sub_dir=$ sub_dir#$1
    echo $ sub_dir#/
  
We declare as much as possible as local (even functions), so that we avoid cluttering the whole environment. sub_dir is going to be used in several places below, which is why we declare it as a function. It outputs the current directory, relative to the directory given as argument.
  git_dir()
    base_dir=$(git-rev-parse --show-cdup 2>/dev/null) return 1
    base_dir=$(readlink -f "$base_dir/..")
    sub_dir=$(git-rev-parse --show-prefix)
    sub_dir=$ sub_dir%/
    ref=$(git-symbolic-ref -q HEAD git-name-rev --name-only HEAD 2>/dev/null)
    ref=$ ref#refs/heads/
    vcs="git"
  
This is the first function to detect a working tree, for git this time. Each of these functions set the 4 variables we declared earlier: vcs, base_dir, sub_dir and ref. They are, respectively, the VCS type, the top-level directory of the working tree, the current directory, relative to base_dir, and the branch, revision or a reference in the repository, depending on the VCS in use. These functions return 1 if the current directory is not in a working tree of the currently considered VCS.
The base directory of a git working tree can be deduced from the result of git-rev-parse --show-cdup, which gives the way up to the top-level directory, relative to the current directory. readlink -f then gives the canonical top-level directory. The current directory, relative to the top-level, is simply given by git-rev-parse --show-prefix.
git-name-rev --name-only HEAD gives a nice reference for the current HEAD, especially if you’re on a detached head. But this can turn out to do a lot of work, introducing a slight lag when you cd for the first time in the git working tree, while most of the time, the HEAD is just a symbolic ref. This is why we first try git-symbolic-ref --name-only HEAD.
  svn_dir()
    [ -d ".svn" ] return 1
    base_dir="."
    while [ -d "$base_dir/../.svn" ]; do base_dir="$base_dir/.."; done
    base_dir=$(readlink -f "$base_dir")
    sub_dir=$(sub_dir "$ base_dir ")
    ref=$(svn info "$base_dir" awk '/^URL/ sub(".*/","",$0); r=$0 /^Revision/ sub("[^0-9]*","",$0); print r":"$0 ')
    vcs="svn"
  
Detecting an svn working tree is easier : it contains a .svn directory, be it top-level or sub directory. We look up the top-level directory by checking the last directory containing a .svn sub directory on the way up. This obviously doesn’t work if you checkout under another svn working tree, but I don’t do such things.
For the ref, I wanted something like the name of the directory that has been checked out at the top-level directory (usually “trunk” or a branch name), followed by the revision number.
  svk_dir()
    [ -f ~/.svk/config ] return 1
    base_dir=$(awk '/: *$/ sub(/^ */,"",$0); sub(/: *$/,"",$0); if (match("'$ PWD '", $0"(/ $)")) print $0; d=1; /depotpath/ && d == 1 sub(".*/","",$0); r=$0 /revision/ && d == 1 print r ":" $2; exit 1 ' ~/.svk/config) && return 1
    ref=$ base_dir##*

    base_dir=$ base_dir%%
*
    sub_dir=$(sub_dir "$ base_dir ")
    vcs="svk"
  
svk doesn’t have repository files in the working tree, so we would have to ask svk itself if the current directory is a working tree. Unfortunately, svk is quite slow at that (not that it takes several seconds, but that induces a noticeable delay to display the prompt), so we have to parse its config file by ourselves. We avoid running awk twice by outputing both the informations we are looking for, separated by a carriage return, and then do some tricks with bash variable expansion.
  hg_dir()
    base_dir="."
    while [ ! -d "$base_dir/.hg" ]; do base_dir="$base_dir/.."; [ $(readlink -f "$ base_dir ") = "/" ] && return 1; done
    base_dir=$(readlink -f "$base_dir")
    sub_dir=$(sub_dir "$ base_dir ")
    ref=$(< "$ base_dir /.hg/branch")
    vcs="hg"
  
I don’t use mercurial much, but I happen to have exactly one working tree (a clone of http://hg.mozilla.org/cvs-trunk-mirror/), so I got some basic information. There is no way we can ask mercurial itself for information, it is too slow for that (main culprit being the python interpreter startup), so we take the informations we can (and since I don’t know much about mercurial, that’s really basic). Note that if you’re deep in the VFS tree, but not in a mercurial working tree, the while loop may be slow. I didn’t bother much looking for a better solution.
  git_dir
  svn_dir
  svk_dir
  hg_dir
  base_dir="$PWD"
Here we just run all these functions one by one, stopping at the first that matches. Adding some more for other VCS would be easy.
  echo "$ vcs:+($vcs) $ _bold $ base_dir/$HOME/~ $ _normal $ vcs:+[$ref]$ _bold $ sub_dir $ _normal "

PS1='$ debian_chroot:+($debian_chroot) \u@\h:$(___vcs_dir)\$ '
Finally, we set up the prompt, so that it looks nice with all the gathered information. Update: made the last lines of the script a little better and factorized.

Next.

Previous.