Search Results: "will"

18 April 2011

Sjoerd Simons: Codec bitrate control

One of the more exciting upcoming features of Farsight is the ability to change the amount of required bandwidth depending on network conditions. Which means Telepathy based VoIP clients will be able to use higher resolutions and better audio/video quality if the network connectivity allows. And ofcourse, when the available bandwidth is low, the bandwidth usage can be lowered such that calls are still possible with lower but hopefully still acceptable quality. One side of the full story is measuring the available bandwidth, which hopefully Olivier will tell at some point. The other part is actually using less bandwidth. In case technical details are not that interesting to you, probably best to stop reading at this point.. An important way to control the bandwidth we're using in a call is setting the target bitrate on the encoding GStreamer element. While previously it was enough for us to set the bitrate before encoding started, we now need to be able to change it at runtime. And not only that, the codec implementation should ideally respond within a few frames and have a reasonable constant per-frame size. All in all, a lot of requirements on codecs we didn't really have before. Which usually means we need to retest the various codecs we often use and make sure we configure them correctly for the behaviour we'd like to see (and fix them if necessary). To do this I've written a small test program, which simply changes the target bitrate over time and outputs some numbers suitable to feed into gnuplot to turn into graphs. For example, when using x264enc with the current default farsight settings a part of the resulting graph looks something like this (full graph here): x264enc bitrate scaling The blue impulses is the per-frame size (scaled), the green line the bitrate average over 10 frames and the red line the target bitrate. Clearly this isn't an ideal picture, we will need to do some more tweaks to our default settings to make x264 behave the way we want. The same will be true for all other codecs and codec elements, at the moment the GStreamer VP8 element doesn't handle run-time bitrate changes at all and the Theora element acts it its very own interesting way (graph here)

Sjoerd Simons: Telepathy and VP8!

Yesterday Google announced the WebM Project, giving the world a new open and royalty-free video codec called VP8. Thanks to Collabora Multimedia and Entropy Wave support for it landed in gstreamer git shortly after the announcement. In Telepathy we quite like video conferencing, so as a logical next step i quickly put together some proof of concept RTP payloading elements for Gstreamer with the obvious result: A call with tux The screenshot isn't very exciting, which is exactly how it should be. In the world i would like to live in people don't have to care about video codecs, whether it is for video calls, playing online media or whatever else they want to do with video. Looking at the list of supporters for the WebM project this may actually happen and that in my opinion is much is actually the most important aspect of it all. The most important aspect that is missing at this point to bring VP8 as the video calling codec to the world is the lack of a standard RTP specification. Which is something we will hopefully start working on with various other parties in the WebM project reasonably soon. For now if you want to feel cutting edge get Empathy from git master and my rtp elements. To give things a first try :) A Belorussian translation of this article is available here

Raphaël Hertzog: Status update of GNOME 3 in Debian experimental

Last week s post generated a lot of interest so I will make a small update to keep you posted on the status of GNOME 3 in Debian experimental. Experimental is not for everybody But first let me reiterate this: GNOME 3 is in Debian experimental because it s a work in progress. You should not install it if you can t live with problems and glitches. Beware: once you upgraded to GNOME 3 it will be next to impossible to go back to GNOME 2.32 (you can try it, but it s not officially supported by Debian). Even with the fallback mode, you won t get the same experience than what you had with GNOME 2.32. Many applets are not yet ported to the newest gnome-panel API. So do not upgrade to it if you re not ready to deal with the consequences. It will come to Debian unstable and to Debian testing over time and it should be in a better shape at this point. Good progress made Most of the important modules have been updated to 3.0. You can see the progress here. The exception is gdm, it still needs to be updated, the login screen looks quite ugly right now when using GNOME 3. Frequently Asked Questions and Common Problems Why do links always open in epiphany instead of iceweasel? You need to upgrade to the latest version on libglib2.0-0, gvfs and gnome-control-center in experimental. Then you can customize the default application used in the control center (under System Information > Default applications ). You might need to switch to iceweasel 4.0 in experimental to have iceweasel appear in the list of browsers. Or you can edit ~/.local/share/applications/mimeapps.list and put x-scheme-handler/http=iceweasel.desktop;epiphany.desktop; in the Added Associations section (replace the corresponding line if it already exists and lists epiphany only). The theme looks ugly, and various icons are missing. Ensure that you have installed the latest version of gnome-themes-standard, gnome-icon-theme and gnome-icon-theme-symbolic. The network icon in the Shell does not work. Ensure you have upgraded both network-manager-gnome and network-manager to the experimental version. Some applications do not start at all. If an application loads GTK2 and GTK3, it exits immediately with a clear message on the standard error output (Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.). It usually means that one of the library used by that application uses a different version of GTK+ than the application itself. You should report those problems to the Debian bug tracking system if you find any. Some people also reported failures of all GTK+ applications while using the Oxygen themes. Switching to another theme should help. BTW, the default theme in GNOME 3 is called Adwaita. Where are my icons on the desktop? They are gone, it s by design. But you can reenable them with gsettings set org.gnome.desktop.background show-desktop-icons true and starting nautilus (if it s not already running). (Thanks to bronte for the information) Why do I see all applications twice in the shell? The package menu-xdg generates a desktop file from the Debian menu information, those are in a menu entry that is hidden by default in the old GNOME menu. Gnome Shell doesn t respect those settings and displays all .desktop files. Remove menu-xdg and you will get a cleaner list of applications. APT pinning file for the brave Since last week, we got APT 0.8.14 in unstable and it supports pattern matching for package name in pinning files. So I can give you a shorter and more complete pinning file thanks to this:
Package: *gnome* libglib2.0* *vte* *pulse* *peas* libgtk* *gjs* *gconf* *gstreamer* alacarte *brasero* cheese ekiga empathy* gdm3 gcalctool baobab *gucharmap* gvfs* hamster-applet *nautilus* seahorse* sound-juicer *totem* remmina vino gksu xdg-user-dirs-gtk dmz-cursor-theme eog epiphany* evince* evolution* file-roller gedit* metacity *mutter* yelp* rhythmbox* banshee* system-config-printer transmission-* tomboy network-manager* libnm-* update-notifier shotwell liferea *software-properties* libunique-3.0-0 libseed-gtk3-0 libnotify* libpanel-applet-4-0 libgdata11 libcamel* libcanberra* libchamplain* libebackend* libebook* libecal* libedata* libegroupwise* libevent* gir1.2-*
Pin: release experimental
Pin-Priority: 500
Package: *
Pin: release experimental
Pin-Priority: 150
Putting the file above in /etc/apt/preferences.d/gnome and having experimental enabled in /etc/apt/sources.list should be enough to enable apt-get dist-upgrade to upgrade to GNOME 3 in experimental. But if you have packages depending on libimobiledevice1, you might have to wait until #620065 is properly fixed so that libimobiledevice2 is co-installable with libimobiledevice1. Update: integrated the explanation to reenable the desktop icons thanks to bronte s comment.

15 comments Liked this article? Click here. My blog is Flattr-enabled.

Russell Coker: Virgin Refunds Me $200

