Live data from Hacker News

Ask HN: Why isn't Erlang more popular?

news.ycombinator.com

51–60 of 244 posts

Re: Ask HN: Why isn't Erlang more popular?

#51
My thoughts:

- Ugly, yet simple syntax - Ugly OTP, yet powerful - emacs - Grumpy community, just like freebsd-dudes. - Isn't general purpose - Breaking meta on ever step: no loops, no variables, no strings, actors, recursions, no namespaces (i mean like in any popular language) - Nobody writes tutorials. - Poor library selection. Look at RoR, having 40 dependencies is okay there. - Situations like you do everything like in Basho's getting started for webmachine, and nothing is working - A lot of libraries that do the same thing, which is funny because it lacks of other libraries. Don't you dare ask community which webserver to use. - If you ask about IDE on erlang@c.j.r - almost instant ban, because, you know, trolling.

Re: Ask HN: Why isn't Erlang more popular?

#52

Erlang is a very specialised language. It does one thing well (scalability) at the expense of not really being a general purpose language. The syntax is just weird, not only in a paradigm-way (pattern matching is not huge in most languages, but, hey, that's the way of doing stuff in functional programming), but on strange places ("read" lines ending on dot, semicolon takes time, it does not share any common syntax de…

This. It's amazing and powerful if you need 1m+ client connections per server. Outside of the epic scale engineering problems of facebook, twitter, google, amazon, whatsapp... It's very difficult to get anything done with Erlang.

If you have fewer than a million people using your application at a time, you're probably better off writing it in a more normal language.

Re: Ask HN: Why isn't Erlang more popular?

#53
post #16

Honestly, I think what kills it is that it's not an Algol-descended language [1]. If Erlang was written with an Algol-esque syntax it would have taken off years ago. But instead it has this weird syntax, which it then doesn't really do that much with. What do I mean by that? Haskell has a radically different syntax, but it does things with that syntax and its pervasive currying to enable a powerful succinctness that…

I'm looking forward to see how reign turns out!

Re: Ask HN: Why isn't Erlang more popular?

#54
I'm seriously thinking about Erlang now. What raised my eyebrows was "2-3 million concurrent connections on a single FreeBSD box"[this is what WhatsApp achieved]. Async network IO can be done with library support in Python, natively in nodeJS, etc. I wonder if one can push those stacks to this level.

Re: Ask HN: Why isn't Erlang more popular?

#55

I haven't looked at Erlang before, so I thought I give it a quick look. Google led me to the Erlang home page[1], which has "What is Erlang" (sounds good) and "What is OTP" (which doesn't bother to define what O, T, and P stand for.) Following the Erlang Quickstart [2] link, I get a page that doesn't really tell me anything about the language. It demonstrates a program that implements a factorial function, then tells…

Come on. Not exactly a good faith effort, is it? Why type in a rant like this, when you could have found a wonderful tutorial on Google in one tenth of the time it took you to write this?

Re: Ask HN: Why isn't Erlang more popular?

#56
post #16

Honestly, I think what kills it is that it's not an Algol-descended language [1]. If Erlang was written with an Algol-esque syntax it would have taken off years ago. But instead it has this weird syntax, which it then doesn't really do that much with. What do I mean by that? Haskell has a radically different syntax, but it does things with that syntax and its pervasive currying to enable a powerful succinctness that…

Not knowing enough about Erlang/OTP or Go: Would it be possible for more of OTP to be replicated in a Go 2.0? What's missing? What would it take? What can never be replicated?

You can recover a substantial portion, but there's a few things you can't quite get back. Since Go is a mutable-state language, and also a shared-state language (isolation is by convention, not by language design), you have to live with the consequences of that. In my supervisor tree implementation, the restart of a monitored goroutine is just to fire off a new goroutine on the exact same object again; if you still have bad state lying around and immediately crash again, well, too bad, the supervisor can't do anything about that. (Except not thrash the processor with endless restarts.) In contrast, when an Erlang supervisor restarts a process, it is guaranteed to be a fresh process with no shared state from the one that just crashed. It's much more likely to not immediately crash.

(I fiddled with having the user specify a closure that is supposed to "create" a new object for the restart, but then simplified that away when I realized that the closure itself could well have mutable state too. Better just to stick with the simpler interface and document the consequences of failing to clean out state at the beginning of your monitored code. On the plus side, so far the interface for the supervised-things is "Serve()" and "Stop()", and nothing else; hard to argue with that level of simplicity!)

