Elixir Programming Introduction - Complete Tutorial!

Sdílet
Vložit
  • čas přidán 29. 06. 2024
  • 💰 FREE Software Dev Intro Course - calcur.tech/free-dev-course
    💯 FREE Courses (100+ hours) - calcur.tech/free-courses
    Timestamps:
    00:00:00 - Intro
    00:01:23 - Why use Elixir
    00:03:48 - Installation and Setup
    00:07:15 - Intro to Mix
    00:09:02 - Overview of Elixir Files
    00:10:52 - Running and Elixir Script
    00:13:40 - Compiling Elixir
    00:16:36 - Running an Elixir Application
    00:23:29 - Intro to Hex
    00:25:40 - Basic Types
    00:26:53 - Creating a Variable
    00:27:52 - Module Attributes
    00:29:01 - Atoms and Strings
    00:35:35 - Strings
    00:38:40 - More about Hex
    00:39:49 - Numbers
    00:47:39 - Compound Types
    00:47:53 - Dates and Times
    00:50:50 - Example App - Time Until the New Year
    00:56:27 - Tuples
    01:01:59 - Lists and Loops
    01:04:15 - Mapping
    01:04:47 - Structs
    01:11:46 - Building a Guessing Game - Taking User Input
    01:14:00 - if Statements
    01:15:07 - Random Number
    01:16:26 - Docs and Arity
    01:17:28 - Cases and Errors
    01:19:19 - Case
    01:22:23 - Lists
    01:24:16 - Append and Prepend
    01:25:29 - Comprehensions with Conditions
    01:27:22 - Functional Programming
    01:30:07 - Defining Custom Functions
    01:34:41 - What’s Next?
    🏆 C++ Mastery Course - cppmastery.com
    ⚛️ FREE React Course (20 hours) - calcur.tech/free-react-course
    ✅ Data Structures & Algorithms - calcur.tech/dsa-youtube
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    ✉️ Newsletter - calcur.tech/newsletter
    📸 Instagram - / calebcurry
    🐦 Twitter - / calebcurry
    🔗 LinkedIn - / calebcurry
    ▶️ Subscribe - calcur.tech/subscribe
    👨🏻‍🎓 Courses - www.codebreakthrough.com
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    ↪ My Amazon Store - www.amazon.com/shop/calebcurry
    🅿 Patreon - calcur.tech/patreon-calebcurry
    🅖 GitHub Sponsors - github.com/sponsors/CalebCurry
    Ⓟ Paypal - paypal.me/calcur
  • Věda a technologie