Virgin Mobile Excessive BillingIn my previous post about the Xperia X10 I mentioned being billed excessively for bandwidth use [1].On Friday when I phoned Virgin I was repeatedly told that there was nothing that could be done about the bill. I demanded to be transferred to someone with authority to change my bill, I was told that wasn t possible so I demanded to be transferred to a supervisor. As no supervisors were available at the time I had to be called back.The Supervisor Tonight I received a call from someone who s employed to deal with disputed bills, after explaining the situation I was offered a discount of $150, that s a 64% discount on the $234. I rejected that offer and explained that I only used 7% more data than was permitted in the month and only did so because of a previous phone call with a Virgin representative telling me that the billing period ended at the month end (which I couldn t verify at the time because the Virgin CRM system was down [2]). Thus it doesn t seem reasonable to charge me 7* the regular billing amount for the entire month.I was asked what I thought would be a reasonable extra charge, I suggested 7.4% more than the $39 contract, IE an extra $3 that wasn t well received. Then I suggested that as the $49 Smart Cap plan would have covered the extra data use it could be reasonable for me to pay $49 for the month. The Virgin representative then offered me a $200 discount on the bill and I accepted that. So I got a 85.5% discount on the disputed amount, that s not too bad, it s enough to make this scam less profitable to Virgin (particularly when I publish information about it) and enough to make it not worth the effort of a TIO complaint.That makes it a bill of $102.36 instead of the original $302.36. That is $29 for one month of the Big Cap $29 for my wife, $39 for one month of the Smart Cap $39 for me, $33.99 for Virgin excessive bandwidth charges (down from $233.99), and $0.37 Account Charges which is described as a Payment Processing Fee presumably a fee for paying by credit card.The Ethical IssueTo make it clear, I think that only a minority of mobile phone customers have an ability to track their bandwidth and understand their bill which equals mine. I also think that only a minority of customers are as willing as I am to argue with random people about such things. I am sure that employees of Virgin Mobile know this and they devised a billing plan to trap customers. I think that this doesn t comply with the ethical standards that Richard Branson has advocated in several TV interviews that I have watched.The Next IssueNow the only remaining issue is that I signed up for an offer 3 Months Free ^ access fee on Topless, Smart & Easy caps with this phone. Save up to $267, just by buying online which continued Promo code: reggae Use this promo code & we ll automatically credit your first 3 months access fees , but so far they have not credited it. It s a pity I didn t realise this before and get it done in the same call.ConclusionI m starting to regret not keeping my LG U990 Viewty with a pre-paid SIM from Lebara [3] or Amaysim [4]. Amaysim has a minimum pre-paid value of $10 which lasts for 90 days, and the SIM will then receive calls for 180 days after the credit has run out this means $10 per 260 days (an average of $7.11 per year) if you just want to receive calls. Lebara has a period of 120 days before the number expires, so that means it costs $10 per 210 days or an average of $5.75 per year to receive calls only.Telstra charges $150 for one year of mobile net access which allows 10G of data transfer [5]. So it seems that a good option would be an old phone and a new Android tablet. $150 per year ($12.50 per month) for mobile net access and something between $5.75 and $40 per year for phone access (depending on whether you want to make calls) gives enough savings over the cost of a post-paid plan to buy a decent tablet.I think that the Android phone is definitely the best deal for my wife because she really only wants to carry one device, also she likes having longer conversations on the phone so the plan where she gets up to 450 minutes for $29 per month is a reasonable deal particularly as calls to me are free and calls to her relatives will be free if they get Virgin phones (something that now seems doubtful given their over-billing).I m happy to carry multiple devices (my past record is having four mobile phones and getting a tailor-made coat to fit all the geek stuff I carried) so a phone and a tablet is a reasonable option for me. But the Xperia X10 will do the job for the next two years and I ve got no great regrets.On the up-side, Virgin did send me a couple of free movie tickets after their CRM stuff-up.

Steve McIntyre: Lies, damn lies and voting system lies

So we're just over 2 weeks away from our next set of local elections in the UK (May 5th), and alongside those elections we're also being asked about switching to a new voting system for future elections. For a long time we've used the simple First Past The Post (FPTP) system here, but now we have the possbility of moving to Alternative Vote (AV) instead. First Past The Post FPTP is simple to understand - the person who receives more votes than any single other person wins. But that simplicity is the only good thing, and there are many problems with it. It's unfair: in an election with 10 candidate, it's possible for a winner to have just 11% of the vote, even in the case where the other 89% of voters would consider them to be the worst option. It's also very susceptible to tactical voting, leading to nasty tactics in parties' election literature like claiming "party foo cannot win here, so don't waste your vote on them - vote for us instead!". See this Wikipedia article for more background. Alternative Vote AV is slightly more complicated. Instead of just placing a mark against their single preferred candidate, voters are able to rank as many of the candidates as they like. In the case that there is not a clear winner with more than 50% of the votes from the initial count, the lowest-ranked candidate is eliminated and second-choice votes from their supporters are counted and re-distributed for the other candidates. Iterate this process until one candidate gets more than 50% of the total votes. By re-calculating the votes this way, supporters of less popular candidates / parties should no longer feel the pressure to vote tactically and a more accurate picture of voter intention should emerge. The downsides? AV will tend to lead to slower, more expensive counting due to the potential for several rounds. It's still not real proportional voting, but it's better than FPTP in this regard. Again, Wikipedia has a good article about this subject. Other options? I'd be much happier to see discussion / trials of other voting systems. For example, Debian uses a variation on Condorcet called Cloneproof Schwartz Sequential Dropping which is an excellent system for fair voting, but it's very difficult to explain and counting votes is comparatively very expensive. It's bad enough getting ostensibly-intelligent Debian developers to understand this system; extending this to a national election would be impossible in my opinion. It's also not an option on the ballot here... :-) Politicians spreading lies I know this won't come as a major shock for a nationwide referendum, but there's a lot of campaigning going on. And, in the best traditions of political campaigning, there's a huge amount of bullshit being spread. The worst is coming from the "No to AV" campaign, as far as I can see. Without many positive things to claim, various members of the Conservative party (current government, with most to fear from a change of voting system, of course) are spouting outright lies and sowing FUD in all directions:
  1. Claiming that AV will cost 250 million, most of which would be for the cost of electronic voting machines. Except... there's no evidence that these would be needed, nor are there any plans to use them.
  2. Continuing on, highlighting the alleged "extra costs" of AV: campaign poster FUD saying that we need to choose between cardiac facilities for babies and AV, or between equipment for our soldiers and AV. Except... there's no evidence that costs will be that high, nor that we have to make such binary choices.
  3. Claims from senior Conservative figures that changing to AV would mean more votes and legitimacy for extremists like the British National Party. Except... there is no evidence that AV will boost minority extremist parties. The BNP themselves are urging their supporters to vote against AV. Finally, if these parties have a high enough proportion of votes that they should be getting seats in parliament then they should have those seats - this is one of the tenets of democracy. Why should we be choosing a voting system to deliberately disenfranchise people?
  4. Finally, even David Cameron is at it: "too much of the debate about the alternative vote (AV) had so far been dominated by 'scientific' evaluation of the two systems' merits. But for me, politics shouldn't be some mind-bending exercise. It's about what you feel in your gut - about the values you hold dear and the beliefs you instinctively have. And I just feel it, in my gut, that AV is wrong." Well, it's nice that our Prime Minister wants to ignore all the scientific evidence and go with his gut feeling. After all, why would we want to think about choices like this?
