17 ms·
Elixir v1.10
- 7777fps 7y agoprevious discussion from the release candidate: https://news.ycombinator.com/item?id=21981908 https://news.ycombinator.com/item?id=21981908 The new sort api seems like a significant improvement.
- happy_path 7y agoHaving learnt Ruby and a bit of Erlang, I'm interested in Elixir so I fire this tangential question: How would you recommend to learn Elixir? And a follow-up: some ideas for personal Elixir-based projects?
- nbap 7y agoIMHO Elixir School is a great way to start: https://elixirschool.com/ https://elixirschool.com/ After that, I would recommend taking a look at Elixir in Action from Saša Jurić
- sbarre 7y agoI just started my Elixir journey late last year, and I've been using a combination of Elixir School[0], the Ecto guides[1] and a video course from Pragmatic Studio[2] that I picked up on sale back in December. The video course was a mixed bag but mostly useful. I am also new to functional programming so it was helpful for getting my head around a new way of planning my code but there were definitely chapters that were painfully basic and slow. So if you're already more advanced, it may not be as useful to you. That said, they did a good job of introducing certain key Elixir/Erlang concepts by getting you to build functionality "by hand" and then refactoring it into the standard library functionality, so you can understand how it works under the hood, while also learning how to use the built-in library modules in real code. Elixir has some pretty important concepts around concurrency, state management, and process supervision that are worth exploring in detail before you dive in too deep. In terms of personal projects, I always try to re-implement an existing project when I tackle a new language. Right now I'm working on a simple scraper/parser that uses a shared worker pool for concurrent post-processing of links scraped by the main thread. 0: https://elixirschool.com/ https://elixirschool.com/ 1: https://hexdocs.pm/ecto/getting-started.html https://hexdocs.pm/ecto/getting-started.html 2: https://pragmaticstudio.com/courses/elixir https://pragmaticstudio.com/courses/elixir
- cambalache 7y agoCould you explain a little bit more what you didnt like about the video course. No affiliation but I want to enter this area and I always looking forward to understand what make a course bad/good for a student.
- sbarre 7y agoSure. Like I said I think overall the video course was well done, and I'm still glad I took it. Honestly, I think my gripes are mostly subjective, and this will always be the case with one-size-fits-all training. Certain aspects that are covered by the course were things I was already quite familiar with, so I was itching to skip ahead. There was nothing wrong with the work itself or the instructors. That stuff was very good.
- cambalache 7y agoYes, it makes sense. I think both their framework courses (Rails/Phoenix) are solid but pretty basic. They have a nice production quality so there is definitively a lot of worth in them.
- emerongi 7y agoThe official Elixir guide runs you through the basics all the way to the more complicated concepts: https://elixir-lang.org/getting-started/introduction.html https://elixir-lang.org/getting-started/introduction.html For a fun and complicated Elixir project, you could try building a process pipeline that uses all your CPU cores to crunch some data. Look into Elixir Flow [0], for example, which has a fun guide on counting words in a file. Elixir & Phoenix work well for web projects. The Phoenix framework is very well built on a solid core; it differs from other frameworks in that it feels more like a library, rather than a monstrosity that forces you to bend your application to its requirements. There's a lot of nice utilities that are easily pluggable and writing "plugs" yourself is rather simple as well. Phoenix has served me well when building microservices, too. Elixir's biggest deficiency is that it does not have a proper type system. There is a very basic one, but it doesn't really help a whole lot. When working with Elixir, a type system is something that I miss the most. The way that Erlang & Beam VM are built makes it slightly easier to deal with errors at run-time, but catching stupidities at compile-time would still be immensely valuable. [0] https://hexdocs.pm/flow/Flow.html https://hexdocs.pm/flow/Flow.html
- ashton314 7y agoHave you looked at Dialyxir? [1] It makes Elixir feel like a structurally typed language. I use it at work, and it catches a lot of inconsistencies at runtime. [1]: https://github.com/jeremyjh/dialyxir https://github.com/jeremyjh/dialyxir
- deleted 7y ago[deleted]
- lawik 7y agoI'll second the Elixir guide and maybe go on to the Phoenix guide for web dev. I just read enough to get going and then start building, then go back, read more, fix what I built. But people learn differently. I don't really get through books and I haven't needed courses aside from random examples of how to do some things.
- dragosmocrii 7y agoOnce you go through the official Elixir crash course, head over to Exercism. Best place to learn by doing!
- 7777fps 7y agoThe "introduction to mix" was particularly fun as a language introduction: https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html https://elixir-lang.org/getting-started/mix-otp/introduction... It's a short project in which you create a homemade key/value store application. What's illuminating coming from elsewhere is how much it "just works" across the network and with multiple nodes including grace under failure.
- neillyons 7y agoAlchemist Camp has good video tutorials https://alchemist.camp https://alchemist.camp Also this blog post helped my understanding http://www.petecorey.com/blog/2019/05/20/minimum-viable-phoenix/ http://www.petecorey.com/blog/2019/05/20/minimum-viable-phoe... Phoenix LiveView [0] is really exciting to try out in Elixir. I'd recommend building an auto updating dashboard. I had a micro controller that had various sensors on it that I connected to over a serial port using circuits_uart[1]. I then read the sensor values and displayed them on a LiveView dashboard. Totally pointless but super fun :) [0]: https://dockyard.com/blog/2018/12/12/phoenix-liveview-interactive-real-time-apps-no-need-to-write-javascript https://dockyard.com/blog/2018/12/12/phoenix-liveview-intera... [1]: https://github.com/elixir-circuits/circuits_uart https://github.com/elixir-circuits/circuits_uart Sidenote. If anyone has any Elixir freelancing work I can do send me an email. Email in my HN bio.
- happy_path 7y agoThanks fellow person. The idea of having a project-based course like Alchemist is just was I was looking for.
- AlchemistCamp 7y agoGreat to hear! Feel free to ask questions on the site if you get stuck anywhere. Or, if you want to dive straight into the free screencasts, this YT playlist has them in order: https://www.youtube.com/watch?v=G3JRv2dHU9A&list=PLFhQVxlaKQEl_-IPHs3TVLJDH64_ddSQP&index=2 https://www.youtube.com/watch?v=G3JRv2dHU9A&list=PLFhQVxlaKQ...
- dnautics 7y agoif you like coding the happy path, you'll really like elixir!
- pull_my_finger 7y agoThis is a course a few friends are working through and they recommended it highly. https://codestool.coding-gnome.com/courses/elixir-for-programmers https://codestool.coding-gnome.com/courses/elixir-for-progra...
- AlchemistCamp 7y agoI get a number of learners on my site who have previously gone through that course and they've had good things to say about it! Its author—Dave Thomas—also wrote prag prog's Programming Elixir book, which I found very helpful a few years ago.
- nickjj 7y agoI would suggest this in order: 1. Figure out what you want to build 2. Read the getting started docs a bit 3. As you figure out which features you want, look up things on a need to know basis And repeat that loop until your project is done. As for learning material to help with step #3, assuming it's a web app, personally I found looking at the source code for https://github.com/thechangelog/changelog.com/ https://github.com/thechangelog/changelog.com/ to be highly valuable. The Programming Phoenix 1.4 book is great too to fill in some gaps of a "self learner". Also Alchemist Camp is quite good for seeing how to do 1 specific thing or generally look for workflow / implementation ideas.
- matt_s 7y agoLots of good suggestions here. You mentioned Ruby so I am going to assume some usage of Rails. There is a good presentation from ElixirConf 2019 about learning Elixir first before diving into Phoenix. Keep that in mind as you think of personal projects.
- plainOldText 7y agoIf you really want to learn Elixir, you should learn enough Erlang prior, to get a better understanding of how Erlang/OTP all fits together. Thus, I would recommend the following structure: 1. Read Joe Armstrong's Book: Programming Erlang to learn the basics and the philosophy behind Erlang from one of its creators. [1] 2. Read Erlang and OTP in Action to learn more about the OTP (Open Telecom Platform), applications and gen_servers (which btw, you will find them all over). 3. Learn Elixir, perhaps from one of the books Elixir in Action [3] or Programming Elixir. [4] 4. Finally, start implementing your cool personal project. Ah, one more thing: Elixir School is also a wonderful resource with tons of information and examples [5] and of course the official Elixir website with its excellent docs. [6] ––– [1] https://www.amazon.com/Programming-Erlang-Concurrent-Pragmatic-Programmers-ebook/dp/B00I9GR4TW https://www.amazon.com/Programming-Erlang-Concurrent-Pragmat... [2] https://www.amazon.com/Erlang-OTP-Action-Martin-Logan/dp/1933988789 https://www.amazon.com/Erlang-OTP-Action-Martin-Logan/dp/193... [3] https://www.amazon.com/Elixir-Action-Sa%C5%A1a-Juri-cacute/dp/1617295027 https://www.amazon.com/Elixir-Action-Sa%C5%A1a-Juri-cacute/d... [4] https://www.amazon.com/Programming-Elixir-1-6-Functional-Concurrent/dp/1680502999 https://www.amazon.com/Programming-Elixir-1-6-Functional-Con... [5] https://elixirschool.com/ https://elixirschool.com/ [6] https://elixir-lang.org/ https://elixir-lang.org/
- alharith 7y agoThis makes me not want to learn elixir. Learning one language and becoming masterful at it is hard enough. There's too many "learn this language, but also this other language and platform"'s in my life (JVM-based work, and anything in the front-end JavaScript world it feels like these days). It just feels like you are telling people "Here, learn this language, but also learn the assembly instruction set for your architecture as well" -- that's not the reason I choose to use higher level language.
- dasil003 7y agoWhat if it saved you from having to learn kubernetes though?
- playing_colours 7y ago
- snake117 7y agoAlong with the other resources mentioned, I would check out https://elixircasts.io/ https://elixircasts.io/ I find the videos to be great, both in terms of quality and pacing. Make sure to use the coupon code 'elixirforum' (without quotes) to get 10% off!
- wefarrell 7y agoI went through a bunch of exercism problems and felt like I learned a lot about the language syntax and control flow (which I think is pretty awesome). However it doesn't teach you much about the concurrency model or Erlang/OTP, which I hear is the real reason for using it.
- pmarreck 7y agoI think it depends on how you learn. I like to get a "lay of the land" before I commit to a new lang so I read Dave Thomas' book on it while playing around with the language on small personal projects (same way I handled Ruby, read the Pickaxe book and did a few language experiments on my own). But YMMV. I will say this- once you read the book it becomes ENTIRELY obvious to you who has not, when they ask certain questions, like "what is a sigil?"
- dnautics 7y agoif you are a rubyist, I can't more strongly recommend watching this video, which has nothing to do directly with Elixir (in fact it precedes elixir by a couple of years) but if the topics that Bernhart (of wat fame) brings up resonate with you, then you will really like Elixir. https://www.youtube.com/watch?v=yTkzNHF6rMs&t=2252s https://www.youtube.com/watch?v=yTkzNHF6rMs&t=2252s
- waylandsmithers 7y agoAfter reading through the guides on the official website I went through the course on learnelixir.tv- basically the creator runs through each topic in the language in a series of videos in his code editor. I think it's $20 or so for permanent stream/download access and access to any new videos he puts out. (Maybe the creator is on HN?) I got most of my team up to speed on elixir this way.
- innocentoldguy 7y agoI have helped a lot of people learn Elixir and, in my opinion, Pragmatic Studio has the best video tutorial series. https://pragmaticstudio.com/courses/elixir https://pragmaticstudio.com/courses/elixir The Elixir course is $89.00, but you'll learn a ton about the language for that price. The course is worth every penny. NOTE: I'm not affiliated in any way with Pragmatic Studio. They just make excellent courses.
- _asummers 7y agoWoooo I have a feature in this release! Contributing to standard tooling feels good.
- anhldbk 7y agoCongrat :D
- sandGorgon 7y agoThis is the first release of Elixir after the Nubank acquisition of the parent company - http://blog.plataformatec.com.br/2020/01/important-information-about-our-elixir-and-ruby-open-source-projects/ http://blog.plataformatec.com.br/2020/01/important-informati...
- ilja 7y agoApparently José Valim is no longer at plataformatec: https://twitter.com/josevalim/status/1219264309202771968 https://twitter.com/josevalim/status/1219264309202771968 Now at https://dashbit.co/ https://dashbit.co/
- sandGorgon 7y agoWhoa. Then what did Nubank acquire then ? I thought it was the talent.
- brodock 7y agothey acquired the "Agile" managers
- ksec 7y agoThanks. I thought he joined NuBank.
- predators372 7y agoSo there are no more platformatec employees involved in Elixir now then?
- josevalim 7y agoIt is curious to see Plataformatec being referred to as Elixir's parent company but I guess it makes sense legally. Plataformatec does own the trademarks for the name and language - which we are currently working on moving the control to the Elixir Core Team. In terms of development, however, it is more of a shared custody by many community members and companies. For example, Elixir Core Team has 6 developers and only one of them was employed by Plataformatec (me). So I would describe Plataformatec as an incubator. Elixir wouldn't exist without their support but even back in 2013/2014 we already had other companies investing in the language and the ecosystem. An investment which has grown over the last years. Plus, I am still directly involved in the same capacity as always, as this release shows. :)
- alberth 7y agoNote as of v1.9, Jose said the language was feature complete. All subsequent releases will focus on improvements and bug fixes. Not new features. https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/ https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-releas... >> ”As mentioned earlier, releases was the last planned feature for Elixir [v1.9]. We don’t have any major user-facing feature in the works nor planned. I know for certain some will consider this fact the most excing part of this announcement!” Edit: fixed for clarity
- josevalim 7y agoI think the keyword in the v1.9 announcement was "major user-facing features". :) Back then we also said: > We will continue shipping new releases every 6 months with enhancements, bug fixes and improvements. I would say v1.10 is quite close to this sentiment: a bunch of improvements and enhancements but nothing really major. The main new feature in v1.10 is "compiler tracing" but that will be directly used by a small subset of the community, to improve the tooling, instead of being something everyone would use from the get go.
- alberth 7y agoJose I really love the years of work you’ve put into Elixir (and Phoenix as a framework). Can’t say thank you enough.
- jacquesm 7y agoHello Jose, first of all, thank you for Elixer and Phoenix. A question that has been bugging me for a long time why Phoenix (arguably, built on one of the most reliable and battle tested stacks) has a dependency on NPM, something that I'd rather not see on any of my computers at all. Would you care to give insight into how this decision was reached and what if anything can be done to do Phoenix development and deploys without any NPM dependencies? thank you!
- xyst 7y agoWhat’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?
- thomasfedb 7y agoAsking for "the advantage" is probably not quite the right question. Different toolbox, different tools, for different solutions to different jobs. Elixir runs on the Erlang VM, is functional, has a Ruby-like syntax.
- justaguyhere 7y agoHow easy (or hard) is it to learn Elixir for someone with Python/PHP/JS background and zero knowledge of functional programming? Also, are there job opportunities for Elixir or is it a niche language?
- the_gastropod 7y agoAs far as functional programming languages go, I think Elixir is probably one of the best intros: especially for someone coming from another dynamically typed language like Python or PHP. The syntax will be far less foreign than a language like Lisp or Haskell. You won't have to deal with types (though they are neat to learn, too). Elixir is not quite as popular as Go. But there are absolutely job opportunities out there. And huge projects currently using it (e.g., Discord). I wouldn't focus on needing there to be a job market to learn something new, though. You'll learn techniques and a new way of problem solving that will make you a better Python, JS, and PHP programmer, even if you never professionally work as an Elixir developer. The Introduction guide on the Elixir website is a really good place to get started. You should be able to pick up the basics pretty quickly: https://elixir-lang.org/getting-started/introduction.html https://elixir-lang.org/getting-started/introduction.html
- hopia 7y agoI don't really agree that Elixir is a good intro to functional languages. It doesn't really teach you much about the functional paradigm as Elixir is fairly imperative by nature. It focuses on practicality rather than adhering to the functional paradigm (lambda calculus etc.). That's probably the right choice for building highly concurrent industrial systems, but purely for learning about FP not quite as good as something like Elm would be.
- sysashi 7y agoI'm really exited about that pattern-match diffing improvement! Although finding green and red mismatches in pages of output of your data structure was fun :) .. no Thanks for the work on Elixir!
- playing_colours 7y agoA very interesting language on powerful platform with a promising web framework. Many saw it, myself included, as a Ruby / Rails Improved, and expected its quick growth. Unfortunately, initial enthusiasm a few years ago did lead to its wide adoption. I talked with a couple of companies that jumped on it initially, but later decided to move to Java, Kotlin, Go. The main reason was difficulty to hire engineers to scale up quickly (in Europe), not some technical disappointments. Sadly, it seems that being a scalable platform is not enough to scale up to business needs.
- bitscrapper 7y agoI recently had a convo with a company that moved into Elixir because they had an easier time hiring as they could tap into the local Ruby developers and into folks interested in functional programming (in France). Would you mind saying which country in Europe in particular? Was it also France?
- playing_colours 7y agoOne company in France, the other in Germany.
- elcritch 7y agoWeird, on the Elixir forums and slack channels there seems to be a fair number of developers working or wanting to work in Elixir. Perhaps the initial uptake in interest outpaced the developer interests in some areas. It'd be interesting to know what the community is like in Europe. Based on the recent formation of Dashbit [1] and larger companies like PepsiCo (?!) among others openly jumping onboard I think means Elixir has reached a clear point of sustainability for those willing to find (and train!) devs. Likely it'll never be RoR level, but I'm fine with that if it keeps the dev community more selective. Functional programming in general seems to be a bit of a self-selector. 1: https://elixirforum.com/t/jose-valim-announces-his-new-elixir-consultancy-dashbit/28414 https://elixirforum.com/t/jose-valim-announces-his-new-elixi...
- lawik 7y ago
- brintnc 7y agoanyone mind explaining the /# to me? like `Application.get_env/3`. been wanting to learn Elixir for awhile now, but didn't even know what do Google for that one.
- bcardarella 7y agoThis is Erlang function notation that Elixir inherited. The format is: `{ModuleName}.{function_name}/{arity}`
- pera 7y agoIt's called "arity": https://elixir-lang.org/getting-started/basic-types.html#identifying-functions-and-documentation https://elixir-lang.org/getting-started/basic-types.html#ide...
- brintnc 7y agonot sure how i made it through my entire CS degree without learning this term. either that or i just don't remember it. anyways, thank you! this is really useful even outside of Elixir.
- quaunaut 7y agoI've honestly never heard anyone who isn't an Elixir programmer use it. I wouldn't worry about not having heard it before.
- grzm 7y agoIt's much more common than just Elixir programmers. It's a common concept in computer science, particularly in functional programming or languages which permit function overloading on arguments. https://en.wikipedia.org/wiki/Arity https://en.wikipedia.org/wiki/Arity Edit to add: I've heard and used arity for at least 10 years, in particular in the Clojure community. I've heard of Elixir and understand it shares some common ideas with Clojure and Ruby, but never been a part of its community.
- Grimm1 7y agoElixir as a language provides a very robust standard lib with most tools to accomplish many tasks that would require external dependencies in other languages. Combine that with the actor model, Erlang's vm and own std lib and you have a very powerful language for a wide array of problems.
- nivenhuh 7y agoI’ve been using elixir for about a year now. It really makes writing API code joyful. The pattern matching concept works so well for handling the variation that happens in API request handling. I also love working with Plugs. The pipeline nature of elixir translates directly into how you manage a request/response, and the plug abstraction pattern allows you to be explicit about what should happen, and hide the details in a clean way. Overall, there are a few simple language patterns that, when used together, provide a lot of power and flexibility — without the drawback of over complicated code.
- tyre 7y agoReading the update to Enum.sort, I could see in my head how easy a change this would be in elixer. Supporting a different second parameter (a symbol rather than a function) can be implemented with another function that pattern matches to :asc or :desc. They can each call the original function(s) too. In many other languages you'd start `sort` with a conditional and that function would need to handle every case. Not here. Each function worries about itself and what it can handle. There's a beauty and practicality that Elixir hits so well.
- pmarreck 7y ago> API request handling It is useful for implementing anything where there is a calling interface/surface with a bunch of verbs that can take parameters. Which is pretty much everything in programming. Which is why it's (also) useful in API dev.
- etuil 7y agoHighly doubt that would get me anywhere but. I'm searching for elixir/js apprenticeship. It could be non-paid and re-evaluated at later point. I have been tinkering with programming as a hobby for a while. Currently located at UTC+2.
- histriosum 7y agoI've been tempted a few times to dip my toes into Elixir -- I like the language and the BEAM concepts, but in my environment I always bump into the following concern.. Ecto v3 has been out for more than a year now, and there are still only two supported adapters.. MySQL and Postgres. In my environment, I use a lot of MSSQL and SQLite in addition to Postgres, and those adapters haven't been successfully ported over to Ecto v3 yet.. in looking at some of the threads related to porting efforts, it appears that it must be a fairly daunting process. I always get to that point in my technical evaluation and wonder whether I ought to sit back and wait for a while yet, until the database stuff catches up and solidifies. I realize Phoenix can still use Ecto v2, but that just seems like it would add legacy dependency issues.. In actual practice, is most everyone using Elixir and Phoenix just sticking with Postgres/MySQL? Is there some other mitigating method that folks are using that makes Ecto support a non-issue?
- sbrother 7y agoI've been working with Elixir (and often Phoenix) since nearly its beginning, and I recently took a project that involved some interop with MSSQL. It has been tenable, but not a great experience. I'm not even using Ecto, just https://hexdocs.pm/mssqlex/Mssqlex.html https://hexdocs.pm/mssqlex/Mssqlex.html. It works but is a little buggy, not much community support, and none of the nice things that Ecto gives you. In one different project, there was a desire to deploy a Phoenix API natively to Windows clients. After poking and spending a few days looking at years-old Stack Overflow posts with no activity, we ended up pushing back on the requirement and going with a containerized solution. Elixir/Erlang/BEAM is a wonderful stack and I probably use it for 50%+ of my software, but I would not choose it in an environment where interop with MS technology was a requirement.
- bglusman 7y agoI guess it depends on your needs and motivation... we recently completed the transition from Ecto2 to Ecto3, and while not totally trivial in our case, I think you could do in a way that wasn't hard if you maintained compatibility with both from the start, so that only config had to change. But also, what are your requirements for using SQLite and/or MSSQL? Are you looking at porting existing projects, or new services talking to existing production databases? It used to be common in Rails to use SQLite in development and in production use Postgres or MySQL, but I think everyone kind of acknowledges its better now to run the same database in local and production if possible, and it's so easy that motivation is gone. I once had to use MSSQL in production for a HIPPA compliance issue, so I understand that might be hard to avoid in some situations, and SQLite is certainly well suited to some embedded applications, but you could certainly try and work on porting the ecto 2 SQLite and/or MSSQL adapter from ecto2 to ecto3 as a project and I'm sure the community would be very supportive in helping if you have motivation. I might be interested in helping with SQLite, but I don't have any specific motivation so I'm not likely to start it on my own.
- ctas 7y agoMy team and me rely heavily upon Elixir and the Beam VM within our startup and couldn't be happier. I'm glad to see continuous improvements beyond the acquisition of Plataformatec.
- ta93754829 7y agoI'm curious to know more about the total cost of ownership of Elixir. What's it like finding other developers with experience? How long does it take to train people up? How easy to understand the code base is it for developers who are 2 generations down from those that wrote it? How good is the tooling/support/interoperability? When I'm using X service, do they already have an SDK are do I have to build it from scratch every single time because I'm using Elixir and not say Java or .NET. What's the general level I have to hire at? Can the "average" developer (who's not that great let's be honest) learn it and be productive or do I need to hire very good developers for every seat (read more expensive) I feel like language features and syntax is close to the bottom of things to consider...
- vetrom 7y agoSpeaking as a sometimes Erlang developer: the ecosystem certainly isn't as universal as language $FOTM. That said, Erlang's concurrency primitives and runtime are second to none, and there is little that is more battle-tested in the industry. Individually developers will be more expensive, but if you have a product that demands maximum leverage of concurrency (i.e. data-heavy api, whatever-in-the-middle services, multiparty real-time data), you will more than makeup the developer premium when you get to that point. I havent hit Elixir yet, but it seems to make access to the Erlang runtime much easier. As far as SDKs/api, Erlang itself has primitives and libraries to build useful access to most APIs you can find. If you're worrying about what services you can access though, you probably don't need Erlang's features, at least not yet.