<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for salimma</title>
    <link>http://www.advogato.org/person/salimma/</link>
    <description>Advogato blog for salimma</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Fri, 25 Jul 2008 16:14:03 GMT</pubDate>
    <item>
      <pubDate>Tue, 15 Jul 2008 15:06:13 GMT</pubDate>
      <title>ABI breakage and package naming</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=33</link>
      <guid>http://hircus.wordpress.com/2008/07/15/abi-breakage-and-package-naming/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;br /&gt;&lt;p&gt;Daniel B&#xE9;ranger has &lt;a href="http://beranger.org/index.php?page=diary&amp;amp;2008/07/13/20/22/20-sun-fights-to-invalidate-the-fir" &gt;raised the ABI issue&lt;/a&gt; surrounding Fedora and RHEL&amp;#8217;s recent upgrade to Firefox 3. In short, RHEL 5.2 ships with Firefox updated to the new xulrunner-based Firefox 3, but its Eclipse and libswt3-gtk2 is still at 3.2, which depends on the old gtkmozembed interface.&lt;/p&gt;
&lt;p&gt;This seems like a good argument in favour of adopting Debian-style package naming, when it comes to libraries: append the ABI version to the (sub)package name containing libraries that are linked to from other packages. So the old Firefox 1.5 would have a libgtkmozembed18 subpackage, that can be shipped with RHEL 5.2 without shipping the rest of Firefox 1.5 (technically speaking, the ABI version is 1.8.x.y, as prior to XULRunner 1.9 the ABI is ever-changing, but packages already handle this by depending on the specific version and release number anyway)&lt;/p&gt;
&lt;p&gt;This is already done from time to time in the RHEL/Fedora world, in the form of compatibility packages, but making it the default would avoid this kind of breakage, where a package &lt;em&gt;/has/&lt;/em&gt; to be updated (due to upstream EOL) but parts of it are needed downstream.&lt;/p&gt;
&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hircus.wordpress.com/230/" /&gt; &lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hircus.wordpress.com/230/" /&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hircus.wordpress.com/230/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hircus.wordpress.com/230/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hircus.wordpress.com/230/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hircus.wordpress.com/230/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hircus.wordpress.com/230/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hircus.wordpress.com/230/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hircus.wordpress.com/230/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hircus.wordpress.com/230/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hircus.wordpress.com/230/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hircus.wordpress.com/230/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hircus.wordpress.com&amp;blog=561873&amp;post=230&amp;subd=hircus&amp;ref=&amp;feed=1" /&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 9 Jul 2008 05:06:19 GMT</pubDate>
      <title>Midori : NT/Vista :: NT : Win95</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=32</link>
      <guid>http://hircus.wordpress.com/2008/07/08/midori-ntvista-nt-win95/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;br /&gt;&lt;div&gt; Looks like Microsoft is preparing for their next great leap forward in OS design. Just as Windows NT&amp;#8217;s kernel is a clean room without any DOS baggage, Midori is based on the Singularity research kernel, that is written in .NET and utilizes a new compiler backend to output native code.&lt;/p&gt;
