Guy Steele did the keynote on parallelism [1] at the Strange Loop [2]
conference in which he said that he could do it over Fortress [3]
would have been modeled on Haskell rather than Fortran. The relevant
portions are between 49:36 - 49:50. Thought it might interest readers
of this list.
-deech[1]
Read more... )
Erlang and its message-passing are just high-level abstractions presented to a scripter (or a programmer, if you wish) in that high-level scripting language called Erlang.
This is a bit misleading, because Erlang is not a programming language per se.
It is a scripting language for the erlang machine, and some people like Joe Armstrong also called it "an application OS".
What this means is that the E. VM can take advantage of multiprocessor systems (since release 11, if I remember correctly) and parallelize the execution of its message-passing lightweight "processes" (I am not even speaking about tasks distributed between hosts and obviously running in parallel, too). If you check a running Erlang VM compiled with smp support, you'll see 4 OS threads per CPU/Core. That is how parallelization occurs in Erlang: implicit parallelism is simply built into the system, capabilities of which you use (or ignore) in your programs.
When you think of Erlang, think of a "cauldron" (Erlang VM), bubbling on top of a fire (host computer OS), and those bubbles and splashes coming out of the brew, hanging for a moment in the air, and then bursting and falling back are the "lightweight processes". It's the ERLANG MACHINE (which can run for years without restart) that matters. That is the heart of Erlang and why it is an "application OS" rather than a programming language.
So come to that example of yours, Erlang is not suited for numeric calculations. And, secondly, knowing how to dissect your computation into parts which would benefit from parallel execution has nothing to do with operators of the language itself.
But basically, yes, the correct answer to someone will be "yeah, dude, just spawn, spawn and spawn, and then spawn_link - and you'll be OK"
.. and the performance of httpd server called "Yaws" versus, say, "multithreaded" Apache, proves my point completely:
http://www.sics.se/~joe/apachevsyaws.html
Reply
Тем более, что вы глупости неинтересные пишете.
Reply
Leave a comment