Don't swallow the bullshit If you're eligible to vote in the UK, please ignore the bollocks. Make up your own mind how to vote in this referendum, by looking at the facts. I've done that and I'll be voting in favour of switching to AV.

17 April 2011

Russell Coker: More about the Xperia X10

I ve now had a Sony Ericsson Xperia X10 for almost two months (here is a link for my first review) [1]. This is a phone that people seem to really dislike because the battery life is poor and Sony doesn t allow replacing the kernel. I m happy with mine, happy enough that after buying one for my wife and trying it out I bought one for myself. I knew about it s problems in advance and wanted a relatively cheap phone with a large high resolution screen, and the Xperia X10 was the best match for my criteria.ChargingThere has been a recent trend towards using USB for charging devices. Sony provides a tiny wall-wart PSU which has a USB socket and a short (1m) USB cable that can be used to charge the phone from it s PSU or from a PC. The size is really convenient, as the phone has a short battery life I ll probably want to take the PSU to more places than I would for other phones I ve owned.The short USB cable saves weight and tangle when travelling, but can be inconvenient. I m currently working on the phone while it s plugged into my laptop, that works well and I can make calls while it s connected. If the phone was connected to a USB port on a tower computer that was on the ground then the cable could be too short to make a call, if it was charging on a power point near the floor then I wouldn t even be able to use the computer functionality let alone make calls without kneeling. My Viewty has a 175cm charging cable which alleviates these problems. I ve got a 50cm USB extension cable that I use for charging my phone while I m in bed that is just long enough to allow me to check my email without getting out of bed!The socket for connecting the USB cable is protected by a plastic lid that is connected by a strip of rubber. For a socket that will be used at least twice a day this isn t a good mechanical design. The plastic slide on the LG U990 Viewty seems like a much better design.As an aside it s a pity that they aren t designing cars with USB charging sockets built in. Some new cars have a socket for one USB flash drive to be attached to the radio, but really they need at least one USB charging port per seat. It would also be nice if they made power points with USB charging sockets built in, I d buy a few of those if they made them.Preserving the BatteryI ve been running Juice Defender to reduce the battery use, at the moment it is claiming to have extended battery life by 69%. That combined with turning off things that aren t needed (such as WiFi) has made the phone reasonably usable. I can survive more than 12 hours during which I use the phone a lot without charging it.XperiaX10.net has an interesting review of replacement batteries [5]. I m not going to buy them because the largest battery requires a replacement back case which prevents using an external case to prevent damage and the smaller one doesn t provide enough of a benefit and the design of the phone makes it difficult to change batteries so carrying a spare battery isn t a good option.Cursor Control KeysThe HP/Compaq iPaQs that I own from ~10 years ago have a single button that can be moved up/down/left/right to act as a cursor, it can also be pressed inwards to act as an ENTER key (or whatever the application might want for a fifth function). Having some sort of hardware cursor control is really handy, I often end up deleting several characters when I want to replace one because getting the cursor onto the desired character is too difficult.Adding more hardware keys would require making the phone bigger, but that would be fine by me. As described in my previous post about phone cameras I d like to have a phone that s thicker to have a better camera with a greater focal distance for a larger lens [2].Core Phone FunctionalityI really miss having separate green and red buttons for making/answering calls and for rejecting/ending calls.A really common operation is to call back the last person who called. To do this on my LG U990 Viewty I press the green button twice on my home screen which took less than a second. On the Xperia this involves selecting the phone icon from the home screen, then the call log icon, then the call that is desired, then the Call user line. That is four presses in different parts of the screen compared to pressing the same hardware button twice. I m investigating dialer applets right now, the Dialler One applet has a good interface for calling people who have called or been called recently but it still requires two presses on different parts of the screen. With my old Viewty I could call back the last person by feel without even looking at the phone!In the last 6 years the standard functionality of phones has been to include multiple profiles for noises. My Viewty has profiles named Normal , Silent , Vibrate only , Outdoor , Headset (automatically selected when a headset is connected), and three customised ones. The Xperia has only one setting, and that is three icon presses away from the home screen. It does allow changing the volume by hardware switches on the side which includes going to vibrate-only and silent mode. While this is useful, it s not the best way that two precious hardware keys could be used. It also doesn t allow control over all the different notifications, I d like to be able to activate a noise profile and have every application respond to it in an appropriate manner. This is a deficiency in Android 2.1 not in the phone itself.In many ways this phone has the worst phone functionality of any mobile phone I ve ever owned, I think that this is more the fault of the Android designers than Sony Ericsson.Android UpdatesSony had previously claimed that they wouldn t support Android later than 2.1. Now Sony has announced that they will support Gingerbread Android 2.3 [3]. So one of the major complaints about the Xperia will soon be addressed.TetheringThe build of Android that the Xperia runs at the moment doesn t support Wifi tethering. I m currently using with Easy Tether for USB tethering [4]. It s not free software and requires it s own code to run as root on your Linux system that is being tethered (which is easily locked down with SE Linux), but it basically works. The down-side with Easy Tether is that it proxies all the connections so you can t run traceroute etc and in the free version you can t use UDP.K9 MailK9 Mail fixes some of the problems in the default Android email program that I described in my previous post. It allows selection of SSL with a default port of 993 for IMAPs. It uses mail.example.com as the mail server address for an email address of user@example.com (so I ll add a mail CNAME to the domains I run). When I connected initially it told me that the SSL key was not signed by a CA and asked if I wanted to save it or reject it this is the correct and desired functionality. It also correctly parses URLs from the email (or at least has fixed the bug that I discovered in the default email app).One problem I ve found with K9 is that it seems to timeout on large folders. This is probably partly the fault of Virgin Mobile being slow for IP access, but I wonder whether K9 doesn t pipeline IMAP commands as Virgin can do bulk transfer at reasonable speeds (80KB/s) and it mainly fails on latency (900ms being typical). The result is that a folder with more than 500 messages that need to be copied to the phone will never get synchronised. When I started reading mail on my phone I had to move mail from some of the bigger folders into other folders to avoid timeouts. As an aside the amount of time I ve saved by reading email on the go has already paid for the phone.MediascapeThe Sony Mediascape software is used for categorising photos. One function of this is to assign names to photos, the names come from the contact list so if you photograph someone who you can t phone then you need to add a contact list entry for them. This also means that you couldn t conveniently add names to non-humans, I guess I could have added a contact list entry Mr Crash Dump for photos of system crash logs. But a bigger problem is that it decides what is a picture of a person, a picture of someone who is not centered in the photo or a profile picture can be regarded as not a photo of a person and therefore not subject to being associated with a contact list. Finally when selecting a name for a picture it displays the entire contacts list in a small font instead of displaying favorites, I have the phone numbers of many clients in my contacts list who I will never photograph Mediascape just isn t much good. If I feel the need to do something serious in this regard I ll search the app store for something free that s better.ProtectionFor $15 each I bought one grey and one clear Gel Case from J2K. This case covers the sides and back of the phone with a firm rubber layer that will hopefully allow it to bounce rather than break. It also extends slightly higher than the screen which should stop the screen being scratched if the phone is left face-down on a hard surface on the vibrate setting.One problem with the Gel Case is that by it s design it has to cover the buttons on the sides, due to a design or manufacturing problem the clear case that my wife uses can press slightly on the shutter button which disables the three main buttons on the front. So when the menu or back button stops working she has to slightly move the Gel Case out from the side. I m thinking of just cutting out a section of the Gel Case there, that will make it difficult to press the shutter button, but you can use the touch screen to take photos and there doesn t seem to be any other use for the shutter button so this shouldn t be a problem. The clear and grey cases have different designs, the grey one has a hole over the raised Sony logo which makes it fit a little better as well as not having the shutter problem, so it seems to be a later design I don t know whether all clear cases have the same problem but I recommend that someone who only has one Xperia X10 get the grey case just in case.Web BrowsingI m experimenting with using my own web proxy to compress the data sent to the phone. Unfortunately the Android settings for a web proxy only apply to the main web browser, not to all the other applications that use web services. Also the built-in web browser requires pressing the settings hardware button followed by at least two touch-screen presses to change between windows or close a window and it doesn t seem to support making the short-press action be to open a link in a new window. So I will have to find another web browser to use.Bandwidth UseThe 3G Watchdog applet is really good for tracking the data transfer and optionally cutting off 3G access before the quota is exceeded. Unfortunately Virgin has already sent me a bill with $234 in extra charges for bandwidth use because I used 1.6G instead of my 1.5G quota. A Virgin representative had told me over the phone that the billing period would be based on the end of the month, so while every calendar month has had less than 1.5G used because I used more than average in the end of March and the start of April that counts as excess data in the 14th March to 13th April period.I m going to appeal this to the Telecommunications Industry Ombudsman, I don t think that it s reasonable that I should be billed almost 7* the normal bill for exceeding the quota by 7.4% based on following the instructions of a Virgin employee. While I could have read the previous bill that they sent me to discover the end of billing period dates, I don t think that I should be expected to distrust everything that a Virgin employee says. If they billed me an extra $20 then I d just pay it, but $234 is unreasonable.ConclusionSince using the phone I ve found significant benefits in web browsing and reading email with the major limitation being the small screen (relative to a Netbook or Laptop). So if I was to buy another phone I would probably consider a Dell Streak which seems to be the largest Android phone on the market at the moment.Given the amount of use that I ve got I would be happy to spend more money and therefore consider a more expensive phone. But I don t regret the decision to save money by getting an Xperia X10.Finally when a telco tries to stick me with a $234 excess charge it really detracts from the value of having a phone contract. If I end up having to pay that then it s half the value of a smart-phone lost in one telco scam. This is enough to make a contract with Virgin a bad option, after this contract expires I may use VOIP and a pre-paid SIM from Telstra NextG if their network is still the best. Another possibility is to just use a small tablet and skip having a mobile phone, email and Jabber plus SMS from the people who lack net access will probably do.

