7 ms·
Elixir 1.0.5 released
- jfaucett 11y agoHaven't looked at elixir yet, but being an erlang fan and quickly hopping through the source it looks like elixir is doing for erlang essentially what coffeescript does to javascript. Something many non-erlangers have long lamented is the syntax so this looks quite interesting, also adding the running compiler is a nice idea for the macro support :)
- josevalim 11y agoHi, Elixir creator here, thanks for commenting! You may want to watch my talk at Erlang Factory SF 2015: https://www.youtube.com/watch?v=Lqo9-pQuRKE https://www.youtube.com/watch?v=Lqo9-pQuRKE Elixir is not really about the syntax, we have great tooling, our own standard library (with proper Unicode support, collections, unified API for dictionaries, etc) and our own approach to some constructs in OTP. Feel free to ping here if you have any questions. I will make sure to check this thread again later.
- benaiah 11y agoThe independent stdlib is interesting, and I haven’t seen Elixir advocates mention it much before. I’ll have to look into that.
- rubiquity 11y agoThe separate stdlib one of the easiest parts of Elixir to take for granted but is nonetheless a really nice part about the language. I find Elixir's stdlib to be small and yet it still covers a huge amount of your typical needs when writing Elixir.
- ghayes 11y agoOn tooling: `Mix` is a great build tool which directly integrates `Hex`, a package manager similar to ruby gems. Additionally, ExUnit is a great built-in unit test library. These tools alone would be a good reason for an erlanger to check out Elixir. I've been recommending Elixir as the language of choice to all my colleagues. I truly believe it will bring the advantages of OTP architecture to a wider audience of programmers.
- ffn 11y agoLove the language, I've been using it (phoenix) to build a more real-time version of my current rails app. But I have a concern with Elixir core's Enum. In particular, the Enumerable protocol has us implementing Enum.reduce for our own data-types, but Enum.map is written as `reduce(collection, [], R.map(fun)) |> :lists.reverse` is there any chance Elixir's enum core can take a page from Clojure's transducer idea and, instead of implementing map with reduce and [], implement it with transduce and some function that steps? I've often had the need to map and filter over strings to achieve rails-like features such as #to_url, #classify, #underscore, and #humanize... but being forced to either rewrite Enum functions for strings or constantly peppering in String.split("") and Enum.join("") feels really bad.
- josevalim 11y agoIt would be possible to have something like `Enum.map |> Enum.into`. You could also do `Stream.map |> Enum.into` if you don't want to traverse it multiple times (similar to Clojure's `into`). In fact: iex> Stream.unfold("hello", &String.next_codepoint/1) |> Enum.to_list ["h", "e", "l", "l", "o"] The reasons we don't have first class support for this though are: 1. There are multiple ways you could traverse a string. By bytes, by codepoints or by graphemes. I don't think we should pick any of those as default. Ruby did that and to this day it is source of confusion (aggravated by the behavior change from 1.8 to 1.9) 2. Modifying strings like this would be horribly inefficient. Using split/join wouldn't be recommended also as you are generating a bunch of intermediate garbage to go from string -> string. The recommended way is to rely on pattern matching and Elixir's bit syntax as the compiler will be able to optimize most cases well.
- yellowapple 11y ago> Elixir is not really about the syntax Don't lie, Jose; we all know it's about the syntax ;) Kudos for the awesome language you've created.
- pselbert 11y agoElixir's syntax also gains a wonderfully consistent AST, which enables all manner of meta-programming and macro writing. Sometimes there are practical benefits to syntactical choices beyond the pleasing aesthetics.
- Xophmeister 11y agoI've been reading about Elixir here-and-there for a while and decided to jump into it last week. I really like it. I'm a big fan of FP and, having increasingly found myself falling out with Python, can definitely see this becoming my dynamically typed language of choice.
- fokinsean 11y agoWould you recommend Elixir for a first FP language? I am familiar with FP from using Python and JavaScript, but I have never used a completely functional language yet. Can I dive into Elixir or should I learn something more "traditional" first such as Haskell, Lisp, etc?
- jimbokun 11y agoWith this book: https://pragprog.com/book/elixir/programming-elixir https://pragprog.com/book/elixir/programming-elixir I would say it's an outstanding choice to learn functional programming. The book is written for someone who knows an imperative language and wants to learn about functional programming.
- hackerboos 11y agoDave's book is a great read. I also recommend the Manning book "Elixir in Action" although I'm only half way into it.
- Xophmeister 11y agoMy current feeling [bearing in mind that it's been less than a week!] is that Elixir is to Haskell as Python is to C++. If you want to learn a dynamically typed FP language, then I think Elixir is a fine choice; especially from a JS/Python background, plus all the goodies that come with the Erlang VM. I've read it's also good for metaprogramming, so it ticks the same boxes as Lisp, without having to get used to S-expressions!... It's certainly something you can dive into :) Then, if you find you're really in to the FP Kool-Aid, I would definitely give Haskell (or OCaml) a try as well. It's a completely different ball game, but even as just a beginner -- I kinda-sorta-understand monads -- I would say that it's already improved my general programming skills.
- arms 11y agoI'd love to read about people's real life uses of Elixir, whether it be for their jobs or side projects.
- vezzy-fnord 11y agoI can't see how they would be much different from the use cases of Erlang/OTP, of which there are plenty of stories.
- arms 11y agoI'm interested in more than just the use cases (although still curious to hear why someone chose Elixir, whether it be for the language, BEAM, or whatever.) I'm looking for stories of why it was chosen over another language and what the end results were.
- hderms 11y agoWell neither will win any speed races, but if your problem requires soft-realtime functionality, concurrent execution, or incredible fault tolerance you'd do much worse than to choose Elixir/Erlang. And a simpler learning curve than many FP languages (in my experience, at least) sweetens the deal.
- doomspork 11y agoI'm currently keeping a list of companies actively using Elixir in production that you mind find useful: https://github.com/doomspork/elixir-companies https://github.com/doomspork/elixir-companies
- josevalim 11y agoYou can also check out conference videos: * Elixirconf EU 2015: https://www.youtube.com/playlist?list=PLWbHc_FXPo2jBXpr1IjyUgJ7hNS1eTf7H https://www.youtube.com/playlist?list=PLWbHc_FXPo2jBXpr1IjyU... (at least Michael's and Claudio's talks) * Elixirconf 2014: http://confreaks.tv/events/elixirconf2014 http://confreaks.tv/events/elixirconf2014 (at least Martin's and Stephen's)
- 11y ago
- sivers 11y agoI sponsored the OpenBSD port of Elixir 1.0.5 & Erlang 18: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/elixir/ http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/elixir/ So it'll be included in OpenBSD 5.8.
- reitzensteinm 11y agoThat's awesome! Could I ask why? Are you using it to build anything public?
- sivers 11y agoHopefully some day! ☺ All my programming is public, so if I ever start making something with it, it'll be at https://github.com/sivers https://github.com/sivers But I'm a fan of OpenBSD, and like to make sure it stays current. I've contributed a few thousand $ over the years to help. And I'm a fan of Dave Thomas from Pragmatic Programmers, so when I heard him raving about Elixir, I had to give it a try. I like it so far. Good overview video: https://www.youtube.com/watch?v=hht9s6nAAx8 https://www.youtube.com/watch?v=hht9s6nAAx8 Good books: "Introducing Elixir - Getting Started in Functional Programming" http://shop.oreilly.com/product/0636920030584.do http://shop.oreilly.com/product/0636920030584.do "Elixir in Action" http://www.manning.com/juric/ http://www.manning.com/juric/ "Programming Elixir" https://pragprog.com/book/elixir/programming-elixir https://pragprog.com/book/elixir/programming-elixir
- yellowapple 11y agoThanks! That should (hopefully) put an end to me having to build both of those things from source (as another user of both OpenBSD and Erlang/Elixir).
- zcid 11y agoThank you so much! I just noticed the Erlang port yesterday; it was a most pleasant surprise.