Live data from Hacker News

Why Erlang matters

petrohi.me

71–75 of 75 posts

Re: Why Erlang matters

#71
post #58

How does Erlang compare to Haskell?

I think one significant difference is in the actual implementation, or rather its intended use. The BEAM implementation is built to be used in products, it is very stable and bug-free and the OTP team are very cautious when making changes. Incompatible changes are introduced with early notices and warnings, usually 3 major releases before the change is made.

My impression is that Haskell implementations are more used as research tools and there is less control of what goes in and how it is to be supported.

In that sense it would be safer to build a product on top of Erlang.

That is just my impression and I could be wrong.

Re: Why Erlang matters

#72
post #61

Would it be safe to say Scala with the Akka lib offers the same robustness and distributed scalability as Erlang? Erlang is using the actor model and so is Akka. I really want to learn one or the other as a goto functional language. I keep looking at sites like Netflix, Twitter and Foursquare. Those seem to be sites running on either Java or Scala. Why would they pick that instead of Erlang?

> Would it be safe to say Scala with the Akka lib offers the same robustness and distributed scalability as Erlang? Depends why you picked Erlang. Erlang has unsurpassed fault tolerance built in. This mean ability to crash and restart individual processes, ability to hot code reloading. Its standard library by default comes with such things as a distributed application controller that will make sure you application w…

I mainly wanted to use it to develop web apps. Everything from the server up to the business logic.

I picked Erlang or Scala/Akka because both of them seem to have reasonable support for web libs and are based around distributed concurrency.

Erlang was a choice because it seems to run really well on medium-tier hardware. What can be served with a single Erlang server might take 10 Python servers, etc..

I haven't seen any Akka benches but if huge crazy scale web sites are serving everything with Scala then I have to assume it's speedy.

I also want to dabble in the idea of creating 2D games and I know Erlang's math computation speed isn't very good but Java's (and that means Scala too) is very reasonable.

It would be nice to just learn Scala and use that for the core game engine (not 3D) logic / collision detection on the server side. I think with Erlang you would have to end up writing the game stuff in C to get reasonable performance?

Re: Why Erlang matters

#73

Every time I read something about the weird Erlang syntax I get so tired and try and tell myself not to get into the discussion, it's not worth the effort, some people will never just never learn, etc. But sometimes I can't help myself. So some of my thoughts on this: - Syntax is the easiest part of learning a language. It's all written down and its just a RTFM. And yes, I have written a lot of C and lisp and prolog…

It's almost an acid test: the person complaining either has only a cursory familiarity with Erlang or is someone who prefers style over substance.

Re: Why Erlang matters

#74

Earlier quoted context omitted.

Just don't use it for big, long-lived work queues and you'll be fine. If the queue gets badly backed up, you're probably fucked. Larger, longer-lived work queues are really more of a Hadoop thing, not an in-memory queue thing.

I got curious and googled a bit, here's what I found: http://www.quora.com/RabbitMQ/RabbitMQ-vs-Kafka-which-one-fo... Where the first answer states that: "RabbitMQ presumes that consumers are mostly online, and any messages "in wait" (persistent or not) are held opaquely (i.e. no cursor). RabbitMQ pre-2.0 (2010) would fall over if your consumers were too slow, but now it's robust for online and batch consumers - but…

People often use Erlang primarily for the memory model. Pure in-memory didn't work for our use-case.

You can implement a queue that works better for batch work in Erlang, it's just that it'd be closer to a data store.

Re: Why Erlang matters

#75
I had the syntax fear when I started learning Erlang, but I think the syntax is tailored to the language itself: - Recursion - Pattern Matching

The problem occurs when you try to translate the Erlang syntax to the language of your choice, which isn't the right approach. C, and Java don't use pattern matching, so naturally their syntax is not designed for it.

Maybe one should write a small program to demonstrate the key functionalities of Erlang, like write a TCP packet decoder etc, then try doing the same in your prefereed language and then see what makes sense.

Post reply on HN