Search Results: "beh"

8 September 2007

Clint Adams: See Siemens first

Maintenant j'ouvre la fen tre et une mouche la chambre entre
Ni la moche ni l'italienne ne peut  tre trouv e plus   son centre
This place with its wood and its shingles, this place
with birdshit splattered down the bricks
This place with drunken girls screaming Meat Loaf lyrics
and behaving like abject pricks
Maintenant je suis bien loin
But yet oh so close
Cerca de la criatura del lago
Not Iago as has been previously claimed
Humming, screeching, gurgling, squeaking
Not unlike Barbie's mom on a Thursday night
It goes through the motions of accomplishing something
When really it is advancing its own sinister agenda
An agenda so sinister that you'd name it Dexter if you could.
You can't.
Then, as the disruptive forces destabilize reality, like
they destabilize the rhyme and scansion and hyperlinklessness
of
This Poem
Then, like
Mike Stone
expressing
gratitude,
like something demanding its $3.50 (but oh, oh, it does not want its $3.50; it wants
something far more visceral and ephemeral), it makes a simple statement.
F01.
Natuurlijk.

Julien Blache: pommed v1.9: keyboard backlight idle timer

I’ve just released pommed v1.9, which adds an idle timer for the keyboard backlight. It’ll save some battery, it’s nice if you’re watching a movie or something and it reportedly behaves like OS X :-) Download at the usual place on Alioth, Debian mirrors at the next push.

7 September 2007

Mike Hommey: Javascript performance in browsers

Ars Technica has recently posted an article about the new Opera alpha release, with some Javascript benchmark results showing it is quite faster than version 9.23. It also goes to compare with Firefox and IE7, but omits some other not so unimportant browsers. I think the main reason is because they seem to have only tested Windows browsers. Sure, Safari has been released recently on Windows, but it is still quite marginal. Anyways, I was wondering how all this was going under Linux, and also, how (good?) WebKit would perform compared to others. So, I tried the same Javascript speed tests on various browsers under Linux on my laptop, which happens to be a Pentium M 1.5GHz. And the winner is…
Test Iceweasel 2.0.0.6 Epiphany 2.18.3/libxul 1.8.1.6 GdkWebKit Opera 9.23 Opera 9.50 alpha 1
Try/Catch with errors 80 81 41 18 22
Layer movement 250 214 76 53 47
Random number engine 280 190 57 72 68
Math engine 343 274 82 101 91
DOM speed 205 225 18 41 54
Array functions 97 97 72 82 44
String functions 14 12 12 46 52
Ajax declaration 178 127 16 21 17
Total 1447 1220 374 434 395
So, It seems the speed gain Opera got on Windows doesn’t happen much on Linux. An interesting result, is that Iceweasel, with a bunch of extensions installed, is slower than Epiphany, despite both using the same rendering engine and Javascript library. Running Iceweasel in safe mode makes it the same speed as Epiphany, though. So having extensions does not only clutter the UI, but actually has an impact on how fast the Javascript code in web pages is going to run. And well, WebKit is the fastest for this testcase, though it stays behind Opera on some specific tests.

MJ Ray: Look who's squatting on Jono Bacon

So, for some reason, I was using advogato and, for some reason, I was looking at jono and, for some reason, I clicked on the link to the JonoCam. What I saw was unpleasant and not what I was expecting. Someone's squatting on the JonoCam address, hiding behind eNom's privacy service. In fact, it looks like all of kdedevelopers.net is spam now, including jono.kdedevelopers.net. Not only that, but http://www.jonobacon.co.uk/ is squatted too, by futuregate aka Mindcom Internet Limited of 20 Meridian Way, Meridian Business Park, Norwich NR7 0TA. If you're reading this from near Norwich, would you post some pictures of the home of these serial domain-squatters, please? So I hopped onto the lugradio IRC and asked jono. Apparently he lost it ages ago(!) nominet says the domain was registered in 2004 and last updated April 2007, so I didn't know if that means it's been a while, or just a few months. Does the registration date change if an owner loses control? astinus told me that it does. Anyway, I wonder how many advogato users have disused person pages with spam/squatted links. Is there a nice way we could spot them all and tag them somehow? Is there some common "about me" format which advogato (and social networking sites?) could use to keep up-to-date on our movements? List three locations in case we lose our primary domain? Also, I had another email yesterday from someone apologising for losing control of their domain, asking me to change my links and I've removed a couple more from my friends bookmarks category recently. Are people still losing personal domains to squatters? If so, is there a new reason for this, or is it the same old problems of registrar-lock-in and it being cheaper to register a new domain than to go to dispute resolution? (2007-09-09: 4 comments)

6 September 2007

Russell Coker: Citing References in Blog Posts

