<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>numerodix blog &#187; reviews</title>
	<atom:link href="http://www.matusiak.eu/numerodix/blog/index.php/category/techno-babble/reviews/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matusiak.eu/numerodix/blog</link>
	<description>A blog about nothing</description>
	<lastBuildDate>Tue, 27 Jul 2010 16:51:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>sms is a garbage protocol</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2009/08/08/sms-is-a-garbage-protocol/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2009/08/08/sms-is-a-garbage-protocol/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 18:38:12 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/?p=2368</guid>
		<description><![CDATA[
no error on transmission failure
no failure on invalid recipient
no assurance of delivery to temporarily disconnected recipient

All of which amounts to the result that when you do send a text you have no idea if the number is correct, if the message went through, and in the event the person&#8217;s phone is turned off if he&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>no error on transmission failure</li>
<li>no failure on invalid recipient</li>
<li>no assurance of delivery to temporarily disconnected recipient</li>
</ul>
<p>All of which amounts to the result that when you do send a text you have no idea if the number is correct, if the message went through, and in the event the person&#8217;s phone is turned off if he&#8217;ll ever see it.</p>
<p>Now, I really don&#8217;t care if the flaws are in the protocol, the phones or the services we pay for; what I do know is that it all makes for an appalling technology whose reliability imitates Microsoft&#8217;s infamous msn messenger where messages constantly go missing without notice. I hear all the time about messages I never saw and apparently when my phone is off for a few days there is zero chance of getting messages sent in that interval.</p>
<p>Compare it to email, which doesn&#8217;t have any of these flaws, and it seems incredible that we are actually paying to use this.</p>
<p>And that&#8217;s to say nothing of the horrendous user interface for typing messages on a phone to begin with.</p>
<p><i>This entry belongs in a comprehensive tome I have been writing in my head for a decade, detailing just how much cell phones suck. But the field is so vast that it overwhelms my ability to articulate it.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2009/08/08/sms-is-a-garbage-protocol/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>that thing about ruby</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2009/02/01/that-thing-about-ruby/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2009/02/01/that-thing-about-ruby/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 23:29:56 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/?p=1921</guid>
		<description><![CDATA[Ruby is a great language, but one thing it needs is process. And what seems to suffer most from this is documentation.

 Ruby’s not ready
Ruby 1.9.1 released

]]></description>
			<content:encoded><![CDATA[<p>Ruby is a great language, but one thing it needs is process. And what seems to suffer most from this is documentation.</p>
<ol>
<li> <a href="http://glyphobet.net/blog/essay/228">Ruby’s not ready</a></li>
<li><a href="http://blog.reverberate.org/2009/01/31/ruby-191-released/">Ruby 1.9.1 released</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2009/02/01/that-thing-about-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello .NET</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2009/01/09/hello-.net/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2009/01/09/hello-.net/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 22:18:29 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/?p=1824</guid>
		<description><![CDATA[So I&#8217;m researching .NET/Mono for an application I might be doing for Windows. There are two important constraints:

The application shall not require installation privileges. (Or users in locked down environments might not be able to run it.)
The application shall be maximally robust with respect to runtime environment. (So that I can leave it behind with [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m researching .NET/Mono for an application I might be doing for Windows. There are two important constraints:</p>
<ul>
<li>The application shall not require installation privileges. (Or users in locked down environments might not be able to run it.)</li>
<li>The application shall be maximally robust with respect to runtime environment. (So that I can leave it behind with the best possible hope that it will work for years.)</li>
</ul>
<p>The first rules out shipping an install bundle of any sort, and the runtime environment is presumed to be a vanilla Windows install. At most I can hope for a .NET runtime since it comes with XP-SP2 (I think) and certainly Vista and onwards. As for the second, I&#8217;ve considered things like py2exe, which bundles code with .dlls for Qt and whatever else the python code actually uses. While this seems to produce a self sufficient bundle (without requiring an install), how do I know if py2exe is going to be around in a few years when I may need to rebuild? And the Qt libs for that matter, they depend on OS-level libs that may change over time, that I have no control over.</p>
<p>So .NET seems to be the <span style="text-decoration: line-through;">best</span> only choice. Now, I obviously want to be able to run it on Mono as well, if for no other reason than to run it myself. So I have to stay clear of .NET-only bits.</p>
<p>That means hello Windows Forms (WPF is out, Mono doesn&#8217;t support it). Now, I should say first off the bat that I&#8217;m not a gui coder. I don&#8217;t like gui, it takes too much work to produce a really good gui, and it&#8217;s way more hassle than I like to put up with. Nevertheless, I&#8217;ve seen a few of them. And Windows Forms&#8230; it&#8217;s something else. On the face of it, the .NET library seems to be stocked reasonably, with classes for gui controls (System.Windows.Forms) and for drawing primitives (System.Drawing).</p>
<p>But then you look at some example code and you have to pinch yourself cause it&#8217;s so unbelievable. I should preempt here by saying that all the gui toolkits I have seen in recent history handle layouting the same way: with layouts. You create a container that is, say, a grid, and put some widgets in it. The layout takes care of distributing the widgets in the container in a particular way. This takes care of resizing, because the widgets scale to the size of the container (and the containers, in turn, to the size of the gui). Containers can be nested to produce panels and so on.</p>
<p>Far be it for me to say that I like coding gui this way. It&#8217;s a huge pain to set all this up. And it doesn&#8217;t make resizing work well either, you have to put in a lot of extra effort just for that part. But at least it&#8217;s a reasonably clean solution, and it&#8217;s how Swing, WxWidgets, and I&#8217;m pretty sure Gtk and Qt as well, work.</p>
<p>Not Windows Forms. In Windows Forms you have containers, but there are no layouts. Everything is positioned with coordinates. As in <em>here is a button, put it 5 pixels from the edge of the container; here&#8217;s another button, put it in this location I have computed manually based on the first button</em>. This has implications:</p>
<ul>
<li>positioning is pixel based,</li>
<li>dimensioning is absolute &#8211; no resizing possible,</li>
<li>there is no rendering.</li>
</ul>
<p>As it turns out, the gui form is basically a canvas you can paint on. Widgets and drawing mix freely on the same pane. But remember that Drawing api I mention? It&#8217;s pixel based, no Qt or Cairo rendering for shapes or fonts. Neither does .NET have any kind of svg-based rendering that I know of.</p>
<p>The whole thing makes me feel like a time traveler. Remember that Windows Forms isn&#8217;t a deprecated library, it&#8217;s still actively used (and Mono just recently got done implementing it).</p>
<p>So why bring this up? It&#8217;s good to remember sometimes that just because something is hyped a lot doesn&#8217;t make it good. Remember, .NET 3 only appeared recently, in 2006. That makes Windows Forms the designated gui toolkit right up to that point. Swing, ugly as it may be to look at (and sluggish as it&#8217;s always been) came out with Java 1.2 in 1998. (As a matter of fact, I think even AWT had layout managers in 1995.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2009/01/09/hello-.net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>linux audio confusing as ever</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2008/12/19/linux-audio-confusing-as-ever/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2008/12/19/linux-audio-confusing-as-ever/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 14:26:56 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/?p=1777</guid>
		<description><![CDATA[Audio in linux, how to put it into words? How about: oss, alsa, pulseaudio, esound, arts, portaudio, jack, gstreamer, phonon.   Did I miss any? Embarrassment of riches? Or just embarrassment?
I will not rehash history any more than to say that between buggy/incomplete drivers for sound cards and the wonderful world of alsa I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Audio in linux, how to put it into words? How about: oss, alsa, pulseaudio, esound, arts, portaudio, jack, gstreamer, phonon. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/googly.png' alt=':googly:' class='wp-smiley' />  Did I miss any? Embarrassment of riches? Or just embarrassment?</p>
<p>I will not rehash history any more than to say that between buggy/incomplete drivers for sound cards and the wonderful world of alsa I&#8217;ve never been able to understand how the hell audio works beyond getting output and, sporadically, input. I am the quintessential dumb user of linux audio, even though I have tried to figure it out.</p>
<p>But let past be past. Ubuntu 8.10 Intrepid. Pulseaudio ready and everything, since 8.04. Why Ubuntu decided to plug in pulseaudio without setting up any gui controls for it is beyond me. All I know is that occasionally sound output will stop working (I get 2 seconds of output and then it stops) and then &#8220;pkill pulse&#8221; cures it.</p>
<p>Let&#8217;s run through the list.</p>
<h3>alsamixer</h3>
<p>I&#8217;ve learned to use alsamixer to fix low level audio problems. It is reliable in that it gives me all the channels on my sound card, so I always use it to mute/unmute my microphone and to untangle the master/pcm/headphones/front speakers settings caused by mixers that only allow me to control the volume of one channel and apps that output on god knows what channel.</p>
<p><img class="alignnone size-full wp-image-1782" title="linuxaudio_alsamixer_ok" src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/linuxaudio_alsamixer_ok.png" alt="" width="467" height="382" /></p>
<p>That&#8217;s alsamixer on a Ubuntu 8.10 desktop with all updates installed as per today. Here&#8217;s the same thing on my laptop.</p>
<p><img class="alignnone size-full wp-image-1784" title="linuxaudio_alsamixer_pulsed" src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/linuxaudio_alsamixer_pulsed.png" alt="" width="460" height="384" /></p>
<p>Same distro, same version, all updates installed. And I have made no conscious choice for this to come about, all I did was install the pulsaudio gui tools. All of a sudden, alsamixer is useless as it only has access to a single &#8220;master&#8221; channel. It would appear now that pulseaudio is sitting between the sound card and alsa, but does that sound right?</p>
<h3>pulseaudio gui</h3>
<p>pulseaudio is here, might as well use it, right? Ubuntu ships a bunch of pa* packages that are gui tools for pulseaudio (not installed by default). This one is called pavucontrol. It lets you set volume per audio stream. I love this, I&#8217;ve wanted to have it since forever.</p>
<p><img class="alignnone size-full wp-image-1787" title="linuxaudio_pavucontrol_playback" src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/linuxaudio_pavucontrol_playback.png" alt="" width="428" height="346" /></p>
<p>But then it comes to output and what do I see?</p>
<p><img class="alignnone size-full wp-image-1789" title="linuxaudio_pavucontrol_output" src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/linuxaudio_pavucontrol_output.png" alt="" width="428" height="346" /></p>
<p>A single output device. Where is my master, my pcm, all my channels? What&#8217;s more bizzarre is that pulseaudio says it&#8217;s connecting to alsa while alsamixer says it&#8217;s connecting to pulsaudio. Surely that way madness lies?</p>
<p>What&#8217;s worse, pavucontrol is a gui app without any kind of systray integration, so much as I would like to use it as an easy-to-reach mixer, I can&#8217;t.</p>
<h3>kmix</h3>
<p>I run kmix in my tray, it lets me set the volume by scrolling the mousewheel over the icon, which is exactly what I want. It&#8217;s not a terribly impressive mixer, as it only lets me select one channel to control, whereas what I really would like is to be able to lock several output channels into one, otherwise I&#8217;m never really in control. So the best I can do is set the volume to max on master, and tell kmix to show me pcm. That seems to work well enough.</p>
<p><img class="alignnone size-full wp-image-1793" title="linuxaudio_kmix" src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/linuxaudio_kmix.png" alt="" width="241" height="282" /></p>
<p>It appears I have two identical channels, but the leftmost is misnamed, that&#8217;s actually Master.</p>
<p>Now, let&#8217;s see. alsamixer doesn&#8217;t show any of these channels, because it delegates to pulseaudio. So kmix connects to&#8230; god knows what, but at least I <em>can</em> access these channels.</p>
<h3>gnome-volume-control</h3>
<p>Gnome&#8217;s volume manager is an interesting one. It has a combo box for devices. I&#8217;m showing here all the devices related to output and how channels are connected.</p>
<p><img class="alignnone size-full wp-image-1794" title="linuxaudio_gnomevolumecontrol" src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/linuxaudio_gnomevolumecontrol.png" alt="" width="442" height="830" /></p>
<p>The good news is that the channels in the default mixer correspond to those in kmix (sweet sanity!). But then there is that bottom mixer with a channel of the same name as the single output channel in pavucontrol. And yes, they are the same (and the same as the single output in alsamixer).</p>
<p>But this channel appears to be some kind of composite output channel that has no bearing on any of the output channels in the top mixer (or in kmix). (Ie. while it might appear to be a composite pipe that aggregates the flow of all these standard channels, it&#8217;s actually a pipe that sits after all of them. If pcm volume is 0, this channel won&#8217;t receive any input, and will be mute no matter its volume setting.)</p>
<p>So neither can I effect the settings of master/pcm/etc with this channel nor vice versa. That means if I want to use this single channel as my master volume control, I have to make sure that absolutely no application can mess with the volume for any of the standard master/pcm/etc channels. Good luck with that.</p>
<h3>A sane spec</h3>
<p>I know this sounds crazy, but what&#8217;s it gonna take to get a <strong>single</strong> server+mixer applet that</p>
<ul>
<li>captures <strong>every</strong> possible audio stream, no matter the audio server/api it&#8217;s on,</li>
<li>prevents applications from messing with master volume controls (eg. mplayer),</li>
<li>has a single virtual channel controlling <em>all</em> the underlying output channels, so that I can have a single master volume slider,</li>
<li>has per stream/app volume controls pulseaudio style,</li>
<li>integrates well into the systray,</li>
<li>integrates with laptop hotkeys</li>
</ul>
<p>?</p>
<p>UPDATE: Ubuntu users can now vote on a proposal to unify sound systems on <a href="http://brainstorm.ubuntu.com/idea/14682/">ubuntu brainstorm</a>. Hopefully this idea and the related ones can gain some traction with Canonical to attack the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2008/12/19/linux-audio-confusing-as-ever/feed/</wfw:commentRss>
		<slash:comments>112</slash:comments>
		</item>
		<item>
		<title>OpenID deserves to die</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2008/05/27/openid-deserves-to-die/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2008/05/27/openid-deserves-to-die/#comments</comments>
		<pubDate>Tue, 27 May 2008 16:15:22 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/?p=1033</guid>
		<description><![CDATA[Here&#8217;s my perspective on it. We all have ideas, some good and some bad. Now it&#8217;s understandable that people who have invested themselves into a bad idea, especially if they thought it was good, are reluctant to walk away from it. It&#8217;s painful to have to realize that. But the flip side is that we [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s my perspective on it. We all have ideas, some good and some bad. Now it&#8217;s understandable that people who have invested themselves into a bad idea, especially if they thought it was good, are reluctant to walk away from it. It&#8217;s painful to have to realize that. But the flip side is that we have to maintain the myth of Santa Claus because, well, so many kids believe in him that we can&#8217;t let them down. Bad ideas deserve to die for the good of everyone.</p>
<p>The first thing a good idea must have is a real problem to solve. OpenID does very well here. The point of OpenID is to solve our common problem of the internet age: many websites, many accounts, many usernames and passwords. This is probably why OpenID still appears to some people as being a good idea.</p>
<p>Here&#8217;s how they do it. Instead of keeping track of your accounts on all the sites you&#8217;re a member of, just let one site keep all your account records (sound ominous yet? it did to me). Now, whenever you want to login to one of your sites, instead of using your username/password for that site, you use your OpenID login, which looks like this: <strong>http://username.myid.net</strong>. This url is effectively your OpenID <em>provider</em>, ie. the site you use to keep track of all your accounts. So now the site you&#8217;re logging into sends you to your provider, where you login with a username/password belonging to the account on the provider site, and that logs you into the site you were visiting. So in other words, your account on the provider is the gatekeeper to all your accounts. Sounds simple, right?</p>
<p>I remember when I first heard about this idea years ago. The first concern I had was that in order for this to work, I need a <em>provider</em> to keep track of all my accounts. So I asked myself the question: whom do I trust do this for me? The answer came back: myself. I don&#8217;t know about you, but the idea of some third party storing all my logins doesn&#8217;t make me feel warmy and cuddly. As it happens, the <em>open</em> in OpenID means you can choose any provider you want, including yourself. You just set up some php scritps and voila, you can use <em>http://mysite.com</em> as your provider. So basically, instead of storing your accounts in some &#8220;account manager&#8221; program on your computer, you do the same thing on your server. This is where the concept of OpenID died for me. I don&#8217;t want to have to depend on my own OpenID provider to work in order to use other sites. I don&#8217;t want to add a dependency on my ability to login to some other site contingent on the assumption that my own site is available and working properly at all times (which it isn&#8217;t, I have a little downtime like everyone else).</p>
<p>If you don&#8217;t want the hassle of being your own provider, you can pick a provider from a list. This is not an attractive fallback option, because now your account on the provider is your key to all your other accounts. If I have an account on some site and I forget my credentials, big deal, I only lose that one account. But if I lose my credentials on the provider, I lose everything.</p>
<p>In theory, OpenID tries to improve your overall security. The hassle of keeping track of accounts is known to us all, and we get around the problem by reusing the same (or similar) credentials on a lot of sites. This is obviously bad for security, because if someone gets your password to one site, they can access all your other accounts that use this password. So security people will always recommend that you use distinct credentials for every account. Suppose you do this, and you use OpenID to alleviate record keeping. Now, OpenID actually works against you. Your account on the OpenID provider is the key to everything. With a different password on every site, you&#8217;re that much less likely to remember what it was, therefore your account on the provider is proportionally more valuable.</p>
<p>There is a strange irony at play here. Supposedly, the more accounts you manage with OpenID the more useful it is. But on the other hand, the more accounts you manage with it, the more you depend on it, and the more you make it the one gateway to all your online identities for a potential attacker or for abuse by a dishonest or incompetent provider.</p>
<p>Most importantly, however, OpenID&#8217;s solution to the login problem isn&#8217;t a very clever solution at all. Typing <strong>http://username.myid.net</strong> is not a big improvement over a username/password form. My browser already gives me the option to login without typing anything.</p>
<p>Those are my reasons why OpenID is a bad idea and should have died years ago. If you want more, Stefan Brands has an exhaustive <a href="http://idcorner.org/2007/08/22/the-problems-with-openid/">laundry list</a> of problems with OpenID.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2008/05/27/openid-deserves-to-die/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>clocking jruby1.1</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2008/04/21/clocking-jruby11/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2008/04/21/clocking-jruby11/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 18:50:35 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/?p=966</guid>
		<description><![CDATA[Did you hear the exciting news? JRuby 1.1 is out! For real, you can call your grandma with the great news.   Wow, that was quick.
Okay, so the big new thing in JRuby is a bytecode compiler. As you may know, up to 1.0 it was just a Ruby interpreter in Java. Now you [...]]]></description>
			<content:encoded><![CDATA[<p>Did you hear the exciting news? JRuby 1.1 is out! For real, you can call your grandma with the great news. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/party.png' alt=':party:' class='wp-smiley' />  Wow, that was quick.</p>
<p>Okay, so the big new thing in JRuby is a bytecode compiler. As you may know, up to 1.0 it was just a Ruby interpreter in Java. Now you can actually compile Ruby modules to Java classes and no one will know the difference, very devious. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/cool.png' alt=':cool:' class='wp-smiley' />  Sounds like Robin Hood in a way, doesn&#8217;t it?</p>
<p>The JRuby guys are claiming that this makes JRuby on par with &#8220;regular Ruby&#8221; on performance, if not better. Hmm. Just to be on the safe side, what size shoes do you wear? Oh ouch, those are going to be tricky to fit in your mouth. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/lala.png' alt=':/' class='wp-smiley' />  And Freud will say you&#8217;re stuck in the oral stage. Too much? Okay.</p>
<p>So here is my completely unvetted, dirty, real world test. No laboratory conditions here, you&#8217;re in the ghetto. First we need something *to* test. I don&#8217;t have a great deal of Ruby code at my disposal, but this should do the trick. How does <a href="http://www.matusiak.eu/numerodix/blog/index.php/2007/08/16/desktop-hackery-with-grep/">scanning the raw filesystem for urls</a> sound? The old harvest script actually does a half decent job of turning up a bunch of findings.</p>
<p>Now introducing the contenders. First up, his name is JRuby, you know him from occasional mentions on obscure blogs and the <a href="http://reddit.com/r/programming/">programming reddit</a> past the top 500 entries. He promises to free all Java slaves by giving away free Rubies to everyone!</p>
<p>Aaand the incumbent, the famous&#8230; Ruby! You know him, your parents know him, every family would adopt him as their own child if they could. He&#8217;s the destroyer of kingdoms and the creator of empires, he&#8217;s bigger than Moses himself!</p>
<p>Our two drivers will be racing across a hostile territory. Your track is a 25gb ext3 live file system. During this time, I can promise you that only Firefox is likely to be writing new urls to disk, but I could be lying eheheh. Due to the unpredictable nature of this rally track, regulations allow only one racer at a time, but you will be clocked.</p>
<p>First up is the new kid on the block Jay&#8230;.Ruby. The Ruby code will not be compiled before execution, we&#8217;ll let the just-in-time compiler do its thing.</p>
<blockquote><p>$ time ( sudo cat /dev/sda5 | bin/jruby harvest.rb &#8211;url &gt; /tmp/fsurls.jruby )<br />
real    39m26.547s<br />
user    37m19.072s<br />
sys     1m28.406s</p></blockquote>
<p>Not too shabby for a first run, but since this a brand new venue, we have no frame of reference yet. Let&#8217;s see how Ruby will do here.</p>
<blockquote><p>$ time ( sudo cat /dev/sda5 | harvest.rb &#8211;url &gt; /tmp/fsurls.ruby )<br />
real    78m42.186s<br />
user    62m12.537s<br />
sys     2m18.721s</p></blockquote>
<p>Well, look at that! The new kid is pretty slick, isn&#8217;t he? Sure is giving the old man a run for his money. Let&#8217;s see how they answered the questions.</p>
<blockquote><p>$ lh<br />
-rw-r&#8211;r&#8211; 1 alex alex  86M 2008-04-21 18:29 fsurls.jruby<br />
-rw-r&#8211;r&#8211; 1 alex alex 8.6G 2008-04-21 20:58 fsurls.ruby</p></blockquote>
<p>Yowza! No less than a hundred times more matches with Ruby. What is going on here? Did Jay just race to the finish line, dropping the vast majority of his parcels? Or did father Ruby see double and triple and quadruple, ending up with lots and lots of duplicates? Well, we don&#8217;t really *know* how many urls exist in those 25gb of data, but it seems a little bit suspect that there would be in excess of 8gb of them.</p>
<p>One way or the other, it&#8217;s pretty clear that the regular expression semantics are not <em>entirely</em> identical. In fact, you might be sweating a little right now if your code uses them heavily.</p>
<p><strong>UPDATE:</strong> Squashing duplicates in both files actually produces two files of very similar size (13mb), in which the disparity of unique entries is only a very reasonable 4% (considering the file system was being written to in the process). The question still remains how did Ruby produce 8gb of output.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2008/04/21/clocking-jruby11/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>evolving towards git</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2007/12/05/evolving-towards-git/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2007/12/05/evolving-towards-git/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 23:50:39 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2007/12/05/evolving-towards-git/</guid>
		<description><![CDATA[I remember the first time I heard about version management. It was a bit like discovering that there is water. The idea that something so basic could actually not exist seemed altogether astounding afterwards. This was at a time when I hadn&#8217;t done a lot of coding yet, so I hadn&#8217;t suffered the pains of [...]]]></description>
			<content:encoded><![CDATA[<p>I remember the first time I heard about version management. It was a bit like discovering that there is water. The idea that something so basic could actually not exist seemed altogether astounding afterwards. This was at a time when I hadn&#8217;t done a lot of coding yet, so I hadn&#8217;t suffered the pains of sharing code *that* much, but it was already relatable enough to understand the implications of version management. Emailing those zip files of code had been plenty annoying.</p>
<p>This happened just before we embarked upon a 6-month journey in college to write an inventory management application in java. There were four of us. We had done java before, but this was the first &#8220;big&#8221; application that also employed our newly acquired knowledge about databases. God only knows why, but they actually ran (and probably still do) an Oracle server at school for these projects. I don&#8217;t know how much an academic license runs on that, but it&#8217;s in the thousands of dollars no doubt. As the initiative taker of my group, I persuaded (not that it took much effort) the guys to forget about the Oracle server (which didn&#8217;t come with any developer tools, just the awful command line interface) and use PostgreSQL (we rejected MySQL just to be on the safe side, as it lacked support for a bunch of things like views and foreign keys). I also introduced another deviation from the standard practice: <a href="http://en.wikipedia.org/wiki/Concurrent_Versions_System">CVS</a>. I would be running both off of my tried and tested Pentium home server. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/proud.png' alt=':proud:' class='wp-smiley' />  We were the only group that used version management, which baffled me (why was it not offered as a service at the department?). I heard that the year after that they started offering CVS for projects. Incidentally, when you deviate off the path, you do expect to get some academic credit for the extra effort, obviously. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/wink.png' alt=';)' class='wp-smiley' /> </p>
<p>So that was 6 months with CVS, and it worked quite well. We didn&#8217;t do anything complicated with it, didn&#8217;t know about tags or branches, just ran a linear development on it and that was it. And it was helpful (but not efficient) to track binary files (Word documents, bleh). But it had some annoying quirks. Not that we were all that concerned with tracking history back then, it was just about getting it finished and then obviously it would never be used, as school projects go. But the lack of renaming and moving in CVS was silly.</p>
<p>It&#8217;s a bit funny, actually. CVS has been a standard for the longest time, and people have put up with its problems, until recently when a version management boom began. Why is that? I have a hunch that the relative calm in version management was kept intact by a predominantly corporate culture (and the corporates are obviously super conservative). But then once a certain number of people had gotten themselves into open source projects the need for better tools put this in motion. One of the first &#8220;new generation&#8221; systems was <a href="http://en.wikipedia.org/wiki/Subversion_%28software%29">Subversion</a>, the replacement for CVS. Subversion was adopted slowly, but quite steadily. Currently it&#8217;s probably the &#8220;standard&#8221; for version management. I registered <a href="http://galleryforge.berlios.de/">galleryforge</a> with <a href="http://developer.berlios.de/">Berlios</a> precisely because they offered svn services. <a href="http://sourceforge.net/">Sourceforge</a> also has it now, and people around the net have started talking in terms of svn a lot. My current school also uses it.</p>
<p>But with the momentum of version management systems in play, a lot of other ideas have surfaced besides those captured in Subversion. <a href="http://en.wikipedia.org/wiki/GNU_arch">Arch</a> and <a href="http://en.wikipedia.org/wiki/Darcs">Darcs</a> are two that employ the distributed paradigm. I don&#8217;t think they have had much success though, and perhaps looking back they will have played the role of stepping stones rather than end products. A new (a third, if you will) generation of systems has appeared quite recently. <a href="http://en.wikipedia.org/wiki/Monotone_%28software%29">Monotone</a> is a newer system with its own network synchronization protocol. <a href="http://en.wikipedia.org/wiki/Mercurial_%28software%29">Mercurial</a> seems to have enough support to replace Subversion/CVS down the line (not that it couldn&#8217;t happen today, but people hate giving up something they&#8217;re used to, so these things drag out). And there is <a href="http://en.wikipedia.org/wiki/Bazaar_software">Bazaar</a>, which seems to discard the goal of being the best system and just aim to be easy and pleasant for small projects.</p>
<p>And somewhere in that mix we find <a href="http://en.wikipedia.org/wiki/Git_%28software%29">Git</a>, except that it has a much higher potential for success than other new systems, because it was launched into the biggest (or noisiest, at least) open source project and made to carry the heaviest loads right from the beginning, which is a good way to convince people that your product is robust. As such, it seems to me that git has had the quickest adoption of any system. It was launched in 2005 and it has already become one of the household names around the interwebs. So therefore I thought git is worth looking at. At this rate I may very well be using it on a project someday.</p>
<p>I was also encouraged by regular people saying it worked for them. A version management system for kernel developers is nice, but that doesn&#8217;t necessarily make it right for everyone else. But here were people with one-man projects liking it, good sign. In fact, one of the things I used to read about git was &#8220;I like the simplicity&#8221;.</p>
<p>What I discovered was that <a href="http://dictionary.reference.com/">my dictionary</a> was out of date, because it didn&#8217;t carry that particular meaning of the word &#8220;simple&#8221;. Git is not simple, it takes getting used to. It&#8217;s one of those things you try and you don&#8217;t understand, then you come back and try again and you make a little more progress and so on. I decided to open a <a href="http://repo.or.cz/w/undvd.git">git repo</a> for <a href="http://www.matusiak.eu/numerodix/code.php">undvd</a>, both because I need to track the changes and so I can use git and get a feel for it.</p>
<p>The special thing about git is that it has well developed capabilities for interoperating with other systems. In other words, git doesn&#8217;t assume it will wipe out everything else, it accepts the reality that some people will continue using whatever it is they&#8217;re using (even CVS) and git can deal with that. Obviously, predicting the future is tricky, but I get the feeling that Subversion has hit that comfort spot where most people are satisfied with what it&#8217;s doing and they really would need a lot of persuasion to learn something new. In other words, I expect Subversion to be around for quite a while. And therefore, git&#8217;s svn tools may come in very handy. I haven&#8217;t really looked at that part yet, but it&#8217;s on my todo list.</p>
<p>So what is the future? I would say Subversion, Git, and maybe Mercurial. Version management systems are like programming languages &#8211; the more of them you use the easier it is to learn a new one. But switching is hard. When I&#8217;m thinking of checking something in version management I still begin typing <em>svn st..</em> before I realize I&#8217;m using git.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2007/12/05/evolving-towards-git/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>what can you do with django?</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2007/12/02/what-can-you-do-with-django/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2007/12/02/what-can-you-do-with-django/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 20:40:11 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2007/12/02/what-can-you-do-with-django/</guid>
		<description><![CDATA[So I&#8217;m reading about Django, which is a really groovy web framework for Python. As the Django people themselves say, there have been *a lot* of web frameworks for Python alone, and it&#8217;s clear that a lot of lessons have been learned along the way. Personally I&#8217;ve only looked briefly at Zope before, but I [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m reading about <a href="http://www.djangoproject.com/">Django</a>, which is a really groovy web framework for Python. As the Django people themselves say, there have been *a lot* of web frameworks for Python alone, and it&#8217;s clear that a lot of lessons have been learned along the way. Personally I&#8217;ve only looked briefly at <a href="http://www.zope.org/">Zope</a> before, but I was a bit intimidated by how complicated it seemed to be. I also once inherited <a href="http://grid-portal.sourceforge.net/">a project</a> that used <a href="http://www.webwareforpython.org/">Webware for Python</a>, which was pretty nice to work with, but radically different from what I&#8217;d known because pages are constructed using a sort of abstract html notation (basically every html tag is a function etc).</p>
<p>There is a lot to like about Django. The MVC pattern is executed quite elegantly (or as they call it in Djangoland, the MTV (model &#8211; template &#8211; view) pattern). Templates are written in what resembles a server side language, but it&#8217;s actually a specialized, both restricted and enhanced, Python-like templating language. Templates can inherit from each other to fill in placeholders in a cascading manner, very interesting design choice.</p>
<p>Then there is a nice separation between objects and persistence. Data is declared in terms of Python classes (called &#8220;the model&#8221;) which are then translated somehow on-the-fly to sql-du-jour depending on your database backend. You can even run a Python shell to interact with your model to de facto edit your database.</p>
<p>The model and the template mechanism are both tied together with &#8220;views&#8221;, which is the application code you write for your webapp. A cool thing here is that urls are decoupled from execution code, and the two things are mapped via regular expressions, so you have something like a <code>mod_rewrite</code> declaration (but nicer) that dispatches to functions.</p>
<p>All the same, if I were to work with Django I have a couple of concerns up front:</p>
<ol>
<li>Templates are written in html with inline Python-line expressions. This makes them both simple and transparent, because the html code that will be served is written by hand. However, considering the present situation with html and browser support, it would be nice if Django could enforce/validate html. But this would probably imply an abstraction over html (to prevent raw html being written) and a layer of code generation for html (which may or may not be easy/possible to cache efficiently).</li>
<li>And that brings me to the second point. I have seen no mention of CSS anywhere. It appears that Django leaves the fairly heavy burden of supplying styles to the designer, without any intelligent mechanisms to help.</li>
<li>Data models are represented in Python code, which is very convenient and provides a much sought after quick access to the contents of your database. Django will instantiate tables for you based on a model, but only for creation. It doesn&#8217;t seem to enforce or update the correspondence between the Python model and the database schema. The <a href="http://www.djangobook.com/">Django book</a> has a mention of strategies for keeping things in check, but this particular section is missing.</li>
</ol>
<p>There is no doubt Django embodies a lot of what we&#8217;ve learnt about building web applications, but currently I would say it seems a bit incomplete (also pre v1.0 still), if terribly elegant in some parts.</p>
<p>Another question concerns performance. <a href="http://www.rubyonrails.org/">Ruby on Rails</a> has been known to suffer when pitted against the effective but ugly php. Does Django fall in the same bracket or does it have a lower overhead? In general Python is an older and more refined environment, so one might expect Django to scale better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2007/12/02/what-can-you-do-with-django/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>latex sucks! (for presentations)</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2007/11/28/latex-sucks/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2007/11/28/latex-sucks/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 00:20:47 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2007/11/28/latex-sucks/</guid>
		<description><![CDATA[Hold your fire.
Got your attention there, didn&#8217;t I?  
Latex is good at what it was built to do &#8211; markup big documents. Fine for writing reports, articles, books. The problem is that we have no other tools nearly as good, so we end up using latex for things it wasn&#8217;t meant for. Like presentation [...]]]></description>
			<content:encoded><![CDATA[<p>Hold your fire.</p>
<p>Got your attention there, didn&#8217;t I? <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/biggrin.png' alt=':D' class='wp-smiley' /> </p>
<p>Latex is good at what it was built to do &#8211; markup big documents. Fine for writing reports, articles, books. The problem is that we have no other tools nearly as good, so we end up using latex for things it wasn&#8217;t meant for. Like presentation slides.</p>
<p>Why is this? Well, let&#8217;s see. There&#8217;s Powerpoint. It&#8217;s a toy. It&#8217;s one step up from drawing each slide separately in <a href="http://en.wikipedia.org/wiki/Ms_Paint">Paint</a>: it has no structure, it makes you duplicate all common elements, no indexing, no outline. What does it offer you? Oh yeah, a spell checker. It sucks. Then there&#8217;s latex. You reuse everything you already know about it, it has a ton of helpful packages, and with <a href="http://latex-beamer.sourceforge.net/">beamer</a> you can actually write slides without hurting too much. Except.. it&#8217;s still latex.</p>
<p>Here is the problem. Presentation slides are not the same as prose. Everything latex is good at has to do with handling text. Everything presentations are supposed to be is not centered on text. Giving a presentation is just as much about showing as it is about telling. And you&#8217;re already telling when you&#8217;re talking, so you should compose your slides so that you can show people what you mean.</p>
<p>We have horrid tool support for writing presentations.<strong> No wonder almost every talk you see is frame after frame of bullet points that no one will remember anyway.</strong> People actually paste parts of their text from articles into slides, as if that is supposed to produce a good visual device! <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/googly.png' alt=':googly:' class='wp-smiley' /> </p>
<p>I have given 8 presentations in the last 12 months, and I&#8217;m set to do 4 more by the end of the year. Almost all of them written in latex with beamer. And you know what? I didn&#8217;t enjoy myself. On the surface it looks promising. The beamer class has a ton of features, you use regular latex, and you output a pdf. But when you get down to the details&#8230;</p>
<p>The ratio of illustrations, diagrams, source code and other example materials is much higher than it is in prose. It&#8217;s supposed to be that way. This is what latex is awkward at. Presentations are visual, so the first thing people think about is the slide design. Well guess what, if you have the perfect design already, good for you, but if don&#8217;t, you&#8217;re stuck editing latex styles, which no one understands. Strike one.</p>
<p>Then there is importing images into your slides. Raster images work fairly well, but obviously you have the resize problem &#8211; a raster image displayed at a non-native resolution will look jagged. You don&#8217;t want that. So you hack up a vector image in something like <a href="http://www.gnome.org/projects/dia/">dia</a>. But you can&#8217;t use that directly in latex, you have to convert it to either eps or pdf. I have found the latter least painful of late. So now not only do you have to know latex and dia, you have to author Makefiles to get a sane build process out of this. That is if you can remember to include just the right latex packages in your document, make sure they are installed both locally and any other place you may want to do a last minute recompile. Strike two.</p>
<p>Speaking of Makefiles, everyone knows you have to recompile a latex document to see the changes you&#8217;ve made. But with presentations these changes are much more often concerned with layout than they are with content. And it&#8217;s a huge pain to recompile again and again to debug something as simple as a two column layout (use <code>\minipage</code> and set the width in absolute units just right so they fit next to each other). So now I have a compile loop running every second that invokes make and I see the updates in kpdf. All because I want to tweak the layout of my content. Speaking of compiling, have you seen those latex error messages lately? They&#8217;re not meant for humans. And as far as languages go, latex isn&#8217;t exactly the most&#8230; robust of them all. Make one tiny mistake here and your compile detonates. Strike three.</p>
<p>It is a pain. It is a pain to have to recheck old documents to remind myself of how I included a piece of source code. Or how I handled a particular image. Latex is extremely hackish. It makes it friggin&#8217; hard to generalize anything so that it becomes reusable. I find myself copy pasting code all the time from one document to another. There is nothing sensible about how things are done, it&#8217;s just a matter of writing something that works, and having a copy of it somewhere. The more presentations I write the more difficult to remember which trick I used where. An unmaintainable mess.</p>
<p>And then there&#8217;s time pressure. When you&#8217;re writing a technical document, you have the time to work out the little quirks you will encounter. It&#8217;s a permanent document, it will continue to exist for years after the fact, it&#8217;s worth the effort. But presentation slides are not. You just want to write them fairly quick so that you can give the talk and move on. You&#8217;re not going to be investing time in this, it&#8217;s a one time thing. And yet writing slides requires a lot more patience with latex than writing prose does.</p>
<p>Nevermind that, writing slides is a creative process. It is not filling in predefined sections of a document, like an article for a conference is. You want to be able to experiment, to try things just for the hell of it. Latex is horrid for this. Let&#8217;s see if I can fit this figure next to the text here. Okay, let me first look up how I do that. How do you actually find this out? I already <a href="http://www.matusiak.eu/numerodix/blog/index.php/2007/05/12/latex-adding-pagebreaks-at-sections/">covered that</a> earlier. Then try it, debug the layout, finally I can see if I got what I wanted. No, that didn&#8217;t work out, let&#8217;s switch it back to the way it was. Compile error. Goddamn it, now what? Okay, let me gradually undo to a state that does compile and that way I can figure out what&#8217;s causing it.</p>
<p>Not. how. it. was. meant. to. be. done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2007/11/28/latex-sucks/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>KVM: the state of the game</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2007/11/16/kvm-the-state-of-the-game/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2007/11/16/kvm-the-state-of-the-game/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 00:21:41 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2007/11/16/kvm-the-state-of-the-game/</guid>
		<description><![CDATA[KVM is one of those things I&#8217;ve kept an eye open for ever since I heard about it. First of all, I should mention that there is currently a great deal happening on the virtualization front, here&#8217;s a list of virtual machines to look over. What is more, it is not so much a wealth [...]]]></description>
			<content:encoded><![CDATA[<p>KVM is one of those things I&#8217;ve kept an eye open for ever since I heard about it. First of all, I should mention that there is currently a great deal happening on the virtualization front, here&#8217;s a list of <a href="http://en.wikipedia.org/wiki/Comparison_of_virtual_machines">virtual machines</a> to look over. What is more, it is not so much a wealth of competing products, because it seems that everyone has their own little twist on the matter, and none of these are completely equivalent solutions. There is a host of different terms to describe these techniques to boot.</p>
<p>I&#8217;ve known about <a href="http://en.wikipedia.org/wiki/Vmware">VMware</a> for 5-6 years, and that is how I originally started out playing around with linux in a safe and easy environment. Since then there have been many linux centric projects that have made waves at some time or another, not all of which I&#8217;ve tried. I think <a href="http://user-mode-linux.sourceforge.net/">User Mode Linux</a> was the first one I heard about. It ran a modified host kernel and could host multiple guest machines that would also be running a modified kernel. You could use it to host Virtual Private Servers, which has been common now for a while, but wasn&#8217;t all that common back then. You could also set up honeypots with them. There was also a VMware competitor called <a href="http://en.wikipedia.org/wiki/Win4Lin">Win4Lin</a> (for Win9x) which was like a poor man&#8217;s VMware. It would run fairly well, but it was far from being equally polished and feature complete. It also had the advantage of being strictly an application, no kernel hooks. A couple of years later there was a new project that was very loud, namely <a href="http://en.wikipedia.org/wiki/Xen">Xen</a>. Xen is one of those odd projects that had a lot of potential and broad support, and yet didn&#8217;t quite have the kind of adoption one would expect. It was quite a complicated piece of code that required a lot of setting up and so on, but Fedora shipped it by default (I&#8217;m not sure if they still do) and it worked out of the box. Again it was a modified host kernel, but the guests could run completely unmodified. I&#8217;m not sure how recent this is, but nowadays Xen also runs various operating systems, although in some cases they need to be modified. Then there was <a href="http://en.wikipedia.org/wiki/Cooperative_Linux">CoLinux</a>, which approached the issue from the opposite side of the table: Linux as guest. I never got around to trying it as I never had to use Windows for long stretches of time, but a lot of people (those poor souls trapped on Windows) were very enthusiastic about it.</p>
<p>So what about <a href="http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine">KVM</a>? Well, KVM is interesting because of how &#8220;close to the metal&#8221; it is. Obviously, any kind of virtualization adds some overhead due to the unavoidable indirection. But KVM actually does not position itself above the kernel, as most virtual machines do, but uses kernel primitives to host guests (in fact it sets up a whole new kernel execution mode <em>guest</em> for this). It also uses cpu <a href="http://en.wikipedia.org/wiki/X86_virtualization">virtualization extensions</a> (current Intel and AMD chips) to gain speed. All of this is fairly recent stuff, KVM was merged into the kernel for 2.6.20. So, of course, the major advantage of KVM is that it&#8217;s well supported and well tested in kernel mainline.</p>
<p>However, KVM is not a virtual machine in itself, in the sense of being a complete application. It&#8217;s more like an access layer which exposes a <code>/dev/kvm</code> interface. The way to run KVM is through <a href="http://en.wikipedia.org/wiki/Qemu">QEMU</a>, which is actually an emulator. I haven&#8217;t mentioned emulators so far, but they are in a sense the second type of virtualizer/emulator software. The difference is that a virtualizer creates a virtual machines with virtual hardware (eg. network adapter) for the guest operating system to run on, but the cpu is still that of the host. An emulator instead emulated the guest cpu, and therefore has to translate every machine instruction into a different one. This means that you can run say a powerpc guest on an x86 host. It sounds very cool, but it&#8217;s orders of magnitude slower, so it&#8217;s not as much of a hot topic.</p>
<p>But back to KVM. As I said, the application is still QEMU, but it&#8217;s accelerated through KVM. I had been looking forward to taking it for a spin, especially now that I also have an Intel chip with the virtualizing extensions. On Ubuntu it&#8217;s all ready to go, just install the userland applications from the repo (<code>qemu</code> and <code>kvm</code>) and you&#8217;re set. Qemu is quite nice and simple to use, but the combo is temperamental and unforgiving. You can set up your guest machine in 2 minutes, but with Windows I had quite a number of fatal crashes (<code>Exception 13</code>) that aren&#8217;t that obvious to figure out. Furthermore, it seems that even linux distros aren&#8217;t trivial to run on KVM/QEMU. In terms of a complete machine virtualization it leaves something to be desired. Notably, the video flickers quite visibly while running on a vesa driver. That isn&#8217;t to say that other virtual machines cannot or will not use KVM as part of their solution.</p>
<p>But for the time being <a href="http://en.wikipedia.org/wiki/VirtualBox">VirtualBox</a> (something of a lightweight VMware, which is also free software) is more convenient.</p>
<p><em>Disclaimer: This entry is something of a historical account of my exposure to virtual machines. I did not do any fact checking here, and the statements only reflect what I recall about the particular products. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2007/11/16/kvm-the-state-of-the-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
