Live data from Hacker News

What's all this fuss about Erlang? (2007)

pragprog.com

171–180 of 193 posts

Re: What's all this fuss about Erlang? (2007)

#171
post #44

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…

It's not only that. I think the bigger issue is that because of it's Ruby-like syntax it encourages newcomers to think in Ruby rather than in Erlang. Rather than emphasising what's the core of Erlang it attracts people with it's syntax, which is the least important aspect of a language.

Re: What's all this fuss about Erlang? (2007)

#172
post #167

I'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.…

Ericson makes a switch that some other networks use. That switch contains lots of Erlang inside it.

Re: What's all this fuss about Erlang? (2007)

#173
post #169

Earlier 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.

Yes, I meant immutably shared data.

Re: What's all this fuss about Erlang? (2007)

#174

Earlier 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.

Wow, rvirding! Thank you for everything. Distributed software is actually a pleasure to write thanks in large part to your the many years of work.

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)

#175
post #118

Earlier 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…

People's obsession with language choice often cloud their judgement.

Re: What's all this fuss about Erlang? (2007)

#176
post #79

Earlier 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.

Funny how often that's the only reasonable response. Nitpick: s/your/you're/. I do my part to stop language drift.

Re: What's all this fuss about Erlang? (2007)

#177

Earlier 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).

Most of the garbage is because those aren't the closest equivalents.

This is the closest Erlang equivalent:

   fac(0) -> 1;
   fac(N) -> N * fac(N-1).

Re: What's all this fuss about Erlang? (2007)

#178
post #93

Earlier 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,…

I'm not saying Amdahl's Law is wrong, I'm saying that it doesn't apply to as many problems as people think it does. I said "almost" for a reason.

Re: What's all this fuss about Erlang? (2007)

#179

Earlier 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.

I'm interpreting "embarrassingly parallel" to mean that it's obvious the task can be parallelized, and I'm saying that many tasks where this isn't obvious in a more serial language are obvious in Erlang.

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)

#180

Earlier 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…

"almost every program" != "any program"
Post reply on HN