_______________________________________________ erlang-questions mailing list erlang-q...@erlang.org http://erlang.org/mailman/listinfo/erlang-questions
-- Garry Hodgson AT&T Chief Security Office (CSO) "This e-mail and any files transmitted with it are AT&T property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited."
Google is a huge company that is spending a *lot* of effort in an attempt to
prevent yet another of their expensive toys winding up in the rubbish bin of
digital history.
_______________________________________________erlang-questions mailing list
On 2014-06-23 11:43:11 +0000, Raphael Korsoski said:
On the other hand, it is more or less trivial to _implement_ models of Actors in Erlang, whichever of the many proposed semantics for actors you choose.
I agree, except the automatic garbage collection of actors that are inactive which seems so important for Hewitt. The latter would not be trivial to implement. Not sure why he thinks its such a big deal.
Although I have never completed the exercise, I believe quite strongly that you could also fully embed Erlang's style of concurrency in both abstract actor models and operational (process calculi) implementations of those, with relatively simple, or even trivial, translations; eg selective receive as a set of actors with a receptionist.
Well in theory you can implement everything in almost everything. In practice its eaither infeasible or has quite bad performance if you model Erlangs mailbox, linking and monitoring behavour.
In my opinion, strictly separating Erlang-style concurrency and the Actor model is only of academic interest; unless you are implementing, say, an Erlang runtime of course.
I disagree. Almost all the good things in Erlang come from differences from the Actor model:
* mailboxes with selective receive help to significantly reduce state complexity. If you don't know what I mean please watch http://www.infoq.com/presentations/Death-by-Accidental-Complexity
Of cours if you are only using sycronous gen_server calls you won't notice the differences but at the same time giving up lots of expresive power.
* links and monitors and the failure handling derived from them
* The possibility of sequential long running preempted code
Generally Erlang implements something that "solves the problem", wheras actors are just a theoretical construct.
Cheers
-- Peer
When people talk about Erlang and actors I look at them funny. Not
because of what you said, how Erlang isn't actors, but because that's
completely missing the point of Erlang.
The beauty of the Erlang processes is that they were made for achieving
fault tolerance. It is this particular aspect that make them incredibly
good: you can focus on the happy path, "let it crash", keeping the code
very tidy; you can detect failure and recover from it automatically,
allowing you to sleep at night; and you don't have to deal with broken
state.
For me Erlang is first fault tolerant, then concurrent, then functional,
yet for many people it seems to be the opposite order. I personally care
very little about Erlang being functional (though I do care a great deal
about immutability and pattern matching being the default behavior, the
rest not so much), and the concurrency is nice but only because it
enables all the fault tolerance features of the language.
--
Loïc Hoguin
http://ninenines.eu
Interesting - because what I find most compelling is the concurrency.
Perhaps, this is because I came to Erlang with a background in two areas
that emphasize concurrent thinking - networking and simulation. In the
first, things tend to be easy - new connection, span a process for the
duration. For simulation, though, the paradigm is often "an object per
simulated entity - with spaghetti coded execution pathways that run
every second." Erlang provides a run-time environment that's much
better for thinking about inherently concurrent problems.
Miles Fidelman
--
In theory, there is no difference between theory and practice.
In practice, there is. .... Yogi Berra
_______________________________________________
I think the more important aspect here being that its very hard to be happy
with concurrency in a world where you have to handle every combination of
message*state, and that means fault tolerance is a neccessary component of any
environment where one can happily build large concurrent systems. In
particular, any large system is non-trivial, and concurrency itself is non-
trivial. Without fault-tolerance you wind up with an explosively complex fault
situation to handle.
Since we're hoppping down the semantic rabbit-hole in this discussion already,
I suppose its worth mentioning that the term "fault-tolerance" in this context
is outlined by the idea that an asynchronous message-stew requires a program
to be capable of reasonable behavior when unexpected messages are received,
and that this should not mandate the programmer write a special case for every
combination that might occur along the message*state matrix. Not every
definition of "fault-tolerance" carries this meaning.
Come to think of it, I don't think it would be very easy to apply Erlang's
concept of fault-tolerance without pattern matching as a central feature in
many areas of the language. I could be wrong, I'm just trying to imagine an
alternative without pattern matching -- and I don't see any alternative than
to emulate it with exclusive guards or something (which still equates to
pattern-matching, just less easy to read), which in the extreme case is almost
as bad as the common practice in some languages of actually enumerating every
negative case -- which usually vastly outnumber the positive cases -- and
providing an exception handler for each.
I recall a talk Ulf Wiger gave a while back about something like this. Along
the lines of how its easy to drown in an ocean of incidental complexity in
large concurrent systems, and "large" doesn't have to be very big. Actually,
he gave examples in Erlang of how you can even drown in Erlang, so its not
just language-specific, it was more a structural issue. (Now I want to go back
and find that again...)
My point is that its hard to have concurrency without fault-tolerance, fault-
tolerance only means what we think it means in a concurrent environment, and
both are much easier to think about in a functional, immutable world (with
assignment meaning labels, not variable storage). So each of these three
points is hard to assign a priority, regardless what feature we personally
think of as most important.
-Craig
--
Remember to send a copy to erlang (dot) questions (at) erlang (dot) org when posting.
---
You received this message because you are subscribed to the Google Groups "Erlang Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erlang-programm...@googlegroups.com.
To post to this group, send email to erlang-pr...@googlegroups.com.
Visit this group at http://groups.google.com/group/erlang-programming.
For more options, visit https://groups.google.com/d/optout.
2. In his recent talk at EUC Garrett Smith showed us an interesting slide[1] where Go appears to be one of the primary alternatives to Erlang, as chosen by _Erlang programmers themselves_. To me this implies that Erlang programmers have found in Go some of the principles Erlang builds upon, the fact I'm going to dispute below.
Robert, I know it's probably documented somewhere, but...
On Wednesday 25 June 2014 00:09:35 Robert Virding wrote:
I think it is very lucky that we weren't interested in, or worried about,
the theoretical aspects, or that we had heard about the actor model. If we
had we would probably still be discussing whether we were doing the actor
model and which parts of it, or where we differed and how important that
was? Or should we differ and maybe we should drop the differences to we
would comply, etc ... :-)
We were trying to solve *THE* problem and this was the best solution we
could come with. It was purely pragmatic. We definitely took ideas from
other inputs but not from the Actor model.
1. what do (did) you see as "*THE* problem" you were trying to solve at the time
2. what sources DID you draw from (other than the predecessor languages at Ericsson), are there any that you'd consider primary influences?
Thanks for the pointers - and yes, the blog post is a very nice summary!
Re.
> 2. what sources DID you draw from (other than the predecessor
> languages at Ericsson), are there any that you'd consider primary
> influences?
>
>
> Prolog and Smalltalk in equal measure. Pattern matching and syntax was
> inspired by Prolog. Messaging from Smalltalk. We took a few ideas on
> guarded commands from
> Dijkstra.
>
This is mostly in the form of historical curiosity of course, but...
can you say a bit more about the Smalltalk influence, and in particular,
which version of Smalltalk? I ask, because:
- The earlier versions of smalltalk included (at least in theory) a lot
of concurrency (objects seemed a bit more like actors), whereas later
versions, starting with Smalltalk-72, pretty much dropped concurrency as
a focus (there was really interesting exchange with Alan Kay on this, a
while back, on the fonc email list).
- During that time period (very early 70s), there was a lot of
cross-fertilization between Alan Kay (Smalltalk), Hewitt (PLANNER, actor
model), and Steele and Sussman (Scheme)
(I'm kind of exploring Robert's statement that "I think it is very lucky
that we weren't interested in, or worried about, the theoretical
aspects, or that we had heard about the actor model." Particularly, in
that Alan Kay cites PLANNER as a key influence on Smalltalk. I'm kind
of interested in the origins and history of languages that treat
processes as fundamental units of computation, vs. the object model).
Thanks,
Miles Fidelman
- During that time period (very early 70s), there was a lot of cross-fertilization between Alan Kay (Smalltalk), Hewitt (PLANNER, actor model), and Steele and Sussman (Scheme)
(I'm kind of exploring Robert's statement that "I think it is very lucky that we weren't interested in, or worried about, the theoretical aspects, or that we had heard about the actor model." Particularly, in that Alan Kay cites PLANNER as a key influence on Smalltalk. I'm kind of interested in the origins and history of languages that treat processes as fundamental units of computation, vs. the object model).
On Jun 25, 2014 7:39 PM, "Joe Armstrong" <erl...@gmail.com> wrote:
>
> I can't be sure but at a guess smalltalk-80. The version I used was
> on a sun workstation and I used to take a coffee break when it garbage collected. To be honest I was more influenced by the books than the
> implementation which was very slow - the red green and blue books
> were great reading.
>
BTW, these three amazing books are available here: http://stephane.ducasse.free.fr/FreeBooks.html
Robby
If you go through the other papers listed on Hewitt's page you will
notice some interesting "publications", like:
* "Mathematics self-proves its own Consistency (contra Gödel et.
al.)", where Hewitt claims having disproved long established
mathematical results via some ad-hoc philosophical arguments;
* "What is computation? Actor Model versus Turing's Model", where he
argues that the Actor Model expresses hypercomputation and thus
transcends Turing machines;
and other gems of varying degree.
To put it lightly, I think Hewitt's papers published after circa 2000
should be taken with a grain of salt. If you look at his publication
history[1], you will notice he has not released a single paper in a
respectable (sic) journal since then. He has also been notoriously
banned from Wikipedia[2][3] for destructively editing articles
according to his own beliefs. I could go on with many other
"interesting" facts, but they can be easily discovered by oneself.
Respectability is not a permanent trait.
[1]: http://www.informatik.uni-trier.de/~ley/pers/hd/h/Hewitt:Carl
[2]: http://en.wikipedia.org/wiki/Wikipedia:Requests_for_arbitration/Carl_Hewitt
[3]: http://en.wikipedia.org/wiki/Wikipedia:Sockpuppet_investigations/CarlHewitt/Archive
--
Ignas