Lars Wirzenius: Obnam 0.16: no longer alpha

I have released version 0.16 of Obnam, my backup application. It adds encryption support. My personal Debian repository has binaries for squeeze in i386, amd64, and armel architectures. More importantly, this is the first BETA release. Obnam should now be feature complete for real use. Performance is lacking and there are many bugs remaining. There are no known bugs that would corrupt backed up data, or prevent its recovery. I've made a roadmap for 1.0, which later on everyone will get a great big laugh about.

Jonathan McDowell: Why Linux? (Part 7: Support)

(This is part of a series of posts on Why Linux?) This is probably a non-obvious reason to run Linux to most people. One of the complaints I've heard in the past is the lack of support for Linux. It's not really relevant to running it on a work desktop (where support is presumably from some central IT organisation), but I believe it's a red herring. Support in the Free software world can exceed that in the proprietary by an impressive margin. And that can turn out to be useful at work, even if you do suppose the existence of central IT. The support I've received for Linux and applications under it has been, on numerous occasions, excellent in a way I feel I could never expect from the commercial software world. And when it isn't, I have the choice of whomever I want to try and fix my problems, rather than being stuck with no options. I have found that if I am polite, and provide useful information, and patient, I can talk directly to the developers who make the software I use. If I have a patch they will often take it from me, or use it as a basis for the final fix. If they are no longer available, or too busy, then because I have the source I can find someone else to look at the problem, or do so myself. The chances of most large proprietary software companies giving me the time of day is low. I don't understand why small businesses think that Windows is a safer choice due to being able to get support from Microsoft. Again using experience gained at Black Cat, at one point we had a problem with IPv6 routes being updated. Signs pointed to Quagga, Simon collected relevant information and got in contact with the Quagga devs. They investigated, realised it wasn't a problem with their code, and then proceeded to find the issue in the Linux kernel, produce the fix and pass it upstream. Within hours of us reporting the problem. I'll accept that's an exceptional response that can be matched within the proprietary software world, but not without a hefty support contract and I doubt you would have got a response other than "Not our fault, talk to the other supplier", or maybe a workaround at best. More recently, I had a conversation about Linux and discard support, with one of the people who'd worked on it. Very interesting from my PoV, useful to my work (I ended up fixing something in our code base that led to the Linux support Just Working with our product) and I believe was useful to that developer too, in terms of providing some insight to the other side of the problem. I don't get that kind of access to proprietary software developers - while it could be argued that I know a lot of Free software people, I also know a lot of other programmers and they're just not able to be so open about things, so both sides lose out. Or my new laptop's ethernet wasn't supported by the kernel in squeeze. I filed a bug requesting the driver be added (and pointing to the patch). The week I wrote the first draft of this article I saw confirmation that this had been done, and will be part of the final squeeze release. I think that's pretty impressive. (Thanks, Ben.)

Jonathan McDowell: Why Linux? (Part 7: Support)

(This is part of a series of posts on Why Linux?) This is probably a non-obvious reason to run Linux to most people. One of the complaints I've heard in the past is the lack of support for Linux. It's not really relevant to running it on a work desktop (where support is presumably from some central IT organisation), but I believe it's a red herring. Support in the Free software world can exceed that in the proprietary by an impressive margin. And that can turn out to be useful at work, even if you do suppose the existence of central IT. The support I've received for Linux and applications under it has been, on numerous occasions, excellent in a way I feel I could never expect from the commercial software world. And when it isn't, I have the choice of whomever I want to try and fix my problems, rather than being stuck with no options. I have found that if I am polite, and provide useful information, and patient, I can talk directly to the developers who make the software I use. If I have a patch they will often take it from me, or use it as a basis for the final fix. If they are no longer available, or too busy, then because I have the source I can find someone else to look at the problem, or do so myself. The chances of most large proprietary software companies giving me the time of day is low. I don't understand why small businesses think that Windows is a safer choice due to being able to get support from Microsoft. Again using experience gained at Black Cat, at one point we had a problem with IPv6 routes being updated. Signs pointed to Quagga, Simon collected relevant information and got in contact with the Quagga devs. They investigated, realised it wasn't a problem with their code, and then proceeded to find the issue in the Linux kernel, produce the fix and pass it upstream. Within hours of us reporting the problem. I'll accept that's an exceptional response that can be matched within the proprietary software world, but not without a hefty support contract and I doubt you would have got a response other than "Not our fault, talk to the other supplier", or maybe a workaround at best. More recently, I had a conversation about Linux and discard support, with one of the people who'd worked on it. Very interesting from my PoV, useful to my work (I ended up fixing something in our code base that led to the Linux support Just Working with our product) and I believe was useful to that developer too, in terms of providing some insight to the other side of the problem. I don't get that kind of access to proprietary software developers - while it could be argued that I know a lot of Free software people, I also know a lot of other programmers and they're just not able to be so open about things, so both sides lose out. Or my new laptop's ethernet wasn't supported by the kernel in squeeze. I filed a bug requesting the driver be added (and pointing to the patch). The week I wrote the first draft of this article I saw confirmation that this had been done, and will be part of the final squeeze release. I think that's pretty impressive. (Thanks, Ben.)

