> What is Erlang? > Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.
erlang sounds awesome as hell, but i thought elixir superceded it?
Jonathan Edwards
Elixer still uses the Erlang VM. It's the same platform with different syntax.
Samuel Moore
>I never see it here.
thats because...
>build massively scalable soft real-time systems with requirements on high availability.
is a niche, a small, complex and difficult one.
anyone in that niche could choose erlang but where are they going to find *experienced* erlang programmers?
yeah its a bit of a chicken and egg thing but the fact is if i'm doing that sort of work i can either hire n00b erlang programmers and train them (and who wants to be trained in a lang that hardly anyone uses?) or i can hire shit hot c++ programmers with 10years experience and we're good to go.
Anthony Myers
It's not like anyone on Sup Forums has a job that their looking to hire for. Sup Forums likes niche languages. I don't come here to discuss the tumor of programming that is C++.
And how Erlang sells itself is not necessarily all it's good for. Concurrency is a general concept, and an increasingly important one. There isn't a non-trivial web-related application that doesn't use concurrency in some way. Erlang is a godsend for writing networking applications.
Besides concurrency, Erlang has serious heritage as a symbolic functional language and makes excellent use of pattern matching. The influences of Prolog and Lisp are obvious.
It's fun, and if you aren't on Sup Forums to have fun, you are wasting your time.
Lincoln Young
you appear to be irritated.
i was merely explaining why i think erlang posts are rare here.
>It's not like anyone on Sup Forums has a job that their looking to hire for.
Never said they were.
>Sup Forums likes niche languages.
that would seem to be in direct contradiction of *your* own observation. let me remind you "I never see it here."
>I don't come here to discuss the tumor of programming that is C++.
again, i never claimed that.
>And how Erlang sells itself is not necessarily all it's good for. Concurrency is a general concept, and an increasingly important one. There isn't a non-trivial web-related application that doesn't use concurrency in some way. Erlang is a godsend for writing networking applications.
i'm not sure who you're arguing with, i was just pointing out why i suspect there are so few erlang posts.
>Besides concurrency, Erlang has serious heritage as a symbolic functional language and makes excellent use of pattern matching. The influences of Prolog and Lisp are obvious.
well woopty-doo!
>It's fun, and if you aren't on Sup Forums to have fun, you are wasting your time.
oh i'm having fun sweetcheeks, watching you froth at the mouth is highly entertaining.
Gabriel Wilson
> never said
You implied it by bring up the topic of jobs on Sup Forums. You wouldn't bring it up if you didn't think it was relevant.
> frothing at the mouth
Oh please, this is Sup Forums. My post was nothing.
> contradiction
Of course not. Sup Forums does like niche languages. Look in the /dpt/. It is not contradiction if there exists a few niche languages they don't talk about.
I'm not arguing with anyone. Why would you think that? I never said you were wrong, but merely pointed out that a niche does not necessarily limit the uses of a language.
Nathan Cooper
I think Erlang is freaking Awesome.
The langauge is much smaller then Haskell and for it's specific niche purpose (large scale concurrency) it's the gold standard.
The error handling is also a class of it's own. When I first heard about the "let it fail" philosophy I was like "WTF?!".. It's so well thought out, there isn't any langauge that comes close to it. CommonLisps "Restart" is similar, but it's a last resort thing. Erlang is almost like an own operating system, you really need to sweep away all threads, destroy the supervision tree and nuke the BEAM virtual machine from orbit to bring it down. That's why applications like WhatsApp use it.
And then we have Elixir, which is really send from heaven because Erlangs Syntax can be quite clumsy sometimes. And Elixir runs Erlang code underneath (similar to Clojure and Java, which are completely differnt but lead to the same machine code).
It's not "the best functional language ever", because there isn't such thing. For example Haskell is more gracefull and it's typing system is outstanding. But Erlang is definately worth learning.
It's great to undestand the thoughts behind Erlang, like SICP for Scheme.
Caleb Barnes
I've been using it for my job for a while, and so far so good. If you have some specific questions, I'd be happy to answer, but to sum it up:
Pros: Functional programming (although it lacks some constructs) Easy-to-use concurrent primitives (as long as you stay in the same node). Easy to make your program fault tolerant with OTP
Cons: No types. You can use dialyzer but it's not the same. Can cause data-races and deadlocks if you're not careful. Distributed erlang can be tricky. and vs andalso, or vs orselse, == =/ vs =:= =/=, short-circuit evaluation Impossible to shadow variables. No arbitrary guard patterns.
Luis Nelson
What's your impression of Elixir?
>Distributed erlang can be tricky.
Distributed programming is always tricky, isn't it?
Julian Green
one of the absolutely best languages to ever be invented. Especially with the introduction of elixir, which, being homoiconic, increases the expressive power of the communication with the BEAM. >difficult one not quite right. It's not that hard to learn, especially if you know at least one functional language.
Lucas Johnson
I like Elixir, although I haven't used it as much as Erlang, it improves on certain things:
- the functional programming side of the language, with the pipe operator |>, protocls etc. - the syntax is better for some things, like atoms and variables. - better strings - lisp-like macros
The only thing I don't like about Elixir is the implicit variable shadowing. In Erlang, variable matching is the default behaviour, while in Elixir you have to use the pinning operator (^) to match. I think variable matching should be default in Elixir too.
>Distributed programming is always tricky, isn't it?
Yes, but Erlang makes certain guarantees when using it in a single node, it can lead you to think that using in a cluster should be "easy". It certainly is easier than in other languages, but it still haves some nasty tricks, like trusting every node by default (so if an attacker gains access to one node, you're fucked). Authentication with cookies can help, but they shouldn't be used for security.
In the end, you need a ton of tooling and monitoring when using erlang in more than one node. In our application we ended up ripping out all the distributed erlang code and using regular TCP to talk with the cluster.
William Roberts
>Impossible to shadow variables. When do you want to do this?
Robert Jones
Imagine you want to mutate something several times in a function. With shadowing, you could do
Oh, thank you for explaining, that does seem annoying. I'm assuming there's no reference passing.
Tyler Anderson
erlang is great joe is great i love erlang!
Bentley Powell
Some parts of the language can be mutated in-place, making it work the same as pass by reference, like graphs, process tables (ets, mnesia) or storage (dets), but in general, most of the language is pass by value.
not him but you sound like a fucking idiot, your post is totally out of place
Jacob Edwards
>i can either hire n00b erlang programmers and train them (...) or i can (...) c++ programmers with 10years experience and we're good to go.
This is a false dichotomy that unfortunately gets repeated a lot, I would assume most erlang programmer are way past the 'n00b' phase. You also assume that '10year experience' means anything, or that experience correlates with skill. Is it really 10 years, or 1 year repeated over and over?
Developers that bother with niche languages tend to be more skilled than programmers who only stick with well-known, mainstream languages.
Most niche programmes will want to work with you just for the opportunity to use those languages in production.
Why do you need programmers that are experienced in a specific language? Programmers should be able to teach themselves a language relatively easily.
Adrian Diaz
Erlang is poo. It's aweful. Everytime I install a new distro and need to compile wing3d, I wince, because wings3d needs erlang. This means there is a fifty percent chance it will never compile. Because erlang is rancid poo.
Wyatt Cook
>some distros ship a bad compiler >this is erlangs fault
If I want to learn Erlang, should I learn Erlang or Elixir? Or start with Erlang and move to Elixir, or what?
And does most Erlang use in the real world tend to be Elixir?
Ryan Ross
I would say start with Erlang, because Elixir runs Erlang underneath. If you want to add Elixir afterwards.
>And does most Erlang use in the real world tend to be Elixir?
It's actually the other way arround. Erlang is used in Industry, but is pretty close "to metall".
Elixir is rather for WebDev (i.e. the Phoenx framework), for situations where you need more raw power (i.e. high avaliblity) than somethign like Rails has - unless you pile up load balancing servers and so on. Elixir is meant to do that job for you so you don't have to "protect it" that much.