Komentáře • 66

  • @codebreakthrough
    @codebreakthrough  Před 6 měsíci +7

    Let me know if you want more Elixir content!
    💰 FREE Software Dev Intro Course - calcur.tech/free-dev-course
    💯 FREE Courses (100+ hours) - calcur.tech/free-courses
    *Timestamps:*
    00:00:00 - Intro
    00:01:23 - Why use Elixir
    00:03:48 - Installation and Setup
    00:07:15 - Intro to Mix
    00:09:02 - Overview of Elixir Files
    00:10:52 - Running and Elixir Script
    00:13:40 - Compiling Elixir
    00:16:36 - Running an Elixir Application
    00:23:29 - Intro to Hex
    00:25:40 - Basic Types
    00:26:53 - Creating a Variable
    00:27:52 - Module Attributes
    00:29:01 - Atoms and Strings
    00:35:35 - Strings
    00:38:40 - More about Hex
    00:39:49 - Numbers
    00:47:39 - Compound Types
    00:47:53 - Dates and Times
    00:50:50 - Example App - Time Until the New Year
    00:56:27 - Tuples
    01:01:59 - Lists and Loops
    01:04:15 - Mapping
    01:04:47 - Structs
    01:11:46 - Building a Guessing Game - Taking User Input
    01:14:00 - if Statements
    01:15:07 - Random Number
    01:16:26 - Docs and Arity
    01:17:28 - Cases and Errors
    01:19:19 - Case
    01:22:23 - Lists
    01:24:16 - Append and Prepend
    01:25:29 - Comprehensions with Conditions
    01:27:22 - Functional Programming
    01:30:07 - Defining Custom Functions
    01:34:41 - What’s Next?

  • @alex6455
    @alex6455 Před 6 měsíci +35

    My first job out of college requires me to learn Elixir. It’s a beautiful language but stuff like pattern matching is still unclear to me. This video could not have come at a better time. Thank you Caleb.

    • @AIMadeSimple007
      @AIMadeSimple007 Před 6 měsíci +2

      I find this video to be good; however, it doesn't delve deeply into explaining pattern matching. It briefly compares it with destructuring assignment in JavaScript, but they are not identical. Pattern matching fundamentally involves attempting to match values to patterns. If successful, it can also deconstruct a value into its constituent parts, akin to destructuring. It's important to note that pattern matching is not only used for value deconstruction but also in control flow, such as determining which function to dispatch, Hope this helps

    • @samuraijosh1595
      @samuraijosh1595 Před 2 měsíci

      the elixir syntax for pattern matching is too verbose, thwarting you from seeing the core idea of pattern matching, just ask chat gpt or gemini simple examples of pattern matching in Haskell. that shoulld visually explain itself, its a pretty simple concept really.

  • @codex8797
    @codex8797 Před 4 měsíci +10

    Thanks bro. 4 years ago I learned how to code with your C crash course. 4 years later I am in my last year of computer engineering, and am learning Elixir from you. You have had a huge impact in my learning carreer, and I am really thankfull for it. Greetings from Brazil!!!

    • @eacarvalho
      @eacarvalho Před 13 dny +1

      Não é engraçado aprendermos em inglês sobre uma linguagem BR?

    • @codex8797
      @codex8797 Před 12 dny

      @@eacarvalho it sure is hahaha

  • @marto642
    @marto642 Před 5 měsíci +5

    "And for seconds.... I will just call it seconds for *ease of pronunciation* " - You got a laugh out of me

  • @ArashAkbarpour
    @ArashAkbarpour Před 6 měsíci +4

    New video just in time. Started the joy of elixir and need some really cool crash course. Thank you. Very appreciated if you do more on elixir .
    Keep on your good work Dear Caleb.
    Wish you the best.

  • @fmailscammer
    @fmailscammer Před 6 měsíci

    Saw it on the stack overflow developer survey and figured I’d check it out. Thanks for the lesson!

  • @Jam-ht2ky
    @Jam-ht2ky Před 6 měsíci

    Best elixir video, thank you again your videos are always of huge help and a great starting point for learning new things

  • @Anibulus
    @Anibulus Před 2 měsíci +2

    It's a great tutorial. Works well for people without programming basses, and excelent for people who code. I mean, just need the sintaxis

  • @zscoder
    @zscoder Před 6 měsíci +1

    Heck ya, I'm here for it 🤘🏼

  • @sharokhkeshawarz2122
    @sharokhkeshawarz2122 Před 6 měsíci +3

    WHAT! This is one of the best coinsidense of my life, i litrally wanted to start learning elixir and you did a video 6 hours ago XD dang it, Your the one who tough me coding :) love you man!

  • @lunarwitch1967
    @lunarwitch1967 Před 6 měsíci

    thanks m8, i tried two different teachers but your explanations are best so far!

  • @LeslieRussell
    @LeslieRussell Před 6 měsíci +4

    yes! much more elixir content please

  • @incognitohacks4850
    @incognitohacks4850 Před 6 měsíci

    Loved your C series and now your doing elixir. I just started learning it as a functional language. W channel

  • @JohnWickXD
    @JohnWickXD Před 6 měsíci +1

    Thank you so much Caleb❤

  • @tim_from_braid
    @tim_from_braid Před 6 měsíci

    Great video, would definitely like to see more

  • @eritert
    @eritert Před 6 měsíci

    Awesome. Since your C series was so good I am going to check this out.

  • @LeslieRussell
    @LeslieRussell Před 6 měsíci +1

    two quick things. after a couple of days poking around in elixir and mix i realized that elixir mix give new learners an advantage because it has builtin testing suite.
    the way you show for testing your code works well but if you make use of the built in testing and write tests first you get a boost. especially if you try and follow tdd.
    you can add the credo package and set it to strict and that (quoting the package docs) acts like rubocop run mix credo and you get a report covering your code that offers suggestions for refactoring and idiomatic preferences.
    then run mix test and correct all your fails

  • @Jam-ht2ky
    @Jam-ht2ky Před 6 měsíci +2

    More content on elexir would be much appreciated, saw your new video its awesome

  • @Redyf
    @Redyf Před 2 měsíci

    Great stuff, thanks for sharing with us

  • @treangle
    @treangle Před 3 měsíci

    Banger! 🔥

  • @easypeasyrun
    @easypeasyrun Před 4 měsíci +3

    Caleb is an awesome teacher! I don't have a laptop to code. But, still I am getting the basics and feel of how powerful exilir is :).
    Thank you!!

  • @Quenjii
    @Quenjii Před 5 měsíci

    Great video. I think it would've been really useful to show how to use functions defined in a module in another file.

  • @nicolaskevin4046
    @nicolaskevin4046 Před 3 měsíci

    Thank you!

  • @user-zm4lx1ml5d
    @user-zm4lx1ml5d Před 5 měsíci

    Def love this...

  • @anusornchaikaew2567
    @anusornchaikaew2567 Před 4 měsíci

    Thank you very much

  • @cryswerton-silva
    @cryswerton-silva Před měsícem

    Nice!

  • @freaklore
    @freaklore Před 6 měsíci +1

    On Windows you would have to add .bat so: iex.bat -S mix

  • @HAAAAAA614
    @HAAAAAA614 Před 3 měsíci +1

    22:40 Great video, but maybe, just maybe don't randomly open a light-themed page after being on a dark theme for the past 20 minutes page

  • @zhigechen7318
    @zhigechen7318 Před 6 měsíci

    Nice job! Caleb Curry!

  • @lancemarchetti8673
    @lancemarchetti8673 Před 4 měsíci

    Brilliant

  • @flubba86
    @flubba86 Před 3 měsíci +1

    This is definitely the best beginner video on Elixer. I found your delivery style very easy to understand. My only criticism is about the tangents to basic fundamental concepts like hex and number systems. It's not necessary to explain those basics in such detail in a video like this.

    • @GeniusMBM
      @GeniusMBM Před měsícem

      I think those small tangents can be helpful and insightful. You can always skip parts you don’t find necessary.

  • @nobudev
    @nobudev Před měsícem

    More elixir/phoenix content please 🙏

  • @jsonkody
    @jsonkody Před 4 měsíci

    42:35 When I think about it this make sense since you know that every int could be float without loosing information AND integer division really looks more like a nonsense/bug than a feature

  • @nayeemurrahman8221
    @nayeemurrahman8221 Před 6 měsíci

    I am always getting this error on mac m1, when I do anything in the "mix new project" folder, eg: mix compile,
    Compiling 1 file (.ex)
    == Compilation error in file lib/learning.ex ==
    ** (ArgumentError) could not call Module.put_attribute/3 because the module Learning.MixProject is already compiled
    (elixir 1.15.7) lib/module.ex:2310: Module.assert_not_readonly!/2
    (elixir 1.15.7) lib/module.ex:2007: Module.__put_attribute__/5
    lib/learning.ex:2: (module)

  • @chopinplaya
    @chopinplaya Před 4 měsíci

    So how do you get the datetime code to compile without using bang? 50:40

  • @dumble_dev
    @dumble_dev Před 6 měsíci

    Elixir + phoenix, count me Subscribed🥳

  • @ya64
    @ya64 Před měsícem

    It’s the first time I heard hexadecimal being referred to as just “hex”.

  • @ksaitor-tv
    @ksaitor-tv Před měsícem

    Awesome tutorial! But is it “put s” is it “puts”? 😅

  • @kangwamark24
    @kangwamark24 Před 2 měsíci

    When I type in “iex -S mix” it keeps bringing an error saying a parameter cannot be found that matches parameter name ‘s’

  • @hikaru_hajime941
    @hikaru_hajime941 Před 6 měsíci +4

    CLASH ROYALE/CLASH OF CLANS REF!!!!?

  • @PaulSebastianM
    @PaulSebastianM Před měsícem

    Elixir looks a lot like F#, except it is clearly influenced by Erlang, which it runs under.

  • @TJ-hs1qm
    @TJ-hs1qm Před měsícem

    friendly reminder on how floating point works:
    czcams.com/video/zzSmQvMOrm4/video.html
    Notice that a function/calculation returning 2.0f could mean that the true result of the calculation was 1.99999999
    So the number 1.99999999 could be rounded to 2.0f when represented in single precision floating point.
    But a function returning an integer 2 will unmistakably represent the exact value 2.

  • @edgardevelops
    @edgardevelops Před 4 měsíci

    Anyone experiencing ElixirLS cannot connect to server. Just downgrade the plugin to v0.13.0

  • @JohnDoe-np7do
    @JohnDoe-np7do Před měsícem

    Wow who wouldve taught learning crystal for fux would be beneficial 😂

  • @wassimyazbekk
    @wassimyazbekk Před 6 měsíci +2

    3rd viewer

  • @earl2907
    @earl2907 Před 6 měsíci

    Trimming armor 5k

  • @kidusabebe2645
    @kidusabebe2645 Před 6 měsíci

    DAY 1 OF LEARNING ELIXIR.
    DEC-15-2023

  • @user-xq4ro9wt6s
    @user-xq4ro9wt6s Před 6 měsíci +2

    hmm functional programming, his last name is "Curry" ... hmm

    • @AIMadeSimple007
      @AIMadeSimple007 Před 6 měsíci +1

      So he should implement function currying in Elixir :)

  • @andrew1550
    @andrew1550 Před 5 měsíci

    Elixir triggers me, I thought this was a functional language. `Enum.each(array, fun)` is completely wrong! It should be `Enum.each(fun, array)`. How else can you compose functions together? Is there even currying?

    • @user-rl7hm7ix5n
      @user-rl7hm7ix5n Před 4 měsíci

      There is no automatic currying in elixir. But even with currying, there's no reason why each(arr, fn) would be "completely wrong". Wanting to curry just each(arr) and composing it with another function is something that happens, as far as composability goes there's no rule about what should come first.
      The order of arguments is a design choice based on what makes sense for the language (taking into account for instance what is the most common usage).
      It just happens that in elixir it's way more common to want the array in the first argument because of the pipe operator.

    • @Devfromnull
      @Devfromnull Před 4 měsíci

      The main reason is to facilitate piping using the pipe |> operator. This passes the result of the previous function call into the next function call. Its very common to see patterns like this:
      Enum.map(items, fn item -> item.id end)
      |> String.downcase()

  • @shubhampawar7921
    @shubhampawar7921 Před 3 měsíci +1

    An absolute useless video. I got my hopes but the video teaches you nothing about elixir but rather how to use built-in packages to do meaning less tasks.
    Didn't fully cover pattern matching, pipelines, concurrency , etc. did not cover what makes elixir stand out instead just repeated things that you can just read documentation about.
    This could very well be python tutorial or any other language tutorial because the real meaning of the language is not shown at all.
    To anyone reading I would recommend reading either the Programming in Elixir 1.6 or Adopting Elixir(my favourite) which give a great overview of why elixir and how to elixir

    • @any_username
      @any_username Před měsícem +1

      All the video courses I've encountered, whether short or long, free or paid, have been much less helpful than almost any book on the subject. Books provide more organized, refined, and detailed coverage, and all the important concepts and contexts can be found within them. Still, some people are more comfortable with video or narrated formats rather than sitting with books (even if it sounds... weird... for someone who will inevitably have to read many manuals/guides/references as part of their development job). So, if someone needs a refresher or is okay with picking up bits and pieces on the go, this video might be useful to them.

  • @suicidalfish
    @suicidalfish Před 2 měsíci

    Thanks Caleb!