<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Umberto Raimondi's Blog</title>
 <link href="http://www.uraimo.com/atom.xml" rel="self"/>
 <link href="http://www.uraimo.com/"/>
 <updated>2012-05-12T09:46:53+02:00</updated>
 <id>http://www.uraimo.com/</id>
 <author>
   <name>Umberto Raimondi's Blog</name>
   <email>me@uraimo.com</email>
 </author>

 
 <entry>
   <title>Interesting projects on GitHub/April</title>
   <link href="http://www.uraimo.com/2012/05/01/interesting-projects-on-github-april"/>
   <updated>2012-05-01T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2012/05/01/interesting-projects-on-github-april</id>
   <content type="html">&lt;p&gt;A few noteworthy open source projects i started following on GitHub in april:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Meteor, uncovered last month and discussed profusely everywhere, is now covered by an MIT license. Looks still a bit scary for the amount of communication protocol details it hides from the developer and for the complete lack of access control on requests performed from the web client to the application DB. Also, it seems that only MongoDB is supported at the moment. &lt;a href=&quot;https://github.com/meteor/meteor&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Heist, small scheme interpreter written in Ruby. &lt;a href=&quot;https://github.com/jcoglan/heist&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Repository for &lt;a href=&quot;http://testingbenfordslaw.com/&quot;&gt;testingbenfordslaw.com&lt;/a&gt;, nice project about the &lt;a href=&quot;Benford's%20Law&quot;&gt;Benford's Law&lt;/a&gt;, not been updated in a while. &lt;a href=&quot;https://github.com/blackant/benfords-law&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Slick Grid, as the author says &quot;a lightning fast javascript grid/spreadsheet&quot;, we'll see if one day i'll find a use for this. &lt;a href=&quot;https://github.com/mleibman/SlickGrid&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Interesting projects on GitHub/March</title>
   <link href="http://www.uraimo.com/2012/04/01/interesting-projects-on-github"/>
   <updated>2012-04-01T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2012/04/01/interesting-projects-on-github</id>
   <content type="html">&lt;p&gt;A few noteworthy open source projects i started following on GitHub in march:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Misaki, a Jekyll inspired static site generator built in clojure &lt;a href=&quot;https://github.com/liquidz/misaki&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; JQuery Scroll Path, a plugin to define custom scroll paths, check the demo &lt;a href=&quot;https://github.com/JoelBesada/scrollpath&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Mechanize, nice ruby web client library to automate interaction with websites &lt;a href=&quot;https://github.com/tenderlove/mechanize&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Induction, generic database client for Mac OS X &lt;a href=&quot;https://github.com/Induction/Induction&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Interesting projects on GitHub/February</title>
   <link href="http://www.uraimo.com/2012/03/01/interesting-projects-on-github"/>
   <updated>2012-03-01T00:00:00+01:00</updated>
   <id>http://www.uraimo.com/2012/03/01/interesting-projects-on-github</id>
   <content type="html">&lt;p&gt;A few noteworthy open source projects i started following on GitHub in february:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Small footprint C JSON Parser &lt;a href=&quot;https://github.com/udp/json-parser&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Luvit, and interesting lua node.js &quot;clone&quot; &lt;a href=&quot;https://github.com/luvit/luvit&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; SocketRocket, an Objective-C websocket client library from Square &lt;a href=&quot;https://github.com/square/SocketRocket&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Tinycon, a js library to manipulate favicons (see compatibility notes) &lt;a href=&quot;https://github.com/tommoor/tinycon&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Filtrr, a javascript image filter library &lt;a href=&quot;https://github.com/alexmic/filtrr&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; Resty, small Java JSON client library &lt;a href=&quot;https://github.com/beders/Resty&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>From VIM Theme to Pygments CSS</title>
   <link href="http://www.uraimo.com/2011/09/21/from-vim-theme-to-pygments-css"/>
   <updated>2011-09-21T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2011/09/21/from-vim-theme-to-pygments-css</id>
   <content type="html">&lt;p&gt;I have just converted a few VIM themes to CSS that can be used with &lt;a href=&quot;http://pygments.org/&quot;&gt;Pygments&lt;/a&gt; using the python script described &lt;a href=&quot;http://honza.ca/2011/02/how-to-convert-vim-colorschemes-to-pygments-themes&quot;&gt;here&lt;/a&gt; (&lt;a href=&quot;https://github.com/honza/vim2pygments&quot;&gt;GitHub repo&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;If anyone is interested (you'll need this if you are using Jekyll), the GitHub repository with the CSS files can be found &lt;a href=&quot;https://github.com/uraimo/pygments-vimstyles&quot;&gt;here&lt;/a&gt; and at the moment it contains the following VIM themes: desert, mustang, no_quarter, peaksea, railscasts, rdark, slate, wombat, nuvola.&lt;/p&gt;