16 April 2011

John Goerzen: The Boys

Jacob really enjoys his pajamas. By this point, he can mostly get himself ready for bed. He still wants help brushing his teeth but that s about it. His favorite pajamas are his rocket ship pajamas , which also cover his feet and have a white pad underneath the feet. That s his favorite part. They have rockets all over them, and he sometimes will run out of a room and inform me with delight, I m all rocket ships! Oliver has really started to form up words. We can pick out words like lettuce, truck, book, look, and dad John . He also has a way of saying there it is , most particularly when looking at trains. Jacob still loves trains. In church, he will take his markers, connect them end to end, and have a marker train that will keep him entertained for quite a long while. He will slide it back and forth on the pew, and eventually it will slide in a tunnel (behind my back). This actually started with hymnbook trains get a few books in a row, and it s a train. Anything can be a train to Jacob. Driving down the road, we might see what he calls tree trains, which are just trees in a row. Last Sunday, the Kansas Mennonite Men s Chorus had its first concert of the season. I sing with this group, which has nearly 300 men in it. It s a lot of fun to be a part of that group, and the music is wonderful. Jacob and Oliver were there on Sunday, and both started to take more of an interest in the music that before. Jacob particularly loved the song Dry Bones, which had a number of odd percussion instruments in it. He was laughing at spots, and wanted to hear me sing it for the next several days. He even wanted Terah to read the program from the concert to him before his nap one day. Oliver enjoyed it too, and kept saying dad John (his word for me) whenever there was a soloist. I didn t sing a solo, but apparently to 1-year-old eyes, 300 guys all dressed alike all look like dad. Jacob and I recently have been reading Winnie the Pooh stories at his bedtime. Not the Disney books, but the original A. A. Milne stories. We read a few pages every night, and have made it to page 214 by now. Jacob loves it. And he s becoming increasingly interested in reading things. Sometimes we ve been unsure if he s reading something or just had it memorized. Last night, I got out the book, and we were on a page he had never seen or heard before. He pointed to a word, and said, It says Roo there! And indeed it did. Then he added, It says said Roo. . Yep. And then he read me the whole sentence:
I love jumping, said Roo.
I believe that s the first time I ve been certain Jacob has read me an entire sentence without having memorized any of it beforehand. And he won t be old enough to start Kindergarten for another year and a half. We then read the story, and when I came to the sentence Jacob had read to me, he interrupted, saying, No, dad, I will read that one! And he did.

Iustin Pop: Sysadmins and auto-configuration

I've read bits and pieces of the recent "Network Manager as default" thread on debian-devel. I have a strong personal preference towards one side, but that's not the point of this post (and I hope I can keep the tone neutral, hence why I didn't get into the mailing list discussion). I think this discussion is just a proxy flame-war to a bigger issue that lurks behind the scenes. That is, what is the most efficient way to configure systems. On one side, we have the sysadmins, with their toolbox, and who desire the most reliable way to configure systems. In the other corner, we have people whose problem is how to configure systems with the least amount of human involvement. Whether it's ifupdown versus NetworkManger, or explicit groups versus things like PolicyKit, it's basically the same thing: do we want to have an OS that is slimmer, more customisable and more stable, but needs hand-holding, or do we accept some degradation in flexibility/customisation in exchange for decreasing the cost of administration? I have personal preferences to one side, and practical preferences to another side. I'm not sure which is best in 2011, and it depends on many factors, but looking forward in 20 years: I don't think we will afford to hand-hold a Linux machine as mach as we were doing it 10 years or even 5 years ago. Presuming that software capabilities advance, it should be possible to hand-over responsibility of autoconfiguration to software, rather than hand-configuring config files (doing it via configuration management systems is beside the point, as it is a mixed setting; I'm discussing only the extremes). So in any case, we'll have to accept that at one point we will have to rely on automated stuff for some parts of the system. The question is when we as sysadmins will be ready to do that, and when the software will be mature enough to bear that kind of responsibility. And then there's my next gripe: what is good for a few systems (dpkg/apt-get) might not be good for many. I find lately that relying on dpkg plus a configuration management tool to keep many machines in sync is not the best way. Keeping with the time means changes, whether we want it or not. PS: for the record, not even my laptop(s) run NetworkManager :)

Iustin Pop: LaTex fun

Recently, I've had the pleasure of having to write many short documents in LaTex (short as in 1 to 6 pages). I haven't written a lot in LaTex since my school time, so this was a very nice flashback to those times. However, since then PDF is the new "standard" format, not PostScript, so I had to do a bit of adjustement. The biggest change is that pdflatex doesn't "like" EPS files for images, so what to do? As usual, the road to enlightenment has many turns First, reading docs, I said simple, create a PNG file, scaled at high resolution, then include it scaled down so that it kind of loses the ugly scaled-bitmap feel. But that's not a nice solution: it is still bitmap, just looks like aliased. So I wanted another solution and threw gnuplot's set terminal png and fig2dev's -L png out the door. Next was, of course, embedding PDFs, since pdflatex supports that. However, gnuplot's pdfcairo output is not as nice as I wanted. It works, but only kind of. Issues with font consistency and scaling, etc. Then I remembered the nice pslatex output from xfig, and learned that there's a pdftex output. And that gnuplot also can generate .fig output. So I went and redid my Makefiles and gnuplot command files and everything, and suddenly all looked almost right. There are still a few issues: So while this setup has some drawbacks, it works well enough. I was happy to simply have a well defined workflow. But then I wanted to do a simple graph (of a 3-wire sorting network), and I realised that positioning all of that using xfig will be painful. I kept stumbling upon pgf and tikz during my previous investigations, and I said I should check it out. Wow. tikz and pgfplot. While you lose a bit on the graphing capabilities, you also gain a lot. Basically one can replace both xfig (instead of hand-drawn diagrams you can actually write them in code, programatically, no more guessing) and gnuplot (so that you have consistent fonts/scaling). I was so amazed at this excellent combination that I've converted for all my new docs to this. And now I have the problem that I keep wanting to write LaTex code in ikiwiki :) PS: Yes, I've been busy lately, so busy that my Debian work has mostly been suspended. Should be back in about a month or so.

Russell Coker: Who is the Best Free Software Advocate?

