7 ms·
Elixir: Ruby-like Syntax and Homoiconicity for Erlang VM
- vasco 15y agoAh, unfortunate name clash with http://elixir.ematia.de/trac/wiki http://elixir.ematia.de/trac/wiki which is a python wrapper on top of sqlalchemy made me confuse for a second.
- badboy 15y agoI like the ruby syntax and I played a bit with Erlang in the past. This looks just like the perfect mix of both worlds.
- vonkow 15y agoIf this accomplishes what it seems to be attempting and makes erlang/OTP and the BEAM more accessible to the ruby, python and js communities while smoothing some of the language/platform's rough edges, I will be a very happy camper.
- metajack 15y agoHaving rebinding of the vars and dictionary literals are really nice. The syntax feels a bit awkward in general. Commas have to be in non-obvious places, and the "do" keyword is essentially hard-coded. But these aren't huge problems. The homoiconicity looks quite interesting. The bigger problem is that it still has 90% of Erlang's semantics, and that turns out to be just as different in Ruby-like syntax as it is in Prolog-like syntax. I should note that this isn't a problem for me, but if the aim is to make the language more familiar to others, the syntax change is not much help. My team and I evaluated using Elixir for game scripting on an Erlang-based engine, but ended up passing because if we were going to teach the scripters Erlang semantics, we might as well just use Erlang. We also looked at LFE and came to largely the same conclusion. But, I applaud the effort and I plan to keep an eye on the project. We need more of these kinds of developments on BEAM, and hopefully some of their good ideas will trickle into the Erlang language itself.
- rubyrescue 15y agoi do a lot of Erlang work - my consultancy - Inaka - has production apps in Erlang for Fortune 500 companies and startups - and I'm constantly looking for Erlang devs. Also, I have some ruby devs. I'm always trying to get the Ruby guys into Erlang but what I've found is that the concepts of Erlang are such that by the time you've learned the VM and processes, and atoms, and lists, and what a term is and what OTP is, you've got Erlang syntax down. So... I agree, I never actually have a need to teach Elixir. But, i REALLLY want it to work - it's a brilliant language and it's picking up where Reia left off - Reia is essentially dead now that (though not just because of the fact that) Tony works at Basho... so, I want to promote Elixir at the same time that I'm a huge potential user of it and don't (yet.). My only thought about how Elixir could take off is if someone writes a killer web framework in Elixir and that starts meaning that the mixed apps we're always writing - Ruby on Rails web UI with an Erlang Web Services framework on the backend (that the iOS and Android apps are talking to) - could be just running inside the Erlang runtime. There would be no more need for that little piece of our deployment running Passenger - which is always the most fragile piece. That could do it.
- OwlHuntr 15y agoThis is already possible using projects like erlectricity(https://github.com/mojombo/erlectricity https://github.com/mojombo/erlectricity) and its associated subprojects (https://github.com/mojombo/ernie https://github.com/mojombo/ernie). I think there is a huge potential with mixing ruby and erlang, as strange bedfellows as they are. I'm excited!
- rubyrescue 15y agoi've used BERT and Ernie extensively and it's generally just easier to mix them using REST. But my point is we use Rails in some cases when we'd rather do everything in Erlang and (Mochiweb | Webmachine) because there's no good Erlang web framework, and I could see Elixir being the language foundation for that framework at some point.
- josevalim 15y ago
- toisanji 15y agoI'd like to know the performance of this compared to erlang and ruby
- josevalim 15y agoBenchmark the performance of this on its own doesn't provide much insight. In any case, early benchmarks of the web server I am working on are available: https://gist.github.com/1582864 https://gist.github.com/1582864 Note it is still experimental, take everything in there with a grain of salt.
- rhdoenges 15y agoThat macro system isn't exactly homoiconicity. Maybe a first-class AST? Whatever it is, I like it.
- josevalim 15y agoThat's a good discussion. I could not find any concrete specification of what homoiconicity means. But there are other languages (like Erlang, Julia and others) which provides the same kind of "first-class AST" and are called homoiconic. In any case, I believe we can agree what it is called doesn't matter much. What we can do with it, does. :)
- raphinou 15y agoI would put a link to the mailing list on the homepage. For those interested, it's here: http://groups.google.com/group/elixir-lang-core http://groups.google.com/group/elixir-lang-core
- josevalim 15y agoJust did that, thanks for the suggestion.
- deleted 15y ago[deleted]
- ludicast 15y agoIn the Ruby world my ordered policy for picking libraries (gems) is: 1) Jose Valim (+ Plataforma) wrote it 2) Ryan Bates covered it recently 3) It is doing well on the Ruby Toolbox I've been meaning to quaff Elixir for a while (am frenemies with Erlang). Maybe I'll write a HAML in it :).