Тёмный
German Velasco
German Velasco
German Velasco
Подписаться
Learning and teaching better ways to build software.

Elixir Streams | www.elixirstreams.com
Website | germanvelasco.com
Twitter | twitter.com/germsvel





Which to use? and/or vs &&/|| #elixirlang
3:45
2 месяца назад
Strong Arrows for Elixir Gradual Typing
4:30
8 месяцев назад
Elixir's intersection types
2:52
9 месяцев назад
Phoenix Forms Backed by Embedded Schemas
2:45
10 месяцев назад
Phoenix forms without changesets!
3:00
10 месяцев назад
ExUnit. It's an app!
1:19
10 месяцев назад
Комментарии
@pertsevds
@pertsevds 2 дня назад
Hello-hello ❤
@pauloffborba
@pauloffborba 7 дней назад
Great❤
@geraldodev
@geraldodev 10 дней назад
A follower :)
@DenysGonchar-sg7br
@DenysGonchar-sg7br 12 дней назад
Sorry, but that is bad advice. all examples in the video trigger runtime error. it must be %StructName{struct | field: new_value} instead, this would cause compilation error on typo.
@germanvelasco
@germanvelasco 11 дней назад
I love that one. That's why it's on the video. Some people say they don't like it b/c it's not pipeable -- hence the alternative to Map.replace!.
@DenysGonchar-sg7br
@DenysGonchar-sg7br 11 дней назад
@@germanvelasco What's on the video is map update syntax %{any_map_or_struct | field: new_value}, and it's not the same.
@germanvelasco
@germanvelasco 7 дней назад
@@DenysGonchar-sg7br oh no! That's a mental lapse on my side during the video. That's definitely what I intended to record 😃Thanks for clarifying!
@g54pcys
@g54pcys 14 дней назад
Is your Vim config publicly available anywhere? I'd love to see your Vim Elixir setup.
@juliolinarezescobar
@juliolinarezescobar 14 дней назад
an awesome elixir pills
@solvm1652
@solvm1652 14 дней назад
Preach
@germanvelasco
@germanvelasco 14 дней назад
😆
@Rossvanzyl
@Rossvanzyl 14 дней назад
fantastic tip!
@germanvelasco
@germanvelasco 14 дней назад
Thanks! 🙌
@pauloffborba
@pauloffborba 14 дней назад
Great tips ❤
@Samuel-pg7tg
@Samuel-pg7tg 14 дней назад
Excellent
@nesocode
@nesocode 15 дней назад
Your short videos are goldmine for Elixir and Phoenix. Thank you.
@germanvelasco
@germanvelasco 14 дней назад
Thank you! Love to hear that. 🙌
@apoorvgupta9680
@apoorvgupta9680 15 дней назад
what does a=v() does?
@elixiradolfont
@elixiradolfont 22 дня назад
Great video. Great examples. A minor mistake: 3:00 You said: "or is expecting booleans on both the left and the right hand side and the same is true of and" But that's not true. When the first value is a boolean, the second can be a non boolean. iex(1)> true and 1 1 iex(2)> false or 2 2
@germanvelasco
@germanvelasco 21 день назад
Yeah, thanks for mentioning that. I realized that after the recording. Couldn't fix the video without re-recording, but I added a note about that at the bottom of the video notes in Elixir Streams -> www.elixirstreams.com/tips/and-or-vs-&&-comparison
@victorkarlsson5183
@victorkarlsson5183 22 дня назад
pro tip! thanks :)
@germanvelasco
@germanvelasco 21 день назад
🙌 glad to hear!
@victorkarlsson5183
@victorkarlsson5183 22 дня назад
Your videos are amazing! I really had a hard time getting how this worked, but your video perfectly explained this. I've tried and reference the beats project for some navigation, but couldn't figure out how they handled the hooks, now it make sense! I'd love a video showing how to handle pubsub / events via hooks for navbars / notifications. keep up the good work :)
@germanvelasco
@germanvelasco 21 день назад
Thanks for the kind words! Always good to hear that the videos are helping! 🙌 And thanks for the suggestions! I'll keep those in mind.
@diegolcdtm
@diegolcdtm 23 дня назад
Amazing!
@pauloffborba
@pauloffborba 24 дня назад
A very small tip, use recompile without parenthesis inside iex. reco + tab will autocomplete too. ❤ Great video, btw
@pauloffborba
@pauloffborba 25 дней назад
Great ❤
@mythrando
@mythrando 26 дней назад
Amen, this is awesome! Please keep sharing small but incredibly interesting and useful Elixir knowledge!
@germanvelasco
@germanvelasco 26 дней назад
Will do! Made 85 so far, so I hope to keep going. All of them are on ElixirStreams.com (if you're interested)
@EdouardMenayde
@EdouardMenayde Месяц назад
Nicely explained, thanks
@germanvelasco
@germanvelasco Месяц назад
Glad to hear it! 🥳
@justmrmendez
@justmrmendez Месяц назад
That's genius
@user-tb4ig7qh9b
@user-tb4ig7qh9b Месяц назад
The video is perfect but have one downside if you make PhoneNumber.parse return a result tuple instead of the value will be better sometimes the input is binary but it is a valid phone number
@jeremy8364
@jeremy8364 Месяц назад
You can also use String.split/3 for this case, String.split("(Hello)", ["(", ")"], trim: true)
@derekbarbosa
@derekbarbosa Месяц назад
Just started my elixir journey (my day job is kernel stuff) as I found so many similarities between the BEAM VM and some of the scheduling "internals" in Linux Kernels. I'm a decent way through Dave Thomas' Programming Elixir Book (a very good read). Anyway, 01:35 blew my mind. Your short video just did a massive stack unwind on a lot of the "fundamentals" of basic program structure. Man am I glad the RU-vid algorithm brought me here.
@germanvelasco
@germanvelasco Месяц назад
Love to hear it! 🥳
@dhonymadruga
@dhonymadruga Месяц назад
I’ve learning a lot watching these videos. Great work. Thanks.
@germanvelasco
@germanvelasco Месяц назад
💪love it!
@awksedgreep
@awksedgreep Месяц назад
I am currently interested in helping modernize a library(snmpex) that has a test for a map order post OTP 26. I wonder if you had this issue after and what are some common fixes for exunit testing for maps that are now unordered.
@armanmirk
@armanmirk Месяц назад
Thanks for sharing.
@germanvelasco
@germanvelasco Месяц назад
Always happy to! 🥳
@aldrinalainroncocarrillo8076
@aldrinalainroncocarrillo8076 Месяц назад
Nice, thanks
@aarroisi
@aarroisi Месяц назад
I hope that it will be possible to separate the type per each function clause and automatically make all function clause's types are combined with an "and". It will be a lot cleaner.
@MarkMark
@MarkMark 2 месяца назад
Does any of the reconnect logic work if the client reconnects to a different server instance, or across deployment?
@germanvelasco
@germanvelasco 2 месяца назад
I believe it does (so long as your server can rerender the form data with the phx-auto-recover event). The reconnect logic is really happening on the client side. It just sends the latest changes again on reconnect. So your server (regardless of node) has a chance to rerender the page with the data the client just sent.
@jajajaj666
@jajajaj666 2 месяца назад
Can be used in C language?
@germanvelasco
@germanvelasco 2 месяца назад
This is Elixir. Not sure what you'd use in C.
@tkemaladze
@tkemaladze 2 месяца назад
Hello Thanks for the video. What about virtual scroll? where can I find implementation information about it?
@germanvelasco
@germanvelasco 2 месяца назад
I think this is a good place to start hexdocs.pm/phoenix_live_view/bindings.html#scroll-events-and-infinite-stream-pagination. Hope that helps!
@tkemaladze
@tkemaladze 2 месяца назад
@@germanvelasco thanks a lot
@solvm1652
@solvm1652 2 месяца назад
oooooh
@msw10100
@msw10100 2 месяца назад
Nice. Thanks!
@Kryptonis
@Kryptonis 2 месяца назад
Awesome tip, I use then/2 sometimes but tap/2 especially looks great!
@auraSinhue
@auraSinhue 2 месяца назад
I was not aware of those helpers, really cool
@Khari99
@Khari99 2 месяца назад
Don't know if I love it or hate it lol. If you go overboard, it can look like a ton of nested ternary statements. But for simple functions, this is pretty cool.
@germanvelasco
@germanvelasco 2 месяца назад
😅 I don't think it's "optional" in the sense that we should write Elixir code like that. It's just interesting to know that it's syntactic sugar. And it's helpful if you do any metaprogramming.
@akaibukai
@akaibukai 2 месяца назад
Wow.. Never thought of a 1min video to be so efficiently useful! Thanks for the tips!
@germanvelasco
@germanvelasco 21 день назад
Love to hear it! 🙌
@akaibukai
@akaibukai 2 месяца назад
Hi German! Thanks for the videos.. Just watched your DDD talk and it was so spot on! And I came here from your Elixir Streams Blog. (Side not, can you add the publishing date of your posts, just to have a sense of when you released them.. E.g. I clicked the video just to see it was posted a day ago!.. Anyway.. Keep up the good work!)
@germanvelasco
@germanvelasco 21 день назад
Awesome, thank you!
@mythrando
@mythrando 2 месяца назад
Nice video. Love how concise and clear it is!
@germanvelasco
@germanvelasco 2 месяца назад
Thanks! Glad to hear it.
@thehibbi
@thehibbi 2 месяца назад
I love these short tips, thanks :)
@germanvelasco
@germanvelasco 2 месяца назад
Glad to hear it! 🥳
@aislanarislou
@aislanarislou 2 месяца назад
In this example how the main function will return the error paths coming from the helper functions? What I've been using is to put a "main else" in the with statement to do just that.
@germanvelasco
@germanvelasco 2 месяца назад
Yes, by default `with` without an `else` clause just returns the "other" paths
@vic9380
@vic9380 3 месяца назад
If we need to add @spec to the main func, the return types would grow into more options. Would it be nice to add just 1 else like 'else -> {:error, "Something is wrong"}' for the main func, so the caller of main func doesn't need to deal with too many possibilities?
@TimGoodwin-zw6jg
@TimGoodwin-zw6jg 3 месяца назад
any reason beyond style that you’d use a when guard rather than pattern match the exact email inline?
@germanvelasco
@germanvelasco 2 месяца назад
No reason. I did that just for the example, but you could use the exact email too. Good point!
@lukabodroza
@lukabodroza 3 месяца назад
Oh cool, I didn't know you didn't have to specify the else part. I was redundantly writing error fetchers from private methods.
@germanvelasco
@germanvelasco 2 месяца назад
Yeah, not necessarily intuitive, but it's very nice that you don't have to!
@pauloffborba
@pauloffborba 3 месяца назад
Thank you!
@germanvelasco
@germanvelasco 3 месяца назад
Very welcome!
@shadow.edgehog
@shadow.edgehog 3 месяца назад
You look like you're being held hostage
@germanvelasco
@germanvelasco 3 месяца назад
Finally someone noticed!
@samuelvishesh
@samuelvishesh 3 месяца назад
But what happens when the delete call fails for some reason?
@MingyarFurtadoMingyar
@MingyarFurtadoMingyar 3 месяца назад
Thanks!
@madlep
@madlep 3 месяца назад
Definitely this 👍. Pattern I've settled on is ONLY use function head pattern matching for dispatch logic controlling which function body to use. Any extraction of data from the function arguments should happen in the function body. Also use of defguard/1 and defguardp/1 to communicate the intent of complex guard clauses is useful.
@germanvelasco
@germanvelasco 3 месяца назад
Love it!