/Erlang/

Erlang / EliXr general

Attached: Erlang_logo.svg.png (1200x1052, 41K)

Other urls found in this thread:

erlang-factory.com/upload/presentations/45/keynote_joearmstrong.pdf
erlang.org/download/armstrong_thesis_2003.pdf
twitter.com/SFWRedditImages

erlang is cool and good
>tfw too dumb for functional programming.

op is a faggot

What's cool about Erlang that separates it from other languages?

Supervisors, hot code reloading, message passing, either locally to a process or over the network, native fail over

Motherfucking actor model
Blowin up inside this monkey hovel
Intrinsic concurrency is earning you currency
Messages move with asynchronous urgency

Also forgot to mention that you can jump into the REPL of a running program and do whatever you want and has a built in GUI monitor for real time performance checking.

Attached: Screen Shot 2018-05-31 at 16.20.22.png (1924x1424, 373K)

So basically things other languages can do already?

doubt.png the what'sapp guys can handle 2 million concurrent connections on a single server using erlang

>Erlang / EliXr general
meme language general

Word to mutha!!!

Attached: winning.jpg (640x482, 80K)

MFW when we meme Vanilla Ice into becoming the unofficial cool mascot spokeperson of Elixir

I approve this message.

Attached: fearofawhiteplanet.jpg (550x753, 157K)

Can anyone write a program where you take a name be X and print it with "Hello X "?

Better still, make that a "Hello Vanilla Ice" program.

Does nobody seriously know? Jow Forums is dead...
-module(main).

%% API
-export([hello/0]).

hello() ->
receive
Name ->
io:format("hello ~p", [Name]),
hello()
end.


c(main, hello).
Pid = spawn(main, hello, []).
Pid ! "user".

All right stop
Collaborate and listen
Erlang is back with a brand new edition
Something grabs functional programming tightly
Then it flows messages daily and nightly

Will it ever stop?
Yo, its never stoppin
Nine nines reliability it is popping
To the extreme, it rocks a server like a vandal
2 million concurrent connections like a gang bang

Attached: elixiricebaby.jpg (1920x1080, 77K)

1. Can you write that using fread?
2. Why are you calling the hello() again? Recursion isn't required
3. How does receive work?

1. Never had to read anything from stdin. You usually use your whatever.app file.
2. It calls the function again, so I can send it another message. Erlang has no loops.
3. Receive doesn't actually receive, it just pauses until there is a message to pull out of the mailbox, then attempts to match your catch clauses.

Thanks user. Few questions
1.You didn't assign the variable to Name. Whatever variable after receive is automatically assigned?
2. I compile like this
c(hello)
hello:hello().
What is the difference ?

why did facebook (and many others) move away from lel-lang then?

1. Your assumption is correct, it makes more sense when you're writing a proper application
receive
{ok, Value} ->
...
{error, Reason} ->

_ -> ...
end.


A variable starts with an uppercase an 'atom' with lower. A variable as a receive clause will match anything.

2. Nothing, just makes it clearer when you're writing your make file though

Because Erlang isn't as popular as python etc, finding the amount of engineers required to build an application at facebook's scale would be tough if not impossible. Also making a relup is fucking hard unless you know what you're doing, so junior erlang programmers are pointless to hire.

>Because Erlang isn't as popular as python etc,
its hard to find companies run by insane people to hire people who use slow meme languages that are hard to program in rather than hire people who use languages that are fast, popular well supported, well understood and full featured

>run by insane people to hire people who use slow meme languages that are hard to program in
Literally every load balancer and phone system is programmed in Erlang.

I bet you're a consultant

Thanks again. I'm learning by
Learn you some haskell online book. Do you've any better resources for learning?

>Literally every load balancer and phone system is programmed in Erlang.
nice meme, and a complete lie

I'll bet you didnt know Erlang was banned at Ericsson and thats the reason they open sourced it

Google the Armstrong thesis
Programming erlang - software for a concurrent world

I can't find a link but Erricsson banned Erlang, then reused it in one of their most successful phone-switching products. Most phone companies still use it today, mostly for 3g authentication I believe.

Maybe Java was open sourced for similar reasons. Still doesnt answer the question.

This is a nice read:
>erlang-factory.com/upload/presentations/45/keynote_joearmstrong.pdf


This!

The thesis is a great introcution to the reasoning behind Erlang. Even if you don't want to become a professional Erlang dev, the prnciples of "fail fast vs. defensive programming" are really enlightening..

>erlang.org/download/armstrong_thesis_2003.pdf


Answering to memes with other memes itsn't the right way, senpai..

Attached: did-you-just-tell-me-to.png (784x393, 43K)

functional programming is pretty easy once you get used to the idea.
something fucked? just slam make more functions to fix it. I think.

well I can't remember how to read a line, but it's basically just

hello() ->
{ok, X} = ??:readLine??(),
io:format("Hello, ~p~n",[X]).

You can but remember you are supposed to be using ENV from your application.app
application:get_env etc.

tha hell u talking about

cat hello
#!/usr/bin/env escript
main(_) ->
X = io:get_line("Your name? "),
io:format("Hello, ~s~n", [X]).

xyz@shell:~/test$ ./hello
Your name? (you)
Hello, (you)

Talking about OTP design, erlang isn't a language you're supposed to pipe shit to. You build a service, set all your settings in whatever.app and have your program start itself based on that.

looks fucking hideous.

Attached: dennis_ritchie_2011-crop-ff70cd3b8a6695e44bdb59e8b17ba004.jpg (1400x933, 258K)

I don't know either but im very interested. Do I start with Elixir or Erlang? And where do you recommend I start?

Never used Elixir, but Joe Armstrong's book (Programming Erlang: Software for a Concurrent World) is a good starting point for Erlang.

Thanks user. I'm reading about Erlang vs Elixir. If elixir really is just "syntactic sugar" or a superset kinda deal, I'd rather learn Erlang.

In order to use Elixir you need to know Erlang. When you learn Erlang you'll see why it worths learning Elixir.

making a 2d multiplayer space game that is heavy on physics engine, would elixir be a good language to make the server in given how good it is for concurrency?

BEAM, which is the greatest VM ever created.

Erlang and Elixir are primarily used in backends, not for desktop programs.
Pinterest and WhatsApp use it heavily.
As someone who has only learned Elixir, I cannot say that I required much knowledge of the Erlang LANGUAGE.
OTP and BEAM are, of course, different

Elixir metaprogramming is simply superior.

Erlang/Elixir are bad for pure compute system as physics engine but if server just mananger status begin really good language with low latency.

don't start with erlang as your first fun language