&lt;p&gt;Feel free to fork the repository and add your own converted themes, an example of the result using the rdark theme can be seen below, enjoy!&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;                                                            
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;IntTimes&lt;/span&gt;
              &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ScalaObject&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;times&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Function1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;what&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Predef$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MODULE&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;intWrapper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$mVc$sp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;what&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;IntTimes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;                        
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>First steps in Scala: Implementing Ruby's Integer.times</title>
   <link href="http://www.uraimo.com/2011/09/21/first-steps-in-scala-implementing-ruby-s-integer-times"/>
   <updated>2011-09-21T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2011/09/21/first-steps-in-scala-implementing-ruby-s-integer-times</id>
   <content type="html">&lt;p&gt;After reading &lt;a href=&quot;http://www.amazon.com/Seven-Languages-Weeks-Programming-Programmers/dp/193435659X&quot;&gt;Seven Languages in Seven Weeks:A Pragmatic Guide to Learning Programming Languages&lt;/a&gt; i was left with the desire to know more about a couple of languages, namely Scala and Clojure. While i had some experiences with functional programming (Standard ML, Scheme) and other programming paradigms (Prolog) during the university, now some years have passed.&lt;/p&gt;

&lt;p&gt;I strongly suggest you to buy the book even if you already know some of the described languages (Ruby, Io, Prolog, Scala, Erlang, Clojure, Haskell), it only gives a gist of these seven languages in a set of lessons ideally completed in three days (that with some individual unguided experimentation will fill a full week) but with its style will make you hungry for more.&lt;/p&gt;

&lt;p&gt;If you need a suggestion on a Scala book, at the moment i'm going through Odersky's &lt;a href=&quot;http://www.amazon.com/Programming-Scala-Comprehensive-Step---Step/dp/0981531644/&quot;&gt;Programming in Scala&lt;/a&gt; and up until now it seems a good book even for those without prior experience in functional(ish) languages. Also, unlike other books, the first chapters are free of enigmatic examples that will only confuse beginners.&lt;/p&gt;