You also won't ever be able to recover live code restarts; you can try to transfer all state to a new process, including file handles, but that's a lot of implementation work. (I'm stuck right now on the fact that my connections are encrypted, and the encryption code won't let me even get to the state, let alone transfer and reconstitute it somewhere else. Someone's got some code for moving file handles around on GitHub but I can't seem to Google it up.) Most people already live in a world where live restarts are difficult or impossible, though, so they won't miss that. Getting a REPL into a live Go server is impossible, at least with Go itself, and will also probably never be as clean as Erlang. (Go "2.0" could fix that with an official Go interpreter, which is the missing bit. I can handle the sockets, I can bind readline and give you a nicer REPL, but interpreting Go is a challenge. Progress is being made, I believe as part of the new compiler implementation, but I'm not sure anyone has this as an explicit goal.) Again, most people live in a world where they already don't have a REPL into their running code, and therefore won't miss this.

There's also some more subtle semantic differences, but I'm saving that for a blog post. (It gets long, especially if I first have to explain Erlang, which is what the blog post does.)

Re: Ask HN: Why isn't Erlang more popular?

#57

Before finding Clojure I dabbled in Erlang. In the end I found the "share nothing" model to be too limiting. Sure its great for highly fault-tolerant systems. But the fact is I just don't need that most of the time. It's just easier to setup a AWS autoscaling cluster of web servers running Clojure and be done with it. Oh yeah, and Clojure beats the pants off Erlang when it comes to performance. Even Erjang is faster…

> Clojure beats the pants off Erlang when it comes to performance

Source?

Re: Ask HN: Why isn't Erlang more popular?

#58
post #11

Earlier quoted context omitted.

Erlang is much easier than Haskell. Haskell breaks my mind, but Erlang is easy-peasy.

I have picked up my copy of "Real World Haskell" (Bryan O'Sullivan et.al) about three times; each time ended up nearly starting over and each time making it about ten pages or so more in, (i guess it's a recursive language at several levels). It's a fascinating approach, but egads, it requires a thousand fold more effort to get into than any other language i've learned. somewhere between the monads and the syntax..[h…

I'm always baffled by these kinds of statements. I learned ocaml first, so haskell wasn't too big a leap for me. But I did get to watch my wife go through the process of learning haskell, and she didn't have any more problems than learning any other language.

My wife is a web designer. She has no interest in programming. She taught herself PHP and javascript because she needed to use them. When she finally got to the point where she couldn't tolerate PHP's shittiness anymore, she asked me what she should use instead. I said "scala is a good choice, or you could just skip a step and go straight to haskell". She tried both, decided on haskell because she didn't like lift or play, and proceeded to teach herself haskell. She has never read real world haskell, or even learn you a haskell. I just asked her what a monad is: "Beats me, just use do and the arrow things". She's already finished two big websites written in haskell. This idea that you need to be a compsci phd or something to use haskell is simply not reality.

Re: Ask HN: Why isn't Erlang more popular?

#60
post #16

Honestly, I think what kills it is that it's not an Algol-descended language [1]. If Erlang was written with an Algol-esque syntax it would have taken off years ago. But instead it has this weird syntax, which it then doesn't really do that much with. What do I mean by that? Haskell has a radically different syntax, but it does things with that syntax and its pervasive currying to enable a powerful succinctness that…

> I'm pretty sure Go is going to eat Erlang. I wouldn't be surprised by this. Go's concurrency pattern is fantastic, but to match what Erlang does it needs to be easily extended beyond the running process. Can channels connect multiple "nodes" yet? That is, two running go programs, can they communicate via channels or do they have to use some other IPC mechanism? Across a network? That universal communication structu…

I do not have direct knowledge, but I'm pretty sure the problem with "network" channels in Go is the synchronous nature of channels. Even if we did have a perfect network, that works poorly across a network, and if the network starts degrading even a bit the sync channels just completely fall apart. The language treats them as a fast synchronization method. You can very nearly translate RPC to "channel" in this argument and it works: https://news.ycombinator.com/item?id=2318249 (Err, I did try to find a better explanation that wasn't mine, but Googling up an RPC criticism was hard, because saying "RPC" comes up with a pretty big search pool to be trying to find the word "bad" in...)

My reign library basically just ports over the Erlang idea; asynch messages, PID-like things that can be transmitted across the network and identify the same mailboxes within a cluster. It's meant to be a porting aid, not a solution you'd reach for in Go to create a brand new program. (If you do that, it's on you.) Clustering like this is nontrivial and the big reason I'm sitting on the code locally until clustering is at least working under some circumstances; without clustering support, the mailboxes are just an invitation to write nonidiomatic code for no gain.

Post reply on HN