Fireship · @fireship

Elixir in 100 Seconds

Uploaded April 8, 2022 · Length 2:35

Elixir in 100 Seconds

Summary

elixir programming language basics and concurrency model in 100 seconds

  • elixir programming
  • concurrency model
  • functional syntax
  • beam virtual machine
  • erlang

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    Elixir a dynamic general purpose

  2. 0:02

    programming language designed to build

  3. 0:03

    scalable concurrent applications with a

  4. 0:06

    beautiful functional syntax it was

  5. 0:08

    created by Jose valim and first released

  6. 0:10

    in 2012 and today it consistently ranks

  7. 0:12

    among the most loved programming

  8. 0:13

    languages it runs on top of the erlang

  9. 0:16

    beam virtual machine which itself is

  10. 0:18

    developed in the 1980s to scale the

  11. 0:19

    massive demands of phone switching which

  12. 0:21

    it did with extreme reliability and

  13. 0:23

    Vault tolerance Elixir was created to

  14. 0:25

    make this powerful technology accessible

  15. 0:27

    to the modern developer it's dynamically

  16. 0:29

    tight with a minimal Ruby inspired

  17. 0:31

    syntax making it more approachable than

  18. 0:33

    statically typed functional languages

  19. 0:35

    like hasle however because it's compiled

  20. 0:37

    to beam Bode it delivers better

  21. 0:39

    performance and scalability compared to

  22. 0:41

    interpreted languages it's used by

  23. 0:42

    companies like Discord to handle massive

  24. 0:44

    amounts of concurrent users by Motorola

  25. 0:47

    to build fault tolerant communication

  26. 0:48

    systems by Pinterest to scale up their

  27. 0:51

    real-time notification system and The

  28. 0:52

    Elixir based Phoenix framework is

  29. 0:54

    responsible for thousands of full stack

  30. 0:56

    web applications to get started install

  31. 0:59

    llang Andy then create a file ending

  32. 1:01

    inexs to create a variable give it a

  33. 1:03

    name followed by a value it's Dynamic so

  34. 1:06

    no type annotations are necessary now

  35. 1:08

    print it to the standard output with IO

  36. 1:10

    puts and like Ruby parentheses are

  37. 1:12

    usually optional alternatively you might

  38. 1:14

    create an atom which is a constant whose

  39. 1:16

    value is its own name Anonymous

  40. 1:18

    functions can be created with the FN

  41. 1:19

    keyword which can then be assigned to

  42. 1:21

    variables or passed around to other

  43. 1:23

    functions and you can even simplify this

  44. 1:25

    expression further using the Amper sand

  45. 1:27

    shorthand when working with function

  46. 1:28

    Expressions you can use the pipe

  47. 1:30

    operator to pass the value of one

  48. 1:32

    expression to another without the need

  49. 1:33

    for deeply nested function calls create

  50. 1:35

    a list of items with brackets or create

  51. 1:37

    a map to represent key value pairs the

  52. 1:39

    equal sign can be used to assign

  53. 1:41

    variables but it's actually called the

  54. 1:43

    match operator to support pattern

  55. 1:44

    matching features for example we might

  56. 1:46

    destructure a list into a set of

  57. 1:48

    variables if a pattern doesn't match it

  58. 1:50

    will raise an error and this Behavior

  59. 1:52

    can be used to implement advanc control

  60. 1:54

    flow logic if and its inverse and less

  61. 1:56

    can be used for basic situations but the

  62. 1:59

    case keyword all allows us to compare a