5 ms·
I am learning Elixir... and I really get a kick out of it. It's zany and pushes me to bend my brain. It's like sort of Dr Seuss riff for an experienced program
by travisgriggs 5y ago
I am learning Elixir... and I really get a kick out of it. It's zany and pushes me to bend my brain.
It's like sort of Dr Seuss riff for an experienced programmer.
So you've done a lot of program?
Can you, can you, without a reference?
Could you, could you, with nary a pointer?
Will you, will you, use no return?
No for loop? And less control flow goop?
I had to switch back to do some Python and Swift maintenance/development last week after 2 solid weeks of climbing the Elixir newbie staircase, and I was amazed at how much code I write in "normal" languages whose sole purpose is to decide where the code goes next. For the first hour or two my brain kept screaming "why do you keep putting all of these if blocks everywhere?!"
- 1MachineElf 5y agoI really felt that story. Mind if I ask, where are you working and what was the Elixir project?
- travisgriggs 5y agoThe project is ongoing; I work at an automation company :)
- truth_ 5y agoWhat are the best resources to learn Elixir for a programmer? And what are you using?
- ddek 5y agoI liked the book ‘Elixir in Action’. It shows some of the language then immediately jumps into building a way too overcomplicated program (a distributed TODO list) that nicely shows off the features of elixir. After that I just read some codebases. I find elixir codebases extraordinarily easy to read. The language does a great job of making ‘the good way’ also ‘the easy way’, and the linear nature of functional code is much clearer than the usual indirect dependency injected hell. Papercups is a fairly good starting point I think. I liked the livebook codebases too.
- swhitf 5y agoI learned using https://alchemist.camp/ https://alchemist.camp/. Some content is premium but the free stuff is very good if you don't want to commit.
- atulatul 5y agoI used Dave Thomas's Programming Elixir > 1.6 and can recommend it highly for learning the language. As others have mentioned on some other threads, learning about OTP, Genserver is really worthwhile. Apart from language, the book teaches a bit about that too. But maybe just enough. https://www.amazon.com/gp/product/B07DP8Y2GJ https://www.amazon.com/gp/product/B07DP8Y2GJ
- aroccolli 5y agohttps://serokell.io/blog/learn-elixir https://serokell.io/blog/learn-elixir - I've made a guide to Elixir resources.
- theagilecoder 5y agoI learned the concepts from dave thomas's book and then drilled them into my mind using exercism.io
- travisgriggs 5y agoThe Elixir-lang Slack channel. The Dave Thomas book. Lots of trial and error in iex. For me, I have to a meaningful thing to do with a language/platform to learn it. The To Do/hello world apps just do nothing for me.
- Maultasche 5y agoI've been writing a lot about Elixir as I've been learning it: https://inquisitivedeveloper.com/ https://inquisitivedeveloper.com/. The idea is for people to learn Elixir along with me as I learn it. It's not a quick start though: I really dig into how Elixir works and move fairly slowly. I've finished covering the language itself, and I'm about to move into the OTP functionality that's inherited from Erlang.
- AlchemistCamp 5y agoElixir in Action is in a class by itself. I'd also recommend Phoenix in Action as a nice quick start and the many, many Elixir books from Pragmatic Bookshelf. I've read almost all of them and all of them are well-written and well-edited. Also, the official docs and guides are fantastic once you have your bearings.
- slver 5y agoHow does erlang eliminate if blocks.
- ratww 5y agoWith Pattern Matching
- slver 5y agoHm that’s if expressions.
- dnautics 5y agotechnically, they are case statements. Even the if is just sugar over case.
- weatherlight 5y agohttps://erlang.org/doc/reference_manual/expressions.html#pattern https://erlang.org/doc/reference_manual/expressions.html#pat... it's more like the = sign in math mathematics. 2x = 10 we can deduce x = 5 Here's an elixir example where a bunch of "if/else" blocks are refactored to use case statements, and then from case statements to pattern matching. https://nickjanetakis.com/blog/refactoring-elixir-code-if-cond-and-pattern-matching https://nickjanetakis.com/blog/refactoring-elixir-code-if-co...
- saba2008 5y agoAnd if statement is just syntax sugar over goto. After using mostly Erlang for several years, 'if' feels like ugly atavism.
- cannabis_sam 5y agoNo..? If-expressions is a specialized version that only works on booleans, pattern matching is a more general concept (that of course can be used to implement if-expressions, but so can pure lambda calculus)
- travisgriggs 5y ago