&lt;p&gt;This will be rather interesting to watch. The idea of writing an OS kernel in a strongly-typed language makes sense &amp;#8212; witness House and Singularity. The effort is not expected to be ready for years &amp;#8212; this is not Windows 7, and I&amp;#8217;d guess there will still be a traditional Windows 8, even if Midori is ready by then.&lt;/p&gt;
&lt;p&gt;Incidentally, the OSS community already has a strongly-typed virtual machine designed for efficient native code generation: LLVM. If one takes a Unix kernel (or, more practically, microkernel) and get it to compile using LLVM&amp;#8217;s C front-end, one then has the opportunity to gradually rewrite it one module at a time in any language with LLVM front-ends. In the time it will take for Midori to get ready, would there perhaps be an ML-like front-end to LLVM? &lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" style="font-family:arial;color:#333333;background:#ffffff;border:solid 4px #e5e5e5;width:100%;clear:left;margin:12px 0;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" class="CM_CTB_Content_Wrap" style="background-color:#ffffff;margin:0;padding:0;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" style="border-bottom:solid 1px #dcdcdc;white-space:nowrap;margin-bottom:8px;background-color:#eeeeee;background-image:url('http://clipmarks.com/images/source-bg.gif');background-repeat:repeat-x;height:24px;line-height:24px;vertical-align:middle;padding-bottom:4px;color:#666666;font-size:10px;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="http://clipmarks.com/clip-to-blog/" title="clipmarks' clip-to-blog" &gt;&lt;img src="http://content.clipmarks.com/blog_icon/43b16aa0-53c8-4dde-82be-1c92e6859880/58FBD3ED-011C-42EE-B540-AB69DD8E34C7/" alt="" width="19" height="19" border="0" style="vertical-align:middle;display:inline;border:none;float:none;margin:0 4px;" /&gt;&lt;/a&gt;clipped from &lt;a title="http://arstechnica.com/journals/microsoft.ars/2008/07/08/midori-a-non-windows-os-in-the-works-not-just-experimental?bub" href="http://arstechnica.com/journals/microsoft.ars/2008/07/08/midori-a-non-windows-os-in-the-works-not-just-experimental?bub" &gt;arstechnica.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" style="text-align:left;background:transparent;border:none;margin:4px 0 8px;padding:0 8px;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;!-- CLIPPED FROM: http://arstechnica.com/journals/microsoft.ars/2008/07/08/midori-a-non-windows-os-in-the-works-not-just-experimental?bub --&gt;&lt;P&gt;Every once in a while, an article gets posted somewhere in the blogosphere about how Microsoft needs to release a complete Windows rewrite, something along the lines of what Apple did with Mac OS X. Most people realize that Microsoft is in no position to pull a stunt like that at the moment; it&amp;#8217;s hard to see Microsoft phasing out support for a billion-Windows-PC-strong user base, but that day may one day come, perhaps thanks to robust virtualization technology.
&lt;/p&gt;
&lt;p&gt; &lt;P&gt;&lt;br /&gt;
But in the meantime, Microsoft has settled on rewriting bits and parts of the Windows operating system as it sees fit, with Vista being one of the biggest rewrites (a fact which partially explains the many hardware and software compatibility issues XP&amp;#8217;s successor experienced at launch). Speculation around a non-Windows operating system in the works at Microsoft has been present for years, but recent trustworthy tidbits of information have found their way into the hands of Microsoft ZDNet bloggers Mary Jo Foley and Ed Bott.&lt;br /&gt;
&lt;/P&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;div style="margin:0 6px 6px 4px;"&gt;
&lt;table style="font-size:11px;border-spacing:0;padding:0;" cellpadding="0" cellspacing="0" width="100%"&gt;
&lt;tr&gt;
&lt;td style="background:transparent;border-width:0;padding:0;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td align="right" style="background:transparent;width:107px;border-width:0;padding:0;" width="107"&gt;&lt;a href="http://clipmarks.com/share/58FBD3ED-011C-42EE-B540-AB69DD8E34C7/blog/" title="blog or email this clip" &gt;&lt;img src="http://content8.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0;margin:0;padding:0;" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hircus.wordpress.com/229/" /&gt; &lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hircus.wordpress.com/229/" /&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hircus.wordpress.com/229/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hircus.wordpress.com/229/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hircus.wordpress.com/229/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hircus.wordpress.com/229/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hircus.wordpress.com/229/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hircus.wordpress.com/229/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hircus.wordpress.com/229/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hircus.wordpress.com/229/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hircus.wordpress.com/229/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hircus.wordpress.com/229/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hircus.wordpress.com&amp;blog=561873&amp;post=229&amp;subd=hircus&amp;ref=&amp;feed=1" /&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 16 Jun 2008 04:07:21 GMT</pubDate>
      <title>Wide Finder: take 2</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=31</link>
      <guid>http://hircus.wordpress.com/2008/06/15/wide-finder-take-2/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;br /&gt;&lt;p&gt;Tim Bray&amp;#8217;s &lt;a href="http://www.tbray.org/ongoing/When/200x/2008/05/01/Wide-Finder-2" &gt;revised Wide Finder project&lt;/a&gt; [ongoing.org] has been ongoing for a few weeks now, and I&amp;#8217;ve finally took the time to design and prototype an implementation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;br /&gt;
The goal is to evaluate the performance of middle-of-the-road, not embarrassingly parralelizable tasks on modern-day multi-core hardware. Such as the Sun T2000 servers. Fittingly, the task is to parse a multi-gigabyte web server log file and compile some aggregate statistics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Design&lt;/strong&gt;&lt;br /&gt;
The solution I came up with for the earlier iteration of the contest, coded in different versions (C++, OCaml and JoCaml) is fundamentally sound, though rather unoptimized (picking up two-and-a-half different languages in one weekend is a good way to find out how much there is to know about, say, C++ stream buffering). With the benefit of hindsight, and given that we are several weeks into the project and there are &lt;a href="http://wikis.sun.com/display/WideFinder/Results" &gt;strong implementations already&lt;/a&gt; [wikis.sun.com], the idea is to find an unexplored niche.&lt;/p&gt;
&lt;p&gt;Short recap of the main implementations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OCaml: Fernandez is ahead of the pack again, the only solution in the 7 minutes&lt;/li&gt;
&lt;li&gt;make+C+awk+sh: Perl is dead, but shell scripting is enjoying a renaissance with parallelizable tasks. 8 minutes&lt;/li&gt;
&lt;li&gt;Java-based solutions: in the 13-17 minutes range are the various JVM solutions, from Java, Groovy and Scala to Fan, an interesting Ruby-like language for the JVM. Reminds me of .NET&amp;#8217;s Boo.
&lt;/li&gt;
&lt;li&gt;Python, Ruby: in the 20+ minutes range. Python multiprocessing is not that efficient yet; I believe an improved Stackless Python solution might be forthcoming&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I dabbled with a Common Lisp solution; it works and appears to be competitive, when tried on a partial log file. Exploring the available options for parallelism, however, revealed the disconcerting fact: no freely-available Common Lisp compilers have good multi-threading, or even multi-processing (without shared memory) on Solaris! Even worse, the SBCL incompatibility with GCC 4.3 means that even the Linux version on my Fedora machine is several months old, and does not have the threading library.&lt;/p&gt;
&lt;p&gt;So it&amp;#8217;s back to Java. Perusing the blogs of the Java and Scala programmers, it appears that the common complain is .. regular expressions. So the hunt was on for a good regular expression library. Joni, a port of the Ruby Oniguruma regex library to the JVM used by the JRuby project, appears ideal: low-level and supposedly very fast. Until one hits the total lack of documentation. So that&amp;#8217;s off the table. Ended up using &lt;a href="http://www.brics.dk/automaton/" &gt;dk.brics.automaton&lt;/a&gt;, which appears to perform well enough, even when parsing Unicode strings.&lt;/p&gt;
&lt;p&gt;The nice thing about using Java is that, if you hit a performance brick wall, chances are that many other people have been there before you. The problem I have, the need to have random access within a file (so different threads can start at different offsets (Java&amp;#8217;s RandomAccessFile is good for this) combined with the need for buffered I/O (BufferedReader is good, but there is no RandomAccessReader !) is solved by the nice folks at Biojava.com. Great!&lt;/p&gt;
&lt;p&gt;On my system (2 GHz Core 2, 2 GB RAM, 5400 rpm HDD, Fedora 9 x64), Ruby takes about 2.2 seconds, while my Java implementation running on OpenJDK 1.6 (64-bit) takes about 1.6-1.7 seconds with 1 thread and 1.4-1.5 seconds with 2 threads. Close to &lt;a href="http://grep.ro/blog/2008/05/wide_finder_going_parallel" &gt;the 1.2+ seconds time&lt;/a&gt; that Alex reported for Python, but hey, we&amp;#8217;re paying the Java start-up cost here.&lt;/p&gt;
&lt;p&gt;Will update when I get an account on the test server. 40GB dataset, here I come! In the meantime, time to look for opportunities to use a JVM-based language better suited for the task. The Java code is a tad bit verbose.&lt;/p&gt;
&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hircus.wordpress.com/226/" /&gt; &lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hircus.wordpress.com/226/" /&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hircus.wordpress.com/226/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hircus.wordpress.com/226/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hircus.wordpress.com/226/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hircus.wordpress.com/226/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hircus.wordpress.com/226/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hircus.wordpress.com/226/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hircus.wordpress.com/226/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hircus.wordpress.com/226/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hircus.wordpress.com/226/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hircus.wordpress.com/226/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hircus.wordpress.com&amp;blog=561873&amp;post=226&amp;subd=hircus&amp;ref=&amp;feed=1" /&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 9 Jun 2008 02:13:59 GMT</pubDate>
      <title>C types 101</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=30</link>
      <guid>http://hircus.wordpress.com/2008/06/08/c-types-101/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;br /&gt;&lt;div&gt; I was cleaning up the code of an application that I&amp;#8217;m packaging for Fedora, and was Googling for information on &lt;strong&gt;size_t&lt;/strong&gt; (in the code, a size_t variable was being printed as a normal integer (&lt;tt&gt;%d&lt;/tt&gt;), which triggered a compiler warning, and I forgot what the relevant option is. Ended up finding it in printf&amp;#8217;s manpage) when I discovered this rather well-written gem. &lt;/div&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" style="font-family:arial;color:#333333;background:#ffffff;border:solid 4px #e5e5e5;width:100%;clear:left;margin:12px 0;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" class="CM_CTB_Content_Wrap" style="background-color:#ffffff;margin:0;padding:0;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" style="border-bottom:solid 1px #dcdcdc;white-space:nowrap;margin-bottom:8px;background-color:#eeeeee;background-image:url('http://clipmarks.com/images/source-bg.gif');background-repeat:repeat-x;height:24px;line-height:24px;vertical-align:middle;padding-bottom:4px;color:#666666;font-size:10px;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;a href="http://clipmarks.com/clip-to-blog/" title="clipmarks' clip-to-blog" &gt;&lt;img src="http://content.clipmarks.com/blog_icon/fb0e31ea-247b-4396-b879-55723cb0754c/7AF356FF-F474-45F5-AE3E-808FDE1D80F8/" alt="" width="19" height="19" border="0" style="vertical-align:middle;display:inline;border:none;float:none;margin:0 4px;" /&gt;&lt;/a&gt;clipped from &lt;a title="http://www.embedded.com/columns/programmingpointers/200900195" href="http://www.embedded.com/columns/programmingpointers/200900195" &gt;www.embedded.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" width="100%" style="text-align:left;background:transparent;border:none;margin:4px 0 8px;padding:0 8px;"&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;&lt;!-- CLIPPED FROM: http://www.embedded.com/columns/programmingpointers/200900195 --&gt;&lt;P&gt;&lt;FONT size="3" face="Verdana" color="#003366"&gt;&lt;B&gt;Using size_t appropriately can improve the portability, efficiency, or readability of your code. Maybe even all three.&lt;/B&gt;&lt;/FONT&gt;&lt;/p&gt;
&lt;p&gt; &lt;P&gt;&lt;br /&gt;
&lt;/P&gt;&lt;P&gt;&lt;br /&gt;
Numerous functions in the Standard C library accept arguments or return values that represent object sizes in bytes. For example, the lone argument in &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;malloc(n)&lt;/B&gt;&lt;/FONT&gt; specifies the size of the object to be allocated, and the last argument in &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;memcpy(s1, s2, n)&lt;/B&gt;&lt;/FONT&gt; specifies the size of the object to be copied. The return value of &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;strlen(s)&lt;/B&gt;&lt;/FONT&gt; yields the length of (the number of characters in) null-terminated character array s excluding the null character, which isn&amp;#8217;t exactly the size of &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;s&lt;/B&gt;&lt;/FONT&gt;, but it&amp;#8217;s in the ballpark.&lt;/p&gt;
&lt;p&gt; &lt;P&gt;&lt;br /&gt;
&lt;/P&gt;&lt;P&gt;&lt;br /&gt;
You might reasonably expect these parameters and return types that represent sizes to be declared with type &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;int&lt;/B&gt;&lt;/FONT&gt; (possibly &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;long&lt;/B&gt;&lt;/FONT&gt; and/or &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;unsigned&lt;/B&gt;&lt;/FONT&gt;), but they aren&amp;#8217;t. Rather, the C standard declares them as type &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;size_t&lt;/B&gt;&lt;/FONT&gt;. According to the standard, the declaration for &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;malloc&lt;/B&gt;&lt;/FONT&gt; should appear in &lt;FONT size="2" face="Courier"&gt;&lt;B&gt;&amp;lt;stdlib.h&amp;gt;&lt;/B&gt;&lt;/FONT&gt; as something equivalent to:&lt;/p&gt;
&lt;p&gt; &lt;P&gt;&lt;br /&gt;
&lt;/P&gt;&lt;P&gt;&lt;br /&gt;
&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;FONT size="2" face="Courier"&gt;&lt;B&gt;void *malloc(&lt;SPAN&gt;size_t&lt;/SPAN&gt; n);&lt;/B&gt;&lt;/FONT&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;div style="margin:0 6px 6px 4px;"&gt;
&lt;table style="font-size:11px;border-spacing:0;padding:0;" cellpadding="0" cellspacing="0" width="100%"&gt;
&lt;tr&gt;
&lt;td style="background:transparent;border-width:0;padding:0;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td align="right" style="background:transparent;width:107px;border-width:0;padding:0;" width="107"&gt;&lt;a href="http://clipmarks.com/share/7AF356FF-F474-45F5-AE3E-808FDE1D80F8/blog/" title="blog or email this clip" &gt;&lt;img src="http://content9.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0;margin:0;padding:0;" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hircus.wordpress.com/223/" /&gt; &lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hircus.wordpress.com/223/" /&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hircus.wordpress.com/223/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hircus.wordpress.com/223/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hircus.wordpress.com/223/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hircus.wordpress.com/223/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hircus.wordpress.com/223/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hircus.wordpress.com/223/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hircus.wordpress.com/223/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hircus.wordpress.com/223/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hircus.wordpress.com/223/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hircus.wordpress.com/223/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hircus.wordpress.com&amp;blog=561873&amp;post=223&amp;subd=hircus&amp;ref=&amp;feed=1" /&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 2 Jun 2008 21:14:18 GMT</pubDate>
      <title>The ultimate Fedora 9 setup: Part 1 - UI</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=29</link>
      <guid>http://hircus.wordpress.com/2008/06/02/the-ultimate-fedora-9-setup-part-1-ui/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;br /&gt;&lt;p&gt;I tend to wipe off my old Linux setup and reinstall everytime a new release comes out &amp;#8212; not that it is necessary, but it&amp;#8217;s a good way to get rid of old cruft that have gotten installed, found not useful enough, and then forgotten (and there are lots of those, as &lt;tt&gt;df -u&lt;/tt&gt; shows).&lt;/p&gt;
&lt;p&gt;It also makes it easier to ascertain the state of Fedora &amp;#8212; any (mis-)configurations that I might have corrected would be reset to the default.&lt;/p&gt;
&lt;p&gt;So, now that Fedora 9 has been released, what needs to be added to / changed from the base setup? Surprisingly, not that many:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Compositing&lt;/strong&gt;&lt;br /&gt;
Some people swear by Compiz; I personally find Metacity much more usable (Compiz does not support cycling through all windows of a given application &amp;#8212; Ctrl+F6 in Metacity; Cmd+~ in OS X). Metacity now has a compositing manager that&amp;#8217;s turned off by default; turning it on involves either using &lt;tt&gt;gconftool-2&lt;/tt&gt; (only for advanced users) or &lt;tt&gt;gconf-editor&lt;/tt&gt;, and setting the &lt;tt&gt;/apps/metacity/general/compositing_manager&lt;/tt&gt; key to &lt;tt&gt;true&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The support in the stable version is a bit flaky still; the metacity package in Rawhide is much better behaved and appears quite stable. Upgrade by issuing &lt;tt&gt;yum &amp;#8211;enablerepo=rawhide update metacity&lt;/tt&gt;. As of the moment it does not pull in any other Rawhide package so you can rest easy.&lt;/p&gt;
&lt;p&gt;Try pressing the volume up/down/mute keys on your keyboard (if you don&amp;#8217;t have a multimedia keyboard, change the bindings in &lt;tt&gt;System-&amp;gt;Preferences-&amp;gt;Personal-&amp;gt;Keyboard Shortcuts&lt;/tt&gt;) and be amazed at the translucency coolness (no, this is not bling). The brightness pop-up windows have not been changed yet, alas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Firefox&lt;/strong&gt;&lt;br /&gt;
Ever cursed Firefox&amp;#8217;s font rendering in silence? Type &lt;tt&gt;about:config&lt;/tt&gt; in the address bar, and add the following boolean keys:&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;font.FreeType2.autohinted = true&lt;br /&gt;
font.FreeType2.enable = true&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keyboard&lt;/strong&gt;&lt;br /&gt;
For the English-speakers among us specifically, and those who use the US keyboard layout in general (it&amp;#8217;s the standard layout in Indonesia, for instance), the occasional times when one has to type an accented character is rather annoying.&lt;/p&gt;
&lt;p&gt;There are various work-arounds &amp;#8212; launch the character map (under &lt;tt&gt;Accessories&lt;/tt&gt;), add the Character Palette applet to the panel (so that it consumes RAM even when you don&amp;#8217;t use it!)&amp;#8230;&lt;strong&gt;*or*&lt;/strong&gt; you can just fix your keyboard layout. The die-hard command-line junkie would be able to tell you what option to pass to &lt;tt&gt;setxkbmap&lt;/tt&gt; to achieve this. The rest of us can just use &lt;tt&gt;System-&amp;gt;Preferences-&amp;gt;Hardware-&amp;gt;Keyboard&lt;/tt&gt;. In the &amp;#8220;Layouts&amp;#8221; tab, select &amp;#8220;Layout Options&amp;#8221;. The option you want is &amp;#8220;Compose key position&amp;#8221;; I use Right Alt, but Caps Lock haters will rejoice to know that, yes, you can use that dreaded key as your compose key as well. To type an accented character, now the only thing you need to do is hit the Compose+accent followed by the letter you want to accent (using shift as necessary, e.g. for ^).&lt;/p&gt;
&lt;p&gt;While you&amp;#8217;re here, you might want to change the Alt/Win key behavior, and map either Meta, Super or Hyper to one of your Win-keys. The GNOME default is inexplicably for the Win-key to be a normal key and not a modifier (so it cannot be combined with other keys).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Coming up: Applications&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;Et voil&#xE0;!&lt;/em&gt; You should have a nice-looking, and more importantly, functional desktop right now. In the next instalment, I&amp;#8217;ll comment on the applications I use. Until then, &lt;em&gt;&#xE0; bient&#xF4;t!&lt;/em&gt;&lt;/p&gt;
&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hircus.wordpress.com/221/" /&gt; &lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hircus.wordpress.com/221/" /&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hircus.wordpress.com/221/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hircus.wordpress.com/221/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hircus.wordpress.com/221/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hircus.wordpress.com/221/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hircus.wordpress.com/221/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hircus.wordpress.com/221/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hircus.wordpress.com/221/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hircus.wordpress.com/221/" /&gt;&lt;/a&gt; &lt;a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hircus.wordpress.com/221/" &gt;&lt;img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hircus.wordpress.com/221/" /&gt;&lt;/a&gt; &lt;img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hircus.wordpress.com&amp;blog=561873&amp;post=221&amp;subd=hircus&amp;ref=&amp;feed=1" /&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 4 Dec 2007 09:14:06 GMT</pubDate>
      <title>Programming languages, in a nutshell</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=28</link>
      <guid>http://hircus.wordpress.com/2007/12/04/programming-languages-in-a-nutshell/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;p&gt;Task: &lt;span style='font-style:italic;'&gt;List the programming languages you consider important or interesting. Describe each of them in one sentence.&lt;/span&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;High-level assembler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lua&lt;/td&gt;
&lt;td&gt;Table-based, functional and embeddable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python&lt;/td&gt;
&lt;td&gt;Great RAD language crippled by dogma&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scala&lt;/td&gt;
&lt;td&gt;Java done (almost) right, with Erlang- and Haskell-inspired features&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;Posting this from the new N810 using its built-in keyboard. Typing those tags was painful, and as a result, more languages will be added to the table tomorrow &amp;#8212; from the workstation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Thu, 18 Oct 2007 04:08:58 GMT</pubDate>
      <title>Why you should conditionally promise to buy the upcoming Nokia N810 tablet</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=27</link>
      <guid>http://hircus.wordpress.com/2007/10/17/why-you-should-conditionally-promise-to-buy-the-upcoming-nokia-n810-tablet/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;p&gt;&lt;img src="http://farm3.static.flickr.com/2301/1599334793_fcb8a41497.jpg" alt="Nokia N810 tablet" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It looks gorgeous&lt;/li&gt;
&lt;li&gt;It runs Linux, and showcases what can be done with more vertical integration&lt;/li&gt;
&lt;li&gt;Nokia has been improving their interaction with the developer community&lt;/li&gt;
&lt;li&gt;Video camera and Skype (no Skype video support yet, though)&lt;/li&gt;
&lt;li&gt;Rhapsody subscription service&lt;/li&gt;
&lt;li&gt;New: Now with GPS, spacious internal storage, and sliding keyboard built-in!&lt;/li&gt;
&lt;li&gt;New: More video codecs, Flash 9, Mozilla-based browser&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So commercial software providers (Skype, Real Networks) will provide Linux ports if they judge that the userbase is big enough. Which is good news.&lt;/p&gt;
&lt;p&gt;The same thing applies to Nokia itself, naturally, and sadly in this case, &lt;a href="http://jaaksi.blogspot.com/2007/10/nokia-n810-announced.html#5850386669965110378" &gt;they do not think there is demand for Ogg Vorbis playback&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So if, like me, you find the product attractive, but have a personal collection of Ogg Vorbis files (or FLAC, which transcodes seamlessly to Vorbis), then this is what you can do:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;E-mail Nokia about it&lt;/li&gt;
&lt;li&gt;Inform outlets that stock the tablet (e.g. Best Buy, CompUSA)&lt;/li&gt;
&lt;li&gt;Sign &lt;a href="http://www.pledgebank.com/nokia-ogg" &gt;this pledge&lt;/a&gt; and pass it around&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All the software for the new device (minus GPS &amp;#8212; though perhaps it&amp;#8217;s the same software that comes with the GPS kit for N800? Oh, and the ambient light sensor) will run on the N800, so holding back won&amp;#8217;t be &lt;strong&gt;that&lt;/strong&gt; painful.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 17 Oct 2007 18:09:40 GMT</pubDate>
      <title>Wide Finder: OCaml and JoCaml</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=26</link>
      <guid>http://hircus.wordpress.com/2007/10/17/wide-finder-ocaml-and-jocaml/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;p&gt;Spent last night getting a crash course in using OCaml to do non-functional things (hash tables, file I/O, regular expressions) and the result &lt;a href="http://hircus.org/widefinder/widefinder-ml.tar.bz2" &gt;is now up&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The JoCaml version does the file-partitioning trick used in the C++ implementation, with each finder workers being run inside a JoCaml channel; the channels share a single lock so they can update the hash table serially.&lt;/p&gt;
&lt;p&gt;Interestingly, current implementation does not get a speed-up from the input file being cached (Ilmari&amp;#8217;s &lt;a href="http://fhtr.blogspot.com/2007/10/wide-finder-ocaml.html" &gt;wf.ml&lt;/a&gt; does). Will have to peruse his to see what&amp;#8217;s slowing things down.&lt;/p&gt;
&lt;p&gt;Lesson: not all techniques for processing a file line-wise are equally good!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 16 Oct 2007 22:09:22 GMT</pubDate>
      <title>Wide Finder: C++ update</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=25</link>
      <guid>http://hircus.wordpress.com/2007/10/16/wide-finder-c-update/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;p&gt;Talked with a colleague about the slow single-threaded performance of my Wide Finder implementation, and we narrowed it down to two possibilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Boost regular expression is not compiled?&lt;/li&gt;
&lt;li&gt;C++ strings have higher overhead than null-terminated &lt;tt&gt;c_str&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First point can be ruled out: Boost compiles regular expressions when you assign them. Second point &amp;#8212; well, reading in the file using &lt;tt&gt;std::getline&lt;/tt&gt; turns out to consume the bulk of time.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve reorganized the code a bit, using a multimap rather than a vector to rank the URLs by count, with no effect on speed. With two and four threads on a dual-core Intel notebook, the performance is at least on par with Ruby.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://girtby.net/archives/2007/10/9/wide-finder-in-c" &gt;Alastair Rankine&lt;/a&gt; has a C++ implementation that is slightly faster, but uses Boost memory-mapped IO that I avoided for the same reason he put as caveat: that it will not scale to files that are too large. Which Tim&amp;#8217;s log file might well be. Again, that is not significantly faster than the Ruby code.&lt;/p&gt;
&lt;p&gt;Moral of the question: Perl and Ruby can be faster than C++! The C implementations out there are blindingly fast, but the way they do regular expression handling are really painful.&lt;/p&gt;
&lt;p&gt;Will turn my (limited) spare time to doing a clean JoCaml implementation &amp;#8212; it might not be faster but it definitely will look cleaner!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 16 Oct 2007 00:11:25 GMT</pubDate>
      <title>JoCaml</title>
      <link>http://www.advogato.org/person/salimma/diary.html?start=24</link>
      <guid>http://hircus.wordpress.com/2007/10/15/jocaml/</guid>
      <description>&lt;div class='snap_preview'&gt;&lt;p&gt;After turning in the C/C++ monster (cleanest C code I reckon it is possible to write, thus the total lack of memory-mapped I/O and other optimizations), I turned my attention to picking a better implementation language.&lt;/p&gt;
&lt;p&gt;Requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Functional&lt;/li&gt;
&lt;li&gt;Good support for threading&lt;/li&gt;
&lt;li&gt;If possible, support for distributed computing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As it turns out, JoCaml fits the bill perfectly. It&amp;#8217;s an extension of Ocaml, so it combines a rich library with a familiar syntax (not to me, but having used both Scheme and Haskell, how different can it be) &amp;#8212; and a very nice process calculus!&lt;/p&gt;
&lt;p&gt;Example: this is a concurrent stack that blocks if there is no input available&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
let new_stack () =&lt;br /&gt;
  def state (s) &amp;amp; push (v) = state (v::s) &amp;amp; reply to push&lt;br /&gt;
    or state (x::s) &amp;amp; pop () = state s &amp;amp; reply x to pop in&lt;br /&gt;
  spawn state([]);&lt;br /&gt;
  pop, push&lt;br /&gt;
;;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This defines a private &lt;tt&gt;state&lt;/tt&gt; channel, and then export the &lt;tt&gt;pop&lt;/tt&gt; and &lt;tt&gt;push&lt;/tt&gt; synchronous channels (that to the user behave just like ordinary functions)&lt;/p&gt;
&lt;p&gt;and this is how you use it:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
let pop, push = new_stack ();;&lt;br /&gt;
spawn echo(pop());;&lt;br /&gt;
push(1);;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Note that the &lt;tt&gt;echo&lt;/tt&gt; channel will block, since pop can&amp;#8217;t return a value until the stack contains something! This value is then pushed into the stack and &amp;#8216;1&amp;#8242; printed.&lt;/p&gt;
&lt;p&gt;More of this at the &lt;a href="http://jocaml.infria.fr/" &gt;JoCaml site&lt;/a&gt;. And, as it turns out, there already is &lt;a href="http://fhtr.blogspot.com/2007/10/wide-finder-ocaml.html" &gt;a JoCaml implementation of the Wide Finder&lt;/a&gt;, by Ilmari Heikkinen. Will have to grok the finer details from him.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
