Erlang rocks (Re: Eppur si sugat)
Serge Aleynikov
serge@REDACTED
Thu May 29 12:59:59 CEST 2003
I happened to have quite a bit of experience with Neural Networks, (I
got a Master degree in biomedical engineering, doing research in retinal
image processing and automated feature extraction and classification
using neural nets).
For the past several months I've been studying Erlang, and see that
while it is extreemly compact and efficient in solving distributed and
concurrent problems, it lacks the computational power (which it wasn't
designed for anyway).
In Neural Nets one needs to perform a lot of calculations involved in
training a network of neurons. The goal is given an input and knowing
the output to find a distribution of weights between N interconnected
nodes a multi-layered network that allows the network to be
deterministic with respect to given input/output templates. The
training involves a lot of iterations that are in the order of the
number of neurons times the number of interconnects divided by some scalar.
So in my opinion Erlang is not quite well suited for this
performance-wise, as in my iterative tests it was about 10 to 13 times
slower than C / Pascal.
Regards,
Serge
Dr.Dr.Ruediger M.Flaig wrote:
> Hi all,
>
> from my bit of Italian, I think it ought to be "Eppur suga" -- the
Latin -t is dropped in the 3rd person singular AFAIK, and it is
certainly not reflexive... it does not suck itself, thaat were recursion.
> ;-)))
>
> Now for something more serious... I think the basic sentiment we all
share is that Java sucks, and that C++ sucks. They do, and very badly
too, and it is annoying to see that they have become a kind of de facto
standard.
>
> I have used both (more than Erlang, I am afraid -- as a molecular
biologist, I have to deal with megabyte arrays, and that is not quite
what Erlang was designed for -- sinnerr repent -- well Ocaml is quite
nice too ;-) ), and I am equally fed up with the cobolesque boilerplate of
> "private final static paralyzed karl.otto.gustav emil =
(karl.otto.gustav) ((egon.kasimir) foo.bar().blah[anything])"
> and the orkish scrawls of
> "#define n<m>(x,i,j) {*++(*x)->y %= (i>j)?&i--:--&j}", not to mention
memory leaks and, and, and... Maybe OO itself does not suck but a
concept without implementation is void.
>
> But I think we are missing the point. The important thing is not that
OO is an inferior concept but that FP (or COPL, if you please) is a
superior one. Erlang were still great even Stroustrup and Gosling had
never come near a computer -- because it enables you to be productive,
to write clear and concise code, to cope with errors and, last but not
least, becaause it allows reasoning.
>
> This latest thing is what I have really been missing. Erlang is a
functional language, so it should be possible to employ automatic
theorem provers and all that kind of stuff. Cummings wrote about ML: "We
are not trying to develop 'safer' programs by testing, but developing
SAFE programs by reasoning." This is a very philosophical matter. Let me
say that Java and C++ rely on induction, Erlang allows deduction, and
Sir Karl Popper has said the rest about that, decades ago. So are there
any theorem provers for Erlang, as there are for Lisp and ML? Can we
prove a program's correctness by reasoning? If not, let's do that!
>
> The other point is that the power of Erlang's concurrency is often
underestimated by folks who are not interested in parallelism itself. I
am a complete layman to that field but I think that neuronal networks
would be a great thing do with Erlang. Has anybody tried this before?
Are there any projects in similar fields? Personally, I was attracted to
Erlang because I felt that simulation of complex biological processes
would be easy to implement. Imagine you have a microbe with some 4000
genes, each with a state of activity and each influencing a couple of
others. In Erlang, this would be straightforward... I met a guy who did
the like and spend a year on that programming the basic mechanism in
Java! So I think we could get away from that "Erlang? Oh, that's for
telephones only" image.
>
> Has anybody worked on this yet?
>
>
> Skål,
> Ruediger Marcus Flaig
More information about the erlang-questions
mailing list