News for hackers. Stuff that matters.
Re:Ask HN: Why isn't Erlang more popular? by Jtsummers on Friday February 21, 2014 @12:36PM (#7278121)
> 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 structure is (IMO) erlang's killer feature.

Re:Ask HN: Why isn't Erlang more popular? by jerf on Friday February 21, 2014 @12:45PM (#7278187)
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.

Re:Ask HN: Why isn't Erlang more popular? by digitalzombie on Friday February 21, 2014 @05:57PM (#7280021)
Erlang scheduler time share each processes. So if you have an infinite forloop, it while stop for several ms for other processes to run.

Preemptive scheduler, I doubt Go have this, then again Go doesn't have a VM/OS system.

Re:Ask HN: Why isn't Erlang more popular? by kapilvt on Friday February 21, 2014 @06:27PM (#7280152)
go 1.2 has preemptive scheduling http://golang.org/doc/go1.2#preemption
Re:Ask HN: Why isn't Erlang more popular? by jerf on Friday February 21, 2014 @07:47PM (#7280462)
In fairness, it's worth pointing out that Go 1.2 has partial preemption. Preemption is still checked only on function entry. However, unlike something like Node, this is not built in the language semantics, it's a characteristic of the runtime, and I imagine over time this will be fixed.
Re:Ask HN: Why isn't Erlang more popular? by voidlogic on Saturday February 22, 2014 @09:30AM (#7282122)
>Preemption is still checked only on function entry.

And I believe also heap allocation... the two cases together make what is still "partial preemption" pretty damn effective.

Re:Ask HN: Why isn't Erlang more popular? by pjmlp on Friday February 21, 2014 @04:36PM (#7279588)
> I wouldn't be surprised by this. Go's concurrency pattern is fantastic

Only for those not versed in java.util.concurrent, TPL, PPL, TBB, Cilk Plus.

Re:Ask HN: Why isn't Erlang more popular? by kinofcain on Friday February 21, 2014 @06:44PM (#7280225)
java.util.concurrent doesn't have a convenient mechanism for "selecting" across available channels/queues without blocking. This is a key feature of erlang and go. There are ways to simulate it, but it's not the same thing. (I'd love to be wrong about this).
Re:Ask HN: Why isn't Erlang more popular? by pjmlp on Saturday February 22, 2014 @01:45AM (#7281208)
Yes, you need to peek() the queues, so it is not really being blocked on select like Go.

But then, one can use something like Akka, which I forgot to mention, and still be on the JVM.

Re:Ask HN: Why isn't Erlang more popular? by voidlogic on Saturday February 22, 2014 @09:33AM (#7282130)
>so it is not really being blocked on select like Go.

Select in Go only blocks if you don't feel out the "default:" case...

  select {
     case: foo := <-fooCh
       fmt.Printf("got %v\n", foo)
     default:
       fmt.Println("got nothing")
  }
Re:Ask HN: Why isn't Erlang more popular? by lacker on Saturday February 22, 2014 @09:29PM (#7284663)
"Those not versed in Cilk Plus" is a pretty large set