News for hackers. Stuff that matters.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by amaccuish on Sunday June 03, 2018 @06:35AM (#17218918)
How does Go compare to Erlang these days? When would you choose one over the other?
Re:Cisco says 90% of internet traffic goes through Erlang-co... by masklinn on Sunday June 03, 2018 @08:14AM (#17219187)
No change from when Go was released AFAIK: Go has no reliability/failover story (whether locally or in terms of distribution), uncaught panics will bring down the entire system, and the runtime has no support for routine hierarchies.

So I guess you'd choose Go if you want to build a local service — especially if it has some amount of concurrency (e.g. network daemons) — or CLI tools (fast startup). You'd use erlang if you want to build a system which really should not die, especially if it so should not die that you're willing to spread it over multiple physical machines.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by anonymous_fun on Sunday June 03, 2018 @09:26AM (#17219403)
Not an expert, nor to take anything from Erlang (was amazed at how robust RabbitMQ was first time I stress tested it) but fault tolerance seems to be a part of OTP. To me, k8s ~ OTP, GO ~ Erlang, and Erlang syntax is a bit easier than GoLang, but might just be the way I was brought up.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by masklinn on Sunday June 03, 2018 @09:38AM (#17219456)
OTP is the standard distribution & library of Erlang, and most of the fault tolerance is either that or the core Erlang runtime e.g. supervisors are part of the standard library[0] and the underlying systems are basically built into the language[1].

Distribution is likewise built into the runtime and language, most of the distribution-related BIFs are not only part of the "erlang" module/namespace but also part of its "prelude" (auto-imported in all modules by default).

So no, it is absolutely nothing like kubernetes in relation to go.

[0] http://erlang.org/doc/man/supervisor.html

[1] http://erlang.org/doc/reference_manual/processes.html#id8861...

Re:Cisco says 90% of internet traffic goes through Erlang-co... by sheeshkebab on Sunday June 03, 2018 @10:28AM (#17219682)
I think parent was referring to similarity of k8s to OTP from user's prospective..
Re:Cisco says 90% of internet traffic goes through Erlang-co... by zzzcpan on Sunday June 03, 2018 @11:07AM (#17219865)
People just want k8s to be that marvelous, to have strong supervision tree architecture. I want the same for systemd too. But sadly it's all mess.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by dozzie on Sunday June 03, 2018 @12:10PM (#17220196)
> [...] but fault tolerance seems to be a part of OTP.

Yes, mostly, but the thing is that OTP was possible at all because of how the portions provided by the language and the runtime play together. You cannot replicate the OTP as it is in Go because Go's runtime is lacking and its communication model doesn't match.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by sitkack on Monday June 04, 2018 @02:30AM (#17225145)
Once you learn Erlang and OTP, you will start seeing everything as a poor re-implementation of the same concepts.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by krainboltgreene on Sunday June 03, 2018 @02:47PM (#17221052)
The syntax you're looking for is k8S:Go::Erlang:OTP
Re:Cisco says 90% of internet traffic goes through Erlang-co... by qaq on Sunday June 03, 2018 @06:45AM (#17218944)
Not sure where I would choose Go, but Elixir + Rust is an extremely capable combo for BEAM (Erlang VM) projects.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by chx on Sunday June 03, 2018 @09:01AM (#17219312)
Do you have some recommended reading on why and how to combine Elixir and Rust?
Re:Cisco says 90% of internet traffic goes through Erlang-co... by pdimitar on Sunday June 03, 2018 @09:05AM (#17219323)
Re:Cisco says 90% of internet traffic goes through Erlang-co... by brightball on Sunday June 03, 2018 @07:12AM (#17219018)
Re:Cisco says 90% of internet traffic goes through Erlang-co... by amaccuish on Sunday June 03, 2018 @08:50AM (#17219285)
Thanks. Did a search before asking but couldn't find anything. Sorry to rehash!
Re:Cisco says 90% of internet traffic goes through Erlang-co... by brightball on Sunday June 03, 2018 @09:29AM (#17219418)
Easy enough to miss. That one is Elixir and Go but for most purposes Elixir/Erlang/BEAM are fairly interchangeable.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by battlebooth on Sunday June 03, 2018 @10:54AM (#17219803)
No. Thank You. Go vs Erlang/Elixir back n' forths are the reason I read HN comments!
Re:Cisco says 90% of internet traffic goes through Erlang-co... by amelius on Sunday June 03, 2018 @07:03AM (#17218997)
I believe GoLang supports efficient sharing of large data-structures between cores of the same processor, whereas ErlangLang does not.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by masklinn on Sunday June 03, 2018 @08:06AM (#17219165)
> I believe GoLang supports efficient sharing of large data-structures between cores of the same processor, whereas ErlangLang does not.

AKA Go does shared-memory multitasking, while Erlang does shared-nothing multitasking.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by amelius on Sunday June 03, 2018 @08:37AM (#17219242)
Yes, and when used in an immutable way, the GoLang approach is very powerful and efficient, because it allows one to pass large (parts of) immutable data-structures without copying.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by jeremyjh on Sunday June 03, 2018 @08:45AM (#17219265)
How do I declare an immutable data structure in Go?
Re:Cisco says 90% of internet traffic goes through Erlang-co... by jerf on Sunday June 03, 2018 @09:26AM (#17219402)
An unexported value type provided through an interface is immutable. The "context" object uses this. But it isn't really a solution for immutable value programming.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by jeremyjh on Sunday June 03, 2018 @09:27AM (#17219408)
Its immutable everywhere, or just outside the package that declares it?
Re:Cisco says 90% of internet traffic goes through Erlang-co... by jerf on Sunday June 03, 2018 @01:37PM (#17220633)
Outside the package that declares it, though if you have it as an interface value you'd have to do work to penetrate it.

Since it's not like I'm trying to sell this as a solution to all immutable data requirements, I didn't worry too much about that detail. In the end it's all about effort, anyhow; with the right invocations in Haskell I can mutate "immutable" data just fine. So even an interface in the package that declared it is still nontrivial protection against accidentally mutating it.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by jeremyjh on Sunday June 03, 2018 @05:12PM (#17222109)
I don't think thats really true about Haskell, unless you are talking about C code you've invoked through FFI in which case all bets are off in every language.

Isn't it a lot simpler to just say that Go has no feature support for immutable data? The fact that you can hide accessors in a package is small comfort if I have to read all the source code in that package to know the actual semantics.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by RyanZAG on Sunday June 03, 2018 @01:57PM (#17220745)
What about lists? Eg, an immutable list of packets.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by darkr on Sunday June 03, 2018 @09:50AM (#17219501)
AFAIAA, the only immutable core type in go is string.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by twic on Sunday June 03, 2018 @08:29AM (#17219224)
"ErlangLang"?
Re:Cisco says 90% of internet traffic goes through Erlang-co... by pritambaral on Sunday June 03, 2018 @08:38AM (#17219247)
While 'ErlangLang' is obviously wrong, I should point out that the '-lang' part of 'Erlang' is not related to the root word 'language'. Perhaps the name 'Erlang' was chosen because it already ended in '-lang', perhaps not, I don't know. But it was quite likely named after the Danish mathematician Agner Krarup Erlang.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by haneefmubarak on Sunday June 03, 2018 @10:13AM (#17219599)
IIRC "ERicsson LANGuage" because it was created for networking stuff at Ericsson.

EDIT: Yep, we're actually both right! From the Wikipedia page:

> The name "Erlang", attributed to Bjarne Däcker, has been presumed by those working on the telephony switches (for whom the language was designed) to be a reference to Danish mathematician and engineer Agner Krarup Erlang as well as a syllabic abbreviation of "Ericsson Language".

Re:Cisco says 90% of internet traffic goes through Erlang-co... by Thaxll on Sunday June 03, 2018 @07:03AM (#17218994)
Erlang is slower, and beam is not relevant anymore with kubernetes and the like which are much more powerful and language neutral.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by brightball on Sunday June 03, 2018 @07:09AM (#17219012)
I keep hearing stuff like that but it’s not even close to accurate.

BEAM and Erlang give you tooling that you can’t get from any other language, regardless of how it’s deployed. Using Kubernetes doesn’t make up for any of that...it just gives you a way to deploy containers.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by Thaxll on Sunday June 03, 2018 @07:41AM (#17219081)
What tooling please give an example.
Re:Cisco says 90% of internet traffic goes through Erlang-co... by pdimitar on Sunday June 03, 2018 @09:08AM (#17219334)
The machinery of the BEAM is in-process (and between nodes when you need it). Kubernetes and the BEAM VM address different levels of the architecture.

Apples to oranges.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by brightball on Sunday June 03, 2018 @07:55AM (#17219121)
For a detailed example, just see the previous posted. There’s a lot.

https://news.ycombinator.com/item?id=13497505

Re:Cisco says 90% of internet traffic goes through Erlang-co... by battlebooth on Sunday June 03, 2018 @11:02AM (#17219845)
I dont know whether this is a good thing or not.... The best nuggets of information on HN are at the mercy of a good soul digging up the link and dropping it on a new thread.

You'd think that this knowledge retrieval/storage problem could have a more elegant solution built by the HN folks. Example solution: Topic X stored in category, ranked to the top, its next 'commit' or successor is chained on kind of like how unroll works with twitter.. but with long HN threads instead. Think a 'git tree' of knowledge descending down, with merges too maybe...

Engh.. maybe thats part of the charm of HN... the old school style message board.

Re:Cisco says 90% of internet traffic goes through Erlang-co... by edholland on Sunday June 03, 2018 @07:50AM (#17219104)
strictly ordered message queues between processes