Earlier quoted context omitted.
Erlang is a great programming language after one takes the time to understand the principles underlying it and its design. Everything fits very nicely into place. There are definitely things that could be done better, but then that’s the case with most programming languages and technologies after they have accumulated some dust. Elixir on the other hand, in my personal opinion, is a false prophet simply because it lo…
Elixir is prettier than Erlang but it really mess up on certain things. Erlang have pattern matching via function with same name and you can tell if it's a group of pattern matching with semicolon and period. But with Elixir you can't tell it's just def and end. Erlang's: -module(recursive). -export([fac/1]). fac(N) when N == 0 -> 1; fac(N) when N > 0 -> N * fac(N-1). You can tell fac(N) both are in a group of patter…
What's all this fuss about Erlang? (2007)
171–180 of 193 posts
Re: What's all this fuss about Erlang? (2007)
#172I'm not well versed in the entire (phone) network space. Ericson switch uptime (powered by Erlang) is always cited and admittedly initially drew me to the whole ecosystem. Well mostly the "it's used in a network that has basically worked all these years so it must be rather robust one way or another" line of thinking. However what I'm wondering is...there's other vendors and Ericson isn't powering the entire network.…
Re: What's all this fuss about Erlang? (2007)
#173Earlier quoted context omitted.
> As Erlang requires message passing overhead by design That's Erlang's main weakness. For parallel code, structurally shared data is immensely useful for processes running in the same address space. With Erlang, you have to give that up. OTOH, not having this possibility makes distributing processes to other nodes a lot simpler.
You should be able to share data in Erlang's model, because the data are immutable. You just can't modified the shared data.
Re: What's all this fuss about Erlang? (2007)
#174Earlier quoted context omitted.
In other words, Elixir is the rocket that will make Erlang go big.
Well, it's a skin on the rocket that will make it big. While they generally say that Elixir runs on top of the Erlang VM there happens to be a big fat Erlang/OTP layer in-between which Elixir and its libraries make full use of. This is just smart of course but not mentioning doesn't paint the whole picture.
The rocket analogy is a good one, too. What Erlang accomplishes is massive, and Elixir uses and benefits from all of it.
I don't want to downplay what Elixir accomplishes, either ... to use a SpaceX analogy, Elixir and its ecosystem are like the guidance systems and deployable struts that let you land rockets repeatably on a barge in the middle of the ocean. It uses macros to make solving problems with rockets easier and more widespread, and maybe it also increases our ambition because of it. (I'm thinking about projects like phoenix_pubsub especially Tracker, ecto, the 1.4 registry, etc).
Re: What's all this fuss about Erlang? (2007)
#175Earlier quoted context omitted.
And then you also need to implement mailboxes to receive new data, supervisors to watch the threads and revive them when they fail, initialization methods to get back to the original state, etc. You can trivialize any issue if you ignore all the facts, but it doesn't make your argument have any correctness.
I'm really surprised at the arguing in this thread. Embarrassingly parallel algorithms are trivial in pretty much every language. That is why is embarrassing. >And then you also need to implement mailboxes to receive new data If you did, it is not embarrassingly parallel. You know, a huge amount of parallel work is done in C/C++. It was the language used for multiple parallel algorithms courses in my university. Bein…
Re: What's all this fuss about Erlang? (2007)
#176Earlier quoted context omitted.
Concurrency is not parallelism. You conflate parallelism with concurrency in your comments both here and above. I should also mention that for a big part of its life the Erlang virtual machine has had no support for parallelism. Erlang was not invented to solve parallelism so your hypothesis is downright wrong. Parallelism was just a consequence of the concurrency which was not exploited by the Erlang virtual machine…
I don't know what to say apart from that I disagree with how your describing my argument back to me.
Re: What's all this fuss about Erlang? (2007)
#177Earlier quoted context omitted.
Elixir is prettier than Erlang but it really mess up on certain things. Erlang have pattern matching via function with same name and you can tell if it's a group of pattern matching with semicolon and period. But with Elixir you can't tell it's just def and end. Erlang's: -module(recursive). -export([fac/1]). fac(N) when N == 0 -> 1; fac(N) when N > 0 -> N * fac(N-1). You can tell fac(N) both are in a group of patter…
I honestly don't understand how this messes anything up... the elixir syntax produces something semantically equivalent with a lot less garbage. Opinions may differ I guess, but I find your Elixir example much easier to read than your Erlang example (I program in Elixir, so that's not much of a datapoint).
This is the closest Erlang equivalent:
fac(0) -> 1;
fac(N) -> N * fac(N-1).Re: What's all this fuss about Erlang? (2007)
#178Earlier quoted context omitted.
>> Your Erlang program should just run N times faster on an N core processor > But only if your program is embarrassingly parallel with at least N times available parallelism in the first place! If you have one of those it's already trivial to write a version that runs N times faster on N cores in C, Java, multi-process Python, whatever. You've made two claims, one irrelevant and one false: 1. only if your program is…
>only if your program is embarrassingly parallel is irrelevant, because a almost every program is embarrassingly parallel in Erlang. The language is built around concurrency to the point that parts which wouldn't be obviously parallel in another language are in Erlang. Further, slow hashes in crypto have taught us that is actually quite difficult to make something which can't be parallelized. OK. Not an Erlang user,…
Re: What's all this fuss about Erlang? (2007)
#179Earlier quoted context omitted.
I'm not devishard, but I parsed his statement slightly differently. He's not saying that Erlang makes things parallel magically. Rather, he's saying that Erlang forces tasks that /could/ be parallel to be parallel by default. Thus, Erlang will tend to maximize the sections of your program that are run in parallel compared to other languages.
Which would make the original commenter's point valid: >Your Erlang program should just run N times faster on an N core processor No, it won't. It will only be true for tasks that /could/ be (completely/embarrasingly) parallel (as you say). Which is kind of circular.
No, I'm not claiming Erlang breaks Amdahl's Law. I'm claiming that Amdahl's Law applies less often than people think it does.
Re: What's all this fuss about Erlang? (2007)
#180Earlier quoted context omitted.
>> Your Erlang program should just run N times faster on an N core processor > But only if your program is embarrassingly parallel with at least N times available parallelism in the first place! If you have one of those it's already trivial to write a version that runs N times faster on N cores in C, Java, multi-process Python, whatever. You've made two claims, one irrelevant and one false: 1. only if your program is…
> almost every program is embarrassingly parallel in Erlang I can't agree with that, and it's key to my point. There are some problems which we just don't know how to make embarrassingly parallel. Take something classic like mesh triangulation or mesh refinement. Nobody knows how to make those embarrassingly parallel. If you write it in Erlang, it's still not going to be embarrassingly parallel. And it won't scale li…