10 ms·
The BEAM is great, but the Elixir language itself is really what spoiled me. After having written ruby for years, I really enjoy what the Elixir language has to
by grantjpowell 6y ago
The BEAM is great, but the Elixir language itself is really what spoiled me. After having written ruby for years, I really enjoy what the Elixir language has to offer. Pattern matching[0] and the pipe operator[1] eliminate a ton of intermediate variables. Functional programming took a while to get used to, but I'm really starting to like thinking immutably. Now that I'm more advanced in the language, I'm starting to get into the Lisp style hygienic (and unhygienic macros)[2]. The Elixir standard library is really well done, everything is consistent and well documented. Elixir language level built in libraries like ExUnit[3] and Embedded Elixir (EEx)[4] are very high quality. For me the BEAM is just the cherry on top, I really like the Elixir language itself!
[0] https://elixir-lang.org/getting-started/pattern-matching.html https://elixir-lang.org/getting-started/pattern-matching.htm...
[1] https://elixirschool.com/en/lessons/basics/pipe-operator/ https://elixirschool.com/en/lessons/basics/pipe-operator/
[2] https://elixir-lang.org/getting-started/meta/macros.html https://elixir-lang.org/getting-started/meta/macros.html
[3] https://hexdocs.pm/ex_unit/master/ExUnit.html https://hexdocs.pm/ex_unit/master/ExUnit.html
[4] https://hexdocs.pm/eex/EEx.html https://hexdocs.pm/eex/EEx.html
- jefflombardjr 6y agoCan you recommend any learning materials that were particularly useful to you?
- SmooL 6y agoHonestly the docs themselves are excellent https://elixir-lang.org/getting-started/introduction.html https://elixir-lang.org/getting-started/introduction.html
- s3cur3 6y agoIt’s the only language I’ve used where just going step by step through the official docs was enough to pick up the language. Took me maybe a day and a half.
- searchableguy 6y agoThe beam book: https://github.com/happi/theBeamBook https://github.com/happi/theBeamBook
- AlchemistCamp 6y agoFor me personally, Programming Elixir and Programming Phoenix, from the Pragmatic Bookshelf, were both very useful. Quite a few of my students have said great things about Phoenix in Action, from Manning, and it looks to me like a fantastic resource for beginners. Elixir in Action is also top-notch and will show you what's special about the BEAM.
- bigbassroller 6y agoTo those out there learning from “Programming Phoenix”, although is the best resource for lay of the land of Phoenix, the content is getting out dated with the rise of auth generator and the context model has also changed a lil bit. It takes diligence in following along and referencing the documentation to not get stuck. Great book though.
- categorybooks 6y agoWhat would you suggest as a more up-to-date alternative?
- AlchemistCamp 6y agoAnything written after 1.3 is almost completely applicable today. The auth generator is just a new feature. Learning how the pieces work from the book is still worthwhile. My advice if you want to avoid confusion as you're learning is to just use the same version of Phoenix the book does! (1.4 in this case) After you go through it, you can follow the official upgrade guides in just a few minutes.
- mercer 6y agoI'll add that learning how to roll your own auth with the book and /then/ using the auth generator is a great learning experience.
- jspash 6y agoWithout a doubt, this was one of the best courses I've done in any language. https://www.udemy.com/course/the-complete-elixir-and-phoenix-bootcamp-and-tutorial/ https://www.udemy.com/course/the-complete-elixir-and-phoenix...
- atulatul 6y agoDisclaimer: This is primarily about language... not BEAM as such. Also, links are inline. I liked the book Programming Elixir 1.6 By (Pragmatic) Dave Thomas. Solved the exercises. Did not quite find use for macros. And I have not done any production projects. The pragmatic studio has some courses for the space: elixir, OTP, LiveView, etc. and free tutorials. The quality is good. Simon Thomson's course on futurelearn was also good. https://pragmaticstudio.com/ https://pragmaticstudio.com/ and https://www.futurelearn.com/ https://www.futurelearn.com/ A recurrent problem for me though has been to write an application. I used to write java's petclinic/petstore application when learning a framework, library, etc. Have not been able to do so with some other ecosystems... perhaps laziness, perhaps have not been able to answer why. And languages in isolation have not clicked for me much apart from maybe making me think in different ways. Why does this Erlang/Elixir/BEAM interest me then? A colleague who talked highly of it... Then there's Joe, his talks, and Alan Kay's recommendation has Joe's thesis on recommended reading list: https://news.ycombinator.com/item?id=20653453 https://news.ycombinator.com/item?id=20653453 There is also Erlang Masterclass series 1,2,3 starting here: https://www.youtube.com/playlist?list=PLR812eVbehlwEArT3Bv3UfcM9wR3AEZb5 https://www.youtube.com/playlist?list=PLR812eVbehlwEArT3Bv3U...
- Kaze404 6y agoThe killer feature for me was the documentation. I got thrown into an Elixir application that uses Ecto and Phoenix and literally everything I ever had to do was documented and explained in Hexdocs.
- OkayPhysicist 6y agoSeriously, the Elixir documentation should be considered the gold standard. Almost everything is documented with exactly what kind of situations the library/module/function should be used for, combined with illustrative examples showing how it should be used.
- pepesza 6y agoComing from Erlang to Elixir - I find Elixir docs lacking in both coverage and terseness.
- yawboakye 6y agoI could agree. Coming to Erlang from Elixir, I truly appreciate the simplicity and small size of the Erlang language. Making it possible to write exhaustive documentation. In fact, in Joe's book he defers a lot to the online docs/manual for in-depth treatment of a lot of topics.
- strzibny 6y agoWhile you might be right, I dislike the style of Erlang docs.
- conradfr 6y agoIMHO many function docs could have more examples. Especially for a dynamic language which uses tuples/maps for a lot of arguments.
- hazz99 6y agoI love Erlang/Elixir and want to use it more, but I just don’t have any good use cases for it! I don’t often make big concurrent back ends - maybe REST APIs, but that didn’t seem easy last time I tried.
- elcritch 6y agoPhoenix takes a bit of learning, but it’s not too bad. It also has pretty decent generators to create JSON/rest endpoints.
- OkayPhysicist 6y agoPhoenix takes a little bit of reading to figure out (though the documentation is brilliant, and really easy to read). Once you understand how it works, though, creating an API is extremely straightforward. It's amazing.
- hazz99 6y agoI just couldn’t get past ecto! It never seemed to “click” for me. Maybe I need to go back and learn it more in-depth, it sounds like it’ll be fantastic once I get the hang of it.
- dnautics 6y agoIt's definitely not an orm, as it was stolen from c# linq. Imo this is actually much better than an orm because it really hits home that the data in memory are stale as soon as you receive them because database transactions are explicit, and not hidden behind getters and setters. ORMs can get you into trouble because they try really hard to hide the problem of distributed state and sources of truth.
- hvis 6y agoComing from (the much-maligned) ActiveRecord, I wasn't really impressed. It has this cute macro-based syntax, and that seems to inform even the "functional" API as well. Yet when you I wanted to do something just a bit more advanced like joining on an association whose name I don't know in advance (or, say, want to parameterize the function with), I had to resort to writing a macro myself and then eval-ing it an runtime.