A Brief Introduction to Elixir's Actors Model

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • In this video I give a brief introduction to the Actors Model in Elixir. Mainly:
    - What is it?
    - Why use it?
    - How to use it?
    - A bit of history
    Feel free to contact me on the e-mail of the last slide or the comments of this video!

КОМЕНТАРІ • 3

  • @hidekxyz
    @hidekxyz 3 місяці тому +1

    An interesting thing is that each process created on the BEAM VM has it's own stack and heap, allowing it to be garbage-collected independently, avoiding having big GC pauses
    E muito boa explicação do video (também sou brasileiro kkk)

  • @mianaviatte
    @mianaviatte Рік тому +1

    I did exactly the same code as you did with Factorial, and it can't be compiled or executed! Used Ubuntu 20.04, saved file with .exs extension and tried to run with iex -S mix... help me, please!

    • @Dwctor
      @Dwctor  Рік тому

      Hello, good afternoon!
      I just redid the example by placing the code on the left above the part on the right and executed it with "iex " (replace with your file) and it worked perfectly! When running with iex , Elixir will run the script located outside any module definitions then launch an interactive session after that, which will have all of the modules loaded. If you look a bit above the "iex(1)>" line you'll see the 120 output! (code copied from 6:50 in the video)
      If you want to try the program out with distinct outputs, by using the same interactive shell, rewrite the code on the right-hand side in the shell altering the 5 with any other number you wish!
      The -S option of iex with mix has to be done in a "mix" directory. That can be created with the "mix new " command, however for simple examples such as the one of this video I would discourage it, as it complicates things more than needed.
      If you still have trouble, feel free to reply to this comment!