TED is offering an audition for future TED.com talks in New York on the 24th of May [1]. It would be good if we could have someone advocate Free Software there. The audition is a 1 minute talk, the speakers who pass the audition may be offered full ~17 minute lecture slots at the next TED conference, and some of the minute long talks will be published on TED.com (which has many viewers).Larry Lessig has previously given a TED talk about laws that strange creativity [2], while this is fairly typical of the type of talk that TED promotes (in terms of politics and presentation quality), a talk doesn t have to be so well produced to make the grade. Firstly some TED talks seem to be accepted with a lower presentation quality due to the speaker having some special knowledge a TED presentation doesn t have to be so slick if the speaker is sufficiently famous or the talk is particularly interesting. Also there are TEDx events which are organised independently, have less international attention, and therefore less competition for speaking slots. Larry gave a more recent talk at the TEDxNYED event about re-examining the remix and lessons that people on the political left can learn from conservatives about remix legislation [3], this talk is much more informal and also unfortunately has a much lower recording quality. But as it s published on TED.com it will still get a large audience.Promoting Free Software to the TED audience (which includes many senior politicians and other VIPs) would be a major achievement. Even a TEDx talk that gets published on TED.com would get seen by a huge and important audience.Who is capable of giving such a talk? Larry got a standing ovation for his TED talk so it seems most likely that he can give another TED talk without going through the public audition process, but it seems that he has other priorities at this time. Probably most people who have more than 10 years experience doing Free Software development and who have a reasonable amount of experience giving lectures at Free Software conferences could at least manage the TEDx quality and a good portion of the speakers from any of the major Linux conferences could potentially give a talk of TED quality if they spent enough time preparing it.What methods of funding are available? There are probably very few people who would travel far to give a 1 minute talk, Mark Shuttleworth is one person who can afford to travel for such things and who could potentially give a great TED talk (his story is the sort of thing that seems popular with the TED audience). Would any of the Free Software organisations sponsor someone to give such an audition? I would support having Debian funds spent on travel for one of the better Debian advocates to travel to NY for the audition I m sure that there are many other Free Software things that can be done in NY to help justify the expense. Maybe this would be something that is suitable for corporate sponsorship.Finally it seems like a good idea to create some very short talks anyway. It would probably be useful to have leaders of the Free Software community publish minute-long video talks about their favorite projects anyway. In some ways a short talk is a higher form of art than a long lecture, I think that the best talk I ever gave was my 5 minute lightning talk about installing SE Linux.UpdateTED now has a blog post with a FAQ about the talks [4]. Larry Lessig is the first example they cite of how to give a great TED talk!Also you can submit a video without attending New York and there is no restriction on publishing the video elsehere. So if you want to make a great 1 minute video about something important you can just send it to TED and see what happens and then publish it on Youtube or one of the other video services too.

15 April 2011

Eddy Petrișor: Upgrade from lenny to squeeze - first impressions

Update: I reported the deluge issues and added a new problem about the lack of click on tapping on the touchpad.




I know that installation reports and upgrade reports need to be submitted to the BTS, but I just want to point out some issues for people that might hit the same issue on upgrade from lenny to squeeze.

But before that I must say I like the new Debian site(s) look.

Issue number one: When upgrading from lenny's deluge to squeeze's deluge, the new version of the app is quite different from the prevoious version. Here are some things to take into account:
Issue number 2: I seem to experience some weird glyph/graphic area reshuffling in GNOME (maybe X?) after recovering from hibernate. With a total (according to my current sloppy counting) 5 resumes, things get back to normal, but I suspect the next hibernate-resume cycle will restart the glyph reshuffling cycle.

By glyph/graphic area reshuffling I mean alterations of the shapes of the glyphs (and some areas on the background picture) in such a manner that it seems that within a set of 8/16/N (?) lines are shifted/rotated sideways with some undefined and different ammount each, but in a reproducible manner ("b" will always be doodled in the same way, no matter if is in the word "be" or if is in the word "absurd".

I'll try to provide some picture in the bug report, once I report this issue in BTS.

Update: I reported this in Debian's BTS and upstream (with screenshots, too). I am not convinced the problem is in the kernel since I tried an old kernel and saw the same issue. I suspect X is at fault.

Issue number 3: This is more like a convenience issue. In the past I was using "hibernate" with uswsusp which I understand is now broken beyond repair and replaced by pm-utils. The thing I miss in the hibernate process now is the ability to abort the hibernation process as it was possible in lenny's uswsusp by pressing the backspace key during the storing of the state on disk phase.


Issue number 4: The upgrade process was quite tedious because once I tried upgrading aptitude, python2.6 was pulled in and almost all apps ended up needing upgrading due to the chaining of necessary package upgrades.


Issue number 5: For some weird reason pulseaudio was initially installed making playback of any audio impossible (the apps wanting to emit noises would just freeze but they were TERM-inatable) and later I've seen a default null audio sink was defined for me. Killing pulseaudio and removing the ~/.pulse directory fixed the issue (but I should probably see why pulseaudio didn't work properly in the first place because I suspect the problem will reappear at the next restart - I usually use hibernate).

Issue number 6: Tapping the touchpad no longer results in a click. Maybe some packages got removed? And, no, it is the same when I remove the external mouse, so it is not because of some smart behaviour of that sort.

Otherwise I am quite satisfied with the result of the upgrade. A huge "thank you" to all people involved in the development of squeeze.

14 April 2011

Mirco Bauer: The Big Split: Mono 2.10 Debian Packaging

Most probably haven't noticed yet but I finished the Mono 2.10.1 debian packaging effort of the past 3 months and uploaded it to Debian/Experimental. With Mono 2.10 I had to make the biggest changes in Mono packaging since the big Mono 2.0 upload. The runtime no longer supports the 1.0 and 2.0 runtime profile, instead it now supports the 2.0 and 4.0 runtime profile. This meant I had to drop all libmono*1.0-cil packages and add libmono*4.0-cil packages. This sounds like a lot of s/1.0/4.0/ work but it actually wasn't. Mono 2.10 ships a lot of new libraries over 2.6 and I had again to decide where they should go. "Where should this $library go?" I have been playing this game for the past 7 years maintaining Mono and I finally gave up on it... What, where, when, why? I could give now a 2 hours talk of the issues behind the current packaging approach (keeping the number of library packages low) but instead I will do something else. Please, just take a look at this picture for a second: Brain Melting Device If your browser crashed, your eyes hurt or your brain simply melted, I think you have got the idea. The Big Split The cure? cli-common-dev! This is a package that contains 2 extremely important debhelper packaging tools for packaging Mono/CLI related packages called dh_makeclilibs and dh_clideps. If you don't know these, they do exact the same thing as dh_makeshlibs and dh_shlibdeps do. dh_makeclilibs generates library dependency tracking information and dh_clideps consumes that information to automatically generate the package dependencies for you. So each library of the 4.0 runtime profile has now it's own package, simple as that, the rest does cli-common-dev for me and you. "Hey, that Mono packaging bastard is polluting the Debian archive because of his laziness!" No, I am not. This packaging change not only has the advantage of simplifying the packaging and with that bringing new Mono versions faster to you but also reduces the typical install size for applications as they will only pull in the really used libraries of Mono instead of groups of them. I don't have any numbers handy right now as none of the applications are built against Mono 2.10 (yet), but when the transition starts we will get numbers. New Features There is also a new SGen flavor of Mono available called mono-runtime-sgen which is no longer using the conservative non-generational Boehm's garbage collector but SGen which is a simple generational garbage collector with promising advantages. And here some more Mono 2.8/2.10 news from /usr/share/doc/mono-runtime/NEWS.Debian.gz: Architecture Regressions With the initial upload of Mono 2.10.1 to Debian/Experimental the architecture world broke apart and it regressed on all Mono architectures except for i386 and amd64 :-D There is a reason it's called experimental isn't there? In mono 2.10.1-3 I could solve all regressions except for kfreebsd-* and armel. Jo Shields fixed the remaining regressions and the world started to look good again in mono 2.10.1-4! He also took care of mono-basic, mod-mono and xsp, but mod-mono and xsp are still waiting for the translation call deadline to pass by so they can also be uploaded to Debian/Experimental. Planned Transition As mentioned above, there will be a Mono 2.10 transition needed when the packages hit Debian/Unstable. There is no ETA yet on this when it will happen as I have to coordinate this with debian-release first. But as things are not showtime ready in experimental anyhow, this will not happen too soonish. The Mono 2.10 transition plan will be covered in a following post. GIVMENOWPLX OMG, all this rumbling about Mono 2.10 and I still haven't said a word on how to obtain it, sorry about this, just do this and I will shut up now:
echo "deb http://ftp.debian.org/debian experimental main" >> /etc/apt/sources.list
apt-get update
apt-get install -t experimental mono-complete
(this is the easiest way of getting only mono 2.10.1 from experimental)

