Erlang process rings and calculation examples.

Ring of processes can be used to do meaningful calculations. Following code first makes a simple process ring. Next is demonstration of calculation of Fibonacci numbers using proc rings.The last part does matrix multiplication on a process ring using map reduce kind of functionality. It is inspired by excellent Unix Systems programming book by Robbins and Robbins.

Simple loop in clojure to talk to Erlang via Jinterface

Working in clojure to talk to Erlang in JVM is such a nice experience. No more fluffy java code to deal with. Here is a code snippet to start a very simple receive loop.

Massage is medicine

Another example of old Indian tradition of giving massage to babies which was looked down by western educated Indian doctors has been found to be beneficial

…., improves symptoms in children with asthma, and increases grip strength in patients with carpal tunnel syndrome. Giving massages to the littlest patients, premature babies, helped in the crucial task of gaining weight.

Problem with gen_fsm stop terminate

I used to think calling gen_fsm:send_event( FsmRef , stop ) will unregister the global name associated with it.

But experiments suggest that is not the case.

global:unregister_name( FsmRef ) seems to FIX the issue.

Also some how using rpc call on different node to gen_fsm:start_link doesn’t give error that name is already registered. Strange!