Elixir Programming Introduction - Complete Tutorial!
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
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?
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.
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
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.
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!!!
Não é engraçado aprendermos em inglês sobre uma linguagem BR?
@@eacarvalho it sure is hahaha
"And for seconds.... I will just call it seconds for *ease of pronunciation* " - You got a laugh out of me
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.
Saw it on the stack overflow developer survey and figured I’d check it out. Thanks for the lesson!
Best elixir video, thank you again your videos are always of huge help and a great starting point for learning new things
It's a great tutorial. Works well for people without programming basses, and excelent for people who code. I mean, just need the sintaxis
Heck ya, I'm here for it 🤘🏼
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!
thanks m8, i tried two different teachers but your explanations are best so far!
yes! much more elixir content please
Loved your C series and now your doing elixir. I just started learning it as a functional language. W channel
Thank you so much Caleb❤
Great video, would definitely like to see more
Awesome. Since your C series was so good I am going to check this out.
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
More content on elexir would be much appreciated, saw your new video its awesome
Great stuff, thanks for sharing with us
Banger! 🔥
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!!
Great video. I think it would've been really useful to show how to use functions defined in a module in another file.
Thank you!
Def love this...
Thank you very much
Nice!
On Windows you would have to add .bat so: iex.bat -S mix
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
Nice job! Caleb Curry!
Brilliant
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.
I think those small tangents can be helpful and insightful. You can always skip parts you don’t find necessary.
More elixir/phoenix content please 🙏
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
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)
So how do you get the datetime code to compile without using bang? 50:40
Elixir + phoenix, count me Subscribed🥳
It’s the first time I heard hexadecimal being referred to as just “hex”.
Awesome tutorial! But is it “put s” is it “puts”? 😅
When I type in “iex -S mix” it keeps bringing an error saying a parameter cannot be found that matches parameter name ‘s’
The ‘S’ needs to be uppercase
CLASH ROYALE/CLASH OF CLANS REF!!!!?
For sure
Elixir looks a lot like F#, except it is clearly influenced by Erlang, which it runs under.
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.
Anyone experiencing ElixirLS cannot connect to server. Just downgrade the plugin to v0.13.0
Wow who wouldve taught learning crystal for fux would be beneficial 😂
3rd viewer
I was 1st
Trimming armor 5k
DAY 1 OF LEARNING ELIXIR.
DEC-15-2023
hmm functional programming, his last name is "Curry" ... hmm
So he should implement function currying in Elixir :)
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?
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.
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()
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
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.
Thanks Caleb!