Thursday, October 16, 2008

Viewing PDF from within Firefox on Mac

I was searching for the firefox plugin to view pdf files within the browser (embedded). I was not able to find the anything useful via google search. But Yahoo! search got me the result, that too first one...

Here is the page

Hurray.. At last I can read PDFs within Firefox without downloading it on to my desktop. No more folder clutter..

Tuesday, October 7, 2008

How to setup grid using Erlang?

Erlang is a functional programming language with the built-in support for concurrency and distributed computing. Nodes running erlang virtual machine can communicate with each other without any additional coding.

Erlang use light weight process model to achieve the distributed computing. Erlang processes are lighter than linux thread. One erlang node can run more than 10k (sometime more than 100k) processes on a single node.

Erlang process is started using spawn or spawn_link function. A process can be started on the current vm (virtual machine) or on any other vm in the grid by just adding one additional parameter to these functions.

In order for 2 nodes to communicate with each other, both nodes should have the same cookie. In a grid, all erlang nodes should have the same secret (set via -setcookie command line option or using erlang:set_cookie/2 function)

Erlang nodes follow the following naming convention.

name@hostname where name can be any arbitrary name


In this example, I am assuming that I have 2 hosts namely node1.example.com and node2.example.com

Run the erlang vm on each node with short name

On node1.example.com,

erl -sname foo -setcookie mysecret


On node2.example.com,

erl -sname bar -setcookie mysecret


On node1.example.com, ping node2.

net_adm:ping('bar@node2.example.com').
pong
nodes().
['bar@node2.example.com']

Wednesday, October 1, 2008

Why Microsoft just don't get it?

Today Microsoft's Live Search announced SearchPerks program. Users are given point when they use Live Search. These points can be re-deemed for X-Box games, t-shirts etc. But the catch is you have to use Internet Explorer 6.0 or higher.

To earn value for your searches and join the SearchPerks! promotion you must have Internet Explorer 6.0 or higher to participate


Microsoft just don't get that Internet is a open space and users should be allowed to use whatever browser they are using.

Monday, September 29, 2008

I can do everything in C or in Java..

Here is the philosophy that should be used by programmers

As a programmer you should spend your time expressing your ideas, not jumping through hoops to accommodate a language. If you spend the majority of your time doing the latter, the language you're working in probably isn't very good.


From here

No shadow building

Le Project Triangle is one of those buildings that make us think that we may actually drive flying cars one day. To be completed by 2014 in the Porte de Versailles area in Paris, its most impressive feature is that, according to the architects, it won't cast shadows on adjacent buildings. The trick is the orientation and it's shape: While it looks like a massive pyramid from one side, the other side shows that it really is an ultra-thin triangle resembling a shark's fin


More here

Friday, September 26, 2008

Threads are at last in C++ standard

It's been decades since I am doing thread programming in C++. It was so painful to use POSIX thread APIs. It is like writing a same novel many times. Not anymore... C++0x standard is out there now. Yahoooooo.. Thread is included in the standard now. Read more about it here

Illustration of Boost shared_ptr

Book Promotion