Over the past 6 months I have been working on a crap load of projects in several different languages (C, SmallTalk, Lisp, Ruby, Python, Erlang), some client work, but mostly open source projects. I love hacking on all kinds of cool projects and languages. I believe it is very important f
Continue reading...
-module (echo).
-export ([go/0, loop/0]).
go() ->
Pid = spawn(echo, loop, []),
Pid ! {self(), hello},
receive
{Pid, Msg} ->
io:format("~w~n", [Msg])
end,
Pid ! stop.
loop() ->
receive
{From, Msg} ->
From ! {self(), Msg},
loop();
stop ->
true
end.
I started playing around with Erlang a few weeks ago. I have to say that this language is very powerful and a lot of fun.
Erlang is a programming language designed for building highly parallel, distributed, fault-tolerant systems. It has been used commercially for many years to build massive fault-tolerant systems which run for years with minimal failures.
Erlang programs run seamlessly on multi-core computers. This means your Erlang program should run 4
Continue reading...« Previous Entries