Live data from Hacker News

Which companies are using Erlang, and why?

erlang-solutions.com

61–70 of 204 posts

Re: Which companies are using Erlang, and why?

#61
post #54
post #50

Earlier quoted context omitted.

To be fair though many Erlang programmers also avoid hot loading code. For the rest, nice summary.

Why would they avoid that? (hopefully it's not just because of the ease of containerization/docker that is leading to reduced hot loading)

Mainly because the relup functionality is a bit complicated and not always clear, Learn You Some Erlang explains some context [1]. It does depend a bit on the situation, in some cases it's easy to recompile a module in a running system and it might not be much of a problem. But when there are multiple modules being updated, which depend on each other, which possibly require updates to some data structures, it becomes very messy very quickly. Also when modules contain anonymous functions this can cause some issues (badfun errors) because the old version might get lost, but can still have references in the running system.

[1] https://learnyousomeerlang.com/relups

Re: Which companies are using Erlang, and why?

#62

Earlier quoted context omitted.

Which is far better, IMHO

why so many negative votes? Isn't C++ a far more battle-tested language than Erlang? Hasn't C++ a far bigger community than Erlang? To all whose concern is Memory Management, learn about C++11 (and newer standards): smart pointers and heavy use of RAII pattern work shamefully good

I think it is because with Erlang you get Beam and it is the real treasure of the Erlang ecosystem. It not only manifest the philosophy of Erlang well but, more specifically, provides a battle tested run-time for concurrent applications that you cannot get with C++ as you have to (re-)write that concurrent run-time each time.

Re: Which companies are using Erlang, and why?

#63

Earlier quoted context omitted.

Which is far better, IMHO

why so many negative votes? Isn't C++ a far more battle-tested language than Erlang? Hasn't C++ a far bigger community than Erlang? To all whose concern is Memory Management, learn about C++11 (and newer standards): smart pointers and heavy use of RAII pattern work shamefully good

I did not downvote but possibly because the idea of "good" and "better" programming languages does not mean much. Different tools have different purposes. If you want to write a network driver for the Linux kernel C++ is probably more suitable but if you quickly want to build a simple chat system Erlang is almost certainly going to make your life a lot easier.

Re: Which companies are using Erlang, and why?

#66

Earlier quoted context omitted.

The fact that the entire ecosystem is based around the actor model is one of the primary ones. It's allowed for code that isn't simply a library, but effectively an entire application, to be used as open source to be dumped into your system, because it has tools like Erlang Term Storage, Mnesia, and other devices to make it easy.

You're still not explaining why this allows to do things that can't be done in other languages. Probably because that claim makes no sense.

Reductions. How do you ensure in other languages (or in other VMs) that every actor will get the same cpu time and that none can block the others? That's a tricky problem to solve as a lib.

Re: Which companies are using Erlang, and why?

#67
post #15

I have never programmed Erlang but it feels like it is the currently only language that is some kind of secret weapon. It has similar aura than Lisp had before that with Erlang you can do stuff beyond "normal" languages.

My understanding is that is has an advantage in concurrency domain. It also has a relatively unique 'hot patch' support but i'm not sure how valuable that actually is.

Re: Which companies are using Erlang, and why?

#69
post #17

Although not in Erlang, Discord uses Elixir which runs on the BEAM VM to much success as well for our real time distributed system as well as VOIP signaling components. Looking back years later - it’s safe to say we wouldn’t have chosen anything else.

> "Although not in Erlang, Discord uses Elixir which runs on the BEAM VM to much success as well for our real time distributed system as well as VOIP signaling components. Looking back years later - it’s safe to say we wouldn’t have chosen anything else."

You're a Staff Engineer at Discord. This response is extremely vague and non-informative.

What does "running to much success" mean exactly? And why is it "safe to say you wouldn’t have chosen anything else" instead? Why could you not have achieved the same results using alternative tools?

By the way - you've mentioned "real time distributed systems". What exactly is your definition of "real time" here?

Re: Which companies are using Erlang, and why?

#70

Earlier quoted context omitted.

Not OP, but have used Elixir pretty extensively; the major selling points for me are the friendlier syntax and more active community support, plus with rebar3 + Elixir's seamless Erlang interop you really don't give up anything, you can use any existing Erlang/Elixir libraries with a single syntax. It's pretty great.

Haven't touched Erlang but has an entry level knowledge on Elixir. I often heard how easy it is to write macros on Elixir. Can you elaborate on this?

One of the big differences between Erlang and Elixir is indeed that Elixir allows you to write macros in the language itself, using quote / unquote constructs just like lisps.

This makes it easy to generate code on compile time, which is then executed in runtime without any performance penalty.

A large part of Elixir itself is actually implemented as macros. For instance, the "unless" construct:

  defmacro unless(condition, do: do_clause, else: else_clause) do
    quote do
      if(unquote(condition), do: unquote(else_clause), else: unquote(do_clause))
    end
  end

(code simplified for clarity)
Post reply on HN