13 ms·
Elixir vs. Erlang: a question of momentum
- digitalzombie 12y agoThis is the same feeling I have. Well mostly toward Erlang. I was at an Erlang meetup and I've mentioned that the reason why Ruby is popular was because of RoR. Erlang needs a killer framework. A web framework would be a good choice since RoR have shown that. The consensus I got from this was basically Erlang doesn't need a killer software and the majority at the meetup thought the idea wasn't valid. Here come Elixir and so far it have decent momentum. It got mix, ecto, etc.. tools. And all of a sudden the creator started to contribute to Phoenix framework. It got 2 books now and an OTP books coming out. In general, I think Elixir is executing pretty well. If pheonix hit 1.0 that is comparable to RoR and can make restful service dead simple with oAuth, elixir might have a chance. edit: From what I've gathered: The blog posts and online community of Erlang is mostly technical. The community at the local meetup is very against new ideas, they're stuck in a cycle of continuing the same path while complaining about how to get adoption rate up for Erlang...
- duaneb 12y agoI dont think ruby is a good example to follow. How about making a stable expressive language?
- Luc 12y ago> Erlang needs a killer framework I like N2O a lot: https://github.com/5HT/n2o https://github.com/5HT/n2o
- 616c 12y agoEvery time I read about it, I thought, it is surreal more people have not heard of this. I have considered in the last year learning Erlang 1 or 2 times just after stumbling upon it again in my history and being very impressed by feature lists and basic stats. I even saw a sample Elixir project. Very cool stuff. https://github.com/erlang-synrc/n2o.ex https://github.com/erlang-synrc/n2o.ex
- davidw 12y agoOne part of that, and Nitrogen, that I really disagree with is "writing HTML via Erlang": the number of people who can hack on a template that is HTML with some processing instructions exceeds, by orders of magnitude, the number of people who can write Erlang.
- Luc 12y agoI'm sure this only partially addresses your issue, but one can use DTL (Django Template Language) with N2O: https://synrc.com/apps/n2o/doc/web/elements.htm https://synrc.com/apps/n2o/doc/web/elements.htm
- vezzy-fnord 12y agoErlang needs a killer framework. For what it's worth, it already does: OTP.
- istvan__ 12y ago"Erlang needs a killer framework." I don't agree with this. Erlang has already frameworks but that is not the selling point of this language and environment. For me the reason to use Erlang is the concurrency patterns and the tooling. RoR is great to get you off the ground but when you hit bigger scale you have to replace it with something that is more memory efficient and supports high number of concurrent connections. Several companies proved this including Twitter, Opscode etc. Erlang on the other hand lets you to use the same environment from day 1 to the time when you have 10M+ active users. You have to work on it but it is possible and there is no need to ditch the entire system because you got popular.
- kungfooguru 12y agoErlang's killer framework is OTP. Not everything is for writing webapps. I'm happy for Erlang to never have a decent web framework. I prefer Erlang (I don't write webapps) but point everyone to Elixir and Phoenix if they want to do webapps.
- yellowapple 12y ago> Erlang needs a killer framework. Have you looked at Chicago Boss yet?
- areski 12y agoGreat article! For a language that has been there for 29years, it's very hard to get such momentum.
- davidw 12y agoThanks! I actually wrote about Erlang's "strange birth" - for an open source language, at least - here: http://journal.dedasys.com/2009/06/18/the-erlang-paradox/ http://journal.dedasys.com/2009/06/18/the-erlang-paradox/ and what it has meant for the language. Basically, that it was born into a production environment and therefore very difficult to change much once it was released into the wild.
- maze-le 12y agoWell, Erlang has kind of a cumbersome syntax, and it is hard to learn for someone who has never seen a functional programming language. IMO Elixir does a great job at reducing the inherent complexity of the Erlang syntax, while keeping its powerful features (Erlang-procs, horizontal scalability, fault-tolerance).
- davidw 12y agoI think people who are professional programmers should be able to easily get over one syntax or the other in order to gain access to something powerful, but the reality is that it does seem to matter. I suppose it's better to deal with that reality rather than gnash one's teeth about it.
- pbowyer 12y agoI think that's because programmers are humans, not machines :)
- k__ 12y agoBut I still don't understand why Elixir didn't drop ends.
- tormeh 12y ago
- vezzy-fnord 12y agoTrying to put together cowboy, poolboy, a circuit breaker, a database driver, erlydtl, and various and sundry other pieces, for someone not well versed in Erlang is a losing proposition. How so? A framework can very much be (and often is) a reductionist endeavor: the sum of its parts connected by entry points. Particularly ones that are loosely coupled, as the one you alluded to (Chicago Boss) is If someone is not well versed in Erlang, they should probably learn Erlang before starting a project in it. Chicago Boss still makes implicit much of OTP, the process model and records that it's easy for beginners to jump in, though. Their friend, using Elixir, will at least have something up and running in short order. Once again, this is just as applicable to Erlang. A package management system, “hex”. Do people even know why they want/need a hundred language-specific package managers anymore, or is it just a cargo cult thing to do? No, a module system, a dependency resolver (Rebar) and release management may push you out of your comfort zone a bit compared to the typical do-everything package manager blob, but it's very much doable. Ecto database driver, with Postgres as the first database integrated (yay!). Ecto looks more like ActiveRecord, but there's nothing particularly wrong with BossDB. The fact that BossRecords are serialized as proplists means you can perform relatively complicated operations by using list comprehensions alone. Oh, but you have to learn some Erlang. No avoiding that. Ecto migrations. I might grant that. BossDB migrations aren't particularly advanced. Not sure how well Ecto fairs in to it. Porcelain, for working with external processes, where Erlang is somewhat lacking https://github.com/msantos/alcove https://github.com/msantos/alcove https://github.com/msantos/perc https://github.com/msantos/perc Latter is old, but the point remains. Port drivers and NIFs can easily bridge the gap from the Erlang VM to the host OS, and it seems that Porcelain uses exactly the former, at least.
- davidw 12y ago> BossDB migrations aren't particularly advanced. No, they aren't, they were "the simplest thing that possibly worked" for my needs (I wrote that code). One problem with boss_db is that it uses some heavy duty compiler magic that none of the "pure Erlang" kinds of folks really want to touch because it produces un-Erlangy code. This leaves it in a no-man's land: the Erlang people don't want to deal with it, and the people coming in from Ruby or whatever are just going to go straight to Elixir which looks more familiar anyway.
- aaron-lebo 12y agoSure, Erlang has an issue with gaining forward momentum, but I feel like people are really overstating the momentum Elixer has. It is easy to gain huge percentages of momentum (if you could ever measure that) when you have little to start with. That's the case with Elixir. That's the same situation languages like Factor and even Haskell saw seven years ago. The former is more or less dead and and the latter still never "broke out". When Elixir is competing library-wise and ecosystem-wise with the likes of existing languages like Python, Ruby, Java, Javascript, and then some of its major selling points are in competitors like Go (though not 100%) or Clojure/Scala (which can leverage the JVM), it really, really has to distance itself. As great as Elixir is, it is hard to make a bet on it ever crossing the threshold of "this is really cool" to something you can goto because library x y and z are available.
- arca_vorago 12y ago"I feel like people are really overstating the momentum Elixer has." I think the real problem is overly broad generalizations about languages in general. I'm just a sysadmin, so I have to keep up with the big picture overview of things, and one thing I have learned is that certain languages have momentum in certain areas of application where they don't in others. The devs in one area see language A as awesome and language B as sucky for their work, while the devs in another see it the opposite. Elixir/Erlang for example has concurrency that is only challenged by a small set of languages like Go. (Henning Diedrich got 877k TPS with Erlang and VoltDB. ) Anyway, my point is that for those of us more specialized and deep instead of jacks of all trades, we need to keep in mind our biases when we speak so broadly about languages. Also, when it comes to momentum, some languages can pull others behind them. For example, I am recently fascinated with Racket, which seems to me a perfect way of pulling Scheme (SICP) into a modern setting. Elixir may have enough momentum that it brings Erlang with it, etc.
- jtittsler 12y agoHave you explored Lisp Flavored Erlang (LFE)? http://lfe.io/ http://lfe.io/ It is another way to participate in the BEAM ecosystem and might align well with your Racket interest.
- rambocoder 12y agoElixir needs a good IDE with code completion and jump to definition. There are awesome Erlang plugins for Eclipse and IntelliJ IDEA, but for Elixir I am still hacking in SublimeText and the lack of those two functionalities slows down the process considerably, from what it could be.
- Akkuma 12y agoI'm not sure if this would suffice, but I came across https://github.com/tonini/alchemist.el https://github.com/tonini/alchemist.el
- rambocoder 12y agoalchemist.el does the trick. I got it to work after some configuration tinkering, but so far so good. Thank you.
- hnrem 12y agoI had a brief look at Erlang in my spare time. Time passed, and I would have returned to it at some point, but then Elixir appeared on the radar, and it appears almost as a refreshed, improved Erlang, an Erlang 2.0. Well, why would I learn yesteryear's implementation instead of a modern implementation? So, I looked at Elixir, and now would need an unlikely compelling reason to look back in Erlang's direction with any serious effort. When people talk about Erlang, they talk about telephone switches and data stores - I'm never going to be hired to build either, how many are? Elixir being used for more modest feats of engineering makes it sound more appealing and accessible to the mortal majority, hence building momentum. That said, I've just looked at the roles advertised at a large London tech fair - two Golang, zero Elixir, zero Erlang, numerous .Net and Java, countless Javascript. Long way to go for new languages, and London feels excruciatingly risk-averse.
- xixixao 12y agoThat's funny because JavaScript could be considered a new language (unless you were counting the "JavaScript, HTML, CSS knowledge useful" descriptions). Languages take time, two Golang jobs is already pretty good given how young a language it is.
- hnrem 12y agoIts popularity increasing doesn't make it a new language. If you spend seconds on a web search you'll see that two is pathetic compared to elsewhere - I'm commenting on London there, not Go, or Elixir, both of which I would love to use, hence my grumbling.
- rdtsc 12y agoJavaScript is not a good comparison. Say I didn't like JavaScript, I can't just start writing Python for the browser. I have a choice of either shipping a product or not. So many learn, know and use it because they have no choice.
- peregrine 12y agoNot a discussion of Elixir vs Erlang. Its not a zero sum game. Every improvement to erlang is an improvement to elixir and vice versa.
- losvedir 12y agoMore like "Elixir and Erlang". It's certainly interesting to compare the relative momentums of each language and think about why that may be, but I hope people don't see it as a zero sum competition. I was intrigued by Elixir, coming from a ruby background, but one of the key points for me was the robust and battle-tested Erlang VM and OTP. And as I've played with my Elixir app, I've found myself looking at Erlang code. Erlang is one of the main draws of Elixir, and conversely the enthusiasm around Elixir will be hugely beneficial to the Erlang community.
- davidw 12y agoExcellent comment: it's definitely not zero-sum, but there is a bit of rivalry and duplication of effort. If someone's using ecto, they're using postgrex rather than epgsql, for instance. Elixir is definitely a gateway drug for Erlang, for many people. I think one of the things that José has done so well with Elixir is layer something on top of Erlang that adds to it without muddying what was underneath, if that makes sense. You can see Erlang sticking out in places, but what's on top if it fits there nicely.
- deleted 12y ago[deleted]
- kungfooguru 12y agoIt should be noted that rebar3 (http://rebar3.org http://rebar3.org) uses hex for packages and has a plugin for working with hex repos https://github.com/tsloughter/rebar3_hex https://github.com/tsloughter/rebar3_hex
- rlbaker 12y agoGiven I had no knowledge of rebar3 before clicking the link, it took me a while to discover what it actually is. There is no descriptive text on the landing page aside from "Build Better Erlang" which i guess narrows this down to some sort of erlang developer tool. The Getting Started page has no mention of what we are installing actually does aside from a snippet in their console output log "you can use rebar to build OTP-compliant apps". So its a build tool? Not until "Basic Usage" do I find out in writing what rebar potentially is: "Rebar3 comes with templates for creating applications, library applications (with no start/2), releases and plugins" So it's a project templating tool? Does "comes with" mean it has more functionality than just templating? On the sidebar I see some terms that lead me to believe it can do more than that but I would love something on the landing page that told me exactly what the tool's purpose or function is. From my understanding it is a tool similar to Leiningen?
- mononcqc 12y agoYes, pretty much. I think we went short on the rebar3 descriptions just because of how known 'rebar' is as a household name. Go to almost any Erlang project, and you'll find 'rebar' or some variant. Rebar3 is the next version of it. But you're entirely right, the page and documentation is lacking to people unfamiliar with the Erlang/OTP ecosystem.
- platz 12y agoIs the main drawback about Elixir lack of support from Dialyzer?
- modiho 12y agoDialyzer works fine for Elixir code since it operates on Erlang bytecode, which Elixir ultimately compiles to. See also this related thread on the Elixir mailing list https://groups.google.com/forum/#!topic/elixir-lang-talk/ft6JPlzwhhA https://groups.google.com/forum/#!topic/elixir-lang-talk/ft6...
- djm_ 12y agoYou can use Dialyzer, not perfectly (yet) but it works. [1-2] [1] https://github.com/jeremyjh/dialyxir https://github.com/jeremyjh/dialyxir [2] https://groups.google.com/forum/#!topic/elixir-lang-talk/yDXgV0hnM-c https://groups.google.com/forum/#!topic/elixir-lang-talk/yDX...
- fiatjaf 12y agoQuick side-by-side code comparison, for everyone wanting a quick (and not very complete) overview: http://rosetta.alhur.es/compare/elixir/erlang/# http://rosetta.alhur.es/compare/elixir/erlang/#
- alanpeabody 12y agoAs huge fan of the Elixir language I think this article missed the point. Elixir is gaining popularity _because_ of the Erlang VM and libraries. Yes, macros, protocols, syntax, etc may attract a first glance at the language, but I believe people stay and evangelize Elixir because of the power of Erlang/OTP. Likewise, I think Elixir popularity will only drive Erlang, Joxa, and LFE popularity forward as the initial roadblock of grokking the Erlang VM and how OTP works are overcome.
- rdtsc 12y agoExactly. Just Elixir build on say Ruby VM or Python VM would not be appealing. BEAM VM is really a marvel of engineering. Telling others that yes it provides lightweight processes which also have isolated heaps is often met with disbelief. It is almost magic.
- jacquesm 12y agoI think in part this is because there are a few very vocal elixer proponents here on HN and this being the site where those people with scaling issues and 'erlang' style problems (which most web stuff actually is!) converge the uptake could be substantial. Erlang doesn't nearly have the 'hey look at me, I wrote a language' component but it just quietly excels at what it does (reliable, scalable). Elixer being targeted at the VM it is very well possible to have the best of both worlds. I'm curious what will happen in the longer term, if at some point the 'upstream' providers of the erlang ecosystem will take notice of elixer and will start to cater to it and then maybe actually adopt it. Until then I'm on the fence, elixer could be great but it also could end up being abandoned as more and more warts in erlang are taken care of. And most of those warts are cosmetic rather than real problems, the lack of libraries will hurt both languages just about the same and it would be much nicer if new libraries were written with interop in mind. That way they will have staying power regardless of which language will eventually become dominant/stay dominant. The erlang vm and ecosystem are very well thought out, battle hardened and solid beyond what most programmers that came into the profession past say 1998 or so are familiar with but it is clearly showing its age and elixer solves some of those problems. A more open process around erlang itself could easily take the wind out of elixer's sails. Time will tell, it sure is interesting. And thanks David, excellent post. edit: it could actually be that elixer will drive developers to erlang in the longer run, the syntax is a minor nuisance easily understood after a little bit of work and the 'strings' issue is mostly a different take on an old problem that you can either work around or simply accept as part of the deal. It can throw you for a loop but not worse than the things other languages will force on you and if you think about it is actually an elegant solution, re-use the same data structure to make life easier. If under the hood those lists would be replaced with something like the clojure ones you might be able to get rid of the performance issues entirely without affecting the code already in production (unless it was C code operating directly on internal structures of erlang).
- phamilton 12y agoThey've gone as far as making 1 in 8 tracks at Erlang Factory about Elixir. They had José give a keynote last year and participate on a panel this year. Robert Virding (one of the creators of Erlang) is fairly active in monitoring (and participating) in the elixir mailing lists. Granted, there's always a small tone of "get off my lawn", but that's just entertaining :-). I've mentioned this before but I'll daybit again. Protocols and Macros are the game changer. The Enumerable protocol absolutely changes the way you write code and solve problems. Doing the same thing in Erlang is just not the same.
- jrochkind1 12y ago> Being, among other things, a “web guy”, this is particularly noticeable to me, and perhaps less so to people using Erlang for what Erlang traditionally has done well. What are the things Erlang has traditionally done well? In what domains is it generally used now?
- MCRed 12y agoElixir is one of the best ways to program erlang. I learned erlang first, many years ago, and I don't really think of them as different languages. Yes, they have different syntaxes and yes Elixir has added features. But when I'm programming in Elixir I'm using the same part of my brain that loved programming in erlang. I think in the same way. More importantly, I think, for some reason so many programmers just can't get past erlang's syntax. I've never seen any really good criticisms of erlang that made sense-- other than the syntax. While it was fine for me when I was doing erlang all the time I did spend a couple years away and find it frustrating again. So Elixir fixes that. Further, there is no other language/platform that does distributed computing correctly, or on such scale, and with such battle testing. Haskell may do it correctly (I'm not sure) but it's very new. Go, Node.js, every "actors" library you can think of, they are single-threaded-thinker's attempts to scale, and they are not correct. Yes, in computer science there is such a thing as "correct" and "not correct", and way too many young programmers seem to think popularity determines correctness. IF you haven't learned Elixir and you want to write code that runs on multiple machines without a lot of hassle, and you've seen how tough this is to do on other platforms, head over to http://elixir-lang.org http://elixir-lang.org and learn. It's really a delight! Edit: Fixed some typos. Oops. Want to add, my intention is not to bash languages like Go. Go has some good ideas and is appropriate for certain use cases. It's just frustrating to see these things being pitched as "distributed" when they have not incorporated the lessons learned building erlang over 20 years ago, and the 20+ years of development since.
- deleted 12y ago[deleted]
- j-conn 12y agodoes distributed computing correctly Go, Node.js, ever "actors" library you can think of, they are single-threaded-thinker's attempts to scale, and they are not correct Could you elaborate, or point to a resource comparing the different scaling strategies? What makes the Erlang approach correct?
- perishabledave 12y ago
- keithnoizu 12y agoA bit like lisp the metaprogramming aspect of elixir allows for really rapid domain customization with out needing to have your changes approved by the core team. I think this on top of interop with existing erlang libraries and the scalability of the erlang vm model put elixir in a really good position to have presence if not in web dev overall then atleast in areas that in the past would have been grudgingly done using erlang instead of scala or whatever for scale reasons.
- mml 12y agoThat this post has > 100 replies (good or bad) heartens me. I would be happy to see more from erl or exrl. Both are phenomenal achievements. I'm only saddened that erl doesn't move faster to modernize its obvious, and easily rectified shortcomings (modern strings anyone?). Adding hashes to erl is a good start, and joeerl seems very open to more. There is certainly more to come in both camps, and that's good for everyone.
- deathtrader666 12y agoThere's also a ton of great stuff highlighted at Awesome Elixir [1] and Awesome Erlang [2] [1] https://github.com/h4cc/awesome-elixir https://github.com/h4cc/awesome-elixir [2] https://github.com/drobakowski/awesome-erlang https://github.com/drobakowski/awesome-erlang