Live data from Hacker News

What can I only do in Erlang?

erlang.org

151–160 of 173 posts

Re: What can I only do in Erlang?

#151
post #34

Erlang looks interesting. However, the only problem I have with starting in Erlang is that on the great computer language shootout, it shows that Erlang is about 10x slower than C++ on most examples. And about 3x slower than Go [1] I know that the problems on this website are not specifically "concurrent" problems, but still, even a distributed web-server must do some non-concurrent stuff at times :) Are my concerns…

This is correct. I tried Erlang with ProjectEuler and creating prime number via sieves with Erlang takes forever compare to C++.

Erlang is not something you want to do for numerical crunching.

Erlang is for a very specific set of problems and it's concurrency.

For any numerical stuff you can off load it to other languages...

Re: What can I only do in Erlang?

#152
post #80

Earlier quoted context omitted.

> Which do you need sooner; fast? or correct and scalable? Well, if I need all of these options, then Erlang is obviously not the way to go. In that case, Erlang might work as a prototyping language. My impression is, from what I've read here, that Erlang might be the preferred tool for situations in which latency is not of paramount importance. For example, when sending text-messages over the internet, it doesn't hu…

If you're just delivering content, not number crunching, I doubt your bottlenecks are CPU, and you shouldn't see Erlang take 10x as long. In fact, you'll probably deliver a better experience in Erlang, because of its approach to concurrency; your average latency will likely be a bit higher, but your extremes will likely be lower. In fact, since you started with benchmarks, let's return to benchmarks (I find them to g…

Fair enough. This makes sense.

Re: What can I only do in Erlang?

#154
post #51
post #34

Erlang looks interesting. However, the only problem I have with starting in Erlang is that on the great computer language shootout, it shows that Erlang is about 10x slower than C++ on most examples. And about 3x slower than Go [1] I know that the problems on this website are not specifically "concurrent" problems, but still, even a distributed web-server must do some non-concurrent stuff at times :) Are my concerns…

Erlang's strength is in its virtual machine which has supervision trees built-in, a built-in DNS system, built-in inter-node RPC, hot code reloading, massive concurrency, etc... I still haven't experienced a programming environment that replicates the Erlang/OTP environment. Period. Haskell is amazing , I've built my company on it, but we're also building our company on Erlang - Haskell's tooling around distributed c…

out of curiosity, what's your company and/or field?

Re: What can I only do in Erlang?

#155
post #47
post #20

Earlier quoted context omitted.

Agree, and to look at it from a different angle - to me writing Erlang felt like I was writing config txt files to some underlying system. The system performs good following your "config" but all the hardcore feel is lost for you.

Huh? "Hardcore feel" is definitely there and the language is anything but "writing config txt files to some underlying system". I've built applications in the > 10k SLOC range that use a consensus algorithm for distributed computing and it was hard but made tremendously easier because of Erlang's built in primitives. No hardcore feel was lost at all and neither was it writing a config txt file... [EDIT] I would love…

I would never downvote someone for it, but starting a comment with "Huh?" is always incredibly annoying to me, although it happens a ton on HN. To me it reads like something you would only say if a comment was literally unintelligible, or logically impossible or something. If you changed it to "I disagree," or "What do you mean?" it would change the whole tone of the comment, at least for me.

Anyway, just a guess, I don't even have enough karma to downvote.

Re: What can I only do in Erlang?

#156
post #146

Earlier quoted context omitted.

Scala+akka may be easier for Java programmers looking at Erlang, and perhaps enough so to make it "more suitable" when you look at net cost/benefit. OTOH, coming from other directions -- particularly dynamic languages -- Erlang may be easier, as well as its other advantages.

It's about 10 times faster, the language has way more modern syntax and constructs. It is not constricted to the actor model only. Erlang has perfected a subset of Scala+akka at slower speed.

EDIT: There's enormous value in perfection, just to be clear.

Re: What can I only do in Erlang?

#157
post #144

Earlier quoted context omitted.

Could possibly be that your comment comes across a bit harsh. Even if not the intention, my inner dialogue read it as someone speaking with anger.

Strange. My inner dialogue read it as someone speaking matter-of-fact-ly about their experiences with the language. Maybe I assume good faith on the part of the speaker in a wider range of situations than many folks.

The initial use of "Huh?" might have been what set the tone for me. At the time I read it, the comment also ended with "kiddie", so I might be a bit biased.

Aside from that, it's obvious he has more experience with Erlang but the tone still matters in a discussion.

Re: What can I only do in Erlang?

#158
post #47
post #20

Earlier quoted context omitted.

Agree, and to look at it from a different angle - to me writing Erlang felt like I was writing config txt files to some underlying system. The system performs good following your "config" but all the hardcore feel is lost for you.

Huh? "Hardcore feel" is definitely there and the language is anything but "writing config txt files to some underlying system". I've built applications in the > 10k SLOC range that use a consensus algorithm for distributed computing and it was hard but made tremendously easier because of Erlang's built in primitives. No hardcore feel was lost at all and neither was it writing a config txt file... [EDIT] I would love…

[deleted]

Re: What can I only do in Erlang?

#159
post #107

I'm just starting to do some work on a system that is going to be very distributed with many endpoints, often on unreliable networks connecting back to a server. Erlang (elixir, really) looked promising for this so I've been investigating off and on while we do some prototyping and flesh out some of the details. So far it seems to be that you get nearly all the advantages of Erlang with running something like RabbitM…

RabbitMQ is a good piece of software, but it has issues. You mention unreliable connections; RMQ does not handle that well.

Even just a few seconds of network hiccup will throw it into a partitioned state, out of which you cannot reliably escape without manual intervention. There are also quite a few bugs that you tend to hit only when RMQ is exposed to network issues.

To use RMQ with bad networks, you need to use either the Shovel plugin or the Federation plugin. Both are somewhat awkward to use, and require manually setting up the different routes that copy messages across.

My advice is, if you like Erlang's architecture and need failure-tolerant IPC, just use Erlang directly. Don't use RabbitMQ for IPC if you need reliability.

I wish I could say better things about RabbitMQ, but it is easily the flakiest component of our stack. When you're used to rock solid server software like Postgres, HAProxy and Nginx, RabbitMQ is a big disappointment.

Re: What can I only do in Erlang?

#160

I got the sense that Erlang overlaps somewhat with node.js in terms of what one might use it for. Could anyone familiar with both compare them?

I have experience with both Erlang and Node.js so I feel it's acceptable if I answer this question. I would use Erlang for anything I would have used Node.js for and I haven't touched Node.js since I've learned Erlang (and Elixir). - Erlang allows both CPU and IO concurrency. - Like Node.js, all I/O in Erlang is non-blocking. The difference is that in Erlang your code looks synchronous. There is no callback/promise/w…

Your second point is extremely important. My elixir code is way cleaner than my node.js code. You aren't constantly thinking about async stuff because each connection is in its own process. Just write your code and let the process scheduler do the hard work. I don't think I could ever go back to node for a medium or large web app. Elixir has been so much simpler, even though I've been learning the language as I go.

It also has benchmarked extremely well...

Post reply on HN