<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34167840</id><updated>2012-01-02T17:15:06.593+05:30</updated><category term='linux'/><category term='embedded'/><category term='emacs'/><category term='tools'/><category term='freesoftware'/><category term='javascript'/><category term='erlang'/><category term='news'/><category term='movies'/><category term='ajax'/><category term='books'/><category term='programming'/><category term='graphics'/><category term='quote'/><category term='music'/><category term='entrepreneurship'/><category term='preference'/><category term='creations'/><category term='concurrency'/><category term='problemsolved'/><category term='life'/><category term='cript'/><category term='css'/><category term='html'/><category term='todo'/><category term='mathematics'/><category term='irc'/><category term='fun'/><category term='distributedcomputing'/><category term='javas'/><category term='virtualisation'/><category term='ide'/><category term='discovery'/><title type='text'>Syntax Versus Semantics</title><subtitle type='html'>A container for my notes</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default?start-index=101&amp;max-results=100'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>232</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34167840.post-3854914750896274033</id><published>2012-01-02T16:35:00.001+05:30</published><updated>2012-01-02T16:35:44.564+05:30</updated><title type='text'>Basic Haskell - Splitting Strings by newline "\n" *only* (not "\r", "\r\n" etc.)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Based on a quick reply I posted to the Haskell mailing list recently -&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On Mon, Jan 2, 2012 at 3:14 PM, max wrote:&lt;br /&gt;&amp;gt; I want to write a function whose behavior is as follows:&lt;br /&gt;&amp;gt;&lt;br /&gt;&amp;gt; foo "string1\nstring2\r\nstring3\nstring4" = ["string1",&lt;br /&gt;&amp;gt; "string2\r\nstring3", "string4"]&lt;br /&gt;&amp;gt;&lt;br /&gt;&amp;gt; Note the sequence "\r\n", which is ignored. How can I do this?&lt;br /&gt;&lt;br /&gt;Here's a simple way (may not be the most efficient) -&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;import Data.List (isSuffixOf)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;split = reverse . foldl f [] . lines&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp;where&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp;f [] w = [w]&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp;f (x:xs) w = if "\r" `isSuffixOf` x then ((x++"\n"++w):xs) else (w:x:xs)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Testing -&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;ghci&amp;gt; split "ab\r\ncd\nefgh\nhijk"&lt;/code&gt;&lt;br /&gt;&lt;code&gt;["ab\r\ncd","efgh","hijk"]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3854914750896274033?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3854914750896274033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3854914750896274033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3854914750896274033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3854914750896274033'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2012/01/basic-haskell-splitting-strings-by.html' title='Basic Haskell - Splitting Strings by newline &quot;\n&quot; *only* (not &quot;\r&quot;, &quot;\r\n&quot; etc.)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8881101708368046074</id><published>2011-12-18T09:24:00.001+05:30</published><updated>2012-01-02T16:38:54.694+05:30</updated><title type='text'>Search for a Haskell IDE - Vim blows Leksah out of the water!</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Vim advantages&lt;/b&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;GHCi integration using &lt;a href="http://www.vim.org/scripts/download_script.php?src_id=15004"&gt;shim.vim&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Vim font rendering is awesome!!&lt;/li&gt;&lt;li&gt;Source Candy using&amp;nbsp;&lt;a href="https://raw.github.com/frerich/unicode-haskell/master/ftplugin/haskell/unicode-haskell.vim"&gt;haskell-unicode.vim&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Here's a screenshot of the font rendering (Currently using Monaco as the font) -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IxdBAPIUn9I/Tu1mGvzawYI/AAAAAAAAHCQ/K9QeiCkaOZI/s1600/Screenshot+at+2011-12-18+09%253A28%253A02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="122" src="http://3.bp.blogspot.com/-IxdBAPIUn9I/Tu1mGvzawYI/AAAAAAAAHCQ/K9QeiCkaOZI/s320/Screenshot+at+2011-12-18+09%253A28%253A02.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More information on my Vim setup coming soon!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8881101708368046074?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8881101708368046074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8881101708368046074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8881101708368046074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8881101708368046074'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2011/12/search-for-haskell-ide-vim-blows-leksah.html' title='Search for a Haskell IDE - Vim blows Leksah out of the water!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-IxdBAPIUn9I/Tu1mGvzawYI/AAAAAAAAHCQ/K9QeiCkaOZI/s72-c/Screenshot+at+2011-12-18+09%253A28%253A02.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2512052307975437779</id><published>2010-12-02T12:18:00.002+05:30</published><updated>2010-12-02T12:22:12.490+05:30</updated><title type='text'>Convert multiple JPG files into a single PDF on Linux (Ubuntu)</title><content type='html'>It's extremely simple if you have imagemagick installed!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;sudo apt-get install imagemagick&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Simple pass all the image files to &lt;b&gt;convert&lt;/b&gt; with the &lt;b&gt;adjoin&lt;/b&gt; parameter -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;convert *.jpg -adjoin output.pdf&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Done!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2512052307975437779?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2512052307975437779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2512052307975437779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2512052307975437779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2512052307975437779'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/12/convert-multiple-jpg-files-into-single.html' title='Convert multiple JPG files into a single PDF on Linux (Ubuntu)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-606223640523072931</id><published>2010-10-20T15:21:00.002+05:30</published><updated>2010-10-20T15:28:46.532+05:30</updated><title type='text'>Installing Yesod (Haskell web framework) on Webfaction</title><content type='html'>Assuming that the latest GHC is installed on webfaction (see my previous posts for that process).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first step is to install cabal. The best method is to download the cabal-install source package from hackage. In that source package there is a script called "bootstrap.sh". Running this script will download all the necessary packages (including Cabal itself) and install them in ~/.cabal.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Add cabal bin directory (~/.cabal/bin) to your system path.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Installing yesod is then as simple as "cabal install yesod".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The only real problem I faced with installing Yesod is that webfaction mounts /tmp with no-exec. Cabal sometimes requires execution of temporary files from /tmp. This will cause strange errors related to hsc-make or sometimes related to mmap in ghc. The workaround is to manually download the source for each troublesome package from hackage and run "cabal install" inside the source directory.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Otherwise the process is smooth sailing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: The haskell platform is not easy to install on webfaction due to missing GLUT libraries. But if you follow the process above of using cabal install for installing only the libraries you need then things should work out fine without haskell platform.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-606223640523072931?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/606223640523072931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=606223640523072931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/606223640523072931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/606223640523072931'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/10/installing-yesod-haskell-web-framework.html' title='Installing Yesod (Haskell web framework) on Webfaction'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-640442093661600067</id><published>2010-09-22T23:48:00.002+05:30</published><updated>2010-09-22T23:52:38.108+05:30</updated><title type='text'>Simple Linux BASH script to swap two filenames</title><content type='html'>&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;div&gt;if [ $# -lt 2 ]&lt;/div&gt;&lt;div&gt;then&lt;/div&gt;&lt;div&gt;    echo "2 arguments needed."&lt;/div&gt;&lt;div&gt;    exit&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;mv $1 tmp&lt;/div&gt;&lt;div&gt;mv $2 $1&lt;/div&gt;&lt;div&gt;mv tmp $2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;echo "Done!"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-640442093661600067?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/640442093661600067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=640442093661600067' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/640442093661600067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/640442093661600067'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/09/simple-linux-bash-script-to-swap-two.html' title='Simple Linux BASH script to swap two filenames'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8668070888347603309</id><published>2010-09-07T02:36:00.002+05:30</published><updated>2010-09-07T03:00:40.503+05:30</updated><title type='text'>Haskell: Memoise arbitrary functions and monadic values</title><content type='html'>&lt;div&gt;I recently got thinking about memoisation in Haskell functions to improve efficiency. Here are my notes -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Pure memoisation&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This means adding memoisation to a function transparently (without changing the function signature).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;i.e. write a function  - memoise :: (a -&gt; r) -&gt; a -&gt; r&lt;/div&gt;&lt;div&gt;so that all we have to do to memoise a function is - memoised_f = memoise f&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This seems like an impossible thing to accomplish. Memoisation by definition requires a table/map in memory from argument to return values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However by exploiting Lazy evaluation, and Compiler optimisations, we can accomplish this in haskell with relative ease. An example from the Haskell wiki -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;pre style="overflow-x: auto; overflow-y: auto; padding-left: 5px; "&gt;&lt;span id="li-0-1"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- The naive fibonacci function&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-2"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fib&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Int&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;-&gt;&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Integer&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-3"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fib&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;0&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;1&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-4"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fib&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;1&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;1&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-5"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fib&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="n"&gt;fib&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;-&lt;/span&gt;&lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;+&lt;/span&gt; &lt;span class="n"&gt;fib&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;-&lt;/span&gt;&lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-6"&gt; &lt;/span&gt;&lt;span id="li-0-7"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Fast memoised fibonacci function&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-8"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;memoised_fib&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Int&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;-&gt;&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Integer&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-9"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;memoised_fib&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="n"&gt;fib&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;0&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;..&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;!!&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here we use lazy evaluation to build a map. And then exploit an optimisation of Haskell compilers that arguments to functions are only evaluated once. i.e. in this case that makes sure that (map fib [0..]) is only evaluated once.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's perhaps clearer this way, which makes it clear that fibs is a constant that is only evaluated once -&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;pre style="overflow-x: auto; overflow-y: auto; padding-left: 5px; "&gt;&lt;span id="li-0-1"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Mapping from Indices to Fibonacci numbers&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-2"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fibs&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-3"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fibs&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="n"&gt;fib&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;0&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;..&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-4"&gt; &lt;/span&gt;&lt;span id="li-0-5"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Fast memoised fibonacci function&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-6"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;memoised_fib&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Int&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;-&gt;&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Integer&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-7"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;memoised_fib&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="n"&gt;fibs&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;!!&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Impure Memoisation&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In general however, it is needed to add some kind of a stateful wrapper over the function to be memoised. IORefs in the IO Monad and State threading in the State Monad can be used for this. I however decided that it would be better to write a function to memoise any "Monadic Value" (m s). I also decided to use StateT Monad Transformer to store the State.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Here's a general solution that can memoise any monadic computation by wrapping it inside a StateT Monad Transformer -&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;pre style="overflow-x: auto; overflow-y: auto; padding-left: 5px; "&gt;&lt;span id="li-0-1"&gt;&lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;module&lt;/span&gt; &lt;span class="nn" style="color: rgb(14, 132, 181); font-weight: bold; "&gt;Main&lt;/span&gt; &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;where&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-2"&gt; &lt;/span&gt;&lt;span id="li-0-3"&gt;&lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;import&lt;/span&gt; &lt;span class="k" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;qualified&lt;/span&gt; &lt;span class="nn" style="color: rgb(14, 132, 181); font-weight: bold; "&gt;Data.Map&lt;/span&gt; &lt;span class="k" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;as&lt;/span&gt; &lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Map&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;empty&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;lookup&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-4"&gt;&lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;import&lt;/span&gt; &lt;span class="err" style="color: rgb(48, 48, 48); "&gt;"&lt;/span&gt;&lt;span class="nn" style="color: rgb(14, 132, 181); font-weight: bold; "&gt;monads&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;-&lt;/span&gt;&lt;span class="n"&gt;fd&lt;/span&gt;&lt;span class="s" style="color: rgb(151, 134, 160); "&gt;" Control.Monad.Trans(lift)&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-5"&gt;&lt;span class="s" style="color: rgb(151, 134, 160); "&gt;import Control.Monad.Trans.State.Lazy(StateT(..))&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-6"&gt; &lt;/span&gt;&lt;span id="li-0-7"&gt;&lt;span class="s" style="color: rgb(151, 134, 160); "&gt;-- Memoise arbitrary monadic computations by wrapping them inside a StateT Monad Transformer&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-8"&gt;&lt;span class="s" style="color: rgb(151, 134, 160); "&gt;memoState :: (Ord k, Monad m) =&gt; (k -&gt; m s) -&gt; k -&gt; StateT (M.Map k s) m s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-9"&gt;&lt;span class="s" style="color: rgb(151, 134, 160); "&gt;memoState f k = StateT $ &lt;/span&gt;&lt;span class="se" style="color: rgb(151, 134, 160); "&gt;\&lt;/span&gt;&lt;span class="err" style="color: rgb(48, 48, 48); "&gt;s -&gt;&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-10"&gt;        &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;case&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;M&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;.&lt;/span&gt;&lt;span class="n"&gt;lookup&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;of&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-11"&gt;            &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Nothing&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;-&gt;&lt;/span&gt; &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;do&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-12"&gt;                &lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-13"&gt;                &lt;span class="n"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;M&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;.&lt;/span&gt;&lt;span class="n"&gt;insert&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-14"&gt;            &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Just&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;-&gt;&lt;/span&gt; &lt;span class="n"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Rather than explain how it works, here's an example of using it -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 14px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;pre style="overflow-x: auto; overflow-y: auto; padding-left: 5px; "&gt;&lt;span id="li-0-1"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Our base monadic computation (IO)&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-2"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;f&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Int&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;-&gt;&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;IO&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;String&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-3"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;f&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;do&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-4"&gt;    &lt;span class="n"&gt;putStr&lt;/span&gt; &lt;span class="s" style="color: rgb(151, 134, 160); "&gt;"Get Value #"&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-5"&gt;    &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-6"&gt;    &lt;span class="n"&gt;putStr&lt;/span&gt; &lt;span class="s" style="color: rgb(151, 134, 160); "&gt;"writesomething&gt;"&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-7"&gt;    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;getLine&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-8"&gt;    &lt;span class="n"&gt;return&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-9"&gt; &lt;/span&gt;&lt;span id="li-0-10"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Here's the IO monadic value (f) used in a memoised context&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-11"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- First we wrap f inside StateT using memoState&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-12"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Then we chain it together using the usual monadic operations&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-13"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Note the use of Lift to perform actions in the IO monad&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-14"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fchain&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;StateT&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Stat&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;Int&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;IO&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;String&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-15"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;fchain&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;do&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-16"&gt;    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;f'&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;0&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-17"&gt;    &lt;span class="n"&gt;lift&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-18"&gt;    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;f'&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;1&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-19"&gt;    &lt;span class="n"&gt;lift&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-20"&gt;    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;f'&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;0&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-21"&gt;    &lt;span class="n"&gt;lift&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-22"&gt;    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;f'&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;1&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-23"&gt;    &lt;span class="n"&gt;lift&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-24"&gt;    &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;&lt;-&lt;/span&gt; &lt;span class="n"&gt;f'&lt;/span&gt; &lt;span class="mi" style="color: rgb(0, 0, 208); font-weight: bold; "&gt;2&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-25"&gt;    &lt;span class="n"&gt;lift&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-26"&gt;    &lt;span class="n"&gt;return&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-27"&gt;        &lt;span class="kr" style="color: rgb(0, 128, 0); font-weight: bold; "&gt;where&lt;/span&gt; &lt;span class="n"&gt;f'&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="n"&gt;memoState&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-28"&gt; &lt;/span&gt;&lt;span id="li-0-29"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- The memoised computation fchain can now be run as a whole&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-30"&gt;&lt;span class="c1" style="color: rgb(128, 128, 128); "&gt;-- Thanks to memoisation, inspite of us invoking (f' 0) and (f' 1) twice, the user will be asked for their values only once.&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-31"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;main&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;::&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;IO&lt;/span&gt; &lt;span class="nb" style="color: rgb(0, 112, 32); "&gt;()&lt;/span&gt; &lt;/span&gt;&lt;span id="li-0-32"&gt;&lt;span class="nf" style="color: rgb(0, 96, 176); font-weight: bold; "&gt;main&lt;/span&gt; &lt;span class="ow" style="color: rgb(0, 0, 0); font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="n"&gt;runStateT&lt;/span&gt; &lt;span class="n"&gt;fchain&lt;/span&gt; &lt;span class="o" style="color: rgb(48, 48, 48); "&gt;$&lt;/span&gt; &lt;span class="kt" style="color: rgb(48, 48, 144); font-weight: bold; "&gt;M&lt;/span&gt;&lt;span class="o" style="color: rgb(48, 48, 48); "&gt;.&lt;/span&gt;&lt;span class="n"&gt;empty&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Works as advertised I'd say....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8668070888347603309?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8668070888347603309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8668070888347603309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8668070888347603309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8668070888347603309'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/09/haskell-memoise-arbitrary-functions-and.html' title='Haskell: Memoise arbitrary functions and monadic values'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1229719683895824317</id><published>2010-08-31T00:34:00.005+05:30</published><updated>2010-08-31T00:42:29.044+05:30</updated><title type='text'>Quick multi level mergesort algorithm in javascript</title><content type='html'>&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;/* Quick multi level mergesort algorithm in javascript * &lt;/code&gt;&lt;span class="Apple-style-span" style="font-family: monospace; "&gt; * Sort the array first by field1 then by field 2      */&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;var sort = function(arr) {&lt;br /&gt;               var len = arr.length;&lt;br /&gt;               if (len &amp;lt; 2) return arr;&lt;br /&gt;               var pivot = Math.ceil(len / 2);&lt;br /&gt;               return merge(sort(arr.slice(0, pivot)), sort(arr.slice(pivot)));&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;var merge = function(left, right) {&lt;br /&gt;               var result = [];&lt;br /&gt;               var li = 0;&lt;br /&gt;               var ri = 0;&lt;br /&gt;               var ll = left.length;&lt;br /&gt;               var rl = right.length;&lt;br /&gt;               var le = null;&lt;br /&gt;               var re = null;&lt;br /&gt;&lt;br /&gt;               while ((li &lt; ll) &amp;amp;&amp;amp; (ri &lt; rl)) {&lt;br /&gt;&lt;br /&gt;                               le = left[li];&lt;br /&gt;                               re = right[ri];&lt;br /&gt;&lt;br /&gt;                               if (le.field1 &gt; re.field1) {&lt;br /&gt;                                               result.push(le);&lt;br /&gt;                                               li++;&lt;br /&gt;                                               continue;&lt;br /&gt;                               }&lt;br /&gt;&lt;br /&gt;                               if (le.field1 &lt; re.field1) {&lt;br /&gt;                                               result.push(re);&lt;br /&gt;                                               ri++;&lt;br /&gt;                                               continue;&lt;br /&gt;                               }&lt;br /&gt;&lt;br /&gt;                               if (le.field2 &gt; re.field2) {&lt;br /&gt;                                               result.push(le);&lt;br /&gt;                                               li++;&lt;br /&gt;                                               continue;&lt;br /&gt;                               }&lt;br /&gt;&lt;br /&gt;                               result.push(re);&lt;br /&gt;                               ri++;&lt;br /&gt;                               continue;&lt;br /&gt;&lt;br /&gt;               }&lt;br /&gt;&lt;br /&gt;               result = result.concat(left.slice(li), right.slice(ri));&lt;br /&gt;               return result;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1229719683895824317?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1229719683895824317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1229719683895824317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1229719683895824317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1229719683895824317'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/08/quick-multi-level-mergesort-algorithm.html' title='Quick multi level mergesort algorithm in javascript'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-435893002375041024</id><published>2010-08-12T00:06:00.003+05:30</published><updated>2010-08-12T00:21:13.472+05:30</updated><title type='text'>Wget as a spider/crawler - Recursively download a webpage and everything it links to</title><content type='html'>&lt;div&gt;Here's a handy command line for using the Linux utility wget as a web crawler.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;b&gt;wget -r -np -p -k http://www.example.com&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;An explanation of the options -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;r&lt;/span&gt;&lt;/b&gt; - enable recursive downloads&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;np&lt;/span&gt;&lt;/b&gt; - wget will not follow links &lt;b&gt;up&lt;/b&gt; the url. e.g. it will not follow a link from &lt;b&gt;example.com/abcd/page1.html&lt;/b&gt; to &lt;b&gt;example.com/page2.html&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;p&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt; &lt;/span&gt;- get all the page requisites. e.g. get all the image/css/js files linked from the page.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;k&lt;/span&gt;&lt;/b&gt; - convert all links to make them suitable for local viewing. Will convert all absolute links to relative links if the file has been downloaded locally.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Some more useful tips:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;c&lt;/span&gt;&lt;/b&gt; - continue a previous download. This option is very handy to resume past aborted download attempts. It compares the local filesize with the remote filesize and downloads only the difference. Beware that if the files have changed on the server, you would end up with a garbled file.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;X&lt;/span&gt;&lt;/b&gt; - Supply a list of directories to exclude from downloading. Is helpful for example when you want to not download a particular section of the site. You can include wildcards in the directory pattern. e.g. &lt;b&gt;-X /ads/*&lt;/b&gt; will skip over anything that begins with &lt;b&gt;www.example.com/ads&lt;/b&gt; folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-435893002375041024?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/435893002375041024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=435893002375041024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/435893002375041024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/435893002375041024'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/08/wget-as-spidercrawler-recursively.html' title='Wget as a spider/crawler - Recursively download a webpage and everything it links to'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-75893771251803902</id><published>2010-08-07T00:00:00.003+05:30</published><updated>2010-08-07T00:14:25.109+05:30</updated><title type='text'>Linux BASH function to search recursively for a string in all files in the current directory</title><content type='html'>If you do any serious coding at all, you would have used a "Search" function in your editor. Some IDEs even allow you to search within the entire project/workspace or a subset of files within that workspace. But when you are using a simple text editor that does not support such features, such functionality is sorely missed.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fortunately, the Linux shell BASH provides an easy way to search for any string recursively in a directory. Just cd to the desired location and do -&lt;/div&gt;&lt;div&gt;&lt;pre&gt;grep -ri "[a phrase]" .&lt;/your&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This would give you the results of a recursive (-r), case insensitive match (-i) for the supplied string in all the files in the current directory.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;But I find even this small line a pain to type when I have to do this every other minute during a marathon coding session. So I wrote a small wrapper function to make this even easier -&lt;div&gt;&lt;pre&gt;&lt;br /&gt;function grepcr() {&lt;br /&gt;if [ $# -gt 0 ]; then&lt;br /&gt; a=$1&lt;br /&gt; shift&lt;br /&gt;fi&lt;br /&gt;sp=" "&lt;br /&gt;while [ $# -gt 0 ]; do&lt;br /&gt; a=$a$sp$1&lt;br /&gt; shift&lt;br /&gt;done&lt;br /&gt;echo "grep -ri \"$a\" ."&lt;br /&gt;grep -ri "$a" .&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;Just put this function in your ~/.bashrc file and then you can search for "a phrase" using the simple -&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;grepcr a phrase&lt;/pre&gt;&lt;div&gt;As you may have guessed, "grepcr" stands for GREP Contents Recursively.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-75893771251803902?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/75893771251803902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=75893771251803902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/75893771251803902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/75893771251803902'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/08/linux-bash-function-to-search.html' title='Linux BASH function to search recursively for a string in all files in the current directory'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6385232411650628116</id><published>2010-06-28T19:56:00.003+05:30</published><updated>2010-06-28T20:04:46.567+05:30</updated><title type='text'>Installing Leksah IDE for Haskell on Ubuntu 10.04 Lucid Lynx</title><content type='html'>From this &lt;a href="http://rizwanbulbul.blogspot.com/2010/06/installing-leksah-gtk-gtk2hs-and-glade.html"&gt;post&lt;/a&gt;  -&lt;br /&gt;&lt;ol&gt;&lt;li&gt;sudo apt-get install cabal-install libghc6-zlib-dev libgtk2.0-dev libgtksourceview2.0-dev libglade2-dev&lt;/li&gt;&lt;li&gt;sudo cabal update&lt;/li&gt;&lt;li&gt;sudo cabal install cabal-install --global&lt;/li&gt;&lt;li&gt;sudo cabal install alex --global&lt;/li&gt;&lt;li&gt;sudo cabal install happy --global&lt;/li&gt;&lt;li&gt;sudo cabal install gtk2hs-buildtools --global&lt;/li&gt;&lt;li&gt;sudo cabal install glade --global&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;sudo cabal install leksah --global&lt;/li&gt;&lt;/ol&gt;Easy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6385232411650628116?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6385232411650628116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6385232411650628116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6385232411650628116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6385232411650628116'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/06/installing-leksah-ide-for-haskell-on.html' title='Installing Leksah IDE for Haskell on Ubuntu 10.04 Lucid Lynx'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-128417772735917773</id><published>2010-06-25T13:48:00.003+05:30</published><updated>2010-06-25T14:03:55.696+05:30</updated><title type='text'>Converting videos for playback on Blackberry Storm 9530</title><content type='html'>Playing decent quality videos on the Blackberry Storm is no walk in the park!&lt;br /&gt;&lt;br /&gt;File size is always an issue on a mobile device. You should convert your videos to smaller screen sizes to save space. A more serious issue is compatibility. I tried to play a bunch of my AVI files on the storm but with no cigars. So transcoding video files was a necessity.&lt;br /&gt;&lt;br /&gt;There are a bunch of utilities for Windows to convert videos to a variety of formats but nothing equivalently easy exists on Linux. Or so I thought.&lt;br /&gt;&lt;br /&gt;Then I discovered that &lt;a href="http://mediautils.garage.maemo.org/tablet-encode.html"&gt;Tablet Encoder&lt;/a&gt; (perl script) for the Nokia Maemo platform works equally well for encoding videos for the Storm! Infact I realised that the default options for conversion to MPG give you a decent enough video playback. So you can just do this -&lt;br /&gt;&lt;blockquote&gt;./tablet-encode original_movie.avi converted_for_the_storm.mpg&lt;/blockquote&gt;and you are done.&lt;br /&gt;&lt;br /&gt;It squishes a 1.5 GB movie into a 300 MB filesize with very decent audio and video quality. Try it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-128417772735917773?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/128417772735917773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=128417772735917773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/128417772735917773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/128417772735917773'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/06/converting-videos-for-playback-on.html' title='Converting videos for playback on Blackberry Storm 9530'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3212683381625243865</id><published>2010-06-12T17:08:00.003+05:30</published><updated>2010-06-12T17:19:57.636+05:30</updated><title type='text'>Getting Mobireader to work correctly on Blackberry Storm</title><content type='html'>&lt;a href="http://www.mobipocket.com/en/DownloadSoft/ProductDetailsReader.asp"&gt;MobiPocket Reader&lt;/a&gt; is the best solution for reading ebooks on your Blackberry.&lt;br /&gt;&lt;br /&gt;Unfortunately, the current Blackberry version of Mobireader available is not tweaked appropriately for the full screen touch enabled Storm experience and is an eyesore. So much so that it can be labeled unusable.&lt;br /&gt;&lt;br /&gt;Fortunately, the MobiPocket team has indicated that they are working on a Storm version of their software. Till the time that version is release however, you can get by disabling compatibility mode, using the following steps -&lt;br /&gt;&lt;ol&gt;&lt;li&gt;On your blackberry, go to Options -&gt; Advanced Options -&gt; Applications.&lt;/li&gt;&lt;li&gt;Hightlight Mobipocket Reader and click the menu button&lt;/li&gt;&lt;li&gt;Select "Disable Compatibility Mode"&lt;/li&gt;&lt;li&gt;Perform a hard reset by turning off the Blackberry and taking out the battery.&lt;/li&gt;&lt;li&gt;Restart the blackberry.&lt;/li&gt;&lt;/ol&gt;At this point when you start the Mobipocket Reader application you would see a full screen interface that can be controlled effectively using the touchscreen. Opening any books would open in full screen but sadly cannot be navigated. To navigate you need to click the menu button and "Show keyboard". Then you can navigate using the Space key and the O/P keys on the keyboard.&lt;br /&gt;&lt;br /&gt;That simple trick will make Mobipocket Reader pretty usable on the Blackberry Storm.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3212683381625243865?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3212683381625243865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3212683381625243865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3212683381625243865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3212683381625243865'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/06/getting-mobireader-to-work-correctly-on.html' title='Getting Mobireader to work correctly on Blackberry Storm'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8819622077608591912</id><published>2010-06-10T09:37:00.001+05:30</published><updated>2010-07-12T18:33:13.048+05:30</updated><title type='text'>Pre built Erlang/OTP R13B04 Debian package for Ubuntu 10.04 (Lucid). Includes WX support and all documentation</title><content type='html'>&lt;p&gt;While building the latest Erlang distribution from sources (R13B04 at  the time of writing) is not too difficult on Ubuntu (see my last post  on this blog), it is a royal pain to do so for all of your machines  every time you upgrade your distribution. The bundled erlang with Ubuntu  is always a few steps behind the latest official release of Erlang so  doing "sudo apt-get install erlang" is not an option.&lt;/p&gt;So for all the  people who would like to stay up to date and yet not have to bother with  configuring and building erlang from sources, I have created a debian  package of erlang R13B04 with wx configured and with all the docs  included.&lt;p&gt;Get the &lt;a href="http://freesoftwarefreeworld.com/public/created_by_me/debian_packages/erlang/otp-src-r13b04_r13b04-1_i386.deb"&gt;erlang  deb file for Ubuntu 10.04 from freesoftwarefreeworld.com&lt;/a&gt;. The  release has wx support (which is difficult to get configured correctly  when building from sources) and the PDF docs, HTML docs, and the man  pages are also included. This is the first deb package I created so it  is admittedly a bit rough (though it should work fine). I will be  refining the deb file every once in a while, and keep it up to date with  the latest released erlang sources. So keep your eyes peeled for  updates on this blog!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I'm thinking of building a deb package  for bleeding edge erlang from it's git repository as well. Please let me  know if you think it's a good idea.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8819622077608591912?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8819622077608591912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8819622077608591912' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8819622077608591912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8819622077608591912'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/06/pre-built-erlangotp-r13b04-debian.html' title='Pre built Erlang/OTP R13B04 Debian package for Ubuntu 10.04 (Lucid). Includes WX support and all documentation'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5260780070781855306</id><published>2010-06-05T19:38:00.002+05:30</published><updated>2010-06-05T19:42:31.011+05:30</updated><title type='text'>Compiling Erlang OTPR13B04 with wx support on Ubuntu Lucid</title><content type='html'>Erlang R13B04 compiles and installs fairly easily on Ubuntu Lucid. The only tricky bit was installing wx dependencies. Here's how -&lt;br /&gt;&lt;br /&gt;Make sure you do this first even before running configure -&lt;br /&gt;&lt;pre&gt;sudo apt-get install wx2.8-dev freeglut3-dev libwxgtk2.8-dev&lt;/pre&gt;There is some problem with caching so if you have run ./configure before you have installed these dependencies, things will break with weird error messages. In such cases it is better to delete the otp_src_r13b04 directory completely and untar it from the tarball again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5260780070781855306?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5260780070781855306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5260780070781855306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5260780070781855306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5260780070781855306'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/06/compiling-erlang-otpr13b04-with-wx.html' title='Compiling Erlang OTPR13B04 with wx support on Ubuntu Lucid'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6215098746423326907</id><published>2010-05-20T23:29:00.003+05:30</published><updated>2010-05-20T23:41:15.815+05:30</updated><title type='text'>To break the rules, you must first know the rules</title><content type='html'>I had to put this down somewhere -&lt;br /&gt;&lt;br /&gt;The previous post (with it's small comment on power and responsibility) reminded me of the zen koan where a master taught a pupil to always use structured code with proper design patterns. Then one day the pupil saw the master writing unstructured code. The pupil was furious and disillusioned. He asked his master - "Why do you force me to write structured code, when you yourself don't follow your own guidelines". To which the master replied "But I already know how to write structured code!", and the pupil was enlightened.&lt;br /&gt;&lt;br /&gt;"To break the rules, you must first know the rules".&lt;br /&gt;&lt;br /&gt;"This world is like any other. It has rules, some can be bent, others, broken."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6215098746423326907?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6215098746423326907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6215098746423326907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6215098746423326907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6215098746423326907'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/05/to-break-rules-you-must-first-know.html' title='To break the rules, you must first know the rules'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8210744174658618039</id><published>2010-05-20T22:51:00.003+05:30</published><updated>2010-05-20T23:29:26.584+05:30</updated><title type='text'>Javascript performance - closures versus prototypal inheritence</title><content type='html'>Another @ work story.&lt;br /&gt;&lt;br /&gt;Today while reviewing some code a junior wrote - I saw a 'class' definition that looked like this -&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;--------------------------------------------&lt;br /&gt;function Foo(x, y) {&lt;br /&gt; var innerx = x*10;&lt;br /&gt; var innery = y*50;&lt;br /&gt;&lt;br /&gt; ... some more processing here ...&lt;br /&gt;&lt;br /&gt; var returned = {};&lt;br /&gt; returned.sum = function () {&lt;br /&gt;   return innerx+innery;&lt;br /&gt; };&lt;br /&gt; returned.setx = function (xval) {&lt;br /&gt;   innerx = xval;&lt;br /&gt; };&lt;br /&gt;&lt;br /&gt; return returned;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var newFoo = Foo();&lt;br /&gt;--------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Do you see what is happening here? This code is using closures to mimic object encapsulation in javascript. The returned object is a closure and therefore has access to innerx and innery variables of the enclosing object/function. The piece of code that calls Foo() gets this object but cannot access the inner variables. It can only access the setx() method to set the value of innerx. And innery is completely inaccessible. This is functional paradigm not an object oriented one (notice the distinct absence of &lt;span style="font-weight: bold;"&gt;new&lt;/span&gt; anywhere in the code)!&lt;br /&gt;&lt;br /&gt;There isn't a way to do this using plain prototype mechanism provided by javascript. You would write something like -&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;--------------------------------------------&lt;br /&gt;function Foo(x, y) {&lt;br /&gt; this.innerx = x*10;&lt;br /&gt; this.innery = y*50;&lt;br /&gt;&lt;br /&gt; ... some more processing here ...&lt;br /&gt;}&lt;br /&gt;Foo.prototype.sum = function(){&lt;br /&gt; return innerx+innery;&lt;br /&gt;};&lt;br /&gt;Foo.prototype.setx = function(xval){&lt;br /&gt; this.innerx = xval;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;var newFoo = new Foo();&lt;br /&gt;--------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here the variables innerx and innery are exposed to the world. But that's not such a bad thing in my opinion - power == responsibility.&lt;br /&gt;&lt;br /&gt;But the functional style code (using closures) has another problem - For each object that is created, the methods are redefined! This is a great speed and memory overhead if your methods are small. In the prototypal code, the methods are defined once (for the prototype object) and then shared across all instances.&lt;br /&gt;&lt;br /&gt;The verdict - I told the coder to rewrite the code using the prototype object. There really wasn't a need to support strict encapsulation in this piece of code (in my experience, there rarely is) and the performance hit wasn't worth it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8210744174658618039?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8210744174658618039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8210744174658618039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8210744174658618039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8210744174658618039'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/05/javascript-performance-closures-versus.html' title='Javascript performance - closures versus prototypal inheritence'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4718311794764778901</id><published>2010-05-19T00:16:00.002+05:30</published><updated>2010-05-19T00:27:42.988+05:30</updated><title type='text'>Installing CouchDB from latest guthub sources in Ubuntu Lucid</title><content type='html'>It's a 3 step process -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Install dependencies -&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;sudo apt-get install erlang build-essential libicu-dev libcurl4-openssl-dev xulrunner-dev&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note that libmozjs-dev is no longer provided on Ubuntu starting with Lucid. This is why we need to install xulrunner-dev which includes spidermonkey. We point couchdb to the appropriate directory within xulrunner in step 3.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Checkout latest couchdb sources from official git repos -&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;git  clone http://github.com/apache/couchdb.git&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Bootstrap, Configure, Make and Install!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;cd couchdb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;./bootstrap&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;./configure --with-js-lib=/usr/lib/xulrunner-devel-1.9.2.3/lib --with-js-include=/usr/lib/xulrunner-devel-1.9.2.3/include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;make&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;$ &lt;/span&gt;make install&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4718311794764778901?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4718311794764778901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4718311794764778901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4718311794764778901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4718311794764778901'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/05/installing-couchdb-from-latest-guthub.html' title='Installing CouchDB from latest guthub sources in Ubuntu Lucid'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7802162346978160893</id><published>2010-05-07T14:27:00.003+05:30</published><updated>2010-05-07T14:56:09.932+05:30</updated><title type='text'>Quick profiling script to gather performance metrics in ruby</title><content type='html'>So over at work we are using an interpreted language for performing many tasks. The interpreter has a debug mode wherein it prints out START and END messages for every function executed with a timestamp in milliseconds. Here's a sample -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;LOG : 1221489714064 : foo() : START&lt;br /&gt;LOG : 1221489714286 : bar1() : START&lt;br /&gt;LOG : 1221489714411 : baz1() : START&lt;br /&gt;LOG : 1221489714676 : baz1() : END&lt;br /&gt;LOG : 1221489714812 : baz2() : START&lt;br /&gt;LOG : 1221489715478 : baz2() : END&lt;br /&gt;LOG : 1221489715574 : bar1() : END&lt;br /&gt;LOG : 1221489715698 : bar2() : START&lt;br /&gt;LOG : 1221489718073 : bar2() : END&lt;br /&gt;LOG : 1221489720092 : foo() : END&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You can see what is going on there. The huge number is a milliseconds timestamp, followed by the function name and a START or an END depending on whether it entered or exited the function.&lt;br /&gt;&lt;br /&gt;This is pretty useful information when you are trying to squeeze out every bit of performance out of these functions.. Unfortunately looking at the log files and performing mental subtraction between 13-14 digit numbers on the fly is really not something I wanted to do, EVER.&lt;br /&gt;&lt;br /&gt;So I wrote this simple ruby script in a jiffy. It converts the previous bit of information into something a lot easier to parse -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;foo() == 6028 msec&lt;br /&gt;--&gt;bar1() == 1288 msec&lt;br /&gt;--&gt;--&gt;baz1() == 265 msec&lt;br /&gt;--&gt;--&gt;baz2() == 666 msec&lt;br /&gt;--&gt;bar2() == 2375 msec&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;As you can see, the script gives you the elapsed times for all the functions. It supports nesting and depicts the function stack graphically. It makes it easy, for example, to see that foo calls two more functions bar1 and bar2 which take more than half of the processing time of foo. Here's the script -&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$pat = /LOG : ([\w.]+) : ([\w.()]+) : (START|END)/&lt;br /&gt;$re = Regexp.new($pat)&lt;br /&gt;&lt;br /&gt;stk = []&lt;br /&gt;out = [[]]&lt;br /&gt;File.open('log').each do |line|&lt;br /&gt;  if line =~ $re&lt;br /&gt;    if ($3 == 'START')&lt;br /&gt;      out.push []&lt;br /&gt;      stk.push $~&lt;br /&gt;    elsif ($3 == 'END') and not stk.empty?&lt;br /&gt;      # gather all information&lt;br /&gt;      end_msec = $1&lt;br /&gt;      $~ = stk.pop&lt;br /&gt;      elapsed = end_msec.to_i-$1.to_i&lt;br /&gt;      children = out.pop&lt;br /&gt;      out.last.push("#{"--&gt;"*stk.length}#{$2} == #{elapsed} msec\n")&lt;br /&gt;      out[out.length-1] = out.last + children&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;out.each {|ls|ls.each{|l|print l}}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;It expects to find the START and END statements in a file called 'log'.&lt;br /&gt;&lt;br /&gt;All the manipulation with the stack are needed to support nested functions and still support correct function call order.&lt;br /&gt;&lt;br /&gt;The only tricky bits in the code are really the pushing and popping of regular expression results. Hats off to Ruby for allowing us to do that! Really. Lesser languages would have made this task harder than it needs to be, by requiring us to extract and then save the regex match results into our own data structure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7802162346978160893?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7802162346978160893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7802162346978160893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7802162346978160893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7802162346978160893'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/05/quick-profiling-script-to-gather.html' title='Quick profiling script to gather performance metrics in ruby'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4939260211708344783</id><published>2010-04-29T17:52:00.002+05:30</published><updated>2010-04-29T17:53:02.421+05:30</updated><title type='text'>My new preferred style for function header comments</title><content type='html'>Very symmetrical!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/**************************************\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; * Description goes here&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; * IN: something&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; * OUT: something&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;\**************************************/&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4939260211708344783?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4939260211708344783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4939260211708344783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4939260211708344783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4939260211708344783'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/my-new-preferred-style-for-function.html' title='My new preferred style for function header comments'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1812446410076964520</id><published>2010-04-29T17:47:00.003+05:30</published><updated>2010-04-29T17:51:22.971+05:30</updated><title type='text'>Funny Sign in the men's room at the airport</title><content type='html'>As I recall, the sequence went like this -&lt;br /&gt;&lt;br /&gt;The liquid soap dispenser next to the washbasin -&lt;br /&gt;&lt;blockquote&gt;Press once for hand wash, 3 times for a bath!&lt;/blockquote&gt;Me:&lt;br /&gt;&lt;blockquote&gt;Ha ha!&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1812446410076964520?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1812446410076964520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1812446410076964520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1812446410076964520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1812446410076964520'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/funny-sign-in-mens-room-at-airport.html' title='Funny Sign in the men&apos;s room at the airport'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1711520700182903942</id><published>2010-04-29T17:42:00.002+05:30</published><updated>2010-04-29T17:46:45.805+05:30</updated><title type='text'>Debugging a Linux BASH shell script</title><content type='html'>Debugging shell scripts is really a PITA. Here's a handy trick that really saved me today -&lt;br /&gt;&lt;blockquote&gt;Use -x and -v switches to get more insight into what BASH is doing.&lt;/blockquote&gt;To display commands and their arguments as they are executed -&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bash &lt;span style="font-weight: bold;"&gt;-x&lt;/span&gt; scriptName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To display shell input lines as they are read -&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;bash &lt;span style="font-weight: bold;"&gt;-v&lt;/span&gt; scriptName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can put the above two commands in the shell script itself, like so -&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# turn on debug mode&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set -x&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;set -v&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OR change the shabang line -&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;#!/bin/bash -xv&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1711520700182903942?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1711520700182903942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1711520700182903942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1711520700182903942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1711520700182903942'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/debugging-linux-bash-shell-script.html' title='Debugging a Linux BASH shell script'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7892711574001335066</id><published>2010-04-28T11:17:00.002+05:30</published><updated>2010-04-28T12:04:44.182+05:30</updated><title type='text'>Best webcomic ever! - The Dinosaur Comic</title><content type='html'>Yep, the static talking dinosaurs at &lt;a href="http://www.qwantz.com/"&gt;Qwantz&lt;/a&gt; deliver the funniest, geekiest, and even surprisingly insightful, madcap comedy routine several times a week, week after week, and I simply can't get enough. Even XKCD gets boring every once in a while but dinosaur comics stay fresh.&lt;br /&gt;&lt;br /&gt;And now it gets even better! Look at the "overlay" feature -&lt;br /&gt;&lt;br /&gt;http://www.qwantz.com/index.php?butiwouldratherbereading=xkcd&lt;br /&gt;&lt;br /&gt;If you'd rather be reading xkcd with the sharp witty banter of dinosaur comics just append - &lt;span style="font-weight: bold;"&gt;&amp;amp;butiwouldratherbereading=xkcd&lt;/span&gt; to the end of the url. Talking dinosaurs replaced by talking stick figures if you find that more "real world".&lt;br /&gt;&lt;br /&gt;There are several other overlays available, mostly to convert the dinosaurs into characters from other popular webcomics. Like Penny Arcade for example -&lt;br /&gt;&lt;br /&gt;http://www.qwantz.com/index.php?butiwouldratherbereading=pennyarcade&lt;br /&gt;&lt;br /&gt;And then there are the "tweak" overlays.. Like if you prefer your prehistoric dinosaurs with just a dash of the future (think Star wars), you can make it happen. Best read with comic 1701-&lt;br /&gt;&lt;br /&gt;http://www.qwantz.com/index.php?comic=1701&amp;amp;butiwouldratherbereading=onewheretrexgotassimilated&lt;br /&gt;&lt;br /&gt;Are you easily offended by nudity (even in cartoon extinct animals)? Try on this overlay -&lt;br /&gt;&lt;br /&gt;http://www.qwantz.com/index.php?butiwouldratherbereading=onewheretrexwearsmore&lt;br /&gt;&lt;br /&gt;Oh well, TRex is still not wearing any pants...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7892711574001335066?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7892711574001335066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7892711574001335066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7892711574001335066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7892711574001335066'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/best-webcomic-ever-dinosaur-comic.html' title='Best webcomic ever! - The Dinosaur Comic'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3944684371349072770</id><published>2010-04-27T17:22:00.002+05:30</published><updated>2010-04-27T17:39:28.342+05:30</updated><title type='text'>Linux BASH tip - How to subtract arrays</title><content type='html'>So I needed a BASH code snippet to subtract arrays...&lt;br /&gt;&lt;br /&gt;What I mean by "subtracting arrays" is actually set difference like so -&lt;br /&gt;&lt;br /&gt;IF&lt;br /&gt;    array1="A B C D E F G H"&lt;br /&gt;    array2="C B D G"&lt;br /&gt;THEN&lt;br /&gt;    array1-array2 = "A E F H"&lt;br /&gt;&lt;br /&gt;Note that the arrays (strings with space separated terms really) need not be in any particular order. Also it's not be clear from the example above but in my solution duplicates are automatically removed.&lt;br /&gt;&lt;br /&gt;So without further ado here's the code -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ array1="A B C D E F G H"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ array2="C B D G"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ finalResult=`comm -23 &lt;(echo ${array1} | sed 's/ /\n/g' | sort -u) &lt;(echo ${array2} | sed 's/ /\n/g' | sort -u)`&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ echo $finalResult&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;A E F H&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It uses the cool "comm" which comes installed on Linux by default. Comm basically compares two &lt;span style="font-weight: bold;"&gt;sorted&lt;/span&gt; files line by line and can give you lines only in a particular file and not the other; In other words the "difference" between two files. This is basically all we needed. We do need to sort the inputs (which removes duplicates as well) before we pass them to comm, hence the use of 'sort'. And we need to convert 'space' to 'newline' before we can pass the strings to sort, hence the use of 'sed'. Piping it all together, we have a nice little one liner.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3944684371349072770?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3944684371349072770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3944684371349072770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3944684371349072770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3944684371349072770'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/linux-bash-tip-how-to-subtract-arrays.html' title='Linux BASH tip - How to subtract arrays'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2828658633120965100</id><published>2010-04-05T20:25:00.001+05:30</published><updated>2010-04-05T20:26:19.483+05:30</updated><title type='text'>Minicom lock file</title><content type='html'>Is in this place -&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-weight: bold;"&gt;/var/tmp&lt;/span&gt;/&lt;span style="font-weight: bold;"&gt;LCK&lt;/span&gt;..&lt;span style="font-weight: bold;"&gt;tty&lt;/span&gt;USB0&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;Or something similar.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2828658633120965100?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2828658633120965100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2828658633120965100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2828658633120965100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2828658633120965100'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/minicom-lock-file.html' title='Minicom lock file'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-9099665593341957315</id><published>2010-04-02T12:47:00.002+05:30</published><updated>2010-04-02T13:24:03.755+05:30</updated><title type='text'>The search for a good Linux GUI for SVN ends at RabbitVCS</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JRKC4KMPogw/S7WifHLqJSI/AAAAAAAAFjg/1eCaFWdYXjE/s1600/tortoise_hare.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 252px; height: 320px;" src="http://2.bp.blogspot.com/_JRKC4KMPogw/S7WifHLqJSI/AAAAAAAAFjg/1eCaFWdYXjE/s320/tortoise_hare.jpg" alt="" id="BLOGGER_PHOTO_ID_5455445179016815906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;SVN may not be the best source control management tool in the world (that title goes to 'git' IMO) but it's certainly the most popular, and you would think that there would be a ton of GUI options for it on Linux. Not so..&lt;br /&gt;&lt;br /&gt;While on windows there's the excellent TortoiseSVN, the only options for people working with SVN repositories on Linux were RapidSVN (which is not under development anymore and hasn't been updated in a while) or the commandline. And the commandline is what I used till today, which while fine for most purposes, does leave you pining for an easier way to juggle revision numbers and look at specific log messages without headaches.&lt;br /&gt;&lt;br /&gt;Well now I have another option. And what a great option it is! RabbitVCS will leave TortoiseSVN behind in its wake!&lt;br /&gt;&lt;br /&gt;Rabbit integrates with Nautilus, Thunar, Gedit etc. to give you that familiar "Shell Extension" ease of use of Tortoise. It makes working with SVN repos a snap.&lt;br /&gt;&lt;br /&gt;Go grab it &lt;a href="http://rabbitvcs.org/"&gt;here&lt;/a&gt;. It has Ubuntu PPA repos which makes it a snap to install.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-9099665593341957315?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/9099665593341957315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=9099665593341957315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/9099665593341957315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/9099665593341957315'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/04/search-for-good-linux-gui-for-svn-ends.html' title='The search for a good Linux GUI for SVN ends at RabbitVCS'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRKC4KMPogw/S7WifHLqJSI/AAAAAAAAFjg/1eCaFWdYXjE/s72-c/tortoise_hare.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7855104213511173634</id><published>2010-03-09T14:01:00.001+05:30</published><updated>2010-03-09T14:03:41.218+05:30</updated><title type='text'>This has to be one of the most productive uses of twitter I ever saw!</title><content type='html'>&lt;a href="http://www.longestpoemintheworld.com/"&gt;http://www.longestpoemintheworld.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sampler - The first page&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;And now for some time in the new Japanese soaking tub.&lt;br /&gt;&lt;br /&gt;Done and done. Liking the new haircut. Now to get some grub ^_^&lt;br /&gt;&lt;br /&gt;In the hospital, and going to be a first time dad soon!&lt;br /&gt;&lt;br /&gt;Today can stop what it's doing already and chang its tune.&lt;br /&gt;&lt;br /&gt;Yet you follow and you'll watch you bitch.&lt;br /&gt;&lt;br /&gt;we're beautiful and dirty rich&lt;br /&gt;&lt;br /&gt;biting off all my nails, and painting them white.&lt;br /&gt;&lt;br /&gt;:O Oh and Life of Ryan ... What a great TV night ???&lt;br /&gt;&lt;br /&gt;The more we do here and now, the more it'll matter then and there.&lt;br /&gt;&lt;br /&gt;I left without my sock hat and i miss having longer hair!&lt;br /&gt;&lt;br /&gt;And of course - Varghese Bush. The world suddenly makes a lot of sense.&lt;br /&gt;&lt;br /&gt;And I?m leaning on this broken fence between past and present tense.&lt;br /&gt;&lt;br /&gt;Work work work and no play!&lt;br /&gt;&lt;br /&gt;its toot and boot it day&lt;br /&gt;&lt;br /&gt;Monkeys live in trees, grasslands, mountains, forests and on high plains.&lt;br /&gt;&lt;br /&gt;No matter the circumstance God is still good and He reigns!&lt;br /&gt;&lt;br /&gt;now im running and screaming.&lt;br /&gt;&lt;br /&gt;good night and pleasant dreaming ...&lt;br /&gt;&lt;br /&gt;Wrapping my hair, and off to bed! :-)&lt;br /&gt;&lt;br /&gt;Bang and you are soo very dead. :)&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7855104213511173634?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7855104213511173634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7855104213511173634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7855104213511173634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7855104213511173634'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/03/this-has-to-be-one-of-most-productive.html' title='This has to be one of the most productive uses of twitter I ever saw!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4028869193035072278</id><published>2010-03-09T13:30:00.003+05:30</published><updated>2010-03-09T13:47:20.909+05:30</updated><title type='text'>Installing Haskell Platform (with GHC 6.10.4) in Ubuntu Karmic</title><content type='html'>From http://gist.github.com/326372&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;# Install dependencies&lt;br /&gt;sudo apt-get install ghc6 ghc6-prof ghc6-doc haddock libglut-dev happy alex \&lt;br /&gt;libedit-dev zlib1g-dev checkinstall libghc6-mtl-prof libghc6-network-prof&lt;br /&gt;&lt;br /&gt;# Get haskell-platform&lt;br /&gt;wget http://hackage.haskell.org/platform/2009.2.0.2/haskell-platform-2009.2.0.2.tar.gz&lt;br /&gt;tar -xzf haskell-platform-2009.2.0.2.tar.gz&lt;br /&gt;cd haskell-platform-2009.2.0.2&lt;br /&gt;&lt;br /&gt;# Build &amp;amp; Install&lt;br /&gt;./configure&lt;br /&gt;&lt;br /&gt;# Before doing a make, install this patch from http://trac.haskell.org/haskell-platform/ticket/84&lt;br /&gt;# Patch appended at the end of the post&lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;sudo checkinstall -y&lt;br /&gt;&lt;br /&gt;cabal update&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;------------------------&gt;8---------------------------&lt;br /&gt;PATCH FOLLOWS&lt;br /&gt;------------------------&gt;8---------------------------&lt;br /&gt;A quick(-and-dirty) hot fix: -- code copied from build.sh&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;scripts/install.sh |   18 ++++++++++++++----&lt;br /&gt;1 file changed, 14 insertions(+), 4 deletions(-)&lt;br /&gt;&lt;br /&gt;Index: haskell-platform-2009.2.0.2/scripts/install.sh&lt;br /&gt;===================================================================&lt;br /&gt;--- haskell-platform-2009.2.0.2.orig/scripts/install.sh&lt;br /&gt;+++ haskell-platform-2009.2.0.2/scripts/install.sh&lt;br /&gt;@@ -34,13 +34,23 @@ install_pkg () {&lt;br /&gt;  fi&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;+# Is this exact version of the package already installed?&lt;br /&gt;+is_pkg_installed () {&lt;br /&gt;+  PKG_VER=$1&lt;br /&gt;+  grep " ${PKG_VER} " installed.packages &gt; /dev/null 2&gt;&amp;amp;1&lt;br /&gt;+}&lt;br /&gt;+&lt;br /&gt;# Actually do something!&lt;br /&gt;cd packages&lt;br /&gt;for pkg in `cat platform.packages`; do&lt;br /&gt;-  cd "${pkg}" || die "The directory for the component ${PKG} is missing"&lt;br /&gt;-  echo "Installing ${pkg}..."&lt;br /&gt;-  install_pkg ${pkg}&lt;br /&gt;-  cd ..&lt;br /&gt;+  if is_pkg_installed "${pkg}"; then&lt;br /&gt;+    echo "Platform package ${pkg} is already installed. Skipping..."&lt;br /&gt;+  else&lt;br /&gt;+    cd "${pkg}" || die "The directory for the component ${PKG} is missing"&lt;br /&gt;+    echo "Installing ${pkg}..."&lt;br /&gt;+    install_pkg ${pkg}&lt;br /&gt;+    cd ..&lt;br /&gt;+  fi&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;echo&lt;br /&gt;&lt;br /&gt;------------------------&gt;8---------------------------&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4028869193035072278?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4028869193035072278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4028869193035072278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4028869193035072278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4028869193035072278'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/03/installing-haskell-platform-with-ghc.html' title='Installing Haskell Platform (with GHC 6.10.4) in Ubuntu Karmic'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4830579336887253757</id><published>2010-03-09T13:20:00.003+05:30</published><updated>2010-03-09T13:27:53.818+05:30</updated><title type='text'>Installing GHC 6.10.4 on webfaction</title><content type='html'>It was surprisingly easy!&lt;br /&gt;&lt;br /&gt;Install the generic Haskell 6.10.4 package from http://haskell.org/ghc/download_ghc_6_10_4.html#x86linux&lt;br /&gt;&lt;ol&gt;&lt;li&gt;wget http://haskell.org/ghc/dist/6.10.4/ghc-6.10.4-i386-unknown-linux-n.tar.bz2&lt;br /&gt;&lt;/li&gt;&lt;li&gt;bunzip2 ghc-6.10.4-i386-unknown-linux-n.tar.bz2&lt;/li&gt;&lt;li&gt;tar -xvf ghc-6.10.4-i386-unknown-linux-n.tar&lt;/li&gt;&lt;li&gt;cd ghc-6.10.4&lt;/li&gt;&lt;li&gt;./configure --prefix=$HOME/applications&lt;/li&gt;&lt;li&gt;make install&lt;/li&gt;&lt;/ol&gt;Proceeded smoothly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4830579336887253757?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4830579336887253757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4830579336887253757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4830579336887253757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4830579336887253757'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/03/installing-ghc-6104-on-webfaction.html' title='Installing GHC 6.10.4 on webfaction'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8786295428448328793</id><published>2010-03-08T13:37:00.006+05:30</published><updated>2010-04-05T23:23:08.362+05:30</updated><title type='text'>Ruby one liner for array splitting</title><content type='html'>The expressiveness of Ruby can surprise you sometimes. And unlike something ultra powerful like Haskell where the expressiveness can fry your noodles, in Ruby the expressiveness comes naturally &lt;span style="font-style: italic;"&gt;for real world code&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Here's a good example -&lt;br /&gt;&lt;br /&gt;I needed a quick function to split an array into sub arrays of fixed sizes. It was very quick and painless and the brevity of the code did surprise me!&lt;br /&gt;&lt;code&gt;&lt;br /&gt;class Array&lt;br /&gt;  def chunk(sizen=2, chunks=[])&lt;br /&gt;    (0...self.length).step(sizen) { |n| chunks &lt;&lt; self[n,sizen] }&lt;br /&gt;    chunks&lt;br /&gt;  end&lt;br /&gt;end &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It's effectively a one liner, if you ignore comments and the cruft for declarations and return values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8786295428448328793?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8786295428448328793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8786295428448328793' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8786295428448328793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8786295428448328793'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/03/ruby-one-liner-for-array-splitting.html' title='Ruby one liner for array splitting'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1347019136406808586</id><published>2010-03-08T13:31:00.002+05:30</published><updated>2010-03-08T13:37:44.847+05:30</updated><title type='text'>Gnome IPMessenger replacement</title><content type='html'>Just now saw http://code.google.com/p/iptux/&lt;br /&gt;&lt;br /&gt;It supports messages and ultra fast file transfers over LAN. Plus! It comes bundled with Ubuntu (Use Ubuntu Software Manager to install).!&lt;br /&gt;&lt;br /&gt;L better than IPMessenger because it supports multiple networks and also behaves much more like a traditional messaging client (chat windows, profile avatars etc.), But the tiny downside is that it doesn't support sealed messages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1347019136406808586?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1347019136406808586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1347019136406808586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1347019136406808586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1347019136406808586'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/03/gnome-ipmessenger-replacement.html' title='Gnome IPMessenger replacement'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-32293705695339529</id><published>2010-02-05T22:28:00.002+05:30</published><updated>2010-02-05T22:35:02.864+05:30</updated><title type='text'>Getting Erlang crypto to work on windows</title><content type='html'>Had a bit of trouble getting Webmachine to work on a windows box. Kept on running into this error -&lt;br /&gt;&lt;blockquote&gt;=ERROR REPORT==== 5-Feb-2010::22:29:24 ===&lt;br /&gt;Unable to load &lt;span style="font-weight: bold;"&gt;crypto_drv&lt;/span&gt;. Failed with error:&lt;br /&gt;"The specified module could not be found."&lt;br /&gt;OpenSSL might not be installed on this system.&lt;br /&gt;{"init terminating in do_boot",{{case_clause,{error,{shutdown,{crypto_app,start,[normal,[]]}}}},[{webmstn,ensure_started,1},{webmstn,start,0},{init,start_it,1},{init,start_em,1}]}}&lt;br /&gt;&lt;/blockquote&gt;And being the smart ass that I am, I went searching on the net instead of simply installing OpenSSL.&lt;br /&gt;&lt;br /&gt;Here's &lt;a href="http://www.trapexit.org/forum/viewtopic.php?p=48496"&gt;a very educational post&lt;/a&gt; I found on finding if a specific module is installed and loading its DLLs with erlang. This guy had the same problem as me and he finally solved it by installing &lt;a href="http://www.slproweb.com/products/Win32OpenSSL.html"&gt;OpenSSL for Win32&lt;/a&gt;! Surprise!&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;---- Quoting  ----&lt;/span&gt;&lt;br /&gt;I have a problem with trying to use the mysql driver available on google code (&lt;a href="http://code.google.com/p/erlang-mysql-driver/" target="_blank" class="postlink"&gt;http://code.google.com/p/erlang-mysql-driver/&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;I have the windows installation of erlang (tried both with R12B-5 and R13A) on my PC running on Windows XP.&lt;br /&gt;&lt;br /&gt;When try to connect to my database it fails. &lt;br /&gt;I have searched the web for hints and found others with similar problems. It seems that the crypto driver is not compiled or linked properly for my machine.&lt;br /&gt;&lt;br /&gt;Somewhere on the web I found the following test to verify if crypto works:&lt;br /&gt;&lt;br /&gt;4&gt; crypto:start(),&lt;br /&gt;4&gt; crypto:sha("abc").&lt;br /&gt;&lt;br /&gt;=PROGRESS REPORT==== 20-Mar-2009::10:14:01 ===&lt;br /&gt;          supervisor: {local,crypto_sup}&lt;br /&gt;             started: [{pid,&lt;0.61.0&gt;},&lt;br /&gt;                       {name,crypto_server},&lt;br /&gt;                       {mfa,{crypto_server,start_link,[]}},&lt;br /&gt;                       {restart_type,permanent},&lt;br /&gt;                       {shutdown,2000},&lt;br /&gt;                       {child_type,worker}]&lt;br /&gt;&lt;br /&gt;=PROGRESS REPORT==== 20-Mar-2009::10:14:01 ===&lt;br /&gt;         application: crypto&lt;br /&gt;          started_at: nonode@nohost&lt;br /&gt;&lt;&lt;169,153,62,54,71,6,129,106,186,62,37,113,120,80,194,108,&lt;br /&gt;  156,208,216,157&gt;&gt;&lt;br /&gt;&lt;br /&gt;On my machine I get the following:&lt;br /&gt;&lt;br /&gt;13&gt; crypto:start(),   &lt;br /&gt;13&gt; crypto:sha("abc").&lt;br /&gt;&lt;br /&gt;=INFO REPORT==== 19-Mar-2009::21:38:13 ===&lt;br /&gt;    application: crypto&lt;br /&gt;    exited: {shutdown,{crypto_app,start,[normal,[]]}}&lt;br /&gt;    type: temporary&lt;br /&gt;** exception error: bad argument&lt;br /&gt;     in function  port_control/3&lt;br /&gt;        called as port_control(crypto_drv02,5,"abc")&lt;br /&gt;     in call from crypto:control/2&lt;br /&gt;14&gt; &lt;br /&gt;&lt;br /&gt;I found some other information on the web on how to check if the crypto_drv.dll was loaded properly.&lt;br /&gt;&lt;br /&gt;7&gt; erl_ddll:start(),&lt;br /&gt;7&gt; &lt;br /&gt;7&gt; PrivDir = code:priv_dir(crypto),&lt;br /&gt;7&gt; &lt;br /&gt;7&gt; LibDir1 = filename:join([PrivDir, "lib"]),&lt;br /&gt;7&gt; &lt;br /&gt;7&gt; ls(LibDir1).&lt;br /&gt;crypto_drv.dll     &lt;br /&gt;ok&lt;br /&gt;8&gt; &lt;br /&gt;8&gt; Mess = erl_ddll:load_driver(LibDir1, crypto_drv).&lt;br /&gt;{error,{open_error,-136}}&lt;br /&gt;9&gt; &lt;br /&gt;9&gt; {_, Err} = Mess.&lt;br /&gt;{error,{open_error,-136}}&lt;br /&gt;10&gt; &lt;br /&gt;10&gt; erl_ddll:format_error( Err).&lt;br /&gt;"The specified module could not be found."&lt;br /&gt;11&gt; &lt;br /&gt;&lt;br /&gt;Looking at this is looks like the file location is correct but the file can not be loaded.&lt;br /&gt;&lt;br /&gt;Any suggestions what to do?&lt;br /&gt;Is the crypto_drv.dll not correct linked/compiled for my machine? &lt;br /&gt;If so where can I find a new?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;---- End Quoting ----&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Well at least it was educational...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-32293705695339529?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/32293705695339529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=32293705695339529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/32293705695339529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/32293705695339529'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/02/getting-erlang-crypto-to-work-on.html' title='Getting Erlang crypto to work on windows'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8739322722532088881</id><published>2010-02-05T13:14:00.002+05:30</published><updated>2010-02-05T13:35:29.070+05:30</updated><title type='text'>Bash! You are killing me! How to escape spaces in filenames being passed to tar</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/S2vROFeKX5I/AAAAAAAAFhA/VLE2-jgbn0g/s1600-h/kill-bill.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 367px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/S2vROFeKX5I/AAAAAAAAFhA/VLE2-jgbn0g/s400/kill-bill.jpg" alt="" id="BLOGGER_PHOTO_ID_5434667415269695378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Bash can be really frustrating!&lt;br /&gt;&lt;br /&gt;I'm trying to take all the files that match a pattern and put them in a tar.gz file. Sounds simple?&lt;br /&gt;&lt;blockquote&gt;aj@aj-laptop:/home/aj$ &lt;span style="font-weight: bold;"&gt;find . -name "*tips*"&lt;/span&gt;&lt;br /&gt;./data/DRAFT/tips and tricks.doc&lt;br /&gt;./data/DRAFT/tips new.doc&lt;br /&gt;&lt;br /&gt;Looks okay till here. But -&lt;br /&gt;&lt;br /&gt;aj@aj-laptop:/home/aj$ &lt;span style="font-weight: bold;"&gt;find . -name "*tips*" | xargs tar czvvf tips.tar.gz&lt;/span&gt;&lt;br /&gt;tar: ./data/DRAFT/tips: Cannot stat: No such file or directory&lt;br /&gt;tar: and: Cannot stat: No such file or directory&lt;br /&gt;tar: tricks.doc: Cannot stat: No such file or directory&lt;br /&gt;tar: ./data/DRAFT/tips: Cannot stat: No such file or directory&lt;br /&gt;tar: new.doc: Cannot stat: No such file or directory&lt;br /&gt;tar: Error exit delayed from previous errors&lt;br /&gt;aj@aj-laptop:/home/aj$&lt;br /&gt;&lt;/blockquote&gt;Apparently it would not work fine when your filenames have spaces in them because then it would tokenise them with spaces and hence break up the file names.&lt;br /&gt;&lt;br /&gt;So I search around on the web and find a bunch of things to try on &lt;a href="http://stackoverflow.com/questions/301039/how-to-escape-white-space-in-bash-loop-list"&gt;a stackoverflow thread&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And here's the solution that worked -&lt;br /&gt;&lt;blockquote&gt;aj@aj-laptop:/home/aj$ &lt;span style="font-weight: bold;"&gt;find . -name "*tips*" -print0 | xargs -0 tar czvvf tips.tar.gz&lt;/span&gt;&lt;br /&gt;-rwx------ aj/aj       31232 2010-01-12 19:23 ./data/DRAFT/tips and tricks.doc&lt;br /&gt;-rwx------ aj/aj       30208 2008-10-08 16:57 ./data/DRAFT/tips new.doc&lt;br /&gt;aj@aj-laptop:/home/aj$&lt;br /&gt;&lt;/blockquote&gt;Basically adding &lt;span style="font-weight: bold;"&gt;-print0&lt;/span&gt; to the find command makes it separate strings by NULLs (\0s) which can never be a part of the filenames and can never cause problems.Note that you also need to tell xargs to separate strings by NULLs by passing the &lt;span style="font-weight: bold;"&gt;-0&lt;/span&gt; flag.&lt;br /&gt;&lt;br /&gt;But now since I couldn't find any such flags for other standard linux commands like grep, this solution is only useful when I need to pass the output from find straight into tar. For example I cannot do &lt;span style="font-weight: bold;"&gt;find . -name "*tips*" -print0 | grep 'tricks' | xargs -0 tar czvvf tips_and_tricks.tar.gz&lt;/span&gt; !&lt;br /&gt;&lt;br /&gt;Sad! But I am done for the day with this problem. Please let me know in the comments if there is a general solution to this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8739322722532088881?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8739322722532088881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8739322722532088881' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8739322722532088881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8739322722532088881'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/02/bash-you-are-killing-me-how-to-escape.html' title='Bash! You are killing me! How to escape spaces in filenames being passed to tar'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/S2vROFeKX5I/AAAAAAAAFhA/VLE2-jgbn0g/s72-c/kill-bill.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7279234528991302790</id><published>2010-02-03T12:54:00.003+05:30</published><updated>2010-02-03T13:00:57.080+05:30</updated><title type='text'>How to escape the Matrix (a.k.a. Escaping the '#' hash character in a wget commandline)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/S2kmIXu3ptI/AAAAAAAAFg4/Ll-vTznZ80Y/s1600-h/redpill.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 166px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/S2kmIXu3ptI/AAAAAAAAFg4/Ll-vTznZ80Y/s320/redpill.jpg" alt="" id="BLOGGER_PHOTO_ID_5433916350650623698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I have a file "&lt;a href="ftp://ftpserver/applicationdocs/detail#1" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail#1&lt;/a&gt;" which I need to retrieve using wget but the # character is  proving impossible!&lt;br /&gt;&lt;br /&gt;Wget tries to retrieve a file with the name "detail" instead of "detail#1". I get the same results with all of the following -&lt;br /&gt;&lt;br /&gt;wget &lt;a href="ftp://ftpserver/applicationdocs/detail#1" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail#1&lt;/a&gt;&lt;br /&gt;wget &lt;a href="ftp://ftpserver/applicationdocs/detail" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail&lt;/a&gt;\#1&lt;br /&gt;wget '&lt;a href="ftp://ftpserver/applicationdocs/detail#1" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail#1&lt;/a&gt;'&lt;br /&gt;wget "&lt;a href="ftp://ftpserver/applicationdocs/detail#1" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail#1&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;I noticed that echo '&lt;a href="ftp://ftpserver/applicationdocs/detail#1" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail#1&lt;/a&gt;' gives the expected output so I also tried the following -&lt;br /&gt;&lt;br /&gt;echo '&lt;a href="ftp://ftpserver/applicationdocs/detail#1" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail#1&lt;/a&gt;' | wget -i -&lt;br /&gt;&lt;br /&gt;but to no avail. Sucks.&lt;br /&gt;&lt;br /&gt;But then! Inspiration strikes!&lt;br /&gt;&lt;br /&gt;%23 is hex code of #. And very surprisingly, this works -&lt;br /&gt;&lt;br /&gt;wget &lt;a href="ftp://ftpserver/applicationdocs/detail%231" target="_blank"&gt;ftp://ftpserver/&lt;wbr&gt;applicationdocs/detail%231&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A quick post to the ILUGD list verifies that this is the only quick solution commonly known.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7279234528991302790?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7279234528991302790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7279234528991302790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7279234528991302790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7279234528991302790'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2010/02/how-to-escape-matrix-aka-escaping-hash.html' title='How to escape the Matrix (a.k.a. Escaping the &apos;#&apos; hash character in a wget commandline)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/S2kmIXu3ptI/AAAAAAAAFg4/Ll-vTznZ80Y/s72-c/redpill.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-785057033334339747</id><published>2009-10-23T00:05:00.004+05:30</published><updated>2009-10-23T01:10:38.839+05:30</updated><title type='text'>Tips for Avidemux - "Trouble initialising audio device", "Encoder not initialised" etc.</title><content type='html'>Tips for converting videos for DVD player playback using Avidemux -&lt;br /&gt;&lt;br /&gt;1. A very simple fix for avidemux "Trouble initialising audio device" -&lt;br /&gt;&lt;br /&gt;Go to "tools-&gt;preferences-&gt;audio-&gt;alsa device" and change it to "default" instead of "dmix"&lt;br /&gt;&lt;br /&gt;Wonder why "default" is not the default for that setting!&lt;br /&gt;&lt;br /&gt;2. Best encoding settings for playback on a DVD player -&lt;br /&gt;&lt;br /&gt;Video - MPEG-4 ASP (Xvid4)&lt;br /&gt;Audio - MP3 (LAME)&lt;br /&gt;&lt;br /&gt;3. If you get an error "Encoder not initialised" then most probably the input audio frequency is non standard. Turn on "Audio-&gt;Filters-&gt;Resampling (Hz)" and that should fix the problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-785057033334339747?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/785057033334339747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=785057033334339747' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/785057033334339747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/785057033334339747'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/10/very-simple-fix-for-avidemux-trouble.html' title='Tips for Avidemux - &quot;Trouble initialising audio device&quot;, &quot;Encoder not initialised&quot; etc.'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1354682460984262395</id><published>2009-10-08T03:57:00.004+05:30</published><updated>2009-10-08T04:02:42.635+05:30</updated><title type='text'>Dazed out english language modification #2</title><content type='html'>The previous post got me thinking...&lt;br /&gt;&lt;br /&gt;Is &lt;span style="font-weight: bold;"&gt;,...&lt;/span&gt; a valid punctuation mark?&lt;br /&gt;&lt;br /&gt;If it isn't then it should be! It indicates a "pregnant" semi-pause (as opposed to an empty one)...&lt;br /&gt;&lt;br /&gt;Ever felt like the range of punctuation marks available is simply not enough to convey even the most basic of emotions?? (Well I can use &lt;span style="font-weight: bold;"&gt;words&lt;/span&gt; yeah, but that went out of fashion decades ago!)&lt;br /&gt;&lt;br /&gt;:) ;) !!!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1354682460984262395?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1354682460984262395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1354682460984262395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1354682460984262395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1354682460984262395'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/10/dazed-out-english-language-modification.html' title='Dazed out english language modification #2'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6674971093612324015</id><published>2009-10-08T03:53:00.002+05:30</published><updated>2009-10-08T03:56:07.371+05:30</updated><title type='text'>Random silliness</title><content type='html'>It popped up in my head while doodling randomly&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I'm a bit insane&lt;/li&gt;&lt;li&gt;as in,... I continuously think outside the box&lt;/li&gt;&lt;li&gt;well that's insanity isn't it...&lt;/li&gt;&lt;li&gt;in this conformant world&lt;/li&gt;&lt;li&gt;where differences can lead to bloodshed&lt;/li&gt;&lt;/ul&gt;What silliness...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6674971093612324015?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6674971093612324015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6674971093612324015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6674971093612324015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6674971093612324015'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/10/random-silliness.html' title='Random silliness'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3476179034371007706</id><published>2009-10-05T16:23:00.002+05:30</published><updated>2009-10-05T16:31:21.539+05:30</updated><title type='text'>Javascript handleEvent function</title><content type='html'>I just discovered this nifty little function!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;handleEvent(evt)&lt;/span&gt; is basically the internal function which gets called when an event is raised on an object.&lt;br /&gt;&lt;br /&gt;For example - when you attach a listener like so (jquery syntax ahoy) $('#divid').click(function(){blah blah}), what really happens is that the anonymous function is added to the event listeners list and the functions in that list are iterated over and called by the handleEvent function defined for DIVs. The anonymous function itself is not called directly when an event is raised.&lt;br /&gt;&lt;br /&gt;Seems fairly useless until you realise that you can &lt;span style="font-weight: bold;"&gt;call this function yourself&lt;/span&gt;!&lt;br /&gt;&lt;br /&gt;i.e. if you want some other div to handle the click event - use div.handleEvent(evt), passing it the event object!&lt;br /&gt;&lt;br /&gt;I am sure it can be used for  all sorts of nifty things, I just can't think of any practical examples right now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;TODO: Think of some practical examples.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also, there is probably a way to attach events to custom objects which define the handleEvent function. Brainfreeze. Gotta try it out soon as I get out of this meeting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;TODO: Attach events to normal objects which define the handleEvent function.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3476179034371007706?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3476179034371007706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3476179034371007706' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3476179034371007706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3476179034371007706'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/10/javascript-handleevent-function.html' title='Javascript handleEvent function'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-9003235846278841048</id><published>2009-10-05T14:04:00.006+05:30</published><updated>2009-10-05T14:12:03.759+05:30</updated><title type='text'>200th Post! (1st Oct) Happy Birthday to me! :)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SsmxMFikjrI/AAAAAAAAEyc/Yt9T9TFr_js/s1600-h/02102009089.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SsmxMFikjrI/AAAAAAAAEyc/Yt9T9TFr_js/s400/02102009089.jpg" alt="" id="BLOGGER_PHOTO_ID_5389033250329235122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SsmxDBr967I/AAAAAAAAEyU/O3zg_wxFUfM/s1600-h/1005_133020.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SsmxDBr967I/AAAAAAAAEyU/O3zg_wxFUfM/s400/1005_133020.jpg" alt="" id="BLOGGER_PHOTO_ID_5389033094676081586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JRKC4KMPogw/SsmwsqOt3dI/AAAAAAAAEyE/3BfPzJEiwQM/s1600-h/01102009082.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_JRKC4KMPogw/SsmwsqOt3dI/AAAAAAAAEyE/3BfPzJEiwQM/s400/01102009082.jpg" alt="" id="BLOGGER_PHOTO_ID_5389032710422257106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/Ssmwha4EYJI/AAAAAAAAEx8/83Cbd16UXTs/s1600-h/01102009081.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/Ssmwha4EYJI/AAAAAAAAEx8/83Cbd16UXTs/s400/01102009081.jpg" alt="" id="BLOGGER_PHOTO_ID_5389032517322170514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This blog is now 200 posts old! Yay! I am now 27 years old! Sigh!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-9003235846278841048?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/9003235846278841048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=9003235846278841048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/9003235846278841048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/9003235846278841048'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/10/200th-post-1st-oct-happy-birthday-to-me.html' title='200th Post! (1st Oct) Happy Birthday to me! :)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SsmxMFikjrI/AAAAAAAAEyc/Yt9T9TFr_js/s72-c/02102009089.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6180730861547361818</id><published>2009-10-02T01:25:00.002+05:30</published><updated>2009-10-02T01:34:00.040+05:30</updated><title type='text'>Using an external 1920x1080 LCD monitor with Ubuntu/Kubuntu (intel cards)</title><content type='html'>I got a 23 inch 1920x1080 LCD screen for my laptop... AND... I got it working under Ubuntu (and Kubuntu)!&lt;br /&gt;&lt;br /&gt;Here are the steps -&lt;br /&gt;&lt;br /&gt;1) Edit your xorg.conf to change the virtual mode line&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;sudo kate /etc/X11/xorg.conf&lt;/span&gt;&lt;br /&gt;change&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Virtual 2560 1024&lt;/span&gt;&lt;br /&gt;to&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Virtual 1920 1880&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2) Add  appropriate mode lines to your ~/.bashrc&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;sudo kate ~/.bashrc&lt;/span&gt;&lt;br /&gt;Add the following lines at the end -&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;# Mode lines for external LCD 1920x1080&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;xrandr --newmode "1920x1080"  172.80  1920 2040 2248 2576  10801081 1084 1118  -HSync +Vsync&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;xrandr --addmode VGA 1920x1080&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: courier new;"&gt;xrandr --output VGA --mode 1920x1080&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3) Reboot the system (Somehow logout and login did not work for me). Or if you have had it enabled, press Ctrl-Alt-Backspace to restart the x.org server.&lt;br /&gt;&lt;br /&gt;Rant: WHY OH WHY does KDE not have an option to extend your desktop across multiple screens?? I can do it easily in Gnome, but all KDE can do is mirror your desktop which sucks when the screens differ greatly in reolution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6180730861547361818?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6180730861547361818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6180730861547361818' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6180730861547361818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6180730861547361818'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/10/using-external-1920x1080-lcd-monitor.html' title='Using an external 1920x1080 LCD monitor with Ubuntu/Kubuntu (intel cards)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7764190071826082175</id><published>2009-09-17T22:15:00.002+05:30</published><updated>2009-09-17T22:21:44.481+05:30</updated><title type='text'>Using ruby on rails routes in javascript (jquery)</title><content type='html'>I am working on a shiny new ajax app using rails and like many before me, I felt the need to use the rails route generation facility in javascript. I found &lt;a href="http://github.com/toretore/javascript_routes"&gt;this&lt;/a&gt; plugin on the web and it had some ajax abilities but it used prototype instead of jquery so &lt;a href="http://github.com/ajnsit/javascript_routes"&gt;I forked it and added jquery support - go get it here&lt;/a&gt; to get all the jquery ajax goodness in your routes. In a later post I will blog about how to create a sample app using it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7764190071826082175?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7764190071826082175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7764190071826082175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7764190071826082175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7764190071826082175'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/09/using-ruby-on-rails-routes-in.html' title='Using ruby on rails routes in javascript (jquery)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8443304130310030068</id><published>2009-08-28T02:43:00.003+05:30</published><updated>2009-08-28T02:57:12.386+05:30</updated><title type='text'>Why I love my wife - and other everyday funny stories</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/Spb5tP_XmcI/AAAAAAAAExc/0_F-IHACbhA/s1600-h/dog.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 322px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/Spb5tP_XmcI/AAAAAAAAExc/0_F-IHACbhA/s400/dog.jpg" alt="" id="BLOGGER_PHOTO_ID_5374757761095014850" border="0"&gt;&lt;/a&gt;&lt;br /&gt;Heh, some blog posts out there are mighty funny in an everyday sort of way (unlike mine which has nothing funny or everyday about it). Consider this quote from a post at &lt;a href="http://www.ultramicroscopic.com/"&gt;ultramicroscopic&lt;/a&gt; -&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Wife stood in the Barnes and Noble music section wearing the headphones and listening to nothing. A few yards away Son Three (four years old) was also wearing headphones but grooving to cds with brightly colored covers. After a minute or two of fidgeting with the kiosk, she asked Son Three how to make the music play. He waved a cd under the upc scanner and continued to rock out. Wife told him he was silly. She asked him again and he showed her again, she dismissed his naivety. Frustrated she called over a clerk. The clerk took the cd and did exactly what Son Three had demonstrated. The music played but she was too confused to enjoy it.&lt;/p&gt;&lt;p&gt;When she got home she asked me how the device sucks the music off the cd through the packaging.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;Ha ha ha ha!&lt;br /&gt;&lt;br /&gt;Reminds me of the time when this friend of mine asked a shopkeeper for a "CD" (this was when floppy disks were the norm) and the shopkeeper replied with "Of course! Wooden or Aluminium"!&lt;br /&gt;&lt;br /&gt;Note :- If you don't speak Hindi, this anecdote will  not make any sense to you. But I won't explain it because it's really not that funny when narrated (it &lt;font style="font-weight: bold; font-style: italic;"&gt;is&lt;/font&gt; funny when it actually happens to you).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8443304130310030068?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8443304130310030068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8443304130310030068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8443304130310030068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8443304130310030068'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/08/why-i-love-my-wife-and-other-everyday.html' title='Why I love my wife - and other everyday funny stories'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/Spb5tP_XmcI/AAAAAAAAExc/0_F-IHACbhA/s72-c/dog.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3158415033615346394</id><published>2009-08-27T00:22:00.003+05:30</published><updated>2009-08-27T00:30:08.245+05:30</updated><title type='text'>Using Aptana for Ruby on Rails development on (K)Ubuntu 9.04 - "Rails not found"</title><content type='html'>Try using Aptana IDE on (K)Ubuntu 9.04 for developing rails apps and you would run into this problem pretty quickly. Somehow on Ubuntu, the executable "rails" is not installed in the standard /usr/bin or /usr/local/bin. Instead it is only present in /var/lib/gems/1.8/bin/. This means that Aptana cannot find rails even though it was installed using the standard distribution specific package manager.&lt;br /&gt;&lt;br /&gt;The fix though is simple - Either create a symlink to rails by doing&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;code&gt;sudo ln -s /var/lib/gems/1.8/bin/rails /usr/bin/rails&lt;/code&gt;&lt;br /&gt;&lt;code&gt;sudo ln -s /var/lib/gems/1.8/bin/rake /usr/&lt;span style="font-family:Georgia,serif;"&gt;bin/rake&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Or even better - do what &lt;a href="http://forums.aptana.com/viewtopic.php?f=20&amp;amp;t=1547"&gt;this post&lt;/a&gt; suggests -&lt;br /&gt;&lt;br /&gt;&lt;code&gt;cd /usr/local/bin&lt;br /&gt;sudo ln -s /usr/bin/ruby ruby&lt;br /&gt;sudo ln -s /usr/bin/ri ri&lt;br /&gt;sudo ln -s /usr/bin/rdoc rdoc&lt;br /&gt;sudo ln -s /var/lib/gems/1.8/bin/rails rails&lt;br /&gt;sudo ln -s /var/lib/gems/1.8/bin/rake rake&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3158415033615346394?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3158415033615346394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3158415033615346394' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3158415033615346394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3158415033615346394'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/08/using-aptana-for-ruby-on-rails.html' title='Using Aptana for Ruby on Rails development on (K)Ubuntu 9.04 - &quot;Rails not found&quot;'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4395218755277294508</id><published>2009-08-25T19:02:00.004+05:30</published><updated>2009-08-27T01:23:44.802+05:30</updated><title type='text'>I broke the translation party!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SpWINnPzwbI/AAAAAAAAExU/pzMsfVDExlc/s1600-h/Translation+Party_find+equilibrium.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 319px; height: 400px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SpWINnPzwbI/AAAAAAAAExU/pzMsfVDExlc/s400/Translation+Party_find+equilibrium.png" alt="" id="BLOGGER_PHOTO_ID_5374351497791521202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Translation party is a fun little tool based on Google translate. Ever played "Chinese whispers"? Think of this as playing it with a schizophrenic Chinese guy halfway across the world! It really is quite a time killer! Google translation is quite good so not all results will be funny, but keep at it, and you will hit upon translation gems quite easily.&lt;br /&gt;&lt;br /&gt;For example, "You can't teach an old woman to suck eggs." (A variation of a saying I heard recently on a UK trip) is translated as "Eggs can not teach a woman to smoke." and then to "Egg women smoke, please do not tell." and then to the really bizzarre "Please tell us the city regiment of women Purizupurizumi eggs.", "Purizupurizumi Please tell me, please send a regiment of women in urban eggs.", and "Please send Purizupurizumi. Please educate the women of the regiment. Eggs please contact me.", before finally settling on "Please. Please Purizupurizumi please. Women's education, please contact me. Send a regiment of the egg."!!!!&lt;br /&gt;&lt;br /&gt;God knows what a Purizupurizumi is. My guess is it's Chinese for either a type of chicken, or some high ranking military designation. Either way, it seems highly revered. :)&lt;br /&gt;&lt;br /&gt;I found it intriguing that every sentence seemed to have an equilibrium point, until I chanced upon the simple 2 word sentence, pictured above, that seems to throw Google translate into a tizzy! Since then I have found many more such examples (there are really a lot of them so they are easy to find).&lt;br /&gt;&lt;br /&gt;Fun!&lt;br /&gt;&lt;br /&gt;http://translationparty.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4395218755277294508?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4395218755277294508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4395218755277294508' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4395218755277294508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4395218755277294508'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/08/i-broke-translation-party.html' title='I broke the translation party!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SpWINnPzwbI/AAAAAAAAExU/pzMsfVDExlc/s72-c/Translation+Party_find+equilibrium.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4108013111404460593</id><published>2009-06-08T13:19:00.002+05:30</published><updated>2009-06-08T13:27:37.218+05:30</updated><title type='text'>Pirate Party wins a seat on the European Parliament!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JRKC4KMPogw/SizEZFCDUGI/AAAAAAAAEvg/jcuu2bFqrFY/s1600-h/Deadman_Pirate_flag.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 320px;" src="http://2.bp.blogspot.com/_JRKC4KMPogw/SizEZFCDUGI/AAAAAAAAEvg/jcuu2bFqrFY/s320/Deadman_Pirate_flag.jpg" alt="" id="BLOGGER_PHOTO_ID_5344862792908492898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;http://torrentfreak.com/pirate-party-wins-and-enters-the-european-parliament-090607/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4108013111404460593?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4108013111404460593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4108013111404460593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4108013111404460593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4108013111404460593'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/06/pirate-party-wins-seat-on-european.html' title='Pirate Party wins a seat on the European Parliament!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRKC4KMPogw/SizEZFCDUGI/AAAAAAAAEvg/jcuu2bFqrFY/s72-c/Deadman_Pirate_flag.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4552062791189484918</id><published>2009-06-01T20:55:00.004+05:30</published><updated>2009-06-01T21:07:19.633+05:30</updated><title type='text'>Dazed out English language modification #1 - Many Few</title><content type='html'>I get crazy ideas when I'm half asleep. So here's what my sleep deprived mind thought should be valid English -&lt;br /&gt;&lt;blockquote&gt;"This is one of the &lt;span style="font-weight: bold;"&gt;many few&lt;/span&gt; reasons why [noun]&lt;noun&gt; rocks"&lt;/noun&gt;&lt;/blockquote&gt;That's right, MANY FEW.&lt;br /&gt;&lt;br /&gt;It somehow sounds better than either "many" or "few" by itself. More rhythmic, balanced.&lt;br /&gt;&lt;br /&gt;Plus it's handy when you want to emphasise the "few" good reasons but in a positive sense. Like when you want to point out the best feature of your product &lt;span style="font-weight: bold;"&gt;but&lt;/span&gt; make sure that the customer knows that there are other features that are just as good too &lt;span style="font-weight: bold;"&gt;but&lt;/span&gt; not trivialise the very important feature you are explaining right now &lt;span style="font-weight: bold;"&gt;but&lt;/span&gt;... Forget it.. I did warn you that it was a hair brained idea..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4552062791189484918?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4552062791189484918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4552062791189484918' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4552062791189484918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4552062791189484918'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/06/dazed-out-english-language-modification.html' title='Dazed out English language modification #1 - Many Few'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1690851918053280861</id><published>2009-05-08T17:06:00.004+05:30</published><updated>2009-05-08T17:25:13.698+05:30</updated><title type='text'>Better looking tabs in jQuery UI 'cupertino' theme</title><content type='html'>Cupertino is, arguably, the best theme in the jQuery UI theme set. But it has a fatal flaw. The tabs have an ugly blue background to them which IMHO looks ugly.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;So here's the fix.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Basically we are trying to convert this -&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JRKC4KMPogw/SgQdBAWsm0I/AAAAAAAAEug/HVdiQ9jrXNw/s1600-h/cupertino-tabs-old.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 125px;" src="http://3.bp.blogspot.com/_JRKC4KMPogw/SgQdBAWsm0I/AAAAAAAAEug/HVdiQ9jrXNw/s320/cupertino-tabs-old.png" alt="" id="BLOGGER_PHOTO_ID_5333419761825782594" border="0" /&gt;&lt;/a&gt;into this -&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SgQdW6ASFtI/AAAAAAAAEuo/89aWgRzboqo/s1600-h/cupertino-tabs-new.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 121px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SgQdW6ASFtI/AAAAAAAAEuo/89aWgRzboqo/s320/cupertino-tabs-new.png" alt="" id="BLOGGER_PHOTO_ID_5333420138078279378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To accomplish this add the following CSS to your web pages -&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;         #tabs, #tabs .ui-tabs-nav {&lt;br /&gt;             border: none;&lt;br /&gt;             background: none;&lt;br /&gt;         }&lt;br /&gt;         #tabs .ui-widget-content {&lt;br /&gt;             border: 1px solid #DDDDDD;&lt;br /&gt;             background: #F9F9F9 url(images/ui-bg_highlight-hard_100_f9f9f9_1x100.png) repeat-x scroll 50% top;&lt;br /&gt;         }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now isn't that much nicer. More Mac-ish but still nicer :)&lt;br /&gt;&lt;br /&gt;PS: No this cannot be done using Theme Roller (unless you want to break other ui widgets), but you are welcome to try!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1690851918053280861?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1690851918053280861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1690851918053280861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1690851918053280861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1690851918053280861'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/better-looking-tabs-in-jquery-ui.html' title='Better looking tabs in jQuery UI &apos;cupertino&apos; theme'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRKC4KMPogw/SgQdBAWsm0I/AAAAAAAAEug/HVdiQ9jrXNw/s72-c/cupertino-tabs-old.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7031095844706260837</id><published>2009-05-08T13:37:00.002+05:30</published><updated>2009-05-08T13:57:43.799+05:30</updated><title type='text'>MySQL Workbench Lua scripting is awesome!</title><content type='html'>So I needed to change the MYSQL engine for all tables to MyISAM. No problems! -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;    foreach_table(sc, function (ts) ts.tableEngine = 'MyISAM'; end);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And I needed to reset autoincrement values in all tables. No problems again!&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-weight: bold; font-style: italic;"&gt;foreach_table(sc, function (ts) ts.nextAutoInc = ''; end);&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Of course you would need to include the &lt;a href="http://freesoftwarefreeworld.com/public/wb_library.lua"&gt;lua utility library script&lt;/a&gt; I mentioned in my previous post.&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7031095844706260837?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7031095844706260837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7031095844706260837' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7031095844706260837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7031095844706260837'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/mysql-workbench-lua-scripting-is.html' title='MySQL Workbench Lua scripting is awesome!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8539617142547068273</id><published>2009-05-08T02:30:00.002+05:30</published><updated>2009-05-08T02:58:46.468+05:30</updated><title type='text'>Ruby on Rails helper scripts for MySQL workbench!</title><content type='html'>I've been using &lt;a href="http://fabforce.net/dbdesigner4/"&gt;DB Designer 4&lt;/a&gt; for quite a while now and while it produced very pretty ER diagrams, it was a bit limited in functionality.&lt;br /&gt;&lt;br /&gt;In particular it did not behave well with Rails style databases because of the following -&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Table names are plural&lt;/li&gt;&lt;li&gt;Foreign keys are singular! E.g. a foreign key to table "Products" will be called "product_id"!&lt;/li&gt;&lt;li&gt;Primary keys are always "id", regardless of the table name.&lt;/li&gt;&lt;/ol&gt;These pecularities with the Rails db schemas made it impossible for DBDesigner to infer table relationships, and I simply made peace with that fact and used DBDesigner anyways (the lure of the pretty ER diagrams was too much!)&lt;br /&gt;&lt;br /&gt;Well I recently discovered the "successor" to DBDesigner called &lt;a href="http://dev.mysql.com/workbench/"&gt;MySQL Workbench&lt;/a&gt;. And amongst all the cool things it brings, the most important is its support for LUA scripting! Surely that can do some nifty things like add support for rails schemas! Alas a quick search on the net revealed no prior scripts I could use.&lt;br /&gt;&lt;br /&gt;Now I'm knew zero percent Lua before today but a few minutes with the Lua cheat sheet got me up to speed! It is kind of like a mix between Python and C. I also found some &lt;a href="http://dev.mysql.com/workbench/?p=166"&gt;handy prebuilt functions for Lua scripting here&lt;/a&gt; which really helped me understand the MySQL Workbench API (which is sadly enough mostly undocumented).&lt;br /&gt;&lt;br /&gt;A few hours of hacking later I had the solution ready in the form of a script! Here are the steps to import a rails schema with all the relationships -&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://freesoftwarefreeworld.com/public/wb_library.lua"&gt;Download the script &lt;wb_library.lua&gt;&lt;/a&gt; here.&lt;/li&gt;&lt;li&gt;Then run it by pressing Ctrl+Shift+R and selecting wb_library.lua from the location where you saved it.&lt;/li&gt;&lt;li&gt;Make sure there are no errors in the output window.&lt;/li&gt;&lt;li&gt;Reverse engineer your DB schema to get all the tables into an ER diagram. None of the tables will be related to each other die to the problems mentioned above. We'll fix that in a minute!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select "view &gt; advanced &gt; GRT shell" to open the shell which will allow you to invoke functions from the script.&lt;/li&gt;&lt;li&gt;Now the semi-hard part. You need to get an object of your schema so that you can pass it to the script. Type the following in the shell - &lt;span style="font-weight: bold; font-style: italic;"&gt;print(get_schema(1).name);&lt;/span&gt;. If this matches your database name then great! otherwise try print(get_schema(2).name); then print(get_schema(3).name); and so on till you find the index of your schema. (Remember that Lua is NOT zero indexed like usual programming languages. This means that there is no index 0). I'll assume that the correct index is 2.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Type the following in the shell - &lt;span style="font-weight: bold; font-style: italic;"&gt;sc = get_schema(2).&lt;/span&gt; Where 2 is the number you got in the previous step. Now the variable sc points to the correct schema.&lt;/li&gt;&lt;li&gt;Now the final magic step! Type &lt;span style="font-weight: bold; font-style: italic;"&gt;connect_all_rails_fk_relationships (sc);&lt;/span&gt; in the shell! Watch the magic happen!&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;It really does work! Maybe someday I will convert this to a plugin with a user friendly GUI!&lt;br /&gt;&lt;br /&gt;PS: The script also includes a Lua port of the RoR inflectors (pluralise and singularise). Maybe those are useful independent of MySQL workbench. Check them out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8539617142547068273?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8539617142547068273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8539617142547068273' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8539617142547068273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8539617142547068273'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/ruby-on-rails-helper-scripts-for-mysql.html' title='Ruby on Rails helper scripts for MySQL workbench!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1850271466968921753</id><published>2009-05-06T20:15:00.003+05:30</published><updated>2009-05-06T20:16:54.254+05:30</updated><title type='text'>My current non-work-related interests</title><content type='html'>A brief list off the top of my head -&lt;br /&gt;&lt;ol&gt;&lt;li&gt; FOSS document sharing and publishing. Especially an alternative to PDF.&lt;/li&gt;&lt;li&gt;Any web dev topics PHP/RoR/Python, AJAX, anything.&lt;/li&gt;&lt;li&gt;FOSS platforms suitable for embedded systems. OpenMoko, Android, Embedded Forth/Erlang/Scheme/Python.&lt;/li&gt;&lt;li&gt;FOSS Functional programming. Haskell, Erlang, Scheme.&lt;/li&gt;&lt;li&gt;Foss alternatives for shared Calendars, shared code development, shared todo lists, milestone and task management.&lt;/li&gt;&lt;li&gt;What's up in Ubuntu/Debian. Ubuntu 9.04.&lt;/li&gt;&lt;li&gt;Gnome roadmap. Gnome translations into local languages. Getting a better user experience in Gnome (install Thunar, AWN, and global menu bar!)&lt;/li&gt;&lt;li&gt;What's up with Firefox? What's up with Chrome? What's up with Epiphany and Dillo?&lt;/li&gt;&lt;li&gt;New advances in Javascript engines. V8. Tracemonkey.&lt;/li&gt;&lt;li&gt;FOSS based massive information management. Search engines.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1850271466968921753?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1850271466968921753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1850271466968921753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1850271466968921753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1850271466968921753'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/my-current-non-work-related-interests.html' title='My current non-work-related interests'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3692655487122745086</id><published>2009-05-06T20:06:00.002+05:30</published><updated>2009-05-06T20:13:42.354+05:30</updated><title type='text'>Set Thunar as the default file manager in Gnome</title><content type='html'>Here's a simple trick for a leaner Gnome desktop -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Install Thunar as the default file manager on Gnome!&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install thunar - sudo apt-get install thunar&lt;/li&gt;&lt;li&gt;Change the following &lt;span style="font-weight: bold;"&gt;Exec&lt;/span&gt; lines -&lt;/li&gt;&lt;li&gt;in &lt;span style="font-weight: bold;"&gt;/usr/share/applications/nautilus.desktop&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;Exec=thunar %U&lt;/span&gt;&lt;/li&gt;&lt;li&gt;in &lt;span style="font-weight: bold;"&gt;/usr/share/applications/nautilus-folder-handler.desktop&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;Exec=thunar %U&lt;/span&gt;&lt;/li&gt;&lt;li&gt;in &lt;span style="font-weight: bold;"&gt;/usr/share/applications/nautilus-home.desktop&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;Exec=thunar&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;That's it! Thunar will open automatically instead of Nautilus in most places. Some locations like Computer and Network are "pseudo" locations which can only be opened by Nautilus.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3692655487122745086?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3692655487122745086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3692655487122745086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3692655487122745086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3692655487122745086'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/set-thunar-as-default-file-manager-in.html' title='Set Thunar as the default file manager in Gnome'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6171688054867773405</id><published>2009-05-06T02:35:00.002+05:30</published><updated>2009-05-06T02:41:04.992+05:30</updated><title type='text'>India needs a pirate party!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SgCrTgwsYXI/AAAAAAAAEtg/P50y6MFukvs/s1600-h/1024x677-dsc_8799.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 264px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SgCrTgwsYXI/AAAAAAAAEtg/P50y6MFukvs/s400/1024x677-dsc_8799.jpg" alt="" id="BLOGGER_PHOTO_ID_5332450310506701170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Pirate_Party"&gt;From Wikipedia - The Pirate Party -&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Pirate Party (Swedish: Piratpartiet) is a political party in Sweden as well as the fourth largest party counted in registered members[1] in Sweden which has given rise to parties with the same name and similar goals in Europe and worldwide. The Party strives to reform laws regarding copyright and patents. The agenda also includes support for a strengthening of the right to privacy, both on the Internet and in everyday life, and the transparency of state administration. The Party has intentionally chosen to be bloc independent on the traditional left-right scale[2] to pursue their political agenda with all mainstream parties.&lt;br /&gt;&lt;br /&gt;India needs one!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6171688054867773405?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6171688054867773405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6171688054867773405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6171688054867773405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6171688054867773405'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/india-needs-pirate-party.html' title='India needs a pirate party!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SgCrTgwsYXI/AAAAAAAAEtg/P50y6MFukvs/s72-c/1024x677-dsc_8799.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3817114562766570707</id><published>2009-05-06T01:33:00.003+05:30</published><updated>2009-05-06T01:39:19.369+05:30</updated><title type='text'>Getting Real Synopsis - Very very rough cut</title><content type='html'>I made notes as I stormed my way through the &lt;a href="http://gettingreal.37signals.com/toc.php"&gt;Getting Real book freely available online&lt;/a&gt; -&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Fix time and budget. Cut back on the scope if needed. Cutting back on the scope has the added bonus of keeping you focussed on the most important bits of your application.&lt;br /&gt;2. Pick a worthy adversary and then undercut them. Do not fight on their "home turf". Change the rules of the game. Force them to fight you on your own terms. Having an existing competitors makes your promoters understand the market and the business model more easily. BUT do not overanalyse the competition! Don't follow, lead.&lt;br /&gt;3. Be passionate. It shouldn't be a chore. The app should excite you! Be your best salesman!&lt;br /&gt;4. Be thrifty. Be lean. Embrace agility, change, and openness. The heavier you are the harder it is to adapt when a paradigm shift comes along.&lt;br /&gt;5. Look for creative emergent solutions. Keep it simple. Let it happen.&lt;br /&gt;6. For version 1.0 three's company. A developer, designer and sweeper (someone who can roam both worlds). That's the developer staff. One more guy for logistics. Basss.&lt;br /&gt;7. Stay close to your customers. Be truthful. Be yourself. i.e. don't be evil.&lt;br /&gt;8. One point app. What's the big deal? The cutting insight, the vision? If you need more than a sentence, it's not as great as you think it is.&lt;br /&gt;&lt;br /&gt;Examples -&lt;br /&gt;&lt;br /&gt;Campfire - group chat over IM sucks.&lt;br /&gt;Basecamp - Project management is communication.&lt;br /&gt;FedEx - Being on time is worth money.&lt;br /&gt;&lt;br /&gt;PS: A good side mantra for a future app - Err in favour of the users. Users get the benefit of the doubt.&lt;br /&gt;&lt;br /&gt;9. Ignore details for version 1.0&lt;br /&gt;10. Wing it. Ignore problems. Spend more time on short term problems than long term problems.&lt;br /&gt;11. Focus on a small core market segment. Know your customers. Don't try to please everyone. Core group will spread word around faster as well.&lt;br /&gt;12. Don't scale while you still don't need to.&lt;br /&gt;13. Be opiniated. Write software KNOWING what's best for your customers. Have a vision.&lt;br /&gt;14. Half not half assed. Build little but well.&lt;br /&gt;15. Focus on the nuclear plant, not the color of the bike shed.&lt;br /&gt;16. Just say no to feature creep. Listen but don't act until it realy keeps on coming back and then you really need to. Tough Love.&lt;br /&gt;17. Every time you say yes to a feature, you are adopting a child. Be prepared to take good care of it and expend time, money and energy in doing so. Understand the true costs of every new feature.&lt;br /&gt;18. Replace feature requests with conventions. Users will really not mind that much.&lt;br /&gt;19. Ask people what they DON'T want instead of what they want. People really want everything that they don't have.&lt;br /&gt;20. Get something running as soon as possible and get feedback. Real things get real reactions.&lt;br /&gt;21. Work in iterations. Be prepared to throw previous work away. Mockups -&gt; HTML -&gt; Version 1.0. Rinse repeat.&lt;br /&gt;22. Avoid user preferences screens. Make the call on behalf of your users.&lt;br /&gt;23. Decisions are temporary. Don't be afraid to take a call FAST. This isn't brain surgery. Lives aren't at stake. Be prepared to revise your opinion later in face of more clarity. Be prepared to throw previous work away. Execute, build momentum and move on.&lt;br /&gt;24. Ideas a worthless. Execution is gold.&lt;br /&gt;&lt;br /&gt;Awful idea = -1&lt;br /&gt;Weak idea = 1&lt;br /&gt;So-so idea = 5&lt;br /&gt;Good idea = 10&lt;br /&gt;Great idea = 15&lt;br /&gt;Brilliant idea = 20&lt;br /&gt;&lt;br /&gt;No execution = $1&lt;br /&gt;Weak execution = $1000&lt;br /&gt;So-so execution = $10,000&lt;br /&gt;Good execution = $100,000&lt;br /&gt;Great execution = $1,000,000&lt;br /&gt;Brilliant execution = $10,000,000&lt;br /&gt;&lt;br /&gt;To make a business, you need to multiply the two.&lt;br /&gt;&lt;br /&gt;25. Test in the wild.&lt;br /&gt;26. Smaller tasks. Smaller timelines.&lt;br /&gt;27. Solve the one problem staring you in the face. Take on a big problem one thing at a time.&lt;br /&gt;28. Hire all rounders, not specialists. Keep them communicating. Outsource to specialists.&lt;br /&gt;29. Keep work timing flexible but get UNINTERRUPTED stretches whenever you get them. Allocate time for fun, don't think about work when having fun. Don't kill yourself.&lt;br /&gt;30. Meetings are toxic. Don't have them. 30 mins max. Lesser people the better. Have a clear singular agenda.&lt;br /&gt;31. Celebrate small victories.&lt;br /&gt;32. Hire temps before permanents. Kick the tires before hiring anyone.&lt;br /&gt;33. Go for open source enthusiasts.&lt;br /&gt;34. Go for quick learners.&lt;br /&gt;35. Go for happy over frustrated. Enthusiastic question askers over silent &amp;amp; stoic.&lt;br /&gt;36. Go for good writers and clear thinkers.&lt;br /&gt;37. Interface before code.&lt;br /&gt;38. Design the "blank" state before the "real" state of the app.&lt;br /&gt;39. Don't ignore the "error" state.&lt;br /&gt;40. Context over consistency.&lt;br /&gt;41. Think about your interface messages. Make them user friendly.&lt;br /&gt;42. Keep admin and regular interfaces combined.&lt;br /&gt;43. Keep code simple.&lt;br /&gt;44. Use tools that keep programmers happy. RoR and Ruby.&lt;br /&gt;45. Choose the easy way instead of the right way. If a feature works slightly differently than what you expected, no problems.&lt;br /&gt;46. Set aside time and money for code mainentance.&lt;br /&gt;47. Keep data flowing. Mashups, RSS feeds, widgets. Let users run wild.&lt;br /&gt;48. Eliminate unnecessary formal documents.&lt;br /&gt;49. Write stories not detail. Strategy not tactics.&lt;br /&gt;50. Use real text instead of Lorem Ipsum.&lt;br /&gt;51. Give your product a personality. Polite? Stern? Forgiving? Strict? Funny? Deadpan? Serious? Loose? Do you want to come off as paranoid or trust-&lt;br /&gt;ing? As a know-it-all? Or modest and likable?&lt;br /&gt;52. Give away freebies. Give away your hit single.&lt;br /&gt;53. Signup and cancellation should be painless. No lock in.&lt;br /&gt;54. fEarn customers money. Don't employ "tricks" like signup fees/long term contracts&lt;br /&gt;55. Give plenty of advance notice for bad news.&lt;br /&gt;56. Hollywood Launch. Teaser -&gt; Preview -&gt; Launch. Reward early adopters.&lt;br /&gt;57. Build an ace community based promotional site. Overview, tour, videos/screenshots, manifesto, case studies, buzz, forum, blog, faq, pricing, signup.&lt;br /&gt;58. Share information / experiences with the community. Good Karma. Pay it forward. Create evangelists.&lt;br /&gt;59. Be an early adopter of "cool" features / technologies. Take advantage of your agility. Generate the buzz. Ride the hype wave. Target the special interest groups.&lt;br /&gt;60. Track your buzz. Pay attention to feedback.&lt;br /&gt;61. Upsell within the app.&lt;br /&gt;62. Pick an easy memorable name. Don't sweat it if you don't get the exact domain name. e.g. backpackit.com or campfirenow.com&lt;br /&gt;63. Development team === Support team. Break down the barriers. Feel the pain. Cut out the middle man.&lt;br /&gt;64. The product should require ZERO training.&lt;br /&gt;65. Quick responses to support questions.&lt;br /&gt;66. Use forums to let users help each other.&lt;br /&gt;67. Be open. Deliver all news, god or bad. Publicise your screwups.&lt;br /&gt;68. Issue a major upgrade 30 days after launch.&lt;br /&gt;69. Keep the heartbeat going. Blog. Newsletters. Buzz. Treat your customer like a friend.&lt;br /&gt;70. No betas. Straight to version 1.0. Betas mean nothing thanks to Google.&lt;br /&gt;71. Prioritise your bugs. Ignore the small ones.&lt;br /&gt;72. Don't panic after a bad decision. It's probably not as bad as you think. Ride out the storm.&lt;br /&gt;73. Keep in touch with your competition.&lt;br /&gt;74. No bloat. No kitchen sink. Mature doesn't mean complicated.&lt;br /&gt;75. Be a surfer. Watch the ocean. Keep looking out for that new big wave on the horizon. Be the first to ride it.&lt;br /&gt;76. Finally. Execution and People! Two things that can make or break. Rest is all gravy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3817114562766570707?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3817114562766570707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3817114562766570707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3817114562766570707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3817114562766570707'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/getting-real-synopsis-very-very-rough.html' title='Getting Real Synopsis - Very very rough cut'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5614004176787132809</id><published>2009-05-05T01:29:00.002+05:30</published><updated>2009-05-05T01:32:42.272+05:30</updated><title type='text'>Check your computer configuration in Linux (Ubuntu)</title><content type='html'>&lt;a href="http://taufanlubis.wordpress.com/2007/10/07/another-way-to-check-your-computer-configuration-in-ubuntu/"&gt;Quoting verbatim from this post&lt;/a&gt; -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;CPU Specification&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;taufanlubis@zyrex:~$ cat /proc/cpuinfo&lt;br /&gt;&lt;br /&gt;processor : 0&lt;br /&gt;vendor_id : GenuineIntel&lt;br /&gt;cpu family : 15&lt;br /&gt;model : 4&lt;br /&gt;model name : Intel(R) Pentium(R) 4 CPU 2.40GHz&lt;br /&gt;stepping : 1&lt;br /&gt;cpu MHz : 2400.238&lt;br /&gt;cache size : 1024 KB&lt;br /&gt;fdiv_bug : no&lt;br /&gt;hlt_bug : no&lt;br /&gt;f00f_bug : no&lt;br /&gt;coma_bug : no&lt;br /&gt;fpu : yes&lt;br /&gt;fpu_exception : yes&lt;br /&gt;cpuid level : 5&lt;br /&gt;wp : yes&lt;br /&gt;flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc up pni monitor ds_cpl cid xtpr&lt;br /&gt;bogomips : 4804.04&lt;br /&gt;clflush size : 64&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Memory Usage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;taufanlubis@zyrex:~$ cat /proc/meminfo&lt;br /&gt;&lt;br /&gt;MemTotal: 481420 kB&lt;br /&gt;MemFree: 5640 kB&lt;br /&gt;Buffers: 72200 kB&lt;br /&gt;Cached: 259676 kB&lt;br /&gt;SwapCached: 7980 kB&lt;br /&gt;Active: 228516 kB&lt;br /&gt;Inactive: 216040 kB&lt;br /&gt;HighTotal: 0 kB&lt;br /&gt;HighFree: 0 kB&lt;br /&gt;LowTotal: 481420 kB&lt;br /&gt;LowFree: 5640 kB&lt;br /&gt;SwapTotal: 979956 kB&lt;br /&gt;SwapFree: 971976 kB&lt;br /&gt;Dirty: 8 kB&lt;br /&gt;Writeback: 0 kB&lt;br /&gt;AnonPages: 104716 kB&lt;br /&gt;Mapped: 94236 kB&lt;br /&gt;Slab: 20624 kB&lt;br /&gt;SReclaimable: 9300 kB&lt;br /&gt;SUnreclaim: 11324 kB&lt;br /&gt;PageTables: 2056 kB&lt;br /&gt;NFS_Unstable: 0 kB&lt;br /&gt;Bounce: 0 kB&lt;br /&gt;CommitLimit: 1220664 kB&lt;br /&gt;Committed_AS: 512424 kB&lt;br /&gt;VmallocTotal: 540664 kB&lt;br /&gt;VmallocUsed: 7500 kB&lt;br /&gt;VmallocChunk: 532700 kB&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Harddisk Partition&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;taufanlubis@zyrex:/proc$ cat partitions&lt;br /&gt;&lt;br /&gt;major minor #blocks name&lt;br /&gt;8 0 39121488 sda&lt;br /&gt;8 1 10241406 sda1&lt;br /&gt;8 2 1 sda2&lt;br /&gt;8 3 979965 sda3&lt;br /&gt;8 4 12538732 sda4&lt;br /&gt;8 5 15358108 sda5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Ubuntu Version&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;taufanlubis@zyrex:~$ cat /proc/version&lt;br /&gt;&lt;br /&gt;Linux version 2.6.20-16-generic (root@terranova) (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Sun Sep 23 19:50:39 UTC 2007&lt;br /&gt;&lt;br /&gt;taufanlubis@zyrex:~$ cat /proc/version_signature&lt;br /&gt;&lt;br /&gt;Ubuntu 2.6.20-16.32-generic&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5614004176787132809?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5614004176787132809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5614004176787132809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5614004176787132809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5614004176787132809'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/check-your-computer-configuration-in.html' title='Check your computer configuration in Linux (Ubuntu)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5202834324760562698</id><published>2009-05-05T01:16:00.002+05:30</published><updated>2009-05-05T01:24:43.902+05:30</updated><title type='text'>More Mac goodness for Ubuntu - Setup global menu bar on Ubuntu Hardy (8.04)</title><content type='html'>&lt;a href="http://code.google.com/p/gnome2-globalmenu/"&gt;Global Menu Bar&lt;/a&gt; just a swell idea and It's quite a surprise that the idea hasn't caught up yet with the Gnome developers. Macs have had it forever and it should really be the default behaviour for Gnome, given its obsession with clean user interfaces.&lt;br /&gt;&lt;br /&gt;So if you are lucky enough to be running Ubuntu 8.10 (Intrepid) or later, you are in luck. Simply follow the installation steps listed on the &lt;a href="http://code.google.com/p/gnome2-globalmenu/wiki/Installation"&gt;installation page&lt;/a&gt; and you will be set to go.&lt;br /&gt;&lt;br /&gt;For Hardy, there is just one more step that is not very well documented in the installation page. You will need to add the following bit of code in your &lt;span style="font-weight: bold; font-style: italic;"&gt;~/.gnomerc&lt;/span&gt; file - &lt;span style="font-weight: bold; font-style: italic;"&gt;export GTK_MODULES=globalmenu-gnome&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For me the .gnomerc file did not exist so I simply created an empty one. Note that adding that line to your ~/.bashrc file or ~/.profile file will NOT work (as opposed to what the installation guide says)! So create a .gnomerc file if needed.&lt;br /&gt;&lt;br /&gt;Log out and then log in, and pat yourself on the back, you just made your user interface a little bit better!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5202834324760562698?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5202834324760562698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5202834324760562698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5202834324760562698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5202834324760562698'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/more-mac-goodness-for-ubuntu-setup.html' title='More Mac goodness for Ubuntu - Setup global menu bar on Ubuntu Hardy (8.04)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2082450257715279112</id><published>2009-05-05T01:01:00.003+05:30</published><updated>2009-05-05T01:16:32.839+05:30</updated><title type='text'>Grim Fandango reference in The Curse of Monkey Island</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JRKC4KMPogw/Sf9Dlmw2ogI/AAAAAAAAEs4/tr-w0kNAChI/s1600-h/mi_1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 273px; height: 66px;" src="http://2.bp.blogspot.com/_JRKC4KMPogw/Sf9Dlmw2ogI/AAAAAAAAEs4/tr-w0kNAChI/s400/mi_1.gif" alt="" id="BLOGGER_PHOTO_ID_5332054797169631746" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/Sf9Dr-aD00I/AAAAAAAAEtA/lW2Tf8frfbs/s1600-h/mi_2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 35px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/Sf9Dr-aD00I/AAAAAAAAEtA/lW2Tf8frfbs/s400/mi_2.gif" alt="" id="BLOGGER_PHOTO_ID_5332054906595693378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In The curse of Monkey Island (MI 3) - the "quite patron" in the chicken shop is (a rather poorly drawn) Manny Calavera! Examine his badge and it says "Ask me about Grim Fandango"!&lt;br /&gt;&lt;br /&gt;Nice surprise for &lt;a href="http://blog.syntaxvssemantics.com/2009/04/best-game-i-have-ever-played.html"&gt;a Grim Fandango fan&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2082450257715279112?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2082450257715279112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2082450257715279112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2082450257715279112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2082450257715279112'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/grim-fandango-reference-in-curse-of.html' title='Grim Fandango reference in The Curse of Monkey Island'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRKC4KMPogw/Sf9Dlmw2ogI/AAAAAAAAEs4/tr-w0kNAChI/s72-c/mi_1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-690650276508593146</id><published>2009-05-05T00:41:00.003+05:30</published><updated>2009-05-05T01:00:03.548+05:30</updated><title type='text'>Linux advice - Use Epiphany instead of Firefox</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/Sf9BwVYOwRI/AAAAAAAAEsw/i0bjn28S6Sg/s1600-h/Burleson_Epiphany_Times_3_500.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 255px; height: 320px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/Sf9BwVYOwRI/AAAAAAAAEsw/i0bjn28S6Sg/s320/Burleson_Epiphany_Times_3_500.jpg" alt="" id="BLOGGER_PHOTO_ID_5332052782458257682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I'm running Ubuntu Hardy (8.04) LTS on my not-yet-so-old HP laptop (1.8 GHz Intel Core 2 Duo, 512 MB Ram), and running netbeans+firefox+komodo totally saps out the system! (Don't even ask why I need both Netbeans and Komodo at the same time.) So I did what I should have done a long time back and switched Firefox for &lt;a href="http://projects.gnome.org/epiphany/"&gt;Epiphany&lt;/a&gt;. It's based on the same Gecko rendering engine which powers Firefox but performs better, doesn't leak as much memory (Firefox easily climbed to over 200 MB of memory usage in a few hours where as Epiphany mostly stays consistantly under 80 MB), and integrates MUCH better into the Gnome desktop (as it uses Gtk instead of XUL stuff). &lt;span style="font-style: italic; font-weight: bold;"&gt;Epiphany needs to be the default Gnome browser.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Added plus which is really a corollory of my last point about Epiphany being based on Gtk - Epiphany behaves well with &lt;a href="http://code.google.com/p/gnome2-globalmenu/"&gt;Gnome Global Menu Bar&lt;/a&gt;! Yea! But more about Global Menu Bar in another post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-690650276508593146?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/690650276508593146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=690650276508593146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/690650276508593146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/690650276508593146'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/linux-advice-use-epiphany-instead-of.html' title='Linux advice - Use Epiphany instead of Firefox'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/Sf9BwVYOwRI/AAAAAAAAEsw/i0bjn28S6Sg/s72-c/Burleson_Epiphany_Times_3_500.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-315826087688590652</id><published>2009-05-03T15:12:00.003+05:30</published><updated>2009-05-03T15:19:24.783+05:30</updated><title type='text'>Open Office won't eat meat, shave, drink or print on Tuesdays!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/Sf1omF0JuyI/AAAAAAAAEsQ/rAmQJfSYd4M/s1600-h/jai+bajrang+bali.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 234px; height: 320px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/Sf1omF0JuyI/AAAAAAAAEsQ/rAmQJfSYd4M/s320/jai+bajrang+bali.JPG" alt="" id="BLOGGER_PHOTO_ID_5331532537481771810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;https://bugs.launchpad.net/ubuntu/+source/file/+bug/248619&lt;br /&gt;https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161&lt;br /&gt;&lt;br /&gt;Apparently having a "Tue" at the fourth byte in the postscript files causes them to be incorrectly identified as "Erlang JAM" files! This in turn causes them to not be printed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-315826087688590652?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/315826087688590652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=315826087688590652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/315826087688590652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/315826087688590652'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/05/open-office-wont-eat-meat-shave-drink.html' title='Open Office won&apos;t eat meat, shave, drink or print on Tuesdays!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/Sf1omF0JuyI/AAAAAAAAEsQ/rAmQJfSYd4M/s72-c/jai+bajrang+bali.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6366454881865048012</id><published>2009-04-22T12:20:00.002+05:30</published><updated>2009-04-22T12:50:27.609+05:30</updated><title type='text'>Oracle buys Sun. The future of MySQL?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/Se7EadRyNkI/AAAAAAAAErw/A0T41NUiyEw/s1600-h/eclipse.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 233px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/Se7EadRyNkI/AAAAAAAAErw/A0T41NUiyEw/s320/eclipse.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5327411368040740418" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/us/corporate/press/018363"&gt;Oracle buys SUN&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;MySQL is ostensibly an Oracle competitor and the acquisition casts a shadow over MySQLs future. Will Oracle continue to maintain the Free MySQL earning solely from support, or is MySQL destined to go the Netscape way?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the meanwhile, the community will do well to start looking at alternatives -&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; is of course well known&lt;/li&gt;&lt;li&gt;Less well known is the Community Fork of MySQL known as &lt;a href="http://askmonty.org/wiki/index.php/MariaDB"&gt;MariaDB&lt;/a&gt;&lt;a href="http://www.firebirdsql.org/"&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.firebirdsql.org/"&gt;Firebird&lt;/a&gt; is another good but relatively unknown alternative. I had &lt;a href="http://blog.syntaxvssemantics.com/2009/01/firebird-alternative-free-database.html"&gt;blogged &lt;/a&gt;about it some time back&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6366454881865048012?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6366454881865048012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6366454881865048012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6366454881865048012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6366454881865048012'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/oracle-buys-sun-future-of-mysql.html' title='Oracle buys Sun. The future of MySQL?'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/Se7EadRyNkI/AAAAAAAAErw/A0T41NUiyEw/s72-c/eclipse.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5145838173331392063</id><published>2009-04-15T13:17:00.004+05:30</published><updated>2009-04-15T13:26:32.656+05:30</updated><title type='text'>The missing punctuation we all need</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SeWSnVkQFjI/AAAAAAAAErM/XmyVOaOOHf4/s1600-h/Interrobang.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 150px; height: 290px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SeWSnVkQFjI/AAAAAAAAErM/XmyVOaOOHf4/s320/Interrobang.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5324823338937226802" /&gt;&lt;/a&gt;&lt;br /&gt;How many times have you expressed the feeling of surprise with a question using the question-mark-exclamation-mark-combo?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://en.wikipedia.org/wiki/Interrobang"&gt;The interrobang!&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It has a special punctuation symbol of its own?!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5145838173331392063?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5145838173331392063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5145838173331392063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5145838173331392063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5145838173331392063'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/missing-punctuation-we-all-need.html' title='The missing punctuation we all need'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SeWSnVkQFjI/AAAAAAAAErM/XmyVOaOOHf4/s72-c/Interrobang.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5302584411483577083</id><published>2009-04-15T12:49:00.003+05:30</published><updated>2009-04-15T13:07:14.686+05:30</updated><title type='text'>Multi Select Bug in Google Chrome</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SeWOeTfsPfI/AAAAAAAAErE/sSExUJM-0K4/s1600-h/d2.PNG"&gt;&lt;/a&gt;You can "crash" Google Chrome browser in 3 simple steps -&lt;div&gt;&lt;ol&gt;&lt;li&gt;Visit a page with a multi select.&lt;/li&gt;&lt;li&gt;Click on the empty area within the multi select&lt;/li&gt;&lt;li&gt;Drag up till the text of an entry&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;i.e. click and drag following the red line in the diagram below -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); "&gt;&lt;img src="http://3.bp.blogspot.com/_JRKC4KMPogw/SeWN21SwvEI/AAAAAAAAEq8/C-PwwZeAenE/s320/d1.PNG" border="0" alt="" id="BLOGGER_PHOTO_ID_5324818107593702466" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 67px; height: 80px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Voila!&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); "&gt;&lt;img src="http://1.bp.blogspot.com/_JRKC4KMPogw/SeWOeTfsPfI/AAAAAAAAErE/sSExUJM-0K4/s400/d2.PNG" border="0" alt="" id="BLOGGER_PHOTO_ID_5324818785715895794" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 134px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5302584411483577083?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5302584411483577083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5302584411483577083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5302584411483577083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5302584411483577083'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/multi-select-bug-in-google-chrome.html' title='Multi Select Bug in Google Chrome'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRKC4KMPogw/SeWN21SwvEI/AAAAAAAAEq8/C-PwwZeAenE/s72-c/d1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4495757560880022837</id><published>2009-04-13T12:11:00.001+05:30</published><updated>2009-04-13T12:12:49.219+05:30</updated><title type='text'>FOSS Physics Software</title><content type='html'>&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div&gt;FísicaLab is an educational application to solve physics problems. Is made with GNUstep and use the GSL libraries (GNU Scientific Library). The problems are setting adding elements from the palette to chalkboard, and writing the data of each element. The elements are objects as Blocks, Pulleys, Mobiles, Forces, ... . Use the SI and English systems, scientific notation and many conversion factors. The problems that can be solved with FísicaLab 0.1, are:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Kinematics of particles (doesn't include circular motion).&lt;/li&gt;&lt;li&gt;Static of particles in 2D.&lt;/li&gt;&lt;li&gt;Dynamic of particles in 2D (doesn't include dynamic of circular motion).&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;The static and dynamic problems are entered constructing the free body diagrams of the objects.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.nongnu.org/fisicalab/"&gt;http://www.nongnu.org/fisicalab/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4495757560880022837?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4495757560880022837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4495757560880022837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4495757560880022837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4495757560880022837'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/foss-physics-software.html' title='FOSS Physics Software'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6423817325757685940</id><published>2009-04-10T13:26:00.002+05:30</published><updated>2009-04-10T13:27:33.601+05:30</updated><title type='text'>Best game I have ever played</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/Sd773E77O1I/AAAAAAAAEqc/AUQP-ALQDrI/s1600-h/Grim_Fandango_artwork.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 240px; height: 320px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/Sd773E77O1I/AAAAAAAAEqc/AUQP-ALQDrI/s320/Grim_Fandango_artwork.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5322968733234969426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Grim_Fandango"&gt;http://en.wikipedia.org/wiki/Grim_Fandango&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6423817325757685940?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6423817325757685940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6423817325757685940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6423817325757685940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6423817325757685940'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/best-game-i-have-ever-played.html' title='Best game I have ever played'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/Sd773E77O1I/AAAAAAAAEqc/AUQP-ALQDrI/s72-c/Grim_Fandango_artwork.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4928157351722681157</id><published>2009-04-02T22:40:00.000+05:30</published><updated>2009-04-02T22:41:06.914+05:30</updated><title type='text'>Vala based DVB-T Guide</title><content type='html'>This is cool!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://live.gnome.org/DVBDaemon/UserGuide"&gt;http://live.gnome.org/DVBDaemon/UserGuide&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4928157351722681157?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4928157351722681157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4928157351722681157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4928157351722681157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4928157351722681157'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/vala-based-dvb-t-guide.html' title='Vala based DVB-T Guide'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6479100556747506096</id><published>2009-04-02T22:34:00.004+05:30</published><updated>2009-04-02T22:42:18.435+05:30</updated><title type='text'>Reading input from stdin within Vala</title><content type='html'>Here's how to read stdin input within &lt;a href="http://live.gnome.org/Vala"&gt;Vala&lt;/a&gt; (a compiler for the &lt;a href="http://library.gnome.org/devel/gobject/stable/"&gt;GObject type system&lt;/a&gt;) -&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(This code snippet is based on the one found in &lt;a href="http://live.gnome.org/Vala/InputSamples"&gt;Vala Input samples&lt;/a&gt;).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;// Utility function to read input from stdin&lt;/div&gt;&lt;div&gt;// if single_line is true then returns as soon as the user presses enter&lt;/div&gt;&lt;div&gt;// else waits for end of input (Ctrl+D on Linux, Ctrl+Z Enter on windows)&lt;/div&gt;&lt;div&gt;string read_stdin(bool single_line) {&lt;/div&gt;&lt;div&gt;  var input = new StringBuilder ();&lt;/div&gt;&lt;div&gt;  var buffer = new char[1024];&lt;/div&gt;&lt;div&gt;  while (!stdin.eof()) {&lt;/div&gt;&lt;div&gt;    string read_chunk = stdin.gets (buffer);&lt;/div&gt;&lt;div&gt;    if (read_chunk != null) {&lt;/div&gt;&lt;div&gt;      input.append(read_chunk);&lt;/div&gt;&lt;div&gt;      if(single_line) {&lt;/div&gt;&lt;div&gt;        break;&lt;/div&gt;&lt;div&gt;      }&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;&lt;div&gt;  return input.str;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6479100556747506096?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6479100556747506096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6479100556747506096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6479100556747506096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6479100556747506096'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/04/reading-input-from-stdin-within-vala.html' title='Reading input from stdin within Vala'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2756852850624801086</id><published>2009-03-18T13:44:00.002+05:30</published><updated>2009-03-18T13:46:17.783+05:30</updated><title type='text'>Nice Quote</title><content type='html'>&lt;blockquote&gt;Trying to forget someone you love is like trying to remember someone you never met&lt;/blockquote&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2756852850624801086?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2756852850624801086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2756852850624801086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2756852850624801086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2756852850624801086'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/nice-quote.html' title='Nice Quote'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-197610619087454837</id><published>2009-03-07T19:49:00.005+05:30</published><updated>2009-03-07T20:01:48.139+05:30</updated><title type='text'>Fix a broken Linux shell</title><content type='html'>When you accidentally cat a binary file, it can leave your shell in a broken state as it can interpret some of the binary sequences as control characters.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SbKEO1L0TUI/AAAAAAAADkE/qzyunt8pYig/s1600-h/screen.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 279px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SbKEO1L0TUI/AAAAAAAADkE/qzyunt8pYig/s400/screen.png" alt="" id="BLOGGER_PHOTO_ID_5310452300952915266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You will see gibberish instead of normal letters/digits and the only recourse may seem to close this terminal and start another. But wait! The next time it happens, use the command &lt;span style="font-weight: bold;"&gt;reset&lt;/span&gt; instead!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JRKC4KMPogw/SbKE4kqU-yI/AAAAAAAADkM/jX5HGnu6zWk/s1600-h/prtscr.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 279px;" src="http://3.bp.blogspot.com/_JRKC4KMPogw/SbKE4kqU-yI/AAAAAAAADkM/jX5HGnu6zWk/s400/prtscr.png" alt="" id="BLOGGER_PHOTO_ID_5310453018071989026" border="0" /&gt;&lt;/a&gt;You can see where I typed reset (second last line) and restored sanity. Note that even the name of the terminal window is back to normal!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-197610619087454837?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/197610619087454837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=197610619087454837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/197610619087454837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/197610619087454837'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/fix-broken-shell.html' title='Fix a broken Linux shell'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SbKEO1L0TUI/AAAAAAAADkE/qzyunt8pYig/s72-c/screen.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4102569797927470659</id><published>2009-03-05T20:36:00.004+05:30</published><updated>2009-03-05T20:43:11.801+05:30</updated><title type='text'>DjVu - It's surprising that it has not had widespread acceptance yet.</title><content type='html'>&lt;div&gt;&lt;a href="http://djvu.sourceforge.net/"&gt;http://djvu.sourceforge.net/&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"DjVu is a web-centric format and software platform for distributing documents and images. DjVu can advantageously replace PDF, PS, TIFF, JPEG, and GIF for distributing scanned documents, digital documents, or high-resolution pictures. DjVu content downloads faster, displays and renders faster, looks nicer on a screen, and consume less client resources than competing formats. DjVu images display instantly and can be smoothly zoomed and panned with no lengthy re-rendering. DjVu is used by hundreds of academic, commercial, governmental, and non-commercial web sites around the world.&lt;/div&gt;&lt;div&gt;DjVuLibre is an open source (GPL'ed) implementation of DjVu, including viewers, browser plugins, decoders, simple encoders, and utilities."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From my personal experience, PDF's are almost always too slow and cumbersome (I tried a few DjVu files and it was a much smoother experience). More importantly, they are huge - The free document I mentioend in my previous post has a 6MB DjVu file and an equivalent 30 MB PDF File! It's time to bury the PDF behemoth for good.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4102569797927470659?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4102569797927470659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4102569797927470659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4102569797927470659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4102569797927470659'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/djvu-libre.html' title='DjVu - It&apos;s surprising that it has not had widespread acceptance yet.'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6847266350369539744</id><published>2009-03-04T20:49:00.002+05:30</published><updated>2009-03-04T20:51:25.439+05:30</updated><title type='text'>Quote - Laws of form</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;From George Spencer-Brown's controversial book Laws of Form (1969).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"The theme of this book is that a universe comes into being when a space is severed or taken apart. The act is itself already remembered, even if unconsciously, as our first attempt to distinguish different things in a world where, in the first place, the boundaries can be drawn anywhere we please. At this stage the universe cannot be distinguished from how we act upon it, and the world may seem like shifting sand beneath our feet."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6847266350369539744?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6847266350369539744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6847266350369539744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6847266350369539744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6847266350369539744'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/quote-laws-of-form.html' title='Quote - Laws of form'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1064939249649107913</id><published>2009-03-04T18:15:00.003+05:30</published><updated>2009-03-04T20:37:57.546+05:30</updated><title type='text'>To Read =&gt; Outliers + The Implementation of Functional Programming Languages</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Free&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/"&gt;The Implementation of Functional Programming Languages&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://research.microsoft.com/en-us/um/people/simonpj/Papers/pj-lester-book/"&gt;Implementing functional languages: a tutorial&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Non Free&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://en.wikipedia.org/wiki/Outliers_(book)"&gt;Outliers: The Story of Success (Hardcover)&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1064939249649107913?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1064939249649107913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1064939249649107913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1064939249649107913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1064939249649107913'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/to-read-outliers-implementation-of.html' title='To Read =&gt; Outliers + The Implementation of Functional Programming Languages'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1806002989178271854</id><published>2009-03-01T13:28:00.003+05:30</published><updated>2009-03-01T13:30:42.456+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='creations'/><title type='text'>"Flexi Arrows" creations - An ink pen</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JRKC4KMPogw/SapAaEkxRnI/AAAAAAAADjc/SlqTZ0FuRe0/s1600-h/pen.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 40px; height: 400px;" src="http://2.bp.blogspot.com/_JRKC4KMPogw/SapAaEkxRnI/AAAAAAAADjc/SlqTZ0FuRe0/s400/pen.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5308125927458293362" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1806002989178271854?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1806002989178271854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1806002989178271854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1806002989178271854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1806002989178271854'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/flexi-arrows-creations-ink-pen.html' title='&quot;Flexi Arrows&quot; creations - An ink pen'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRKC4KMPogw/SapAaEkxRnI/AAAAAAAADjc/SlqTZ0FuRe0/s72-c/pen.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-33472044084392414</id><published>2009-03-01T00:37:00.001+05:30</published><updated>2009-03-01T00:38:54.424+05:30</updated><title type='text'>R2D3 code at a new location</title><content type='html'>&lt;a href="http://freesoftwarefreeworld.com/public/r2d3.zip"&gt;http://freesoftwarefreeworld.com/public/r2d3.zip&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-33472044084392414?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/33472044084392414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=33472044084392414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/33472044084392414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/33472044084392414'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/03/r2d3-code-at-new-location.html' title='R2D3 code at a new location'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-875953899059088719</id><published>2009-02-28T02:42:00.005+05:30</published><updated>2009-03-01T00:18:50.292+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>CSS Language Extensions</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/Sahb8Ends0I/AAAAAAAADUg/lbXj6ba09AY/s1600-h/FIL9E52D_FIL588A8_Janno_Scholtz_4-1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 251px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/Sahb8Ends0I/AAAAAAAADUg/lbXj6ba09AY/s400/FIL9E52D_FIL588A8_Janno_Scholtz_4-1.jpg" alt="" id="BLOGGER_PHOTO_ID_5307593248445674306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;CSS is a nice idea gone horribly wrong. It's a major pain in the butt to web content developers worldwide. I've been coding web apps for several years now and it still seems crazy to me! I am not a CSS fan and I am not alone.&lt;br /&gt;&lt;br /&gt;So while I sit around and crib, people are coming up with extensions on top of CSS to  alleviate the pain somewhat. All of them add support for nesting selectors which is something that should have been a part of CSS spec to being with. In addition -&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://ncannasse.fr/projects/hss"&gt;HSS&lt;/a&gt; adds variables, block variables, single line comments and CSS validation. Built on top of &lt;a href="http://nekovm.org/"&gt;Neko&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://agilewebdevelopment.com/plugins/css_dryer"&gt;CSS Dryer&lt;/a&gt; adds support for variables. Written in Ruby.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html"&gt;Sass&lt;/a&gt; changes the syntax to be a bit more terse (by getting rid of all the braces), and adds variables, namespaces, arithmetic/string/color manipulation operations and a bunch of other things. Written in Ruby.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://sandbox.pocoo.org/clevercss-hs/"&gt;CleverCSS&lt;/a&gt; adds support for variables, property groups, lots of arithmetic/string expression operators and a bunch of other things. Written in Haskell.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-875953899059088719?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/875953899059088719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=875953899059088719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/875953899059088719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/875953899059088719'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/css-language-extensions.html' title='CSS Language Extensions'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/Sahb8Ends0I/AAAAAAAADUg/lbXj6ba09AY/s72-c/FIL9E52D_FIL588A8_Janno_Scholtz_4-1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-1215468930426451927</id><published>2009-02-27T20:45:00.003+05:30</published><updated>2009-03-01T13:30:57.194+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='discovery'/><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='creations'/><title type='text'>Construct your own spaceships using Visio "Flexi Arrows"</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SagE0BNCdmI/AAAAAAAADGw/hhWWfujWA6o/s1600-h/spacecraft.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 163px; height: 400px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SagE0BNCdmI/AAAAAAAADGw/hhWWfujWA6o/s400/spacecraft.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5307497452578960994" /&gt;&lt;/a&gt;&lt;br /&gt;I found out that Visio "Flexi Arrows" are great for creating Spacecraft like shapes!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check out the proof of concept I threw together in about a minute and half!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-1215468930426451927?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/1215468930426451927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=1215468930426451927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1215468930426451927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/1215468930426451927'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/construct-your-own-spaceships-using.html' title='Construct your own spaceships using Visio &quot;Flexi Arrows&quot;'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SagE0BNCdmI/AAAAAAAADGw/hhWWfujWA6o/s72-c/spacecraft.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5988483208011338337</id><published>2009-02-24T01:48:00.003+05:30</published><updated>2009-03-01T00:27:35.609+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='discovery'/><category scheme='http://www.blogger.com/atom/ns#' term='problemsolved'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><title type='text'>Convert an arbitrary Erlang expression to String</title><content type='html'>It's the very counter-intuitive -&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;lists:flatten(io_lib:format("~p", [Term])),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Where &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Term&lt;/span&gt; is the erlang expression.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Simply using &lt;span class="Apple-style-span" style="font-style: italic;"&gt;io_lib:format&lt;/span&gt; &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;should&lt;/span&gt; have worked in this case but it returns a deep list for some reason which needs to be flattened before use. Some fun facts -&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;The deep list returned by io_lib:format still behaves like a normal string within erlang. For example - printing it out to the console using io:format() will work as expected. But when you pass that list to some non-erlang program (Java in my example, using Jinterface) expecting a String, all hell will break loose.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;This works too but is more computationally expensive - &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-weight: bold; "&gt;binary_to_list(list_to_binary(io_lib:format("~p", [Term])))&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Peace Erlang! I don't wanna fight no more..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5988483208011338337?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5988483208011338337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5988483208011338337' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5988483208011338337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5988483208011338337'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/convert-arbitrary-erlang-expression-to.html' title='Convert an arbitrary Erlang expression to String'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7429467801471656663</id><published>2009-02-23T03:50:00.004+05:30</published><updated>2009-03-01T00:27:35.609+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ide'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='problemsolved'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Painlessly convert code buffers in emacs to HTML</title><content type='html'>While looking for a way to convert my Haskell code to HTML, I stumbled upon &lt;a href="http://www.emacswiki.org/emacs/Htmlize"&gt;HTMLize&lt;/a&gt;!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Steps -&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Download the file at http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el to some location on your hdd (I put mine in ~/emacs.d/htmlize/).&lt;/li&gt;&lt;li&gt;Add the following lines to your init.el file -&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;(load "~/.emacs.d/htmlize/htmlize.el")&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Restart emacs.&lt;/li&gt;&lt;li&gt;From within emacs, invoke - &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;M-x customize-variable htmlize-output-type&lt;/span&gt;&lt;/span&gt; and set its value to &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;css-inline&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Switch to the code buffer and invoke - &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;M-x htmlize-buffer&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Save the newly created buffer with an html extension&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Behold! (An excerpt of the code from &lt;a href="http://www.haskell.org/yampa/"&gt;Yampa&lt;/a&gt;) -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#b22222;"&gt;--&lt;/span&gt;&lt;span style="color:#b22222;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#b22222;"&gt;-- &lt;/span&gt;&lt;span style="color:#b22222;"&gt;Implementation of Yampa utilities:&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#b22222;"&gt;--&lt;/span&gt;&lt;span style="color:#b22222;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#a020f0;"&gt;module&lt;/span&gt; &lt;span style="color:#228b22;"&gt;YampaUtils&lt;/span&gt; &lt;span style="color:#a020f0;"&gt;where&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#a020f0;"&gt;import&lt;/span&gt; &lt;span style="color:#228b22;"&gt;AFRP&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;hold&lt;/span&gt; &lt;span style="color:#b8860b;"&gt;::&lt;/span&gt; a &lt;span style="color:#b8860b;"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#228b22;"&gt;SF&lt;/span&gt; (&lt;span style="color:#228b22;"&gt;Event&lt;/span&gt; a) a&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;hold&lt;/span&gt; x0 &lt;span style="color:#b8860b;"&gt;=&lt;/span&gt; loop (arr aux &lt;span style="color:#b8860b;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; iPre x0 &lt;span style="color:#b8860b;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; arr dup)&lt;br /&gt;&lt;span style="color:#a020f0;"&gt;where&lt;/span&gt; aux (e,x) &lt;span style="color:#b8860b;"&gt;=&lt;/span&gt; event x id e&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PS - A useful little tip: To import HTML into an open office presentation - first open the html file in OOwriter and then copy paste into OOimpress..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7429467801471656663?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7429467801471656663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7429467801471656663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7429467801471656663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7429467801471656663'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/painlessly-convert-code-buffers-in.html' title='Painlessly convert code buffers in emacs to HTML'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6479313051241795324</id><published>2009-02-18T15:25:00.006+05:30</published><updated>2009-03-01T00:21:02.514+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='irc'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>It happened to me - IRC Netsplit</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SZvdMz0YmYI/AAAAAAAADGg/cYsJPZYm7Gw/s1600-h/u18300137.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 170px; height: 136px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SZvdMz0YmYI/AAAAAAAADGg/cYsJPZYm7Gw/s320/u18300137.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304076198296983938" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I'm logged on to #haskell, #erlang, #python on Freenode.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's what an &lt;a href="http://en.wikipedia.org/wiki/Netsplit"&gt;IRC Netsplit&lt;/a&gt; looks like -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;... [690 users on #haskell] ...&lt;/div&gt;&lt;div&gt;... [When suddenly] ...&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;* enascryaptio has quit (kubrick.freenode.net irc.freenode.net)&lt;/div&gt;&lt;div&gt;* Asoasdeir has quit (kubrick.freenode.net irc.freenode.net)&lt;/div&gt;&lt;div&gt;* amaornsfall has quit (kubrick.freenode.net irc.freenode.net)&lt;/div&gt;&lt;div&gt;* reehya has quit (kubrick.freenode.net irc.freenode.net)&lt;/div&gt;&lt;div&gt;* aabosyscsaared has quit (kubrick.freenode.net irc.freenode.net)&lt;/div&gt;&lt;div&gt;* asdfnetcgasat has quit (kubrick.freenode.net irc.freenode.net)&lt;/div&gt;&lt;div&gt;... [etc. etc.] ...&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;... [34 users on #haskell] ...&lt;/div&gt;&lt;div&gt;... [Collective gasp! Holy crap! This is the smallest I've ever seen #haskell]...&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;... [Later. Netburst!] ...&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;* MrSyzsaygy (n=blah@blah.se) has joined #haskell&lt;/div&gt;&lt;div&gt;* Kapsfasdu (i=blah@blah/Japsu) has joined #haskell&lt;/div&gt;&lt;div&gt;* Dotjasde (n=blah@blah.be) has joined #haskell&lt;/div&gt;&lt;div&gt;* sbosk (n=blah@blah/kobs) has joined #haskell&lt;/div&gt;&lt;div&gt;* alesaator_ (i=blah@blah.fi) has joined #haskell&lt;/div&gt;&lt;div&gt;* SAhurique (n=blah@blah.fi) has joined #haskell&lt;/div&gt;&lt;div&gt;* SssimonsRsC (n=blah@blah.org) has joined #haskell&lt;/div&gt;&lt;div&gt;* Raiastraasdh (n=blah@blah.net) has joined #haskell&lt;/div&gt;&lt;div&gt;... [etc. etc.] ...&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;... [Life back to normal] ...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And then moments later - an apology -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[Global Notice] Hi all, it would appear we've discovered yet another bug in hyperion, the ircd we run -- how we've managed to use it successfully for so long is now but a great mystery. The network is back up, for now, but in light of this we will be looking at bringing our ircd-change forward, details shall be forthcoming. Please accept my sincere apologies for the instability as of late and thank you for your patience.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And a retraction!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[Global Notice] Hi all, It appears I may have been too harsh on hyperion -- this crash wasn't a segfault after all, but some of hardened gentoo's 'security' measures deciding that our ircd is a threat. More information will be provided on the blog when we have a better picture and know what actions will be taken to prevent this from occuring again. Thank you for using freenode and have a good day!&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6479313051241795324?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6479313051241795324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6479313051241795324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6479313051241795324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6479313051241795324'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/it-happened-to-me-irc-netsplit.html' title='It happened to me - IRC Netsplit'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SZvdMz0YmYI/AAAAAAAADGg/cYsJPZYm7Gw/s72-c/u18300137.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3158589450026562605</id><published>2009-02-16T20:27:00.003+05:30</published><updated>2009-03-01T00:21:51.104+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>The Byzantine Generals Problem</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Byzantine_Fault_Tolerance"&gt;The problem&lt;/a&gt; was described by &lt;a href="http://en.wikipedia.org/wiki/Leslie_Lamport"&gt;Leslie Lamport&lt;/a&gt; in a 1982 paper written after observing what he felt was an inordinate amount of attention received by &lt;a href="http://en.wikipedia.org/wiki/Dining_philosophers_problem"&gt;Dijkstra’s Dining Philosophers problem&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Interested in understanding concurrent programming algorithms? Writing a &lt;a href="http://marknelson.us/2007/07/23/byzantine/"&gt;program to solve this problem&lt;/a&gt; will make you a much better programmer..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3158589450026562605?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3158589450026562605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3158589450026562605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3158589450026562605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3158589450026562605'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/byzantine-generals-problem.html' title='The Byzantine Generals Problem'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2934270851205345827</id><published>2009-02-16T01:27:00.002+05:30</published><updated>2009-03-01T00:22:27.928+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='freesoftware'/><title type='text'>Debian Lenny released as Stable!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SZh1vt-oPQI/AAAAAAAAC8Q/BNp-SATRcfY/s1600-h/Squeezetoyalien.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 203px; height: 152px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SZh1vt-oPQI/AAAAAAAAC8Q/BNp-SATRcfY/s320/Squeezetoyalien.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5303118023885339906" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Or more accurately..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.debian.org/News/2009/20090214"&gt;Debian GNU/Linux 5.0 released!&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The next version currently in testing is called "Squeeze"..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2934270851205345827?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2934270851205345827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2934270851205345827' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2934270851205345827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2934270851205345827'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/debian-lenny-released-as-stable.html' title='Debian Lenny released as Stable!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SZh1vt-oPQI/AAAAAAAAC8Q/BNp-SATRcfY/s72-c/Squeezetoyalien.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7369133253110318586</id><published>2009-02-16T00:38:00.003+05:30</published><updated>2009-03-01T00:22:36.954+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><title type='text'>Recipe for the "perfect paper plane"</title><content type='html'>&lt;div&gt;While on the topic of paper planes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From &lt;a href="http://www.probert.me.uk/bored.asp"&gt;here -&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SZhow0qiSCI/AAAAAAAAC8I/_1qlhq1O4hM/s1600-h/paperplane.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 255px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SZhow0qiSCI/AAAAAAAAC8I/_1qlhq1O4hM/s400/paperplane.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5303103749208819746" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://www.timesonline.co.uk/tol/news/uk/article593146.ece"&gt;The "perfect paper plane"..&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Have to try it out tomorrow!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7369133253110318586?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7369133253110318586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7369133253110318586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7369133253110318586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7369133253110318586'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/recipe-for-perfect-paper-plane.html' title='Recipe for the &quot;perfect paper plane&quot;'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SZhow0qiSCI/AAAAAAAAC8I/_1qlhq1O4hM/s72-c/paperplane.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-9028564246093717919</id><published>2009-02-16T00:22:00.002+05:30</published><updated>2009-03-01T00:23:07.239+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='preference'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>MIA Paper Planes</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SZhoCcbBUoI/AAAAAAAAC8A/olbsNOFvJIc/s1600-h/paper_planes.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SZhoCcbBUoI/AAAAAAAAC8A/olbsNOFvJIc/s320/paper_planes.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5303102952427311746" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/M.I.A._(artist)"&gt;MIA - Mathangi "Maya" Arulpragasam&lt;/a&gt; is a British songwriter and vocalist of Srilankan descent. Her 2007 album Kala includes this &lt;a href="http://en.wikipedia.org/wiki/Paper_Planes_(song)"&gt;gem with an infectious beat to it - Paper Planes&lt;/a&gt;. I don't particularly care about the message she's trying to convey but the Song is awesome! &lt;a href="http://www.youtube.com/watch?v=7sei-eEjy4g"&gt;Watch/Listen to it on you tube&lt;/a&gt;. (See the &lt;a href="http://www.youtube.com/watch?v=0kH0l7h-zqs"&gt;fan made video&lt;/a&gt; here if you have extra time) :)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This track was very well used in &lt;a href="http://en.wikipedia.org/wiki/Slumdog_Millionaire"&gt;Slumdog Millionaire&lt;/a&gt; which is where I heard it first..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's &lt;a href="http://en.wikipedia.org/wiki/Alternative_hip_hop"&gt;alternative hip hop&lt;/a&gt;.. And that's your "totally useless fact of the day"..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-9028564246093717919?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/9028564246093717919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=9028564246093717919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/9028564246093717919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/9028564246093717919'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/mia-paper-planes.html' title='MIA Paper Planes'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SZhoCcbBUoI/AAAAAAAAC8A/olbsNOFvJIc/s72-c/paper_planes.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5253700281378590875</id><published>2009-02-13T14:44:00.001+05:30</published><updated>2009-03-01T00:24:42.967+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='embedded'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Graphics Solutions for Embedded Linux</title><content type='html'>&lt;a href="http://www.linuxdevices.com/articles/AT9202043619.html"&gt;http://www.linuxdevices.com/articles/AT9202043619.html&lt;/a&gt; lists some graphics toolkits/libraries for folks deploying Linux on embedded devices.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's the list of &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Free&lt;/span&gt;&lt;/span&gt; solutions -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Dillo&lt;/span&gt; -- Dillo is a very small (less than 300KB), fast, Open Source multi-platform web browser that's written completely in C and built on GTK+ libraries. Dillo's high efficiency and minimal library dependencies make it quite suitable for embedded apps. Dillo can be teamed up with an embedded webserver to completely eliminate the need for a window manager in an embedded device.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;DirectFB&lt;/span&gt; -- DirectFB is a thin library that provides developers with hardware graphics acceleration, input device handling and abstraction, integrated windowing system with support for translucent windows and multiple display layers on top of the Linux Framebuffer Device. It is a complete hardware abstraction layer with software fallbacks for every graphics operation that is not supported by the underlying hardware.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;The Familiar Project&lt;/span&gt; -- this open source PDA Linux project, which is an offshoot of the activities at handhelds.org, has collected together all of the key components of a complete Linux-based PDA computing platform. The Familiar distribution currently includes a Blackbox-based window manager, Agenda Computing's Fltk+ based PIM applications, an embedded Python implementation, system configuration and settings backup utilities, OpenSSH client and server, and a Debian-based ARM kernel.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;FBUI&lt;/span&gt; -- FBUI is a tiny GUI that resides inside the Linux kernel. The key concepts of FBUI are that firstly it is small; secondly that it is spartan, which is good; thirdly that it is just another driver; and fourthly that drivers belong in the kernel, not in userspace.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;GGI project&lt;/span&gt; -- the "General Graphics Interface" project is dedicated to development of fast, stable, open-source cross-platform multimedia API systems. Designed from the ground up with environments such as embedded systems in mind, GGI is fast, clean, abstract, dynamically modular and highly optimizeable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;GPE Palmtop Environment&lt;/span&gt; -- this project aims to provide a Free Software GUI environment for palmtop/handheld computers running the GNU/Linux operating system. GPE uses the X Window System, and the GTK+ widget toolkit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;GtkFB&lt;/span&gt; -- beginning with version 2.0, GTK+ will support rendering directly to the Linux framebuffer instead of using the X Window System. This is good for embedded systems and devices with limited resources, because it eliminates the overhead of an X server, while still taking advantage of the power of GTK+ and the large base of existing programs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;handhelds.org PDA support&lt;/span&gt; -- want to create your own unique Linux PDA implementation? handhelds.org is for you! Early this year, Compaq created the Open Handheld Program, an initiative designed to stimulate innovation and research on handheld devices that resulted from the company's "Itsy" pocket computer project. To support this initiative, Compaq created handhelds.org -- a vendor neutral website dedicated to open source handheld development. Not surprisingly, Compaq's iPAQ PDA is used as the base platform for all these activities and, consequently, a iPAQ Linux port is available as freely available open source software.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Matchbox&lt;/span&gt; -- a small foot-print window manager and associated applications, designed specifically for resource-constrained X11-enabled devices such as handheld computers, PDA's, set-top boxes, and consumer devices where display size, storage, CPU bandwidth, and input mechanisms are limited. Matchbox includes a window manager, a panel, a desktop, a shared utility library, and a number of small panel applications.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Microwindows&lt;/span&gt; -- an Open Source project aimed at bringing the features of modern graphical windowing environments to smaller devices and platforms. Microwindows applications can be built and tested on the Linux desktop, as well as cross-compiled for the target device.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;NxZilla (formerly nanozilla)&lt;/span&gt; -- a set of libraries that allow Mozilla to be used with a NanoX server from the Microwindows project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;OpenGL ES&lt;/span&gt; -- a light-weight, royalty-free embedded graphics standard that provides graphics API profiles for a broad range of embedded systems and devices, including handheld wireless devices, automotive and avionics displays, and multimedia consumer devices such as advanced digital TVs, set-top boxes, and game consoles.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;OpenGUI&lt;/span&gt; -- a fast, 32-bit, high-Level C/C++ graphics &amp;amp; windowing library/GUI built upon a fast, low-level x86 asm graphics kernel. It is under LGPL license. OpenGUI provides 2D drawing primitives and an event-driven windowing API for easy application development.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;PicoGUI&lt;/span&gt; -- small, portable client/server GUI designed to work on many types of hardware including handheld computers. Like the X Window System, it has a flexible client-server architecture. Unlike X, however, fonts, bitmaps, widgets, and anything else the application needs are built directly into the server. This sacrifices a small decrease in flexibility for an increase in speed and a large decrease in size.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Qt/Embedded&lt;/span&gt; -- provides a full graphics stack, from the hardware interface to a full GUI tookkit. Although the API is identical to the popular Qt/X11 and Qt/Windows products, Qt/Embedded is not based on X11 and therefore it has substantially reduced memory requirements. Memory demands can be tuned to the range of 800 KB to 3 MB in ROM (Intel x86). Qt/Embedded is available as open source software, under the GNU General Public License (GPL), or can be licensed on other terms from its originator, Trolltech.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Simple DirectMedia Layer&lt;/span&gt; -- an open source cross-platform multimedia development API/library designed to provide fast access to the graphics framebuffer and audio device. SDL is currently being applied to a number of Embedded Linux implementations such as Microwindows.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Tiny-X&lt;/span&gt; -- a small footprint X Window server implementation for embedded systems. It was developed by Keith Packard of the XFree86 Core Team, sponsored by SuSE. The goal was to create something that would work well in a small memory footprint and, importantly, be robust in near out-of-memory situations. Typical X servers based on Tiny-X can fit in less than 1MB on x86 CPUs. The project has since forked into several projects, including KDrive, SmallX, and Integrated Tiny-X. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;ViewML&lt;/span&gt; -- a freely available, open source web browser targeted specifically at the embedded Linux platform. Currently, ViewML along with it's interface requires 2.1 MB of RAM, with a disk image of only 760K.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;WML Browser&lt;/span&gt; -- a project, sponsored by 5NINE to develop a browser which will allow any wireless device to have WAP functionality. It must support multiple protocol stacks (WAP 1.2.1, http), in differing environments, using differing input devices. The browser will work with framebuffer graphics.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Xynth Windowing System&lt;/span&gt; -- a free software project to build a portable, embedded client-server windowing system. The Xynth Windowing System, released under the GPL, offers a lightweight GUI-capable windowing system usable in Linux-based embedded systems and devices, such as handhelds and set-top boxes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5253700281378590875?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5253700281378590875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5253700281378590875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5253700281378590875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5253700281378590875'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/graphics-solutions-for-embedded-linux.html' title='Graphics Solutions for Embedded Linux'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-784831986408418763</id><published>2009-02-13T00:52:00.002+05:30</published><updated>2009-03-01T00:24:00.248+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='preference'/><category scheme='http://www.blogger.com/atom/ns#' term='movies'/><title type='text'>I found Serenity</title><content type='html'>I went through a marathon run of 14 episodes of &lt;a href="http://en.wikipedia.org/wiki/Firefly_(TV_series)"&gt;Firefly&lt;/a&gt; followed by &lt;a href="http://en.wikipedia.org/wiki/Serenity_(film)"&gt;Serenity the movie&lt;/a&gt;, in a span of 3 days. Head rush! Wow!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I can't get over the shock that the series got cancelled..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-784831986408418763?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/784831986408418763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=784831986408418763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/784831986408418763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/784831986408418763'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/i-found-serenity.html' title='I found Serenity'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4291652614929117334</id><published>2009-02-13T00:35:00.002+05:30</published><updated>2009-03-01T00:27:35.609+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='problemsolved'/><category scheme='http://www.blogger.com/atom/ns#' term='javas'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Image and Color handling in Java2D</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SZR2cPHRoUI/AAAAAAAAC74/cQ6QfZxMwFs/s1600-h/2262722-Perfect-Sunset-colours-0.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SZR2cPHRoUI/AAAAAAAAC74/cQ6QfZxMwFs/s320/2262722-Perfect-Sunset-colours-0.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5301992888787378498" /&gt;&lt;/a&gt;&lt;br /&gt;Here are two handy snippets -&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;1. Color from String -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Color c = Color.decode("0x87CEFA");&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;g.setColor(c);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(The hex value is for a serene "lighter" sky blue colour, which I find better than the official "sky blue" of 0x87CEEB)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;2. Painting background images -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;@Override&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public void paint(Graphics g) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;...&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;URL imgURL = getClass().getResource("foo.jpg");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;ImageIcon icon = new ImageIcon(imgURL, "image description");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;icon.paintIcon(this, g, 0, 0);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Where "foo.jpg" should be in the same folder as the compiled class.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4291652614929117334?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4291652614929117334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4291652614929117334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4291652614929117334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4291652614929117334'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/image-and-color-handling-in-java2d.html' title='Image and Color handling in Java2D'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SZR2cPHRoUI/AAAAAAAAC74/cQ6QfZxMwFs/s72-c/2262722-Perfect-Sunset-colours-0.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5891789627108119619</id><published>2009-02-12T00:26:00.001+05:30</published><updated>2009-03-01T00:25:13.240+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='quote'/><category scheme='http://www.blogger.com/atom/ns#' term='life'/><title type='text'>I hate complications</title><content type='html'>But they seem to love me for some reason..&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5891789627108119619?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5891789627108119619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5891789627108119619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5891789627108119619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5891789627108119619'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/i-hate-complications.html' title='I hate complications'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-8867626856175163067</id><published>2009-02-11T14:23:00.004+05:30</published><updated>2009-03-01T00:25:51.562+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualisation'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Languages based on the Erlang VM</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SZKUfmLxsVI/AAAAAAAAC7w/IrPq93v2g3I/s1600-h/ErlangMeter3MP.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 234px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SZKUfmLxsVI/AAAAAAAAC7w/IrPq93v2g3I/s320/ErlangMeter3MP.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5301462981915291986" /&gt;&lt;/a&gt;&lt;br /&gt;Sadly there don't seem to be many of them -&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.haskell.org/haskellwiki/Yhc/Erlang/Proof_of_concept"&gt;Yhc/Erlang - Yhc Core to Erlang BEAM bytecode compiler&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.tornkvist.org/blog.yaws?id=1190846785574003"&gt;Haskerl - Haskell to Erlang translator (Looks unmaintained).&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/erlocaml/"&gt;Erlocaml - A "tight" binding of OCaml with Erlang&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://wiki.reia-lang.org/wiki/Reia_Programming_Language"&gt;Reia - Python/Ruby lookalike on Erlang&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/erlyjs/"&gt;ErlyJS - Javascript on Erlang (No concurrency primitives)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.trapexit.org/forum/viewtopic.php?p=40268"&gt;LFE (Lisp Flavoured Erlang) - &lt;/a&gt;&lt;a href="http://www.trapexit.org/forum/viewtopic.php?p=40268"&gt;Lisp on Erlang (Mostly a prototype)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.erlang.org/workshop/2008/Sess23.pdf"&gt;Matlang - Matlab on Erlang (Only a paper, no freely available implementation)&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-8867626856175163067?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/8867626856175163067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=8867626856175163067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8867626856175163067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/8867626856175163067'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/languages-based-on-erlang-vm.html' title='Languages based on the Erlang VM'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SZKUfmLxsVI/AAAAAAAAC7w/IrPq93v2g3I/s72-c/ErlangMeter3MP.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6245209859522538526</id><published>2009-02-10T19:34:00.000+05:30</published><updated>2009-03-01T00:26:15.779+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurship'/><category scheme='http://www.blogger.com/atom/ns#' term='quote'/><title type='text'>Venture capitalists don't back technologies they back people</title><content type='html'>&lt;div&gt;"Give me a grade 1 person with a grade 2 idea rather than a grade 2 person with a grade 1 idea"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6245209859522538526?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6245209859522538526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6245209859522538526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6245209859522538526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6245209859522538526'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/venture-capitalists-dont-back.html' title='Venture capitalists don&apos;t back technologies they back people'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5440055730345283717</id><published>2009-02-07T18:31:00.005+05:30</published><updated>2009-03-01T00:28:01.674+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='discovery'/><category scheme='http://www.blogger.com/atom/ns#' term='distributedcomputing'/><category scheme='http://www.blogger.com/atom/ns#' term='problemsolved'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Naming distributed nodes in Erlang</title><content type='html'>I was trying to setup communication between Erlang and Java, following the example code here - &lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=IntegratingJavaandErlang"&gt;http://www.theserverside.com/tt/articles/article.tss?l=IntegratingJavaandErlang&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Problem - &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;  Server code &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;C:\Projects\mips&gt;erl -name servernode -setcookie cookie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  Eshell V5.6.5  (abort with ^G)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  (servernode@ANUPAMDELLAPTOP.Belkin)1&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;delme:start().&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 153, 0);"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  (servernode@ANUPAMDELLAPTOP.Belkin)2&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;  Client Code&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;C:\&gt;erl -name clientnode -setcookie cookie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  Eshell V5.6.5  (abort with ^G)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  (clientnode@ANUPAMDELLAPTOP.Belkin)1&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;rpc:call(servernode@ANUPAMDELLLAPTOP, delme, add, [1,6]).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  &lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;=ERROR REPORT==== 7-Feb-2009::18:36:16 ===&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  ** System running to use fully qualified hostnames **&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  ** Hostname ANUPAMDELLLAPTOP is illegal **&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  {badrpc,nodedown}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  (clientnode@ANUPAMDELLAPTOP.Belkin)2&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;rpc:call(servernode@ANUPAMDELLLAPTOP.Belkin, delme, add, [1,6]).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;* 1: syntax error before: Belkin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  (clientnode@ANUPAMDELLAPTOP.Belkin)2&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;rpc:call('servernode@ANUPAMDELLLAPTOP.Belkin', delme, add, [1,6]).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;{badrpc,nodedown}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  (clientnode@ANUPAMDELLAPTOP.Belkin)3&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;rpc:call(servernode, delme, add, [1,6]).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;{badrpc,nodedown}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  (clientnode@ANUPAMDELLAPTOP.Belkin)4&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;rpc:call(servernode@localhost, delme, add&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt; [1,6]).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;{badrpc,nodedown}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  =ERROR REPORT==== 7-Feb-2009::18:37:56 ===&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  ** System running to use fully qualified hostnames **&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;  ** Hostname localhost is illegal **&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-family:'courier new';"&gt;  (clientnode@ANUPAMDELLAPTOP.Belkin)5&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Solution -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  Server code&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;C:\Projects\mips&gt;erl -sname servernode@localhost -setcookie cookie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  Eshell V5.6.5  (abort with ^G)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  (servernode@localhost)1&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;delme:start().&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 153, 0);"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  (servernode@localhost)2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;  Client Code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;C:\&gt;erl -sname clientnode@localhost -setcookie cookie&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  Eshell V5.6.5  (abort with ^G)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  (clientnode@localhost)1&gt; &lt;span class="Apple-style-span" style="color: rgb(51, 102, 255);"&gt;rpc:call(servernode@localhost, delme, add, [1,6]).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;span class="Apple-style-span" style="color: rgb(0, 153, 0);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  (clientnode@localhost)2&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5440055730345283717?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5440055730345283717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5440055730345283717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5440055730345283717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5440055730345283717'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/naming-distributed-nodes-in-erlang.html' title='Naming distributed nodes in Erlang'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-952432299712758997</id><published>2009-02-05T17:19:00.002+05:30</published><updated>2009-03-01T00:28:43.619+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='todo'/><category scheme='http://www.blogger.com/atom/ns#' term='preference'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><title type='text'>To Read - On Intelligence by Jeff Hawkins</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JRKC4KMPogw/SYrS0I9yFlI/AAAAAAAACHQ/qJjeglS88Mk/s1600-h/frontcover.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 264px; height: 400px;" src="http://3.bp.blogspot.com/_JRKC4KMPogw/SYrS0I9yFlI/AAAAAAAACHQ/qJjeglS88Mk/s400/frontcover.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5299279704756459090" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.onintelligence.org/"&gt;http://www.onintelligence.org/&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This book is written by Jeff Hawkins, the founder of Palm and Handspring!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-952432299712758997?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/952432299712758997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=952432299712758997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/952432299712758997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/952432299712758997'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/to-read-on-intelligence-by-jeff-hawkins.html' title='To Read - On Intelligence by Jeff Hawkins'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JRKC4KMPogw/SYrS0I9yFlI/AAAAAAAACHQ/qJjeglS88Mk/s72-c/frontcover.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-5142243680417566248</id><published>2009-02-05T16:50:00.004+05:30</published><updated>2009-03-01T00:31:03.191+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>New features in Javascript 1.8 (Firefox 3.0)</title><content type='html'>While on the subject of Firefox 3.0, &lt;a href="https://developer.mozilla.org/en/New_in_JavaScript_1.8"&gt; check out the new features in Javascript 1.8&lt;/a&gt;. Some of these like generators (pythonesque constructs, introduced in Javascript 1.7, souped up to support expression syntax in 1.8) are nice!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-5142243680417566248?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/5142243680417566248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=5142243680417566248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5142243680417566248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/5142243680417566248'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/new-features-in-firefox-30.html' title='New features in Javascript 1.8 (Firefox 3.0)'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3894461893172635560</id><published>2009-02-05T16:46:00.003+05:30</published><updated>2009-03-01T00:30:26.697+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='problemsolved'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Global variables in Javascript - Across JS files!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SYrLa498VrI/AAAAAAAACHI/bFQR-RB7L60/s1600-h/rock_jump.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 209px; height: 320px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SYrLa498VrI/AAAAAAAACHI/bFQR-RB7L60/s320/rock_jump.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5299271574384039602" /&gt;&lt;/a&gt;&lt;br /&gt;Check out &lt;a href="https://developer.mozilla.org/en/Using_JavaScript_code_modules"&gt;Javascript Code Modules&lt;/a&gt;!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;JavaScript code modules are a concept introduced in Firefox 3 (Gecko 1.9) and can be used for sharing code between different privileged scopes. Modules can also be used to create global JavaScript singletons that previously required using JavaScript XPCOM objects. A JavaScript code module is simply some JavaScript code located in registered location. The module is loaded into a specific JavaScript scope, such as XUL script or JavaScript XPCOM script, using Components.utils.import.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is only available on Firefox 3.0 or better, and then also only to extension developers. But sweet!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3894461893172635560?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3894461893172635560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3894461893172635560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3894461893172635560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3894461893172635560'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/global-variables-in-javascript-across.html' title='Global variables in Javascript - Across JS files!'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SYrLa498VrI/AAAAAAAACHI/bFQR-RB7L60/s72-c/rock_jump.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2451962912939115876</id><published>2009-02-05T16:00:00.003+05:30</published><updated>2009-03-01T00:31:03.191+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Oni - Concurrent Javascript</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SYrC1h7ZPFI/AAAAAAAACHA/MXWAGcHV40o/s1600-h/Reds_and_Airbus_A380.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 265px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SYrC1h7ZPFI/AAAAAAAACHA/MXWAGcHV40o/s400/Reds_and_Airbus_A380.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5299262136451152978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.croczilla.com/oni"&gt;Oni is an an embedded structured concurrency language&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's a framework which allows the programmer to implement concurrent applications without having to explicitely manage the control flow. It does this by "composing" together concurrent actions using operators such as &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Par&lt;/span&gt; which performs actions in parallel, and &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Alt&lt;/span&gt; which performs actions in parallel and returns the result of whichever action finishes first (very useful in implementing timeouts).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Oni can be implemented in any &lt;span class="Apple-style-span" style="font-weight: bold; font-style: italic;"&gt;host&lt;/span&gt; language, and an implentation exists for &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Javascript&lt;/span&gt;! Currently the implementation only works in Firefox 3.0 or better.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2451962912939115876?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2451962912939115876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2451962912939115876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2451962912939115876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2451962912939115876'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/oni-concurrent-javascript.html' title='Oni - Concurrent Javascript'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SYrC1h7ZPFI/AAAAAAAACHA/MXWAGcHV40o/s72-c/Reds_and_Airbus_A380.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4275396965037728999</id><published>2009-02-05T15:28:00.003+05:30</published><updated>2009-03-01T00:31:03.191+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Greenspun's Tenth Rule</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JRKC4KMPogw/SYq5XrBn0bI/AAAAAAAACG4/lIJng-ktk9w/s1600-h/SheepdogsInNY-PhilipGreenspun.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 267px;" src="http://2.bp.blogspot.com/_JRKC4KMPogw/SYq5XrBn0bI/AAAAAAAACG4/lIJng-ktk9w/s400/SheepdogsInNY-PhilipGreenspun.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5299251727892468146" /&gt;&lt;/a&gt;&lt;br /&gt;From Wikipedia - &lt;a href="http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule"&gt;http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Greenspun's Tenth Rule of Programming is a common aphorism in computer programming and especially programming language circles. It states: &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The rule was written sometime around 1993 by Philip Greenspun. Although it is known as his tenth rule, there are in fact no preceding rules, only the tenth. The reason for this according to Greenspun: "Sorry, Han-Wen, but there aren't 9 preceding laws. I was just trying to give the rule a memorable name."&lt;/div&gt;&lt;div&gt;...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The rule is often modified by replacing "Common Lisp" with the speaker's functional language of choice, such as Scheme or Haskell. It can also be generalized as: &lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Any sufficiently complicated platform contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a functional programming language&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Heh!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It can also be applied to Erlang: &lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Any sufficiently advanced CONCURRENT program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of ERLANG&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Double Heh!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4275396965037728999?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4275396965037728999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4275396965037728999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4275396965037728999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4275396965037728999'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/greenspuns-tenth-rule.html' title='Greenspun&apos;s Tenth Rule'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JRKC4KMPogw/SYq5XrBn0bI/AAAAAAAACG4/lIJng-ktk9w/s72-c/SheepdogsInNY-PhilipGreenspun.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-7022247080779527712</id><published>2009-02-03T16:35:00.001+05:30</published><updated>2009-03-01T00:31:03.191+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>To Read - Yahoo Pipes</title><content type='html'>Read up!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://pipes.yahoo.com/pipes/"&gt;http://pipes.yahoo.com/pipes/&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-7022247080779527712?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/7022247080779527712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=7022247080779527712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7022247080779527712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/7022247080779527712'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/to-read-yahoo-pipes.html' title='To Read - Yahoo Pipes'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-804073407994524127</id><published>2009-02-03T15:42:00.002+05:30</published><updated>2009-03-01T00:31:03.192+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Java Layout Manager Showdown</title><content type='html'>&lt;a href="http://weblogs.java.net/blog/joconner/archive/2006/10/layout_manager_1.html"&gt;Very interesting "showdown" of the various layout managers in Java Swing&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Seems like there are quite some options for good looking GUI's in Java apart from the haloed GroupLayout manager.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-804073407994524127?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/804073407994524127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=804073407994524127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/804073407994524127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/804073407994524127'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/java-layout-manager-showdown.html' title='Java Layout Manager Showdown'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-4219983672489212619</id><published>2009-02-02T14:20:00.004+05:30</published><updated>2009-02-03T16:37:21.184+05:30</updated><title type='text'>WOTD - Word Of The Day - Segue</title><content type='html'>Yes, the title continues the acronyms theme. Let's move on.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div&gt;&lt;a href="http://en.wikipedia.org/wiki/Segue"&gt;http://en.wikipedia.org/wiki/Segue&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Segue (pronounced /ˈsɛgweɪ/) - In music, "segue" is a direction to the performer. It means continue (the next section) without a pause. It comes from the Italian "it follows".&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;In journalism, a segue is a method of smoothly transitioning from one topic to another. A segue allows the host or writer to naturally proceed to another topic without jarring the audience. A good segue makes the subject change seem like a natural extension of the discussion.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example real-world usage - &lt;a href="http://www.oreillygmt.co.uk/2008/07/karthik-ramacha.html"&gt;http://www.oreillygmt.co.uk/2008/07/karthik-ramacha.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;Karthik Ramachandra - Erlang eXchange and ThoughtWorks&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Video - Karthik Ramachandra is an Extreme Programmer for ThoughtWorks. He is based in Bangalore, India, and was in London recently to speak at Skillsmatter's Erlang eXchange.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;He was good enough to talk to me about Erlang, Thoughtworks and the tech scene in India.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;And as a slick segue&lt;/span&gt;&lt;/span&gt;, Pragmatic Programmers have recently released The ThoughtWorks Anthology.&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;QS: Would the seamless transitions from one sketch to the next on the &lt;a href="http://en.wikipedia.org/wiki/Monty_Python"&gt;Monty Python&lt;/a&gt; TV Series be called &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Segue&lt;/span&gt;&lt;/span&gt;? &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Stream of consciousness&lt;/span&gt;&lt;/span&gt; is what they are popularly known as.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-4219983672489212619?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/4219983672489212619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=4219983672489212619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4219983672489212619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/4219983672489212619'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/wotd-word-of-day-sague.html' title='WOTD - Word Of The Day - Segue'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-6784639278513585760</id><published>2009-02-02T14:14:00.002+05:30</published><updated>2009-02-02T14:16:18.462+05:30</updated><title type='text'>What is JAIN?</title><content type='html'>While on the topic of acronyms -&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From the &lt;a href="http://en.wikipedia.org/wiki/JSLEE"&gt;Wikipedia page for JSLEE&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;JAIN - &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;J&lt;/span&gt;&lt;/span&gt;ava &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;A&lt;/span&gt;&lt;/span&gt;PIs for &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;I&lt;/span&gt;&lt;/span&gt;ntegrated &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;N&lt;/span&gt;&lt;/span&gt;etworks&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-6784639278513585760?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/6784639278513585760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=6784639278513585760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6784639278513585760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/6784639278513585760'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/what-is-jain.html' title='What is JAIN?'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3945190781658040527</id><published>2009-02-02T13:12:00.001+05:30</published><updated>2009-02-02T13:14:30.429+05:30</updated><title type='text'>What does COB stand for?</title><content type='html'>Here is the context (from an email I received recently) -&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"I will be unavailable from 9:00 AM - COB"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;C&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;lose &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;O&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;f &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;usiness&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3945190781658040527?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3945190781658040527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3945190781658040527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3945190781658040527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3945190781658040527'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/02/what-does-cob-stand-for.html' title='What does COB stand for?'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-517823270444386492</id><published>2009-01-30T15:11:00.005+05:30</published><updated>2009-02-28T23:15:15.548+05:30</updated><title type='text'>XUL Development using Komod IDE/Editor</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JRKC4KMPogw/SYLQVqquykI/AAAAAAAACGw/EBbpfYgIOtY/s1600-h/Xul-Solar-Vuel-Villa.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 262px;" src="http://1.bp.blogspot.com/_JRKC4KMPogw/SYLQVqquykI/AAAAAAAACGw/EBbpfYgIOtY/s320/Xul-Solar-Vuel-Villa.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5297025182390471234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="https://developer.mozilla.org/en/XUL_Explorer"&gt;XUL Explorer&lt;/a&gt; is an &lt;a href="https://developer.mozilla.org/en/XULRunner"&gt;XULRunner&lt;/a&gt; application that aims to provide an IDE for &lt;a href="http://www.mozilla.org/projects/xul/"&gt;XUL&lt;/a&gt; development.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It provides some useful features -&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;A variety of XUL "templates" a.k.a. "snippets", which allow you to quickly insert commonly used XUL into your code.&lt;/li&gt;&lt;li&gt;A preview pane which shows you a live preview of what the finished application will look like.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Neat idea! Except that the project is in its infancy and bundles a barely usable editor which renders the whole contraption impractical.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have a license for Komodo IDE and find it very usable and intuitive. &lt;a href="http://www.activestate.com/komodo/"&gt;Komodo IDE/Editor&lt;/a&gt; is also based on the Mozilla platform and therefore has native support for XUL. What's more, it already includes a live preview option for quickly testing out your changes. So to fill in the missing piece, I set out to port the XUL snippets to Komodo format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A lot of manual copy paste later - &lt;a href="http://freesoftwarefreeworld.com/public/XUL.kpz"&gt;Voila&lt;/a&gt;!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's in the Komodo KPZ format. Downoad, Drag drop into the IDE, Enjoy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;PS: Use the &lt;a href="http://community.activestate.com/forum-topic/trigger-now-tabstop-support"&gt;Trigger&lt;/a&gt; Macro to enable Textmate style macro functionality for more hacking bliss!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-517823270444386492?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/517823270444386492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=517823270444386492' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/517823270444386492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/517823270444386492'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/01/xul-development-using-komod-ideeditor.html' title='XUL Development using Komod IDE/Editor'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JRKC4KMPogw/SYLQVqquykI/AAAAAAAACGw/EBbpfYgIOtY/s72-c/Xul-Solar-Vuel-Villa.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-3572918156270926896</id><published>2009-01-28T14:34:00.004+05:30</published><updated>2009-01-28T14:46:13.087+05:30</updated><title type='text'>Resending meeting invites from Mozilla Lightning</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JRKC4KMPogw/SYAhkwEqMFI/AAAAAAAACGM/D1i8RfKsec0/s1600-h/Lightning-bird-sanctuary-tn.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 250px; height: 250px;" src="http://4.bp.blogspot.com/_JRKC4KMPogw/SYAhkwEqMFI/AAAAAAAACGM/D1i8RfKsec0/s320/Lightning-bird-sanctuary-tn.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5296270077051154514" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Scenario -&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You use &lt;a href="http://www.mozilla.org/projects/calendar/lightning/"&gt;Mozilla Thunderbird with the Lightning extension&lt;/a&gt;. Someone sends you an email with a meeting invite which you accept and it's added to the lightning calendar. &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Then you delete that email&lt;/span&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Problem -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You need to invite a third person to that same meeting. You cannot forward the mail (since you deleted it) and there seems to be no way to forward an event from your Lightning calendar.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Solution - &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Right click on the event in Lightning and select "copy".&lt;/li&gt;&lt;li&gt;Open a blank text file and "paste".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Save that file as event.ics or anything else with a &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;.ics&lt;/span&gt; extension.&lt;/li&gt;&lt;li&gt;Forward the newly created ICS file as an attachment.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Problem solved!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: The ICS file is in the &lt;a href="http://en.wikipedia.org/wiki/ICalendar"&gt;iCalendar format&lt;/a&gt; which is supported by a wide variety of software including thunderbird, iCal, and outlook.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-3572918156270926896?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/3572918156270926896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=3572918156270926896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3572918156270926896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/3572918156270926896'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/01/resending-meeting-invites-from-mozilla.html' title='Resending meeting invites from Mozilla Lightning'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JRKC4KMPogw/SYAhkwEqMFI/AAAAAAAACGM/D1i8RfKsec0/s72-c/Lightning-bird-sanctuary-tn.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34167840.post-2866928138742820765</id><published>2009-01-28T00:25:00.004+05:30</published><updated>2009-01-28T00:44:19.241+05:30</updated><title type='text'>Hardware virtualisation</title><content type='html'>1. Use &lt;a href="http://www.vmware.com/products/player/"&gt;VMWare Player&lt;/a&gt; - Excellent, extremely easy to use and free (as in beer). i386 only.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use the Ubuntu 8.04 image from - &lt;a href="http://jars.de/english/ubuntu-804-vmware-image-download-english"&gt;http://jars.de/english/ubuntu-804-vmware-image-download-english&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;2. Use &lt;a href="http://bellard.org/qemu/"&gt;QEmu&lt;/a&gt; - Excellent, Free (as in speech) and supports a variety of targets.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.aurel32.net/info/debian_mips_qemu"&gt;Use these steps for a MIPS installation&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use these &lt;a href="https://help.ubuntu.com/community/WindowsXPUnderQemuHowTo"&gt;steps for QEmu installation under Ubuntu&lt;/a&gt; (ignore the stuff about Windows, and use the &lt;a href="http://people.debian.org/~aurel32/qemu/"&gt;QEmu images available here&lt;/a&gt;). Follow the directions for KQEmu to speed up i386 emulation (Alas it does not seem to speed up MIPS emulation).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use &lt;a href="http://www.codesourcery.com/gnu_toolchains/mips/"&gt;Sourcery G++&lt;/a&gt; for cross compilation with a MIPS target. (Supports Linux and Windows both).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NOTE: &lt;a href="http://www.h7.dion.ne.jp/~qemu-win/"&gt;QEmu for Windows&lt;/a&gt; does not work fine. Ignore!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34167840-2866928138742820765?l=blog.syntaxvssemantics.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.syntaxvssemantics.com/feeds/2866928138742820765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34167840&amp;postID=2866928138742820765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2866928138742820765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34167840/posts/default/2866928138742820765'/><link rel='alternate' type='text/html' href='http://blog.syntaxvssemantics.com/2009/01/hardware-virtualisation.html' title='Hardware virtualisation'/><author><name>Anupam Jain</name><uri>http://www.blogger.com/profile/15145615824972745459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