A significant problem with the old-fashioned media is that as a general rule they don’t cite references for anything. Some of the better TV documentaries and non-fiction books cite references, but this is the exception not the norm. Often documentaries only cite references in DVD extras which are good for the people who like the documentary enough to buy it but not for people who want to rebut it (few people will pay for a resource if they doubt the truth and accuracy of it’s claims). I can understand newspapers not wanting to publish much in the way of background information in the paper version as every extra line of text in an article is a line of advertising that they can’t sell. So they have financial pressure to produce less content, and the number of people like me who want to check the facts and figures used in articles is probably a small portion of the readership. Another issue with newspapers is that they are often considered as primary authoritative sources (by themselves and by the readers). It is often the case that journalists will interview people who have first-hand knowledge of an issue and the resulting article will be authoritative and a primary source in which case all they need to do is to note that they interviewed the subject. However the majority of articles published will be sourced from elsewhere (news agencies [ http://en.wikipedia.org/wiki/News_agency ] such as Reuters are commonly used). Also articles will often be written based on press releases - it is very interesting to read press releases and see how little work is done by some media outlets to convert them to articles, through a well written press release a corporation or interest group can almost write it’s own articles for publication in the old media. One way of partially addressing the problem of citing references in old media would be to create a web site of references, then every article could have a URL that is a permanent link to the references and calculations to support the claims and numbers used. Such a URL could be produced by any blogging software, and a blog would be an ideal way of doing this. For bloggers however it’s much easier to cite references and readers have much higher expectations of links to other sites to support claims and of mathematical calculations shown to indicate how numbers are determined. But there is still room for improvement. Here are some of the most common mistakes that I see in posts by people who are trying to do the right thing:
  1. Indirect links. When you refer to a site you want to refer to it directly. In email (which is generally considered a transient medium) a service such as TinyURL [ www.TinyURL.com ] can be used to create short URLs to refer to pages that have long URLs. This is really good for email as there are occasions when people will want to write the address down and type it in to another computer. For blogging you should assume that your reader has access to browse the web (which is the case most of the time). Another possibility is to have the textual description of a link include a reference to the TinyURL service but to have the HREF refer to the real address. Any service on the net may potentially go away at some future time. Any service on the net may have transient outages, and any reader of your blog may have routing problems that make parts of the net unavailable to them. If accessing a reference requires using TinyURL (or a similar service) as well as the target site then there are two potential things that might break and prevent your readers from accessing it.
    One situation where indirect links are acceptable is for the printed version. So you could have a link in the HTML code for readers to click on to get to the reference page directly and a TinuURL link for people who have a printed version and need to type it in.
    Also when linking to a blog it’s worth considering the fact that a track-back won’t work via TinyURL and track-backs may help you get more readers…

  2. Links that expire. For example never say “there’s a good article on the front page of X” (where X is a blog or news site). Instead say “here’s a link to a good article which happens to be on the front page now” so that someone who reads your post in a couple of years time can see the article that you reference.
    Another problem is links to transient data. For example if you want to comment on the features of a 2007 model car you should try to avoid linking to the car manufacturer page, next year they will release a new car and delete the old data from their site.
    A potential problem related to this is the Google cache pages which translate PDF to HTML and high-light relevant terms and can make it much easier to extract certain information from web pages. It can provide value to readers to use such links but AFAIK there is no guarantee that they will remain forever. I suggest that if you use them you should also provide the authoritative link so that if the Google link breaks at some future time then the reader will still be able to access the data.

  3. Not giving the URLs of links in human readable form. Print-outs of blog pages will lose links and blog reading by email will also generally lose links (although it would be possible to preserve them). This counts for a small part of your readership but there’s no reason not to support their needs by also including links as text (either in the body or at the end of the post). I suggest including the URL in brackets, the most important thing is that no non-URL text touch the ends of the URL (don’t have it in quotes and have the brackets spaced from it). Email clients can generally launch a web browser if the URL is clear. Note that prior to writing this post I have done badly in this regard, while thinking about the best advice for others I realised that my own blogging needed some improvement.
    I am not certain that the practice I am testing in this post of citing URLs inline will work. Let me know what you think via comments, I may change to numbering the citations and providing a list of links in the footer.

  4. Non-specific links. For example saying “Russell Coker wrote a good post about the SE Linux” and referring to my main blog URL is not very helpful to your readers as I have written many posts on that topic and plan to write many more (and there is a chance that some of my future posts on that topic may not meet your criteria of being “good”). Saying “here is a link to a good post by Russell Coker, his main blog URL is here” is more useful, it gives both the specific link (indicating which post you were referring to) and the general information (for people who aren’t able to find it themselves, for the case of deleted/renamed posts, and for Google). The ideal form would be “<A HREF=”http://etbe.coker.com.au/whatever”>here is a link to a good post by Russell Coker [ http://etbe.coker.com.au/whatever ]</A>, his main blog URL is <A HREF=”http://etbe.coker.com.au/”> [ http://etbe.coker.com.au ]</A>” (note that this is an example of HTML code as a guide for people who are writing their own HTML, people who use so-called WYSIWYG editors will need to do something different).

  5. Links that are likely to expire. As a rule of thumb if a link is not human readable then the chance of it remaining long-term is low. Companies with content management systems are notorious for breaking links.

  6. Referencing data that you can’t find. If you use data sourced from a web site and the site owner takes it down then you may be left with no evidence to support your assertions. If data is likely to be removed then you should keep a private copy off-line (online might be an infringement of copyright) for future reference. It won’t let you publish the original data but will at least let you discuss it with readers.

  7. Referencing non-public data. The Open Access movement [ http://en.wikipedia.org/wiki/Open_access ] aims to make scholarly material free for unrestricted access. If you cite papers that are not open access then you deny your readers the ability to verify your claims and also encourage the companies that deny access to research papers.
    An insidious problem is with web sites such as the New York Times [ www.nytimes.com ] which need a login and store cookies. As I have logged in to their site at some time in the past I get immediate access to all their articles. But if I reference them in a blog post many readers will be forced to register (some readers will object to this). With the NYT this isn’t such a problem as it’s free to register so anyone who is really interested can do so (with a fake name if they wish). But I still have to keep thinking about the readers for such sites.
    I should probably preview my blog posts from a different account without such cookies.

  8. Failing to provide calculations. My current procedure is to include the maths in my post, for example if you have a 32bit data type used to store a number of milliseconds then it can store 2^32/1000 seconds which is 2^32/1000/60/60/24 = 49.7 days, in this example you can determine with little guessing what each of the numbers represent. For more complex calculations an appendix could be used. A common feature of blogs is the ability to have a partial post sent to the RSS feed and the user has the ability to determine where the post gets cut. So you could cut the post before the calculations, the people who want to see them will find it’s only one click away, and the people who are happy to trust you will have a shorter post.

  9. Linking with little reason. Having a random word appear highlighted with an underline in a blog post is often not very helpful for a reader. It sometimes works for Wikipedia links where you expect that most readers will know what the word means but you want to link to a reference for the few who don’t (my link for the word Wikipedia is an example). In the case where most readers are expected to know what you are referring to then citing the link fully (with a description of the link and a human-readable form for an email client) is overkill and reduces the readability of the text.
    The blogging style of “see here and here for examples” does not work via email and does not explain why a reader should visit the sites. If you want to include random links in a post then having a section at the footer of related links would probably be best.

  10. Linking to a URL as received. Many bloggers paste URLs from Google, email, and RSS feeds into their blog posts. This is a bad idea because it might miss redirection to a different site. If a Google search or an email gives you a URL that is about to go away then it might redirect to a different site. In that case citing the new URL instead of the old one is a service to your readers and will decrease the number of dead-links in your blog over the long-term. Also using services such as www.feedburner.com may cause redirects that you want to avoid when citing a blog post, see my previous post about Feedburner [ http://etbe.coker.com.au/2007/08/20/feedburner-item-link-clicks/ ].

Here are some less common problems in citing posts:
  1. Inappropriately citing yourself. Obviously if there is a topic that you frequently blog about then there will be benefit to linking to old posts instead of covering all the background material, and as long as you don’t go overboard there should not be any problems (links to your own blog are assumed to have the same author so there is no need for a disclaimer). If you write authoritative content on a topic that is published elsewhere then you will probably want to blog about it (and your readers will be interested). But you must mention your involvement to avoid giving the impression that you are trying to mislead anyone. This is particularly important if you are part of a group that prepares a document, your name may not end up on the list of authors but you have a duty to your readers to declare this.
    Any document that you helped prepare can not be used by itself as a support of claims that you make in a blog post. You can certainly say “I have previously demonstrated how to solve this problem, see the following reference”. But links with comments such as “here is an example of why X is true” are generally interpreted to be partly to demonstrate the popular support for an idea.

  2. Citing secret data. The argument “if you knew what I know then you would agree with me” usually won’t be accepted well. There are of course various levels of secrecy that are appropriate. For example offering career advice without providing details of how much money you have earned (evidence of one aspect of career success) is acceptable as the readers understand the desire for some degree of financial secrecy (and of course in any game a coach doesn’t need to be a good player). Arguing the case for a war based on secret data (as many bloggers did) is not acceptable (IMHO), neither is arguing the case for the use of a technology without explaining the science or maths behind it.

  3. Not reading the context of a source. For example I was reading the blog of a well regarded expert in an area of computer science, and he linked to another blog to support one of his claims. I read the blog in question (more than just the post he cited) and found some content that could be considered to be racially offensive and much of the material that I read contained claims that were not adequately supported by facts or logic. I find it difficult to believe that the expert in question (for whom I have a great deal of respect) even casually inspected the site in question. In future I will pay less attention to his posts because of this. I expect a blogger to pay more attention to the quality of their links than I do as a reader of their blog.

While writing this post I realised that my own blogging can be improved in this regard. Many of my older posts don’t adequately cite references. If you believe that any of my future posts fail in this regard then please let me know.

3 September 2007

David Welton: Hpricot did something less than delightful

I have a Rails application that uses Hpricot, "a fast and delightful HTML parser" for Ruby. It seems, however, that this change (the one in xchar.rb, specifically), present in 0.6, but not 0.5 causes the inner_text method to fail less than gracefully, spitting out a ? character instead of simply letting through the unescaped text. I was depending on the latter behavior, so this change blew up my code. It's a good thing I caught it before going to production. Other than that, I've been very happy with Hpricot, and it is indeed quite quick and useful.

2 September 2007

Jeff Bailey: "home" stretch

We're about 40 miles outside of Bakersfield, CA now, leaving us 289 miles to get home. We'll be packing up shortly to start the trip while Leif is still asleep. This puts us in San Francisco a day earlier than projected. It means another night in a hotel in the target city, but at least it'll mean that the driving is behind us.

Lessee, I think we were in Albuquerque last time I posted. Since then, we saw the petrified forest a second time, this time when the sun was up so we could enjoy it. The temperatures were so warm during the day, we had to idle with the AC on to keep Leif from waking up screaming. We continued on to Flagstaff after that where we found a nice healthfood deli for dinner and collecting more snacks. My back reminded me that twisting to pick up a diaper bag while holding Leif isn't a particularly good idea, so we spent the night in a hotel and a bed instead of in the camper, and trekked off to the grand canyon.

We met Karina and Chris up there. Sometime in this stretch, we also misplaced the camera. Hopefully it's not sitting at the hotel in Flagstaff. So, we only have a couple pictures of us at the GC, sitting on Karina and Chris' camera. The two of them flew up from Tucson, and Chris offered to take Angie and I up for a sightseeing tour. The last trip I had been on overtop had been an adventure, but this flight was smooth, and nice to be able to say "Hey, I missed that", and then spin around to see it again". Karina managed to keep Leif calm and happy for the hour that we were up, which was also a nice break for us. Angie and I both started to worry about him at around the same time - something like 10 minutes before the end of the flight. =)

The rest of the day was spent wandering along the rim, ending in a nice dinner and sleep at the campsite. The next morning, we went to hear a ranger talk to people passing by about his topic-du-jour. In this case, it seemed to be about the wildfires going on the south rim. He had a telescope pointed at the river and would answer any questions, though. After that we packed up and headed out.

Our intended stop yesterday had been Needles, CA. It turns out that there's nothing there. No name-brand hotels, no Mojave information centre (despite there being signs for it), and a lot of dwellings with the sides falling off. The stretch over to Barstow seemed like the most boring stretch of the trip, probably because we had intended to stop at Needles, but also probably because we know that from here we're just going home. We carried on until Leif's patience totally expired and stopped in Tehachapi for the night.

We think Leif might be starting to push out a second tooth. He also might've gotten a touch too much sun at the Grand Canyon. It was hard to find shady spots to nurse him, and his hat seems to have gotten buried somewhere in the van. He's in good spirits, but his cheeks had a red tinge to them last night. =( He's almost six months, now, so we'll be able to put sunscreen on soon. In the meantime, we'll try to find a place to buy another hat today.

Update: We got access to the place today. Yay! Straight home for us!

1 September 2007

Miriam Ruiz: Stormbaan Coureur

The name Stormbaan Coureur means “Assault Course Driver” in Dutch. It was previously called Sturmbahnfahrer as a joke, playing with the words in german, but some people considered that name offensive, and the author, Bram Stolk, kindly decided to change it. Put a car into a course full of obstacles, and give the whole world a physically realist behaviour, and you have the basic design of this game. the game also has support for quad buffer stereo and passive stereo setups. The game has only one track for practice and another one for competition right now, but once more tracks are developed, I’m pretty sure many people will stick to it. The package for the game has entered Debian repositories today, so it’ll soon be in the mirrors, available for everyone. You can see the game in action in this MPEG movie. Impressive, isn’t it? :)

31 August 2007

Simon Richter: Carbon emissions

Russell thinks that trading emission "rights" individually would decrease emissions. The global emission market has shown quite the opposite happening, countries that have no industry and did not contribute to the problem now sell their rights to industrial countries, with the net effect being as if all these countries suddenly became industrialized over night. I don't think anything different would happen at an individual level. The fundamental problem is this: emission rights trading happens only when buying rights is cheaper than actually reducing your emissions. When this is relatively cheap, you remove any incentive to develop better processes in individual companies; if it is more expensive, most industries will remain at the status quo (no emission trading) while those where it still makes sense fiscally now have an alternative, which diminishes the market for technology companies specializing in filtering technology and process optimization (i.e. it becomes even more expensive to behave environmentally conscious). At the same time, the cost of buying these rights from individuals will be passed on to the consumer, the only way to get this money back will be to sell off their emission rights. From a macroeconomic perspective, no money ever changes hands, but you have effectively transferred the individual emission rights over to the industry. Looking at individuals, you are penalizing those that behave environmentally conscious and neither use their "rights" nor sell them. So, emission rights trading is a really bad idea.

30 August 2007

Michael Janssen: In my own head consume, I sit down in my room

Lately I have been tasked with a lot of writing to do. I'm writing a chapter for a book on the field that my research is in, which is a good thing for me to get done, but I started it quite late. I had to finish a 9,000-12,000 word chapter in 2 weeks. Here's how I set it up:
  1. For the first week, write 2,000 words each day.
  2. For the second week, edit the words already written.
The first half of the schedule was easier than I thought it would be. In general, writing in my field doesn't usually happen that fast, but the subject is something I'm pretty versed in, so it was not too hard to get 2,000 words out. I had a clear defined goal for each day that once I met, I could feel okay about not working on the project for the rest of the day. I also only had to write 6 days, and I was able to take the seventh day off. Both of these combined made it a lot easier to not feel guilty about being behind. Editing is a bit more abstract and ongoing than the writing part, so it's hard to tell how well it's really going. There are some easy parts like fixing grammar and proofreading to make sure you don't repeat yourself, but there are also a good portion of hard parts as well, like which sections to cut a bunch of words in, and which word choice should be made in a particular spot. I'm at the point where some things NEED to be cut because the document is too long, so I have to make some hard choices. I also met with my advisor last week and we discussed my progress toward finishing my Ph. D. I had been thinking about this problem for a while now and was glad that it was also on his mind as well. We agreed that I would set the goal for having my orals done by the end of this year (christmas). I am thinking I will use a similar tactic to the chapter that I am writing, but on a much slower schedule, so next week I will start writing 500 words a day, and do that for a couple months. This will leave me with 30,000 words that I will then edit down by quite a bit, reducing it by almost half. Hopefully this will make the process easier as it has for the chapter. If writing my thesis proposal works well this way, I hope I can use a chunk of it for the final thesis, which I want to finish one year after my orals, putting me on track for graduating at the end of 2009. I'm looking forward to that.

28 August 2007

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.

Clint Adams: I cans driving down the intarwebs. Lol

(clara) Oh really? My brother used to spray my butt with lysol when we used to go camping. (carol) did it burn? (clara) Yes, it was cold and then burned. Lol (clara) My brother used to sneak up behind me when I was in the woods pooping over a fallen tree. Lol. I know it sounds funny but he would do that. He also used to threaten me by putting my blanket out the window when driving down the interstate. Disclaimer: This is not the carol of the hallucinatory libtool reacharound.

27 August 2007

Matt Brubeck: 27 Aug 2007

vim-addons Joey wonders why vim addons are not enabled by default using the new Debian infrastructure. For single-user systems, Joey is right: enabling addons by default would be best. But for multi-user systems, I think disabled-by-default is better. Otherwise, installing an add-on would change vim's behavior unexpectedly for all users. (Unlike a daemon, which runs once per system; a vim addon is run by each user, every time they start vim.) This is especially bad because vim users tend to have carefully personalized configurations. Should the defaults cater to multi-user systems at the expense of single-user ones? Probably not, since admins of large multi-user systems are generally willing and able to figure out how to change their configurations, while many single-user machine owners need something that "just works". Perhaps the default configuration should load all installed addons, but local admins should be able to easily change this to load only addons enabled by the current user.

Russell Coker: Hydrogen Powered Cars Will Never Work

One of the most important issues for a commodity fuel for vehicles is that it be convenient and safe to transport. For quite a while LP Gas has been available as a cheaper car fuel. Even with increasing petrol prices it’s acceptance is well below 100% due to extra expense in storing the fuel (high pressure and more insulation are required), the more expensive technology in the engine to heat the fuel before injecting it into the engine, and the extreme difficulty in creating something as convenient as a Jerry Can for transporting LPG. LPG is mostly comprised of Propane and Butane. Propane has the lower boiling point of -42.09C. Hydrogen however has a boiling point of -252.87C and therefore is much more difficult to store and transport. The next problem with hydrogen as a fuel is that it has a very low density. The energy density per volume of liquid hydrogen is 10.1MJ/L while the energy density of petrol/gasoline is 34.6MJ/L. Not only is liquid hydrogen difficult to transport but the vessels you transport it in need to be 3.4 times the size! Having a 3.4x larger fuel tank in a car may not be a huge obstacle, but then there is the issue of trucks used to transport it to fuel stations which are already at maximum size so the truck fleet will need to be 3.4x larger with more people driving them etc. Once these problems are solved there are a variety of safety issues. Hydrogen burns with an almost invisible flame, sustains a fire when at a concentration of between 4% and 75% of the air and ignites at a low temperature. For an explosion you need a concentration of between 18.3% and 59%. I won’t risk promoting foolish behaviour by describing details, but when younger I have performed experiments with ethanol and witnessed experiments with petrol that demonstrate that they are both far less dangerous. Page 22 of this document by the US Bureau of Transportation and Statistics gives more information about the fire risks posed by hydrogen fuel. Page 35 of the same document describes fuel cells as being 45% efficient and an internal combustion engine for methane gas as being 30% efficient thus giving overall efficiencies of 33% and 29.5% respectively. Of course using an Atkinson Cycle engine will give a significant efficiency benefit over an Otto Cycle engine and outweigh this. Also it should be noted that fuel cells tend to require expensive materials such as Platinum in their manufacture. Hydrogen is promoted by clean-coal advocates (not that any form of coal power is clean) and the nuclear industry (electrolysis is one way of using a huge amount of electricity). But there are many better options for powering cars that are available right now at minimal cost, these include bio-Diesel, ethanol, and plug-in hybrid or electric vehicles.

24 August 2007

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!

23 August 2007

Brice Goglin: Debian X.org notes - ATI 6.7.191 with RandR-1.2 and TV-out support in experimental

No, I am not confusing version numbers. Yes, xserver-xorg-video-ati 6.7.191 follows 6.6.193. Upstream thought it was useless to try fixing the dead-end 6.7 branch (where 6.6.193 came from) since they were already mostly working on the randr-1.2 branch. So 6.7 will probably never happen. The randr-1.2 support has been merged in master and will be released as driver 6.8. 6.7.191 is its first release candidate. With RandR-1.2 support, you get mode auto-detection and so, as in the Intel driver 2.x. So you may clean your xorg.conf as described here. If you don't get your desired resolution at startup, see here. However, the old dual-head support code (zaphod) is dead, so some people might have to get used to xrandr instead. Several people will also be happy that the GATOS TV-output support code has been merged and improved to support more cards. You will see a S-video output and you can enable it as usual with xrandr. Not sure how well tested it has been, but at least it seems to work fine on my rv370 (Mobility X300). Don't forget that this is a release candidate. I personally consider the code as highly experimental since I seem to get more GPU lockups when playing xmoto than in 6.6.193. The code is still under heavy development. Multiple ATI boards have strange behaviors that may not be supported yet (but it shouldn't be worse than in 6.6.193). Fortunately, upstream people are very responsive and doing a great job at fixing bugs, so feel free to ping them on IRC or report a bug directly on http://bugzilla.freedesktop.org. The package is in now in debian experimental. But the Xserver release candidate is there too. So you will need to upgrade xserver-xorg-core too. If you don't want to do so, just rebuild the driver against unstable, you should just need to downgrade xserver-xorg-dev build-depend to 1.3.0 or so.
(Permanent link) 

22 August 2007

Ian Wienand: Fun with <tt>-funroll-loops</tt>

I was playing with loop unrolling, and decided to investigate it a little. The basis is this very simple program which looks like it could do with some loop unrolling.
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define SIZE (1500 * 1024 * 1024)
int fn(int *buf)  
        int i;
	for(i=0; i < (SIZE/sizeof(int)); i+=1)
		buf[i] = i;
	return 0;
 
int main(void)
 
        int *buf = malloc(SIZE);
        assert(buf);
	return fn(buf);
 
Firstly, lets have a look at what happens to the function when -funroll-loops is applied. Below is the de-compilation with some comments on what each line is doing.
Non-optimised
                           nop.m 0x0
r14=0                      mov r14=r0
save the "loop counter"    mov.i r2=ar.lc
                           nop.m 0x0
one less than iterations   movl r15=0x176fffff;;
                           nop.m 0x0
initalise loop counter     mov.i ar.lc=r15
                           nop.i 0x0;;
                           loop:
*buf = i, buf++            st4 [r32]=r14,4
i++                        adds r14=1,r14
dec lc, branch if > 0      br.cloop.sptk.few .loop
                           nop.m 0x0
restore loop counter       mov.i ar.lc=r2
Loop unrolled
                           nop.m 0x0
r26 = 0                    mov r26=r0
save lc                    mov.i r2=ar.lc
                           nop.m 0x0
iter / 32                  movl r14=0x2edffff;;
                           nop.m 0x0
setup loop counter         mov.i ar.lc=r14
                           nop.i 0x0
                           loop:
r3 = buf                   mov r3=r32
r8 = 1                     adds r8=1,r26
r25 = 3                    adds r25=3,r26
r23 = buf[3]               adds r23=12,r32
r24 = 4                    adds r24=4,r26
r22 = buf[4]               adds r22=16,r32;;
buf[0] = 0; r3=buf+1       st4 [r3]=r26,4
r21 = 5                    adds r21=5,r26
r19 = buf[5]               adds r19=20,r32
r20 = 6                    adds r20=6,r26
r18 = buf[6]               adds r18=24,r32
r16 = 7                    adds r16=7,r26;;
                           nop.m 0x0
buf[1] = 1, r3=buf+2       st4 [r3]=r8,4
r15 = buf[7]               adds r15=28,r32
r17 = 2                    adds r17=1,r8
r26 += 8                   adds r26=8,r26
buf += 8 (for next iter)   adds r32=32,r32;;
buf[2] = 2                 st4 [r3]=r17
buf[3] = 3                 st4 [r23]=r25
                           nop.i 0x0
buf[4] = 4                 st4 [r22]=r24
buf[5] = 5                 st4 [r19]=r21
                           nop.i 0x0
buf[6] = 6                 st4 [r18]=r20
buf[7] = 7                 st4 [r15]=r16
loop, dec branch           br.cloop.sptk.few .loop
                           nop.m 0x0
restore lc                 mov.i ar.lc=r2
                           br.ret.sptk.many b0;;
We can see that in the first case the loop counter is setup to run 393216000 times (e.g. 1500*1024*1024/sizeof(int)) and a very simple loop of storing the value and incrementing is undertaken. In the second version, the code becomes more complex. We can see the loop now executes 49152000 times (e.g. 1500*1024*1024/sizeof(int)/8) so we can infer that for each loop iteration, 8 values have been unrolled to be written into our buf array. Indeed, when pulled apart we can see the 8 stores (numbers just reflect the first time through). So, is it faster?
$ time ./loop
real    0m1.209s
user    0m0.388s
sys     0m0.820s
$ timme ./loop-unroll
real    0m1.056s
user    0m0.244s
sys     0m0.812s
Yes! Great. We can suggest a number of reasons why, but it would be interesting to get some hard statistics on why this is so. Thanks to the Itanium performance counters, we can. Firstly, lets start by seeing how cycles are being spent.
$ pfmon -e cpu_cycles,ia64_inst_retired_this,nops_retired,back_end_bubble_all ./loop
 547923609 CPU_CYCLES
1179995250 IA64_INST_RETIRED_THIS
    104431 NOPS_RETIRED
 154285534 BACK_END_BUBBLE_ALL
$ pfmon -e cpu_cycles,ia64_inst_retired_this,nops_retired,back_end_bubble_all ./loop-unroll
 311570590 CPU_CYCLES
1327451286 IA64_INST_RETIRED_THIS
 147560435 NOPS_RETIRED
  16088889 BACK_END_BUBBLE_ALL
Now, the Itanium can issue up to six instructions (IA64_INST_RETIRED_THIS) in two bundles of three instructions per cycle (CPU_CYCLES). However, you can't have dependencies between registers within a 3-instruction bundle (and branches and interruptions play havoc) so sometimes you need to pad with no-ops (this is why you need a good compiler). We can work out some figures from this, namely the useful instructions per cycle (e.g. instructions retired - nop instructions / cycles).
TestUseful instructions/cycle
loop1179995250 - 104431 / 547923609 = 2.15
unroll1327451286 - 147560435 / 311570590 = 3.78
This tells us that for each given cycle, the unrolled-loop version is doing more work (ideally we'd like that to be a the theoretical maximum of 6). So what is the unrolled version doing for all this time? Bubbles are where the CPU is waiting for something; a prime candidate is moving data from caches to registers. Bubbles make up (154285534/547823609) 28% of the cycles on the loop version, but only (16088889/311570590) 5% of the time for the unrolled version. This means the processor is spending a lot less time waiting for things to happen with the unrolled loop version. We can drill down further to see what bubbles are occurring.
$ pfmon -e be_l1d_fpu_bubble_all,be_exe_bubble_all,be_RSE_bubble_all,Back_end_bubble_fe ./loop
 14229581 BE_L1D_FPU_BUBBLE_ALL
    97669 BE_EXE_BUBBLE_ALL
     1260 BE_RSE_BUBBLE_ALL
131354866 BACK_END_BUBBLE_FE
$ pfmon -e be_l1d_fpu_bubble_all,be_exe_bubble_all,be_RSE_bubble_all,Back_end_bubble_fe ./loop-unroll
22676169 BE_L1D_FPU_BUBBLE_ALL
   83064 BE_EXE_BUBBLE_ALL
    1263 BE_RSE_BUBBLE_ALL
  718850 BACK_END_BUBBLE_FE
We are now breaking the stalls down to see where they are occuring. L1D_FPU_BUBBLES are essentially related to micro-architectural issues with the caches; things like the L1D cache being overwhelmend and interactions with the hardware page-table walker. BE_EXE bubbles are more simply described a waiting for data to come from caches (or even main memory) to registers. BE_RSE bubbles are related to the register stack engine, and "front end" bubbles (BACK_END_BUBBLE_FE) are where there are not enough instructions coming from the "front-end" for the "back-end" to issue out to functional units in the processor. In this case, the major cause of problems for the simple loop seems to be not being able to get enough instructions through to keep the processor busy. We can try to pin down what is happening in the front-end:
$ pfmon -e fe_bubble_imiss,fe_bubble_tlbmiss,fe_bubble_branch,fe_bubble_bubble ./loop
   27727 FE_BUBBLE_IMISS
    4910 FE_BUBBLE_TLBMISS
98094189 FE_BUBBLE_BRANCH
52615907 FE_BUBBLE_BUBBLE
$ pfmon -e fe_bubble_imiss,fe_bubble_tlbmiss,fe_bubble_branch,fe_bubble_bubble ./loop-unroll
780729 FE_BUBBLE_IMISS
  4858 FE_BUBBLE_TLBMISS
291620 FE_BUBBLE_BRANCH
111089 FE_BUBBLE_BUBBLE
What we can see here is that the increased code size of the unrolled version causes us a lot more i-cache misses, as expected. However, the problem for the unrolled version seems to be the time spent by the front-end dealing with the branch. This is not surprising since there is a rumor that there is a front-end buffer which fills up after 3 repeated cycles with branch instructions; apparently this is a problem addressed in the new Montecito chips (if anyone has one, I'll update this if you send me the numbers). Since we are doing 393216000 branches all within a single bundle its not surprising we've hit it! Just to confirm, we can break-down the BE_EXE bubbles. Remember, BE_EXE bubbles are caused by stalls in the execution phase primarily due to cache latencies or inter-register dependencies. Looking at our code, we don't re-use the same register over-and-over so we would not expect to spend a long time waiting for registers, and indeed this is what we see.
$ pfmon -e be_exe_bubble_grall,be_exe_bubble_grgr ./loop
79601 BE_EXE_BUBBLE_GRALL
  919 BE_EXE_BUBBLE_GRGR
$ pfmon -e be_exe_bubble_grall,be_exe_bubble_grgr ./loop-unroll
76627 BE_EXE_BUBBLE_GRALL
  918 BE_EXE_BUBBLE_GRGR
Therefore in this case, the speed increase isn't coming from better cache behaviour as we might have expected, but greater ability to keep the processor busy with instructions between branches. We can also examine the major events happening with the unrolled case. Here we see BE_L1D_FPU bubbles being the major overhead. On Itanium floating-point avoids the L1 cache (it is too big, and not re-used enough to make it useful) hence the concatenation of the event acronym. These bubbles can be broken down into the following events (measured in two runs, since you can only do 4 at a time).
$ pfmon -e be_l1d_fpu_bubble_l1d,be_l1d_fpu_bubble_l1d_dcurecir,\
  be_l1d_fpu_bubble_l1d_tlb,be_l1d_fpu_bubble_l1d_stbufrecir ./loop-unroll
 9623193 BE_L1D_FPU_BUBBLE_L1D_DCURECIR
     414 BE_L1D_FPU_BUBBLE_L1D_TLB
     282 BE_L1D_FPU_BUBBLE_L1D_STBUFRECIR
$ pfmon -e be_l1d_fpu_bubble_l1d_fullstbuf,\
    be_l1d_fpu_bubble_l1d_l2bpress,be_l1d_fpu_bubble_l1d_tlb ./loop-unroll
      23 BE_L1D_FPU_BUBBLE_L1D_FULLSTBUF
17220177 BE_L1D_FPU_BUBBLE_L1D_L2BPRESS
     425 BE_L1D_FPU_BUBBLE_L1D_TLB
These events expose micro-architectural details, the full extent of which is only gleaned by reading the processor manuals (a PhD in computer architecture probably helps too!). The store buffers are not an issue here -- the caches are more than able to keep up with our few writes. The TLB is also not involved; we have pretty good TLB coverage thanks to the virtual-linear page table and hardware page-table walker. The two clues are DCURECIR and L2BPRESS. Essentially DCURECIR happens when references have to "re-circulate"; this is a side-effect of the data not being available. The L2BPRESS figure suggests why this is so; this event happens when the L2 cache can not handle any more requests. The L2 cache keeps a queue of outstanding requests; when this queue is full (for example, full of long latency requests to get data from main memory) the L2 cache causes "back-pressure" which stops the L1 cache from issuing new requests. This suggests the program is chewing through a lot of data and not using the cache very effectively, which is exactly what we are doing. Pre-fetching hints can help (but as described in a previous entry on hacking Enigma may not always help), but in this case there probably isn't any spare bandwidth to pre-fetch in because essentially no processing is happening. What does all this mean? I don't know, but playing with performance monitors is fun!

20 August 2007

Simon Richter: Non-standard compiler extensions

Normally I don't like them, because the people using them write non-portable code. In some cases however (mostly when writing stuff other people would write in perl), I'd like things like __attribute__((mode(QI))) to work, and not claim that while the compiler perfectly well understood what I was trying to do, it can nonetheless not help me around writing my own support for 128 bit types. At least MSVC is no better, __int128 has the exact same behaviour. Bleh.

Martin F. Krafft: Pay three times as much and get zero brain power

If you walk up to the Swiss railways customer service desk and tell them that you're a group of six looking to travel from Zurich to Munich and would thus like to make a reservation, they'll charge you 15 CHF (~ 9.50 ) for a little piece of paper which documents that the guy behind the desk put his brain to use and reserved six contiguous seats to keep the group together. Well, he actually asked me whether that's what I wanted. If you walk up to the German railways customer service desk and tell them that you're a group of (now) eight looking to travel from Munich to Zurich and would thus like to make a reservation, they'll charge you 28 for a little piece of paper which documents that the guy behind the desk does not have a brain or didn't bother to switch it on: instead of two adjacent groups of four seats, we got four pairs of aisle seats. Given that we mainly reserved to minimise the annoyance for the other travellers while we kept up a conversation for the five hours of the journey, it did piss me off quite a bit to have paid three times as much in Germany as the reservation cost in Switzerland and not be able to talk among each other without annoying the others. This reservation was made two days in advance. You may, of course, think that the train was already full and no space to sit eight was left; however, I did not have to go further than two wagons to find copious amounts of unreserved spaces for eight, which were then, unfortunately, already occupied (of course). It shames me to expose my peers (I made the travel arrangements) to the crap and blather one has to put up in German railways: the quality of the speaker system is crap, everything is repeated in English by non-English-speaking conductors, and after every stop, we're yet again alerted to the fact that we could be relaxing to high-quality cuisine in the board restaurant, or should watch out for the little trolley passing by and happy to collect our money. Oh, and of course the brainless and often unfriendly service employees. And all that for a price more than it would have cost the lot of us to rent a van and drive back and forth. Going by train is my most preferable means of transport, not only, but in large part due to environmental issues. I don't understand why the German government puts this important bit of infrastructure in the hands of imbeciles and lets them overcharge for their low-quality service and their delays. NP: Mono: Under the Pipal Tree Update: A guy from Berlin wrote:
The seats you found in the other wagons may as well have been reserved, too. The electronic reservation signs will extinguish about 15 minutes after the train departs from the station. Or, there was too little time between reservation and departure, so you could only get one of the few express-reservation seats.
I am aware of this. However, the train between Zurich and Munich is ancient (part of the way it still has to run on Diesel) and the reservation signs were paper slips. The seats of eight I found were definitely unreserved, especially because I checked immediately after departure.

18 August 2007

David Welton: Business Friendly

Growing up in Eugene, Oregon, which like Berkeley or Boulder could have the label "People's Republic of" applied to it, I always thought of "business friendly", as something along the lines of helping huge corporations avoid laws against pollution, or other antisocial behavior. Only after moving to Europe did I begin to get an idea of what the very positive side of "business friendly" is in the US. Truth be told, all countries tend to protect their 'big players' to some degree, be it the US propping up creaking airlines after September 11th, Italy finding various clever ways to get around rules about funding Fiat and Alitalia, or France finding it in their 'national interests' to discourage a potential bid for Danone (yogurt!) by PepsiCo. Some are better or worse (the UK has been pretty good about not interfering), but there is a tendency to want to intervene. Leaving be the discussion over whether those sorts of policies are good, bad, or ugly, the biggest difference between continental Europe and the US is the ease with which new companies - 'startups' can be created and enter a market. As a first hand example, I decided this summer to create DedaSys as a real company in order to better separate my business and personal financial dealings. Were I to do that in Italy or Austria, we would be talking about fees upwards of 3000 Euros (about 4000 dollars at market rates), which is a great deal of money for something that is not making a lot of it at this point in time. Contrast this with what it took to create a Limited Liability Company (LLC) in Oregon, my home state. To have things done up professionally, it's certainly possible to lay down a bit of cash there too, but by trading my time for money, and with the assistance of some nolo.com books about the creation and maintenance of an LLC, I was able to register DedaSys with the state of Oregon for the grand total of 55 dollars, and was actually able to complete the process remotely from Austria prior to going home on vacation, where I did the only thing I needed to do in person: open a bank account. So it costs 1% of what it costs in Italy or Austria to open a company that provides limited liability... a very impressive difference, especially to a small, new company that does not have the connections a Ford or a Fiat will likely have to enable it to deal with all the other paperwork, rules, and regulations to deal with. Add to that a culture of greater risk taking (meaning also more acceptance of failure), better funding opportunities, and... one comes to the conclusion that Paul Graham is right. It's a pity, because the people in Europe are top notch. In Italy alone, I know a bunch of really bright hackers. Granted, some of them aren't interested, and are probably better off not starting a company or otherwise dealing with the business side of the equation, but it's always nice to have that opportunity. In closing, here is another example of bureaucracy in action, from my personal on line journal about life in Italy, and now Austria, which I recently revamped by moving it to the Typo platform: Confronting the bureaucratic beast - registering an Italian domain Two months to accomplish what can be done in ten minutes with a .com!

Next.

Previous.