Niels Thykier: Lintian 2.5.0~rc1 (and newer) breaks overrides

This is old actually old news, but I suspect some people have forgotten or maybe do not understand to what extend. We decided to break overrides in 2.5.0~rc1[1], as explained in Raphael s email to d-d-a@l.d.o. As the email mentions there were two breakages the tag merges and the file prefix change. Especially the latter seem to be causing confusion (or at least pings/questions/emails for me). The long story short:
All overrides listing files with a prefix of ./ or / will not work as of 2.5.0~rc1
If you are curious as to why, please have a look at #534940. Fixing the override is simply a matter of removing the ./ or / prefix(es). If you discover a tag that still uses ./ or / as file name prefix, please file a bug (assuming someone did not beat you to it). I am not entirely sure if the FTP-masters have updated the copy of Lintian that handles auto-rejects[2], so you may have keep the old/broken override if it is for a non-fatal auto-reject tag. This is especially true for the embedded-zlib tag that were merged into embedded-library. [1] On a related note, this is why this is 2.5.0~rc1 and not 2.4.4. [2] I also do not know when they plan to do it if they have not already done so, but Tolimar has informed me that 2.5.0~rc2 is in squeeze-backports. >.>

Lars Wirzenius: Project Harmony

It seems that Project Harmony has finally taken itself public. From the website:
Project Harmony is a community-centered group focused on contributor agreements for free and open source software (FOSS).
In reality, this seems to be a closed group that in no way represents the community in general and mainly acts in the interest of various corporations. Their goal is to create a bunch of templates for contracts to make participating in free software projects even more complicated than it already is. Look, we have a bunch of copyright licenses. They're not always easy to understand, and there's enough details and corner cases and interactions with the real world to make your head hurt. My head as well. (They're still easier, and more standardized, than contracts for proprietary software.) Contributing to a free software project is easy enough, in most cases. You make a patch, and if the project accepts it, yay. Your patch will be licensed the same way as all the other code. These Harmony agreements aim at making you give up your copyright to someone else, usually a corporate sponsor of the project. That's a bad thing. If the corporation owns the copyright, or you give them a license to do anything they wish with the project, they can do all sorts of evil things with it. For example, they can release it under a non-free license, or enter into complicated patent agreement with someone else that will require you to pay protection money later on, or something else. There is no end to the evil corporations invent, when given the chance. If, however, you refuse to give the corporation any ownership, or special powers, then their ability to do evil lessens, or at least you aren't helping them do that. It might be possible to use the Harmony agreements, as they are currently written, in ways that do not directly allow evil. However, why bother? By sticking to well-known, court-tested free software free software licenses, there is no need for the Harmony licenses. You get to keep the corporations honest, without having to read piles more legalese. Another way of looking at this: here's a bunch of corporations that want you to start using complicated legal documents for their benefit. Ask yourself, in what scenario is this going to be a good idea for you? Just say no to copyright assignments.

Timo Jyrinki: MeeGo Summit FI starts tomorrow

I'm participating in the MeeGo Summit FI that starts tomorrow, and I'm already in Tampere now, as you can see. The summit is at an interesting time, given that there is a huge amount of stuff happening around MeeGo while at the same time Nokia is balancing on what do both in the far future and what to do to ship the MeeGo device they've already promised. The summit is fully and overly booked for >300 attendees. There is also Finhack free software event happening alongside on Saturday at the same venue.

A view towards the venue(s), Finlayson area in Tampere.
The company I work for, Nomovok's CEO illustrated the MeeGo situation extraordinarily well a little less than two months ago. I think it's one of the best insights you can get from anywhere in public at the moment. Now things are starting to really heat up. Of course the Big thing is the MeeGo Conference in San Francisco in the end of May, but it takes nothing away from this being the major event both in the country formerly known as NokiaLandia, and also globally given the amount of MeeGo related talent here. Nomovok is teasing people with the SteelRat - a launchpad for MeeGo tablet creation and an UX, based on latest MeeGo Core - a beta of which will be available now in Tampere and first version in San Fransisco. Meanwhile we and others are investing in also the MeeGo IVI and MeeGo TV platforms, not forgetting about the handset industry that is more visible to many tech savvy consumers.

Pre-registration and building on-going.
At the same time there is a lot of exciting stuff going on in the Ubuntu project (Ubuntu 11.04 upcoming, I'm already using it and reporting bugs), together with Linaro and other ARM players. As a founder of Ubuntu Finland I'm always eager to see if I can work there also on work time, not only on free time. And regarding ARM, Nomovok is the key player in having ARM on MeeGo as well.

Then on the completely other end of spectrum, I'm eagerly waiting for the GTA04 project to have my Neo FreeRunner(s) bumped up to modern specs. At the end of the day I'm still using over 2,5 year old phone myself, since I want to run the software that is both free and completely selected (and if I want, done) by me. With GTA04, I could choose between MeeGo armv7hl port, Debian armhf port or Ubuntu as the base distribution to use my software.

12 April 2011

Dirk Eddelbuettel: The new R compiler package in R 2.13.0: Some first experiments

R 2.13.0 will be released tomorrow. It contains a new package by R Core member Luke Tierney: compiler. What a simple and straightforward name, and something that Luke has been working on for several years. The NEWS file says
    o Package compiler is now provided as a standard package.  See
      ?compiler::compile for information on how to use the compiler.
      This package implements a byte code compiler for R: by default
      the compiler is not used in this release.  See the 'R
      Installation and Administration Manual' for how to compile the
      base and recommended packages.
so the compiler is not yet used for R's own base and recommended packages. While working on my slides for the upcoming Rcpp workshop preceding R/Finance 2011, I thought of a nice test example to illustrate the compiler. Last summer and fall, Radford Neal had sent a very nice, long and detailed list of possible patches for R performance improvements to the development list. Some patches were integrated and some more discussion ensued. One strand was on the difference in parsing between normal parens and curly braces. In isolation, these seem too large, but (as I recall) this is due some things 'deep down' in the parser. However, some folks really harped on this topic. And it just doesn't die as a post from last week demonstrated once more. Last year, Christian Robert had whittled it down to a set of functions, and I made a somewhat sarcastic post argueing that I'd rather use Rcpp to get 80-fold speed increase than spend my time argueing over ten percent changes in code that could be made faster so easily. So let us now examine what the compiler package can do for us. The starting point is the same as last year: five variants of computing 1/(1+x) for a scalar x inside an explicit for loop. Real code would never do it this way as vectorisation comes to the rescue. But for (Christian's) argument's sake, it is useful to highlight differences in the parser. We once again use the nice rbenchmark package to run, time and summarise alternatives:
> ## cf http://dirk.eddelbuettel.com/blog/2010/09/07#straight_curly_or_compiled
> f <- function(n, x=1) for (i in 1:n) x=1/(1+x)
> g <- function(n, x=1) for (i in 1:n) x=(1/(1+x))
> h <- function(n, x=1) for (i in 1:n) x=(1+x)^(-1)
> j <- function(n, x=1) for (i in 1:n) x= 1/ 1+x 
> k <- function(n, x=1) for (i in 1:n) x=1/ 1+x 
> ## now load some tools
> library(rbenchmark)
> ## now run the benchmark
> N <- 1e6
> benchmark(f(N,1), g(N,1), h(N,1), j(N,1), k(N,1),
+           columns=c("test", "replications",
+           "elapsed", "relative"),
+           order="relative", replications=10)
     test replications elapsed relative
5 k(N, 1)           10   9.764  1.00000
1 f(N, 1)           10   9.998  1.02397
4 j(N, 1)           10  11.019  1.12853
2 g(N, 1)           10  11.822  1.21077
3 h(N, 1)           10  14.560  1.49119
This replicates Christian's result. We find that function k() is the fastest using curlies, and that explicit exponentiation in function h() is the slowest with a relative penalty of 49%, or an absolute difference of almost five seconds between the 9.7 for the winner and 14.6 for the worst variant. On the other hand, function f(), the normal way of writing things, does pretty well. So what happens when we throw the compiler into the mix? Let's first create compiled variants using the new cmpfun() function and then try again:
> ## R 2.13.0 brings this toy
> library(compiler)
> lf <- cmpfun(f)
> lg <- cmpfun(g)
> lh <- cmpfun(h)
> lj <- cmpfun(j)
> lk <- cmpfun(k)
> # now run the benchmark
> N <- 1e6
> benchmark(f(N,1), g(N,1), h(N,1), j(N,1), k(N,1),
+           lf(N,1), lg(N,1), lh(N,1), lj(N,1), lk(N,1),
+           columns=c("test", "replications",
+           "elapsed", "relative"),
+           order="relative", replications=10)
       test replications elapsed relative
9  lj(N, 1)           10   2.971  1.00000
10 lk(N, 1)           10   2.980  1.00303
6  lf(N, 1)           10   2.998  1.00909
7  lg(N, 1)           10   3.007  1.01212
8  lh(N, 1)           10   4.024  1.35443
1   f(N, 1)           10   9.479  3.19051
5   k(N, 1)           10   9.526  3.20633
4   j(N, 1)           10  10.775  3.62673
2   g(N, 1)           10  11.299  3.80310
3   h(N, 1)           10  14.049  4.72871
Now things have gotten interesting and substantially faster, for very little cost. Usage is straightforward: take your function and compile it, and reap more than a threefold speed gain. Not bad at all. Also of note, the difference between the different expressions essentially vanishes. The explicit exponentiation is still the loser, but there may be an additional explicit function call involved. So we do see the new compiler as a potentially very useful addition. I am sure more folks will jump on this and run more tests to find clearer corner cases. To finish, we have to of course once more go back to Rcpp for some <emph>real</emph> gains, and some comparison between compiled and byte code compiled code.
> ## now with Rcpp and C++
> library(inline)
> ## and define our version in C++
> src <- 'int n = as<int>(ns);
+         double x = as<double>(xs);
+         for (int i=0; i<n; i++) x=1/(1+x);
+         return wrap(x); '
> l <- cxxfunction(signature(ns="integer",
+                            xs="numeric"),
+                  body=src, plugin="Rcpp")
> ## now run the benchmark again
> benchmark(f(N,1), g(N,1), h(N,1), j(N,1), k(N,1),
+           l(N,1),
+           lf(N,1), lg(N,1), lh(N,1), lj(N,1), lk(N,1),
+           columns=c("test", "replications",
+           "elapsed", "relative"),
+           order="relative", replications=10)
       test replications elapsed relative
6   l(N, 1)           10   0.120   1.0000
11 lk(N, 1)           10   2.961  24.6750
7  lf(N, 1)           10   3.128  26.0667
8  lg(N, 1)           10   3.140  26.1667
10 lj(N, 1)           10   3.161  26.3417
9  lh(N, 1)           10   4.212  35.1000
5   k(N, 1)           10   9.500  79.1667
1   f(N, 1)           10   9.621  80.1750
4   j(N, 1)           10  10.868  90.5667
2   g(N, 1)           10  11.409  95.0750
3   h(N, 1)           10  14.077 117.3083
Rcpp still shoots the lights out by a factor of 80 (or even almost 120 to the worst manual implementation) relative to interpreted code. Relative to the compiled byte code, the speed difference is about 25-fold. Now, these are of course entirely unrealistic code examples that are in no way, shape or form representative of real R work. Effective speed gains will be smaller for both the (pretty exciting new) compiler package and also for our C++ integration package Rcpp. Before I close, two more public service announcements. First, if you use Ubuntu see this post by Michael on r-sig-debian announcing his implementation of a suggestion of mine: we now have R alpha/beta/rc builds via his Launchpad PPA. Last Friday, I had the current R-rc snapshot of R 2.13.0 on my Ubuntu box only about six hours after I (as Debian maintainer for R) uploaded the underlying new R-rc package build to Debian unstable. This will be nice for testing of upcoming releases. Second, as I mentioned, the Rcpp workshop on April 28 preceding R/Finance 2011 on April 29 and 30 still has a few slots available, as has the conference itself.

11 April 2011

Dominique Dumont: Changing e-mail in package control file is now easy

I often see on debian-perl IRC changelog related to e-mail changes. For instance, when a Debian contributor becomes a Debian developer, he often wants to change his old e-mail address in his brand new debian e-mail address. This change is mostly done while updating packages to fix bugs or ship a new upstream releases. Since this change is trivial and mostly boring, forgetting about it is likely. Well, at least, that s true for the author of this blog who did have to change he e-mail address recently. The last version Config::Model Perl module (and its Dpkg model) offers a way to automatically perform this boring update task for you while you work on more interesting problems. Dpkg model now provides a bunch of meta Dpkg parameters. These Meta parameters are used to customize the behavior of the Dpkg editor tool to suit your needs. Among these parameters, the email-updates meta parameters enable you to specify which email address to update and how. Here s a screenshot of config-edit GUI invoked on a package (with config-edit -application dpkg): GUI to set up e-mail replacement In this case, all occurrences of the dominique.dumont email will be replaced with the new domi.dumont email in the control and in the copyright file. You can change or add new addresses using the GUI. When the package data (i.e. control, copyright and source) is saved, all meta information is also saved. Meta dpkg data is saved in its own file, so the email change will be applied to all packages you will be working on: E-mail address changes can also be specified in a command line:
$ config-edit -application dpkg \
  'meta email-updates:"domi@old.fr"="dod@new.fr"' \
 -ui none -save
Note: this command must be run in a source package directory. This new address change is stored in ~/.local/share/.dpkg-meta.yml or ~/.local/share/.dpkg-meta.yml:
---
email-updates:
  domi@old.fr: dod@new.fr
From now on, anytime you run config-edit -application dpkg (and save the data) while you work on a package, all occurrences of your old e-mail adress in debian.control will be changed with the new email address. All the best

Next.

Previous.