Erlang Programming Language - Computerphile

Поделиться
HTML-код
  • Опубликовано: 16 дек 2019
  • Introducing Erlang - with Francesco Cesarini Technical Director of Erlang Solutions.
    / computerphile
    / computer_phile
    This video was filmed and edited by Sean Riley.
    Computer Science at the University of Nottingham: bit.ly/nottscomputer
    Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Комментарии • 440

  • @linz4213
    @linz4213 4 года назад +283

    The animation for pattern matching and recursion is major milestone in computer science education

    • @patternwhisperer4048
      @patternwhisperer4048 4 года назад +4

      ... I mean ive seen animations similar to it in my undergrad several years ago already

    • @Oladipupo_
      @Oladipupo_ 4 года назад +12

      @@patternwhisperer4048 My man I never did, I had to visual myself, I was lucky that I had it easy

    • @custardtart1312
      @custardtart1312 2 года назад +7

      @@patternwhisperer4048 I saw it as an embryo in 1971

    • @goodtechdoor
      @goodtechdoor 7 месяцев назад

      Epic !

  • @leedeffebach3504
    @leedeffebach3504 4 года назад +223

    Haven't done erlang but just recently learned elixir. Elixir is erlangs child basically. It's awesome, if you haven't tried it yet try it now.

    • @elliott8175
      @elliott8175 3 года назад +47

      So when Elixir crashes then Erlang gets a notification? =P

    • @Nehpets94
      @Nehpets94 3 года назад +9

      It's a BEAM language. There's a lot of them, but I think Elixir is probably going to be the one to push this paradigm forward.

    • @dandan7884
      @dandan7884 3 года назад

      @@Nehpets94 like ruby

    • @rickhackro
      @rickhackro 2 года назад

      I was already tempted...

    • @stnhld2841
      @stnhld2841 2 года назад +6

      RabbitMQ is written in Erlang. Elixir is very cool.

  • @armin_hammer_studios
    @armin_hammer_studios 4 года назад +33

    Absolutely love Erlang and all of the material Joe Armstrong has online. Anybody interested in computer science in general should watch Joe's online talks.
    RIP Joe, you are a hero to me and countless others.

  • @shotovar
    @shotovar 4 года назад +56

    I met this man at ElixirConfLA 2019, I've gotta say he is a genius in terms of Erlang.

    • @cat47
      @cat47 6 месяцев назад

      did i ask?

  • @mellertid
    @mellertid 2 года назад +52

    Ericsson really made impressive progress all over Telecom, from mechanical switch modules through Erlang to Bluetooth.

  • @kalebbruwer
    @kalebbruwer 4 года назад +292

    So it's encouraged to skip error checking?
    _I was born for this_

    • @lpil
      @lpil 4 года назад +69

      You are encouraged to check for _expected_ errors. Unexpected errors are to be handled non-locally, though design of your supervision tree. The reality of Erlang programming is that you spend more time than average thinking about error and failure, but it obscures your business logic less, and your code is more reliable.

    • @IIARROWS
      @IIARROWS 4 года назад +2

      If you are a bad programmer, you can do that on every programming language.
      Don't be an asshole.

    • @whossname4399
      @whossname4399 4 года назад +14

      @@lpil I feel this is something that needs to be made more explicit to beginers. It took me a while to figure out what 'let it crash' actually meant.

    • @whossname4399
      @whossname4399 4 года назад +9

      @@IIARROWS if you think he was being an asshole you probably don't understand what he is saying. The language design encourages you to think about the system behaviour for your error conditions while also reducing the amount of code you write for handling those errors.

    • @mikew2229
      @mikew2229 4 года назад +2

      Erlang OTP has the concept of supervisor that monitor and restart its process if one is crashed. Over catching errors usually makes life very hard to locate the real line of bug code is.

  • @StickySli
    @StickySli 3 года назад +63

    I'm starting to love this language more each day.
    On the other hand, my teacher handed us an assignment to make an industrial elevator lift (without doors or human safety checks) simulation through Erlang.
    It is quite easy to wrap your head around this problem:
    The elevator requires a motor, the motor can only go at one speed in two directions and can only sense when it reaches the top or bottom.
    The elevator also requires a single sensor for each floor. Basically, each sensor is its own process, and talks to a supervisor which then talks to the motor.
    The elevator also requires a button cabinet. Imagine that each button when pressed, sens a signal, to the elevator master supervisor. Then, the master supervisor can light on or off the button. There is also a display because why not.
    The motor is easy to implement with a finite-state machine, and the master sensor will have to distribute its slave sensors.
    Can you see now? With what you learned from this video it is quite simple to get a grasp on how the process tree looks like. Erlang is so fun!

    • @brainless3651
      @brainless3651 3 года назад +1

      Nice

    • @ruhtam8971
      @ruhtam8971 2 года назад +3

      Please share the solution in github and link it here if you can spare some time. I want to learn this too

    • @StickySli
      @StickySli 2 года назад +5

      @@ruhtam8971 Since this lab work was handed to my teacher, it is now the university intellectual property and I cannot post the solution. I will have to ask my teacher if I'm allowed to share the code. He will most likely say no to my question because it was the last project for this course and other students might plagiarize my own work. I hope you understand my situation.

    • @ruhtam8971
      @ruhtam8971 2 года назад +2

      @@StickySli okay then I'll attempt a solution on my own taking inspiration from your explanations. Thank you

    • @StickySli
      @StickySli 2 года назад +1

      @@ruhtam8971 You should start with "P1" if you are a newbie to Erlang. The difficulty increases quite a lot afterwards, specially with the other lab works. I hope you have a great day sir!

  • @Anaximander29A
    @Anaximander29A 4 года назад +42

    We had to use this language in university to write algorithms and datastructures. At first I was like wtf, but then after a while I really started to dig it.
    The ability to write implicit if-cases just with function headers makes it very elegant imo.

    • @NaumRusomarov
      @NaumRusomarov 4 года назад +2

      Fun fact. You can in theory just use case- and if-statements for flow control without even touching pattern matching in the function headers, but the code very quickly becomes unwieldy because of the static variables; (recursive) loops done like this are quite hilarious. It's a fun exercise to see how far you can push the language by limiting some of its features.

    • @AndersJackson
      @AndersJackson 4 года назад +5

      First Erlang was written in Prolog, so that was the part that came from Prolog.

  • @caw25sha
    @caw25sha 4 года назад +21

    I worked on a system written in C# with 120 threads (don't ask!) and Erlang would have been brilliant for that. Great video.

  • @unvergebeneid
    @unvergebeneid 4 года назад +36

    This was brilliant! I had always wondered what made Erlang so special!

    • @jsonkody
      @jsonkody 3 месяца назад

      Yes, it's indeed very special and it's a shame that it does not have the attention it deserves. Now with Elixir it slowly changing.

  • @contingenceBoston
    @contingenceBoston 4 года назад +138

    This is surprisingly easy to wrap one's head around. Rad.

    • @hauleth
      @hauleth 4 года назад +14

      At its core Erlang is very simple language. The problem is that this language requires a little bit different approach to thinking, and this is the "hard part".

  • @KentHambrock
    @KentHambrock 3 года назад +11

    I've been learning Erlang over the last two weeks and I love it. It's so weird, but so damned fast to code in.

  • @KlojoVidjo
    @KlojoVidjo 4 года назад +47

    Douglas Adams:
    Click, click, hum.
    Click, hum, click, hum, click, hum.
    Click, click, click, click, click, hum.
    Hmmm.
    A low level supervising program woke up a slightly higher level supervising program deep in the ship's semi-somnolent cyberbrain and reported to it that whenever it went click all it got was a hum.
    The higher level supervising program asked it what it was supposed to get, and the low level supervising program said that it couldn't remember exactly, but thought it was probably more of a sort of distant satisfied sigh, wasn't it? It didn't know what this hum was. Click, hum, click, hum. That was all it was getting.
    The higher level supervising program considered this and didn't like it. It asked the low level supervising program what exactly it was supervising and the low level supervising program said it couldn't remember that either, just that it was something that was meant to go click, sigh every ten years or so, which usually happened without fail. It had tried to consult its error look-up table but couldn't find it, which was why it had alerted the higher level supervising program to the problem.
    The higher level supervising program went to consult one of its own look-up tables to find out what the low level supervising program was meant to be supervising.
    It couldn't find the look-up table.
    Odd.

  • @amirhasanbasic2193
    @amirhasanbasic2193 4 года назад +1

    You are hitting bang on with the last few videos, really interesting.

  • @lifelover69
    @lifelover69 4 года назад +9

    Awesome intro to erlang, I'm very motivated to learn more, thank you!

  • @jabuci
    @jabuci 2 года назад +1

    Every word of his was golden. I enjoyed listening to him. Thanks!

  • @rembautimes8808
    @rembautimes8808 2 месяца назад

    This was an amazing talk. Thanks - mind opener on different programming paradigm

  • @lpil
    @lpil 4 года назад +71

    • @LucienHughes
      @LucienHughes 4 года назад +2

      He slightly reminds me of Jose Mourinho

    • @keedt
      @keedt 4 года назад +3

      @@LucienHughes jose mourinho minus the ego

  • @borntolose_livetowin
    @borntolose_livetowin 3 года назад +2

    Erlang got my curiosity because it reminds of a city called Erlangen, but after watching this video - Erlang has my attention.

  • @callumstewart5891
    @callumstewart5891 4 года назад +10

    It's all coming back to me now! Flashbacks ftw!

    • @danceswithdirt7197
      @danceswithdirt7197 4 года назад +3

      Yeah! I wrote a chat server/client in Erlang during my university days. I love Erlang.

    • @callumstewart5891
      @callumstewart5891 4 года назад +1

      @@danceswithdirt7197 I did that too! Well, maybe not for a chatbot, but I did something with it. I prefer Haskell, personally though.

    • @AndersJackson
      @AndersJackson 4 года назад +2

      Yes, we did a computation server, that was able to move around for updates etc. We did that in Uppsala university around 1995 (some thing, don't remember). It had computation server management in Erlang and solving the problem with Prolog. :-)

  • @NikolajLepka
    @NikolajLepka 4 года назад +8

    erlang! one of my favourites :D
    good to see it get some attention

  • @mikopiko
    @mikopiko 4 года назад +3

    The BEAM vm is really powerful, thank you Erlang!

  • @hereallyfast
    @hereallyfast 2 года назад +4

    I have a question. What are we doing? Why have I learned object oriented programming? This is awesome. This is next level

  • @billfrug
    @billfrug 2 года назад +4

    Beautiful language in my opinion.

  • @zecekobold2140
    @zecekobold2140 4 года назад

    This is the best lecture on apoptosis on youtube.

  • @caw25sha
    @caw25sha 4 года назад +66

    Can we please have another video with source code for a simple working program, and see it in action? I'm really impressed and intrigued by Erlang and want to know more.

    • @unknownunknown9160
      @unknownunknown9160 4 года назад +2

      caw25sha I’d suggest looking into Elixir

    • @johnjoyce
      @johnjoyce 4 года назад

      More Erlang and some Elixir

    • @PaulaJBean
      @PaulaJBean 4 года назад +1

      A video about Elixir, then?

    • @ryan.winchester
      @ryan.winchester 4 года назад +1

      Look up on RUclips: Erlang The Movie

    • @mrhivefive
      @mrhivefive 4 года назад +2

      Search for this presentation on RUclips.
      GOTO 2019 • The Soul of Erlang and Elixir • Saša Jurić

  • @benouattara6249
    @benouattara6249 4 года назад +4

    please ask this man to create a full course

  • @QtmMtrlzr
    @QtmMtrlzr 4 года назад +9

    Erlang sounds pretty interesting, thanks for this explanation

  • @ankk98
    @ankk98 3 года назад +9

    Declarative programing
    Let the code fail (No guard clauss)
    Runs on virtual machine
    Seperate process for every task
    Fault tolerance
    Scalability
    Can run in a cluster of machines and pass messages

  • @davidmccrea1232
    @davidmccrea1232 3 года назад +3

    What an elegant design for error handling

  • @qzbnyv
    @qzbnyv 4 года назад +13

    I'd like to see a comparison of the concurrency in Erlang (in more details) with Haskell's model, where Haskell's threads spawned with forkIO are also described similarly as "lightweight" (...but the communication between them in Haskell is done through the MVar data type and/or STM's TVar type). STM (Software Transactional Memory) in Haskell would probably be a great video on its own. Maybe another one for Graham Hutton? :)

    • @lpil
      @lpil 4 года назад +16

      They are similar in many ways but one key way in which they are different is the garbage collection. Haskell's GC time cost is linear with the amount of memory used by all threads and can have large pauses for global GC. Erlang's GC is performed on a per-thread basis and as a result there is never any global pause. Erlang programs tend to have a much better 99th percentile latency than those written in Haskell, Java, etc.

    • @lpil
      @lpil 4 года назад +11

      Another key point is that pervasive use of timeouts and assertions means that deadlocks are much rarer and are something that can be recovered from, while in Haskell it would cause the whole program to crash. Erlang has much better runtime error handling properties, though less ability to prevent runtime errors than Haskell due to lack of a static type system.

  • @JockeTF
    @JockeTF 4 года назад +2

    Excellent explanation! Thank you!

  • @jhbonarius
    @jhbonarius 4 года назад +4

    I've been programming in hardware description languages like VHDL and Verilog for many many years now, and it sounds like Erlang is very similar in architecture.

    • @kreuner11
      @kreuner11 2 года назад

      Maybe because it's functional, so you explain what the result should be rather than the steps to achieve it?

  • @jsonkody
    @jsonkody 3 месяца назад

    By the way, it's funny that Elixir/Erlang are considered functional languages (which they indeed are), but by implementing the actor model with message passing, they actually adhere more closely to the original OOP concept as Alan Kay intended it than many 'modern' OOP languages like Java.

  • @typograf62
    @typograf62 4 года назад +3

    An impressive explanation.

  • @GuitarWithBrett
    @GuitarWithBrett 11 месяцев назад

    Good stuff , use elixir at my work and this is a great breakdown of Erlang

  • @ristekostadinov2820
    @ristekostadinov2820 4 года назад +22

    Joe Armstrong was legend, rest in peace

    • @mikew2229
      @mikew2229 4 года назад

      Riste Kostadinov the death cause of Joe is so strange, someone could never got infected such disease and passed away that quick

  • @jms019
    @jms019 4 года назад +2

    Maybe reference the original Erlang movie which demonstrates process failure and live module replacement quite well

  • @jaszynek7640
    @jaszynek7640 4 года назад +2

    I`m C++ and Erlang dev, Erlang supports actor model which is imo safest and easiest to maintain and scale up solution in design of concurrent systems, unfortunately it is not fast enough so there is a need to implement actor model in C++, and what was elegant and clean in Erlang becomes nightmare in C++.

  • @elixiradolfont
    @elixiradolfont 6 месяцев назад

    4:03 Great animation showing how do we execute a function that uses pattern matching

  • @vanaesthetics3336
    @vanaesthetics3336 2 года назад

    Cool video! Thanks for sharing

  • @BenMursa
    @BenMursa 4 года назад +1

    That factorial program is so simple but so cool too

    • @meowsqueak
      @meowsqueak 4 года назад +1

      Indeed. Factorial programs are the “hello, world!” programs for functional programming languages.

  • @StanSensei
    @StanSensei 3 года назад +2

    This guy makes programming sound cool.

  • @AtticusBleep
    @AtticusBleep 4 года назад +40

    So what does his shirt say at the bottom?!

    • @keedt
      @keedt 4 года назад +54

      let it crash

    • @arvind31459
      @arvind31459 4 года назад +17

      Camera man is an intern

    •  4 года назад +21

      Wash at 40C

  • @ataksnajpera
    @ataksnajpera 4 года назад +5

    This process isolation looks very similar to what chrome and firefox browsers are doing from some time. They also spawn multiple instances and then communicate via messages. Also when one card crashes it will not hang whole browser. Supervisor process will simply terminate crashed process.

    • @gang_albanii
      @gang_albanii 9 месяцев назад

      yeah! but browsers do it for security primairly

  • @CalvinHikes
    @CalvinHikes 4 года назад +13

    Like having a plate of food with none of the servings touching each other. That sounds nice to me.

  • @FeelsDonkMan
    @FeelsDonkMan 4 года назад +2

    Great explanation thank you.

  • @erlanmejia2140
    @erlanmejia2140 2 года назад

    Thank you very much.

  • @Shadow81989
    @Shadow81989 4 года назад +9

    Some of it reminds me of objects in other languages - they don't share memory, communicate by sending messages, supervisor objects decide what to do in a crash scenario, ...
    Would definitely be interesting to learn more about it!

    • @MikkoAhlroth
      @MikkoAhlroth 4 года назад +9

      In fact some people have said that Erlang is closer to the true idea of OOP than the usual OOP languages (C++, Java…). ;)

    • @hauleth
      @hauleth 4 года назад +27

      Alan Kay (creator of the term Object Oriented Programming) once said that there are only 2 languages that implemented OOP as what he meant - Smalltalk and Erlang.

  • @noahwilliams8996
    @noahwilliams8996 4 года назад +7

    This is really amazing. I want to write code in Erlang now.

    • @JSDudeca
      @JSDudeca 4 года назад +5

      It's recommended for most to write using Elixir which is a child of Erlang. Elixir, which uses the rock solid Erlang VM, has much nicer syntax, great libraries and an awesome community.

    • @peterr6205
      @peterr6205 4 года назад

      @@JSDudeca Elixir is not a "child Erlang". Using that phrase suggests that it's somehow less powerful or is a watered down version. To most people who are familiar with more modern languages, the Elixir syntax and tooling will seem much more familiar, but rest assured it is in no way a "child Erlang". It has everything you would get with Erlang, plus some extras.

    • @JSDudeca
      @JSDudeca 4 года назад

      @@peterr6205 - Your point is well taken. In re-reading my comment it was definitely a typo. I had meant that "Elixir is a child of Erlang". Elixir is an awesome language and I look forward to using it in future projects. I cannot see myself ever writing Erlang as Elixir has it all.

    • @Gwaerondor
      @Gwaerondor 4 года назад +4

      @@JSDudeca In what way is Elixir "recommended" over Erlang? It's the same thing with different syntax. Elixir doesn't do anything that Erlang can't. It's based on preference and neither one is "recommended" over the other. I'll pick Erlang any day of the week to avoid half of my lines consisting of the keyword bloat that is "do" and "end" but completely understand why people who have done Ruby might want to pick Elixir instead.

    • @JSDudeca
      @JSDudeca 4 года назад +2

      @@Gwaerondor If working on small personal projects, it's really up to the person but in big teams
      However with Elixir it is a much easier language to get new team members, train up new talent, find support on issues etc. This is why I recommend Elixir to N00b's.

  • @swerasnym
    @swerasnym 4 года назад +4

    Yey my current favorite language, did not expect to find it here!

  • @davidgillies620
    @davidgillies620 4 года назад +6

    Objective C is primarily a message-passing paradigm, and BeOS had it baked into the OS level. I think it started with Smalltalk. The idea of sharing memory by communicating rather than communicating by sharing memory is fundamental to Go (channels), as is very rapidly spawning lightweight processes (goroutines).

    • @ryan.winchester
      @ryan.winchester 4 года назад +3

      Go has shared memory and channels are more like passing a baton than asynchronous communication between concurrent processes, no?

    • @AndersJackson
      @AndersJackson 3 года назад +1

      Objects started with Simula, Object orientation started with Smalltalk. Compared to Smalltalk, C++, Java, C# etc are not object oriented languages.
      Smalltalk and Object orientation are about sending messages between objects, not calling methods. (That it is implemented as methods are another thing).

  • @hcblue
    @hcblue 4 года назад +5

    Message passing, share-nothing design, and supervisors sound kinda cool, but what am I missing here? It would be lovely to get into the tradeoffs of Erlang's design (which, as with everything else in engineering, has a cost).

    • @PaulaJBean
      @PaulaJBean 4 года назад +2

      It might be more difficult to find Erlang developers than JavaScript developers. They might cost more. Some people find Erlang's syntax ugly and/or unreadable. Luckily, there is Elixir.

    • @hauleth
      @hauleth 4 года назад +4

      It needs some accustoming to be able to properly work with OTP (the supervisor thing in the video). Also as @Paula said, there are not that much developers, so it can be problem for some companies as well.

  • @vinaysatish368
    @vinaysatish368 3 года назад

    Awesome! Thank you

  • @timibolu
    @timibolu 2 года назад

    I love Francesco Cesarini

  • @manassricharanvarri
    @manassricharanvarri 4 года назад

    You guys are best

  • @K2gjbcfcvjbv
    @K2gjbcfcvjbv Год назад

    A Like and subscription because of the telephone in the background on the desk.

  • @MrManafon
    @MrManafon 4 года назад +9

    A language created for todays web.

  • @qm3ster
    @qm3ster 2 года назад

    How is fallibility of network messaging handled though?
    Does it mean that sending a message to another process in the same supervisor tree is just as scary-looking as another node?

  • @seancharles1595
    @seancharles1595 4 года назад +4

    I'm lucky enough to use Erlang and Elixir. Awesome!

  • @rasmichael
    @rasmichael 4 года назад +7

    I'm getting a flash-back! Long live the AXE!

  • @formbi
    @formbi 4 года назад +1

    in Scheme you can just do factorial like this:
    (define (factorial x) (apply * (iota x 1)))

  • @IshamMohamedIqbal
    @IshamMohamedIqbal 3 года назад

    Is the "tread" he is mentioning @ 10:34, the OS thread?

  • @thm6994
    @thm6994 2 года назад +1

    Erlang is a computer language developed in Sweden by the Swedish telephone company Ericsson.

  • @Furiends
    @Furiends 4 года назад +1

    Its an important distinction that any concurrency must use message passing. This is excellent for information processing and servers but debilitating for something like operating system drivers.

    • @davidwuhrer6704
      @davidwuhrer6704 4 года назад

      So drivers must not be concurrent.

    • @Furiends
      @Furiends 4 года назад

      @@davidwuhrer6704 They have to be by definition unless you want your operating system to be like DOS.

    • @davidwuhrer6704
      @davidwuhrer6704 4 года назад +1

      @@Furiends Then they must use some form of message passing.

    • @AndersJackson
      @AndersJackson 3 года назад

      @@Furiends you can have the drivers to be non-concurrent, and let the OS handle the concurrency.
      And yes, most drivers are not concurrent.

  • @udaysom3244
    @udaysom3244 3 года назад

    Hey, this guy was at NIIT conference:)

  • @justahker3988
    @justahker3988 4 года назад

    Any coverage on Brady's channels on the other Erlang? (Agner Krarup Erlang)

    • @anlonburke2885
      @anlonburke2885 4 года назад +1

      Just FYI, this Erlang (the language) was actually named after the "other" Erlang :) That whole Erlang = "Ericsson language" theory is plain wrong.

  • @MaximumJoy
    @MaximumJoy 4 года назад +16

    This guy has a way with words

  • @jabuci
    @jabuci 2 года назад

    Should I start learning Erlang or Elixir?

  • @hansisbrucker813
    @hansisbrucker813 4 года назад +4

    I love Erlang.
    Btw, in the factorial example you could also use a pattern that matches one and you wouldn't have needed a when clause.

    • @PaulaJBean
      @PaulaJBean 4 года назад +5

      But would that catch calling factorial() with a negative number?

    • @hansisbrucker813
      @hansisbrucker813 4 года назад

      @@PaulaJBean Hmm, no

  • @welltypedwitch
    @welltypedwitch 4 года назад +9

    This is very interesting compared to Elm. Unlike Erlang, in Elm you have to handle every possible error case explicitly. I think I still prefer Elm, but this is still really interesting!

    • @florianthelliez7739
      @florianthelliez7739 4 года назад +7

      Elm is more akin to Haskell, in the way that it uses a strong type system, whereas Erlang has dynamic typing. Some people are working on a strongly type language that runs on the Erlang VM (Gleam) but it is still a work in progress so far.

    • @AndersJackson
      @AndersJackson 4 года назад +1

      @@florianthelliez7739 there was also work that did type system checks on the Erlang program when compiling. I never heard how it worked out though.

    • @florianthelliez7739
      @florianthelliez7739 4 года назад +1

      @@AndersJackson that might have been referring to dialyser, you should get a look at it. It is a bit bothersome to set up and get working properly apparently though.

  • @Zolbat
    @Zolbat 4 года назад +1

    Sounds pretty cool

  • @runefjord8446
    @runefjord8446 4 года назад +1

    The last lair of the onion : an electromagnet that flips the switch and swings back to re-flip it before getting turned on again

  • @nnaaaaaa
    @nnaaaaaa 4 года назад +78

    if erlang's syntax isn't your jam, elixir is actually really nice.

    • @tjpld
      @tjpld 4 года назад +10

      jaff Elixir is the nicest language I have come across in the last 15 years.

    • @nnaaaaaa
      @nnaaaaaa 4 года назад +2

      @@tjpld i wish i learned elixir far sooner than i did so i could've spent more time learning the right lessons.

    • @tjpld
      @tjpld 4 года назад +11

      jaff Same. The thing that struck me the most was how little relevance control structures have in functional programming. The only thing your are going to use is case and cond, but even this is rare and you just pattern match most of the time. With any other language I end up with a mess of for loops, if, else and while statements.

    • @FeelsDonkMan
      @FeelsDonkMan 4 года назад

      Very similar to Ruby for obvious reasons. Something I really want to learn as well.

    • @shayneoneill1506
      @shayneoneill1506 4 года назад +5

      @@FeelsDonkMan The similarity to Ruby is fairly superficial. It does have some similaritys (do ... end blocks etc), but if you tried to use it in a Ruby style manner, I think you might end up making a big mess. Its not a procedural or OOP language.

  • @RawPeds
    @RawPeds 4 года назад +1

    Erlang looks cool!

  • @MrErtghj23
    @MrErtghj23 4 года назад +4

    You should create some Erlang tutorials ❤️

    • @AndersJackson
      @AndersJackson 3 года назад +2

      He has written at least one book about Erlang.

    • @dlabor1965
      @dlabor1965 2 года назад

      Designing for Scalability with Erlang/OTP,
      Francesco Cesarini and Steve Vinoski

  • @catcatcatcatcatcatcatcatcatca
    @catcatcatcatcatcatcatcatcatca Год назад

    I was blown away by the brilliance of Erlang when I heard Joe Armstrongs presentations about it.
    Before that, Casey Muratoris criticism of OOP made me overreact a bit: I became very sceptical of systems that advocated abstractions and focused on “maintainability”, because, very often, “maintainability” just meant arbitrary idea of simplicity and willing blindness towards the actual complexity of the system.
    But Erlang ACTUALLY addresses those issues by doing something radically different. And the approach of it shows perfectly what is wrong with OOP.
    If you are writing a program that will be one process and one binary, you are fundamentally unable to handle errors and achieve structures like erlang is. So why are we hellbend on writing “provably safe” and “modular” code based on “frameworks” - when none of those are true for anyone else than the single developer?
    The overall binary is not provably safe, nor is the source code as a whole is. Erlang as a system can be.
    The application is not modular, as long as it runs as a single process. Erlang is naturally capable of distributed computation.
    And the “framework” is just code in your binary you most likely didn’t bother reading (and which might be amount too big to physically read by single human, in a month). That’s not a true framework, because that’s not a true structure. Erlang, being distributed on multiple physical machines, multiple VMs and multiple processes is a true framework.
    In comparison, the “frameworks” modern developers use is just copy-pasting code we might or might not have read, composed of copy-pasted code we most definitely did not read.
    Now that consumer processors no longer see as rapid growth in processing power - as while definitely very possible, such devices would be impractical to cool down in consumer devices, I really hope there is some big shift in culture of software and OS development.

  • @Ratebron
    @Ratebron 4 года назад +52

    Erlangers rise up!

  • @dantenotavailable
    @dantenotavailable 4 года назад +10

    ♥️ Erlang. RIP Joe Armstrong.

  • @jackc451
    @jackc451 4 года назад +5

    Could you guys think about doing a video on the Actor Model?

  • @ismaelgrahms
    @ismaelgrahms 5 месяцев назад

    Gotta try Erlang

  • @naheliegend5222
    @naheliegend5222 4 года назад

    Well, I don't get everything what he said. Any recommendations to read something about Erlang?

    • @HarmonicaTool
      @HarmonicaTool 4 года назад

      I think "Seven Languages in Seven Weeks" has a chapter on it. "Seven More Languages..." has a chapter on Elixir.

  • @NotGarbageLoops
    @NotGarbageLoops 2 месяца назад

    The captions are obsessed with Fred.

  • @oliverm.batista5445
    @oliverm.batista5445 4 года назад +5

    OMG can we like this video twice?!

  • @itaco8066
    @itaco8066 3 года назад

    Awesome thanks

  • @masoomsanadi
    @masoomsanadi 3 года назад +1

    Why isn't there a common xmpp for all the world communication?

  • @shalomhabibi9594
    @shalomhabibi9594 4 года назад +15

    Team Erlang \o/
    What's your take on BEAM though

    • @peterr6205
      @peterr6205 4 года назад +2

      I'm not sure I understand your question. BEAM is the runtime/VM that is used to run erlang(not directly, but after it's compiled to bytecode). Within the Erlang community, BEAM is the only major VM that is used, while there might be other implementations, I've never heard of anyone running anything except BEAM. So it would follow that anyone who is a fan/user of Erlang (or any other BEAM language, like Elixir), is a fan of the BEAM.

    • @shalomhabibi9594
      @shalomhabibi9594 4 года назад

      @@peterr6205 BEAM is its own project though, I'd just like to hear their thoughts about it

    • @peterr6205
      @peterr6205 4 года назад +2

      @@shalomhabibi9594 BEAM is not a separate project. BEAM is the reference implementation of Erlang. In a way, it IS Erlang. While you could argue Erlang is the syntax and rules of the language, in reality, Erlang is the compiler.VM that compiles and runs Erlang source code, and that currently is the BEAM.

    • @shalomhabibi9594
      @shalomhabibi9594 4 года назад

      @@peterr6205 I give up

    • @peterr6205
      @peterr6205 4 года назад +2

      @@shalomhabibi9594 I'm actually curious about what you'd like to know. My goal it not to be argumentative about your comment or request for info. For example, Java runs on the JVM, but there are also many other runtimes that people use, so understanding the differences, both technologically and politically (google vs oracle, etc.) makes a lot of sense, but with Erlang there's only one runtime, so therefore Erlang and the BEAM can be thought of as one thing. So anything you would learn about Erlang, would be applicable to BEAM. I'm curious what info you're looking for, or what facts you'd like about BEAM. I'm really not trying to be argumentative. I'd like to give you more info if I can. I've been working with Erlang and Elixir (both major BEAM languages) for over 3 years.

  • @diegonayalazo
    @diegonayalazo 2 года назад

    Thanks

  • @platin2148
    @platin2148 4 года назад +5

    I don’t really want to know how the vm’s interact with each other in reality i mean it must happen through packets but what it sends and how it does the routing decision is really the part that maybe makes it so scalable.

    • @auto514
      @auto514 4 года назад +2

      Sorry...what?

  • @Pyrazahn
    @Pyrazahn 4 года назад

    So if variables can't be modified and there is no shared memory, how would you program something like a counter?

    • @sverkeren
      @sverkeren 4 года назад +3

      recursion

    • @AndersJackson
      @AndersJackson 3 года назад

      When you do calculation, you store the new result in a new variable. And because you do all loops in recursion, you do get a new set of variables each call. :-)
      And actually, non mutable variables the default in ML languages likeHaskell and OCaml. Nothing strange there at all, actually.

  • @DaniErik
    @DaniErik 4 года назад +3

    Hello Joe!

  • @nO_d3N1AL
    @nO_d3N1AL 4 года назад +1

    Isn't the distributed idea a form of an Actor system? If I'm not mistaken, what this video is kind of alluding to is that, in terms a Java programmer can understand, Erlang basically has a JMS-style architecture built in to the language.

  • @Mattwoods35
    @Mattwoods35 3 года назад

    I live for this sh**

  • @KvapuJanjalia
    @KvapuJanjalia 2 месяца назад

    So, actor model?

  • @alexandterfst6532
    @alexandterfst6532 4 года назад +5

    Why is there no subtitles on this video ?

    • @sevcandincel
      @sevcandincel 4 года назад +1

      It is sad.

    • @KingJellyfishII
      @KingJellyfishII 4 года назад

      I'm kinda annoyed too

    • @caw25sha
      @caw25sha 4 года назад +2

      This is currently a very new video and it sometimes takes a while for the subtitles to be generated. Try again tomorrow.

    • @KingJellyfishII
      @KingJellyfishII 4 года назад

      @@caw25sha ah makes sense. Will do

    • @cesteres
      @cesteres 4 года назад +2

      Subtitles in Erlang plz

  • @pspicer777
    @pspicer777 4 года назад +3

    A small detail ... Should really be ... erlang/OTP. Nice videoo.

    • @peterr6205
      @peterr6205 4 года назад

      They are used interchangeably, but Erlang/OTP is not somehow more correct than just saying Erlang.

  • @boboxiaodd
    @boboxiaodd 4 года назад +1

    I love erlang, I use cowboy,vernemq

  • @alsatusmd1A13
    @alsatusmd1A13 4 года назад

    A quicker factorial algorithm:
    fac(N) when N < 2, is_integer(N) -> 1; % If 0 or 1, then return 1, otherwise (note the semicolon ; meaning 'else')
    fac(2) -> 2; % If 2, then return 2, otherwise
    fac(N) when N > 2, is_integer(N) -> N * fac(N-1).

  • @striker865
    @striker865 4 года назад +1

    Erlang is super cool

  • @alexandredaubricourt5741
    @alexandredaubricourt5741 4 года назад

    Okay but it's nothing different than if you were to choose to not throw errors in production so as it would just exit the stack but not terminate the thread no?

    • @hauleth
      @hauleth 4 года назад +1

      The difference is where the error will be handled. In Java threads are in most cases pretty heavy as these are delegated to the OS. In Erlang on the other hand processes are something called "green-threads" or "user-space threads", so spawning them is super easy and all errors are caught on its boundary, so the "blast area" of error is much smaller than in Java.

    • @AndersJackson
      @AndersJackson 3 года назад

      The thing is that Erlang threads takes an handfull of bytes, compared to Java that take some 1000 bytes overhead. So yes, if you are running massively threaded programs (like Erlang programs tends to be) you will run out of memory much earlier on a Java program doing the same thing.