&lt;p&gt;I'm practicing Scala solving some problems at &lt;a href=&quot;http://projecteuler.net/&quot;&gt;Project Euler&lt;/a&gt; and for one of those i decided to implement something that resembled Ruby's .times and check the produced java bytecode to get a glimpse of scala's inner workings.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;scala&quot;&gt;&lt;span class=&quot;k&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;scalatimes&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;App&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;implicit&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;int2inttimes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;IntTimes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  
  &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;IntTimes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;){&lt;/span&gt; 
       &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;times&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;what&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Unit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;){&lt;/span&gt;
           &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;what&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;mf&quot;&gt;1000.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The implementation of &lt;em&gt;times&lt;/em&gt; is quite trivial, this code makes use of &lt;em&gt;implicit conversions&lt;/em&gt; to add to the Int type the new method through the implicit conversion of Int objects to the new IntTimes in the scope of the scalatimes object.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;times&lt;/em&gt; function simply uses the given function object of type Int=&gt;Unit within a foreach cycle, the current index will be accessible inside the function body (i suppose that there are better ways to do this).
But what kind of java code does the scala compiler produces for this example?
A quick check shows that six class files are built:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;scalatimes&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;scalatimes$&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;scalatimes$$anonfun$1&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;scalatimes$delayedInit$body&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;scalatimes$Int2&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;scalatimes$IntTimes&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;These files follow the usual java .class naming conventions,so the scala compiler produces a scalatimes class with a few inner classes. The class files can be decompiled with &lt;a href=&quot;http://www.geocities.com/kpdus/jad.html&quot;&gt;Jad&lt;/a&gt; but the decompiled result will be only partially complete. But anyway, this will help to understand what is happeing behind the scene.
As expected, the body of &lt;em&gt;IntTimes&lt;/em&gt; is contained in an inner class with the same name:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;                                                            
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;IntTimes&lt;/span&gt;
              &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ScalaObject&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;times&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Function1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;what&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Predef$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MODULE&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;intWrapper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$mVc$sp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;what&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;IntTimes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;    
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The &lt;em&gt;times&lt;/em&gt; method expects a Function1 object as parameter, the body of the function passed to &lt;em&gt;1000.times()&lt;/em&gt; as parameter has been wrapped in an anonymous inner class (as per Jad comment):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;                                                            
&lt;span class=&quot;cm&quot;&gt;/* anonymous class */&lt;/span&gt; 

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;anonfun&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cls1&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scala&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;runtime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;AbstractFunction1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mcVI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;sp&lt;/span&gt;
                    &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Serializable&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;apply$mcVI$sp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;apply$mcVI$sp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Predef$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MODULE&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BoxesRunTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;boxToInteger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;volatile&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BoxesRunTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;unboxToInt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BoxedUnit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;UNIT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;serialVersionUID&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; 
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;mi&quot;&gt;0L&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;serialVersionUID&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0L&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;The two lines of code that compose the function object body passed to 1000.times() are clearly visible in &lt;em&gt;apply$mcVI$sp(int v1)&lt;/em&gt;. The main method of the App can be identified in the body of the &lt;em&gt;apply()&lt;/em&gt; method of a static class that extends &lt;em&gt;AbstractFunction0&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;on0&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;AbstractFunction0&lt;/span&gt;
                    &lt;span class=&quot;kd&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ScalaObject&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;t1_&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$eq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;currentTimeMillis&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;int2inttimes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Predef$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MODULE&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StringBuilder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Time:&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BoxesRunTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;boxToLong&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;currentTimeMillis&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;t1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BoxedUnit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;UNIT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scalatimes$&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;on1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mcVI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;sp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scalatimes$&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;){&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;NullPointerException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;$outer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;                                                            
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Function0, like the Fuction1 above, is a scala framework object, likely related to the class extended above, and some helper methods in scalatimes hints to the fact that it will be loaded using a &lt;em&gt;delayedInit()&lt;/em&gt; call (by an App loader?).
And this ends for now my brief and superficial investigation on the structure of the code produced by the Scala compiler.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>SSH Productivity Tips: Multiplexed connection and more</title>
   <link href="http://www.uraimo.com/2011/08/19/ssh-productivity-tips-multiplexed-connection-and-more"/>
   <updated>2011-08-19T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2011/08/19/ssh-productivity-tips-multiplexed-connection-and-more</id>
   <content type="html">&lt;p&gt;With tools like SSH, Git and RSync there are always new tips you don't know about or some clever scripts that can increase your productivity or simply save you a few keystrokes.
Today's tips come from a presentation given at YAPC Europe 2011 that have been summed up in this &lt;a href=&quot;http://blogs.perl.org/users/smylers/2011/08/ssh-productivity-tips.html&quot;&gt;nice post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The best one is obviously connection sharing, this allows you to share a single ssh connection channel with more than one ssh session, saving the few seconds needed to establish a new connection.
Just two config lines that you need to put in your &lt;em&gt;~/.ssh/config&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;As stated &lt;a href=&quot;http://tanso.net/ssh/connection-sharing/&quot;&gt;here&lt;/a&gt;, every user (e.g. root) that has access to your control path file will be potentially able to use your established connection, be aware of this.
Furthermore, it looks like that without additional Control directives, the disconnection of the master session who opened the first connection also disconnects the other slave sessions, to fix this, as described &lt;a href=&quot;http://binblog.info/2009/04/24/openssh-connection-multiplexing/trackback/&quot;&gt;here&lt;/a&gt; you just need to let the connection persist for some time (any timeout would do i guess)&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;ControlPersist 10m
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Glad to see that the suggestion to use SSH key authentication is there too, just remember to use a strong key password (and if you haven't done so already disable root login).&lt;/p&gt;

&lt;p&gt;Be sure to checkout the &lt;em&gt;Jumping Through Servers&lt;/em&gt; section, a good use of netcat.&lt;/p&gt;

&lt;p&gt;On a related note, see &lt;a href=&quot;http://senko.net/en/linux-auto-rsync/trackback/&quot;&gt;Senko's Blog&lt;/a&gt; for a script that using inotify launches a command when a file in a directory has been changed. He has built it to automatically perform an rsync on selected directories when changes are detected, nice.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Configuring NGINX for Jekyll on Ubuntu</title>
   <link href="http://www.uraimo.com/2011/08/10/configuring-nginx-for-jekyll-on-ubuntu"/>
   <updated>2011-08-10T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2011/08/10/configuring-nginx-for-jekyll-on-ubuntu</id>
   <content type="html">&lt;p&gt;After a few years of shared hosting, a few days ago i moved this site on a &lt;a href=&quot;http://www.linode.com/?r=c82691ecf33a5a0b1cde7e01a5f6cb8e0a6765d3&quot;&gt;Linode VPS&lt;/a&gt; and so far i am really happy with it, the performances are impressive, especially for what concern disk i/o, way better then what you get with other VPS providers.&lt;/p&gt;

&lt;p&gt;With the new hosting i decided it was time to finally drop Wordpress and the boatload of plugins i was using and try an alternative solution that was more appropriate for a site with a small number of pages and no dynamic content like mine.&lt;/p&gt;

&lt;p&gt;The old site was already using a caching plugin for WordPress, W3 Total Cache, to produce static pages (regenerated periodically), on the new site i am giving a try to &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; to remove some moving parts and simply serve a static site built offline with a generator.&lt;/p&gt;

&lt;p&gt;So far i have no complains, i would have preferred if a basic layout with archive/categories/tags/etc... was bundled with Jekyll but checking the numerous examples available on github i've found my way through anyway, and built an initial skeletal layout in a few days than then evolved in what you are seeing now.&lt;/p&gt;

&lt;p&gt;As my HTTP server of choice, i have opted for NGINX. Various independent benchmarks performed with different environments and configurations i have read lately seems to confirm that, with the right configuration, NGINX is one of the best http server for static content serving.&lt;/p&gt;

&lt;p&gt;If interested you can read some of them &lt;a href=&quot;http://nbonvin.wordpress.com/2011/03/14/apache-vs-nginx-vs-varnish-vs-gwan/&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;http://www.ogre.com/node/393&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-which-server-to-use/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This kind of tests should be taken with a grain of salt, after all the only meaningful benchmark for you is the one you'll perform on your system with your configuration, here is an interesting discussion on the &lt;a href=&quot;http://www.mnot.net/blog/2011/05/18/http_benchmark_rules&quot;&gt;rules of benchmarking&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is the configuration i am using at the moment, it's optimized for small files and it enables the file cache to reduce disk access and the number of i/o syscalls. I have performed a few tests on my own and this seems to perform quite well on the first two VPS tier of Linode.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;user www-data;
worker_processes  2;

events &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    worker_connections  1024;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

http &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    include mime.types;
    default_type  application/octet-stream;

    log_format  main  &lt;span class=&quot;s1&quot;&gt;&amp;#39;$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; &amp;#39;&lt;/span&gt;
        &lt;span class=&quot;s1&quot;&gt;&amp;#39;$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; &amp;#39;&lt;/span&gt;
        &lt;span class=&quot;s1&quot;&gt;&amp;#39;&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;&amp;#39;&lt;/span&gt;;

    open_file_cache &lt;span class=&quot;nv&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1000 &lt;span class=&quot;nv&quot;&gt;inactive&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 2;

    sendfile off;
    tcp_nodelay on;

    keepalive_timeout  65;

    server &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        listen 80;
        server_name &amp;lt;yourdomain&amp;gt;;
        access_log /var/www/logs/&amp;lt;yourdomain&amp;gt;.access.log  main;
        error_log /var/www/logs/&amp;lt;yourdomain&amp;gt;.error.log;
        root /var/www/sites/&amp;lt;yourdomain&amp;gt;;
        index index.html index.htm;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;On the NGINX wiki you can find a nice init.d script to launch the server but to manage its lifecycle i suggest to use upstart (installed by default on ubuntu) instead, it will manage your NGINX instance restarting it if it dies unexpectedly.&lt;/p&gt;

&lt;p&gt;Create an upstart configuration file at /etc/init/nginx.conf:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;description &lt;span class=&quot;s2&quot;&gt;&amp;quot;nginx http daemon&amp;quot;&lt;/span&gt;

start on &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;filesystem and net-device-up &lt;span class=&quot;nv&quot;&gt;IFACE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;lo&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
stop on runlevel &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;!2345&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;

env &lt;span class=&quot;nv&quot;&gt;DAEMON&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/local/nginx/sbin/nginx

expect fork
respawn

pre-start script
    &lt;span class=&quot;nv&quot;&gt;$DAEMON&lt;/span&gt; -t
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$?&lt;/span&gt; -ne 0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;then &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$?&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
end script

&lt;span class=&quot;nb&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$DAEMON&lt;/span&gt; -c /etc/nginx/nginx.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Verify that upstart has located your new configuration file, if the output of the following command is empty you should check /var/log/daemon.log for errors in the config file:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;initctl list | grep nginx
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Now you can start NGINX with:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;initctl start nginx
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Your NGINX instance will now be respawned if it dies unexpectedly and this can easily be verified with:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;killall nginx
ps -Al | grep nginx
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;



</content>
 </entry>
 
 <entry>
   <title>Upgrading the ATI drivers and configuring OpenCL in Ubuntu</title>
   <link href="http://www.uraimo.com/2010/09/06/upgrading-the-ati-drivers-and-configuring-opencl-in-ubuntu"/>
   <updated>2010-09-06T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2010/09/06/upgrading-the-ati-drivers-and-configuring-opencl-in-ubuntu</id>
   <content type="html">&lt;p&gt;I'm planning a series of post about OpenCL basics and its use ( simple kernels,  smoke modelling with Navier-Stokes equation and usage with python) , but before that, a short post on upgrading drivers and basic environment configuration could be useful. Especially  when done in conjunction with a kernel upgrade, the update of the ATI graphic drivers is a bit tricky.Unlike CUDA or Stream, OpenCL library is CPU/GPU architecture-independent, so this will be the only post where you'll read something limited to ATI card owners.&lt;/p&gt;

&lt;p&gt;We'll use ATI Radeon 57xx logical schematics in the next post to understand how modern GPUs are structured internally but every consideration will also apply to GPUs from other vendors.&lt;/p&gt;

&lt;p&gt;The recommended procedure to perform a driver update consists of three steps: uninstalling the old drivers, building custom .deb packages/installing them, build the initial configuration.So, first of all, uninstall the drivers and delete the obsolete fglrx packages:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx_* xorg-driver-fglrx
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Download from ati.com the latest driver, generate .deb and install (using 10.04, same procedure applies to other &lt;em&gt;recent&lt;/em&gt; builds):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sh ati-driver-installer-10-8-x86.x86_64.run --buildpkg Ubuntu/lucid
sudo dpkg -i fglrx*.deb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Initialize /etc/X11/xorg.conf (a backup is generated) and after this reboot/restart X:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sudo aticonfig --initial -f
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;To verify that everything has gone as expected (this will display the current driver version):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;./fglrxinfo
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Regarding OpenCL environment configuration,  the installation is easy and fast and the official ATI documentation does a good job.&lt;/p&gt;

&lt;p&gt;Get the Stream SDK and the OpenCL ICD configuration (new in 2.2) from the &lt;a href=&quot;http://developer.amd.com/gpu/ATIStreamSDK/Pages/default.aspx#five&quot;&gt;developer site&lt;/a&gt; and follow these steps.Untar the SDK in a directory of your choice and add to your .bash_profile (or equivalent) these lines, customizing where needed:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;ATISTREAMSDKROOT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;lt;...&amp;gt;/ati-stream-sdk-v2.2-lnx64export &lt;span class=&quot;nv&quot;&gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ATISTREAMSDKROOT&lt;/span&gt;/lib/x86_64:&lt;span class=&quot;nv&quot;&gt;$LD_LIBRARY_PATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Untar the ICD configuration archive (will put vendor-specific configuration files in /etc/OpenCL/vendors):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /
sudo tar xfz icd-registration.tgz
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;To verify the successful installation, reload your .bash_profile (&lt;em&gt;source ~/.bash_profile&lt;/em&gt;) go to &lt;em&gt;.../ati-stream-sdk-v2.2-lnx64/samples/opencl&lt;/em&gt; , compile the opencl samples with &lt;em&gt;make&lt;/em&gt; and then run from &lt;em&gt;.../ati-stream-sdk-v2.2-lnx64/samples/opencl/bin/x86_64&lt;/em&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;./CLInfo
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Verify that both CL_DEVICE_TYPE_CPU and CL_DEVICE_TYPE_GPU are present in the output.As last test and if you want to qualitatively evaluate performance differences, try &lt;em&gt;Mandelbrot&lt;/em&gt; with --device cpu and --device gpu.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Amazon AWS, Cloud Computing and economies of scale</title>
   <link href="http://www.uraimo.com/2010/04/10/aws-and-economies-of-scale"/>
   <updated>2010-04-10T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2010/04/10/aws-and-economies-of-scale</id>
   <content type="html">&lt;center&gt;&lt;object data=&quot;data:application/x-silverlight-2,&quot; type=&quot;application/x-silverlight-2&quot; height=&quot;330&quot; width=&quot;560&quot;&gt;&lt;param name=&quot;source&quot; value=&quot;http://live.visitmix.com/ClientBin/players/VideoPlayer2009_03_27.xap&quot; /&gt;&lt;param name=&quot;initParams&quot; value=&quot;m=http://ecn.channel9.msdn.com/o9/mix/10/wmv/EX01.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://live.visitmix.com/Skins/MIX10/Styles/images/DefaultPlayerBackground.png, postid=0&quot; /&gt;&lt;param name=&quot;background&quot; value=&quot;#00FFFFFF&quot; /&gt;[![Get Microsoft Silverlight](http://go.microsoft.com/fwlink/?LinkId=108181)](http://go.microsoft.com/fwlink/?LinkID=124807)&lt;/object&gt;&lt;/center&gt;


&lt;p&gt;A really interesting presentation given at MIX10 (Microsoft sponsored conference) by James Hamilton regarding Cloud computing and its implementation in Amazon Web Services. After a brief introduction about the reasons why AWS is economically sustainable and why it was mandatory for Amazon considering the large amount of underutilized servers they had, he provides a sneak peek on how an Amazon Data Center is structured and what kind of problem them or anyone else building a &quot;cloud&quot; have to address (power/cooling/maximize utilization). Well worth one hour of your time. You'll need Silverlight(win) or Moonlight(lnx/firefox) to play this one, if you don't feel inclined to install it, go straight to the site and &lt;a href=&quot;http://live.visitmix.com/MIX10/Sessions/EX01&quot;&gt;download the mp4 recording&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>HTC Magic ADB USB driver install instructions</title>
   <link href="http://www.uraimo.com/2009/07/06/htc-magic-adb-driver-install-instructions"/>
   <updated>2009-07-06T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2009/07/06/htc-magic-adb-driver-install-instructions</id>
   <content type="html">&lt;p&gt;If you diligently followed the &lt;a href=&quot;http://developer.android.com/guide/developing/device.html#setting-up&quot;&gt;android driver install instruction&lt;/a&gt; from the Android Developer site but your HTC Magic is still discovered only as an &quot;HTC Android Phone USB Device&quot; and an unknown device named &quot;ADB&quot; because the driver contained in the last &lt;a href=&quot;http://developer.android.com/sdk/1.5_r2/index.html&quot;&gt;SDK&lt;/a&gt; &lt;em&gt;(android-sdk-windows-1.5_r2\usb_driver\x86)&lt;/em&gt; is not recognized, follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open the Device Manager, select the ADB Device and open the Details tab. Look for &quot;Device Instance Id&quot;, it should be something like &lt;strong&gt;vid_0bb4&amp;amp;pid_0c0&lt;/strong&gt;*. If your * is not 2, these instructions will probably solve your issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Disconnect your device and uninstall the two discovered devices (i used usbdeview but you can do it manually from the Device Manager).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open with a text editor &lt;em&gt;android-sdk-windows-1.5_r2\usb_driver\x86\android_usb.inf&lt;/em&gt;. Replace all the &lt;strong&gt;vid_0bb4&amp;amp;pid_0c02&lt;/strong&gt; occurrences with &lt;strong&gt;vid_0bb4&amp;amp;pid_0c0&lt;/strong&gt;* (e.g. vid_0bb4&amp;amp;pid_0c03).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect your phone and when asked for driver choose to specify manually a path and select _android-sdk-windows-1.5_r2\usb_driver\x86_.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the installation is successful, to verify that all is ok execute &lt;em&gt;android-sdk-windows-1.5_r2\tools\adb devices&lt;/em&gt;, your phone should be listed in the device table.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thanks to Wysie, for the full discussion see the &lt;a href=&quot;http://groups.google.com/group/android-beginners/browse_thread/thread/8f99c245c78af3ab/6a1437c912aac2f1?show_docid=6a1437c912aac2f1#&quot;&gt;original thread&lt;/a&gt;. After following this procedure even HTC Sync should work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; This procedure should likely work for HTC Hero, Touch and Samsung Galaxy too, just substitute where needed the “Device Instance Id” found at step 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE 4/10/10: &lt;/strong&gt;Confirmed, this procedure still works for newer phones like the Desire, just use a correct Device Id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE 2011: &lt;/strong&gt; I'm still receiving a good amount of visitors for this page so i guess that installing the android driver under windows is still not straightforward as it should be. As an update, please use the driver provided &lt;a href=&quot;http://developer.android.com/sdk/win-usb.html&quot;&gt;here&lt;/a&gt; instead of the one suggested above. Furthermore, feel free to share your opinions below if these instruction helped you or if you feel the steps suggested are not relevant anymore (from 2009 things could have changed a bit).&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>DNS-323/CH3SNAS Packages recap</title>
   <link href="http://www.uraimo.com/2008/12/15/dns-323_ch3snas-packages-recap"/>
   <updated>2008-12-15T00:00:00+01:00</updated>
   <id>http://www.uraimo.com/2008/12/15/dns-323_ch3snas-packages-recap</id>
   <content type="html">&lt;p&gt;Here is a brief recap of the new packages i built for the DNS-323/321/343/CH3SNAS and available &lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas&quot;&gt;here&lt;/a&gt; (fonz funplug 0.5 is required):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas/blob/master/ffp-0.5/lynx2-8-6.tgz?raw=true&quot;&gt;Lynx 2.8.6&lt;/a&gt;: The textual web browser;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas/blob/master/ffp-0.5/alpine-2.00.tgz?raw=true&quot;&gt;Alpine 2.0&lt;/a&gt;: Successor of Pine, textual mail reader;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas/blob/master/ffp-0.5/aria2c-1.0.0.tgz?raw=true&quot;&gt;Aria2 1.0&lt;/a&gt;: Multi-threaded file download, it should support also bittorrent.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Added &lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas/blob/master/ffp-0.5/htop-0.8.3.tgz?raw=true&quot;&gt;Htop 0.8.3&lt;/a&gt; , a nice top-like process manager with tree view and other goodies (simpler arrow navigation , easily accessible kill/nice).
As usual, you can install it using:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;funpkg -i htop-0.8.3.tgz
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The full binaries repository has now been moved to &lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>DNS-323/CH3SNAS: A low cost NAS and embedded development</title>
   <link href="http://www.uraimo.com/2008/12/13/dns-323ch3snas-a-low-cost-nas-and-embedded-development"/>
   <updated>2008-12-13T00:00:00+01:00</updated>
   <id>http://www.uraimo.com/2008/12/13/dns-323ch3snas-a-low-cost-nas-and-embedded-development</id>
   <content type="html">&lt;p&gt;If you are looking for a low cost NAS you surely will come across with three devices: the &lt;a href=&quot;http://www.nslu2-linux.org/&quot;&gt;Linksys NSLU2&lt;/a&gt;, the &lt;a href=&quot;http://mybookworld.wikidot.com/start&quot;&gt;Iomega MyBook WE&lt;/a&gt; and the &lt;a href=&quot;http://wiki.dns323.info/&quot;&gt;D-Link DNS-323&lt;/a&gt; (or its sibling CH3SNAS pitcured on left).Devices with similar functionality (all of them support Samba/FTP/ITunesServer/UPNPAVServer/etc...) and that in a similar fashion have been greatly extended thanks to the community. The NSLU2 with its custom firmware, linux distributions and the optware package repository, the MyBook WE with a first customized firmware and now with a full fledged community and the DNS-323/CH3SNAS with the &lt;a href=&quot;http://www.inreto.de/dns323/&quot;&gt;fonz's fun_plug&lt;/a&gt; and the huge amount of modifications that came after that.Something similar to what always happens to devices based on FOSS and when the opportunity to enhance them is given to the community and something,  in my opinion, that always boosts the &quot;saleability&quot; of such products, just think to the famous Linksys WRT54G.I got my own Conceptronic CH3SNAS last year, and since then i enjoyed the progress made by the community and contributed my little share when possible.You can now find all my DNS323/CH3SNAS binaries &lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas&quot;&gt;here&lt;/a&gt;. Feel free to try them and call for support if needed.&lt;/p&gt;

&lt;p&gt;After this long preamble about opensource and NASes, let's talk briefly about Linux and embedded development.There are many ways to start learning Linux for those who come from a MSWindows background such as installing a random distribution, maybe on a virtual machine, but what the DNS323 and similar devices give you is the opportunity to get a taste of what &lt;a href=&quot;http://en.wikipedia.org/wiki/Embedded_devices&quot;&gt;embedded&lt;/a&gt; &lt;a href=&quot;http://elinux.org/Main_Page&quot;&gt;development&lt;/a&gt; is.&lt;/p&gt;

&lt;p&gt;The hardware platform reminds what you could find in your average pocket-pc and is good enough for this use:  a Marvell SoC with an ARM926Tj at 500Mhz and 64Mb of RAM.Don't limit your experience to installing a different UPnP AV Server or the latest Transmission/mldonkey, try to compile some software yourself and &lt;a href=&quot;http://en.wikipedia.org/wiki/Linux_From_Scratch&quot;&gt;experiment&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Browse the &lt;a href=&quot;http://wiki.dns323.info/&quot;&gt;WIKI&lt;/a&gt; to discover what a toolchain is, how you can &lt;a href=&quot;http://www.miriamruiz.es/weblog/?p=41&quot;&gt;cross-compile&lt;/a&gt; software for different CPUs (in this case an ARM926) on a x86 host and which are the main differences among glibc and libraries like uclibc, eglibc, etc...&lt;/p&gt;

&lt;p&gt;This post should contain enough pointers for you to start!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; The full binaries repository has now been moved to &lt;a href=&quot;https://github.com/uraimo/dns323-ch3snas&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Google: The early days</title>
   <link href="http://www.uraimo.com/2008/09/12/google-the-early-days"/>
   <updated>2008-09-12T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2008/09/12/google-the-early-days</id>
   <content type="html">&lt;blockquote&gt;&lt;p&gt;In handwritten letters it said, “Google World Headquarters”.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Ubergizmo publishes this touching &lt;a href=&quot;http://www.ubergizmo.com/15/archives/2008/09/googles_first_steps.html&quot;&gt;interview&lt;/a&gt; from 1998 and this reminds me of the great book &quot;The Search&quot; by John Battelle , a vivid and detailed description of the search market in the pre-bubble era (plus some chapters with debatable content about the future of the search engine and the search market in general).Maybe it's the right time to start &quot;Founders at Work&quot; or to buy the recent &quot;Once You're Lucky, Twice You're Good&quot;.All Books about great people and successful ventures, someone should really write something similar to &lt;a href=&quot;http://www.amazon.com/Banvards-Folly-Renowned-Obscurity-Anonymity/dp/0312268866/ref=sr_1_30?ie=UTF8&amp;amp;s=books&amp;amp;qid=1221249499&amp;amp;sr=1-30&quot;&gt;Banvard's Folly&lt;/a&gt; (GREAT book with awesome stories) set in the bubble era, possibly non following the Startup.com documentary lousy approach...&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>SUN Spot</title>
   <link href="http://www.uraimo.com/2008/08/03/sun-spot"/>
   <updated>2008-08-03T00:00:00+02:00</updated>
   <id>http://www.uraimo.com/2008/08/03/sun-spot</id>
   <content type="html">&lt;p&gt;Open-source electronics platforms for rapid prototyping have already been around for a while, i can think of &lt;a href=&quot;http://www.arduino.cc&quot; title=&quot;Arduino Board&quot;&gt;Arduino board&lt;/a&gt; but surely there are more of them.The low cost, the wide variety of inputs/outputs, the ability to interact with sensors ot to control motors, the ease of use and the community, make these platforms a perfect fit for hobbyist's and artist's projects.Regarding the ease of use, Arduino can be programmed in a c-like language ( additional straightforward libraries to access the board's functions are provided ) and has a development environment based on the famous &lt;a href=&quot;http://www.processing.com&quot; title=&quot;Processing&quot;&gt;Processing&lt;/a&gt;.And now, &lt;a href=&quot;http://www.sunspotworld.com/&quot; title=&quot;SUN Spot&quot;&gt;SUN Spot&lt;/a&gt;.I've spotted the video embedded below on the googletechtalks youtube channel.&lt;object height=&quot;344&quot; classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;src&quot; value=&quot;http://www.youtube.com/v/fGSObzubTfY&amp;amp;hl=en&amp;amp;fs=1&quot; /&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;embed allowfullscreen=&quot;true&quot; src=&quot;http://www.youtube.com/v/fGSObzubTfY&amp;amp;hl=en&amp;amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; height=&quot;344&quot; width=&quot;425&quot;&gt;&lt;/embed&gt;&lt;/object&gt;The platform developed by SUN Laboratories seems awesome:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Completely open source (hardware/software)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;180 MHz 32 bit ARM920T core &lt;em&gt;(with jazelle?) &lt;/em&gt;- 512K RAM/4M Flash&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2.4 GHz IEEE 802.15.4 radio with integrated antenna&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;USB interface &lt;em&gt;(host?)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2G/6G 3-axis accelerometer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Temperature sensor&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Light sensor&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;8 tri-color LEDs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;6 analog inputs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2 momentary switches&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;5 general purpose I/O pins and 4 high current output pins&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;100 mt max distance between Spots (more info on this on the sunspotworld.com forum, the devices together form a meshed network, so multiple stations can be used to extend the network civerage, but the maximum distance between two spots seems limited to that)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Missing agps and only 4mb flash? Looks like someone already built a custom gps module and SD module for their projects. Some new addons have been shown at &lt;a href=&quot;http://www.youtube.com/watch?v=QD7wI_IQvko&quot;&gt;JavaOne2008&lt;/a&gt;.The SUN Spot can be programmed enterely in Java, and has a development platform based on NetBeans (Eclipse can also be used).Refer to the embedded video for some example projects. Above all, watch @00:21 for the cool Sun Blackbox monitoring project.It comes in a developer kit with 1 Spot base station and 2 standard Spots for under $700, a kit that reminds me of the early &lt;a href=&quot;http://www.openmoko.com/&quot;&gt;openmoko&lt;/a&gt; developers kit.The two things that i found most intriguing are the ability to upload new &quot;software packages&quot; wirelessly (in this presentation is done through a management interface, could this be done dinamically using the java api provided?) and the way the meshed wireless network formed by Spots is managed (i should take a look at this sooner or later).Additional videos about Sun Spot and projects based on it can be found on &lt;a href=&quot;http://www.youtube.com/results?search_query=sun+spot&quot;&gt;youtube&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>

