Earlier quoted context omitted.
Pattern matching, to me, is the killer feature. It allows me to write so many fewer if statements, which to me is a big boon.
Here's a list of things Elixir things I love: - pattern matching - immutable data - built-in supervision tree - async message passing w/ mailboxes - networking modules - much of Elixir is written in Elixir Here's stuff I'd like to see in the standard library (which may come over time anyway): - Better time/calendar options (I still like using Timex) - Rational numbers - Ruby's BigDecimal in Elixir - Dialyzer for Elix…
Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
41–50 of 50 posts
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#42Earlier quoted context omitted.
alternatively it is the most object oriented language
Haha, nice observation. But not really. The only facet of object orientation is processes communicating with message-passing semantics. Primitive types are not objects, and processes are not instances of a class for example.
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#43I think it comes down to this: with Elixir, you gain a lot over Ruby and lose very little. Any Elixir app will be significantly more performant and reliable than its Ruby counterpart. This is due to several reasons: - Elixir runs on a battle-tested virtual machine, and stuff like supervisor behavior (e.g. auto-restart of crashing processes) is built right in - Elixir is a functional language, which makes the code you…
It's different, but I'm not sure that makes it better than Ruby. You listed three advantages for Elixir. Are there none for Ruby? Language design involves tradeoffs. Are there no tradeoffs for being immutable and functional?
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#44I think it comes down to this: with Elixir, you gain a lot over Ruby and lose very little. Any Elixir app will be significantly more performant and reliable than its Ruby counterpart. This is due to several reasons: - Elixir runs on a battle-tested virtual machine, and stuff like supervisor behavior (e.g. auto-restart of crashing processes) is built right in - Elixir is a functional language, which makes the code you…
This means deployment and running a production elixir app is fundamentally "different", which leads to people reaching for hot code swapping, treating servers as "pet" instead of "livestock", etc.
With tools like Kubernetes and containers taking over more and more of the ops world, running an Elixir application feels like swimming against the current as the BEAM VM have its own clustering system that requires some workaround to make it work well with an elastic auto-scaling cluster.
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#45I think it comes down to this: with Elixir, you gain a lot over Ruby and lose very little. Any Elixir app will be significantly more performant and reliable than its Ruby counterpart. This is due to several reasons: - Elixir runs on a battle-tested virtual machine, and stuff like supervisor behavior (e.g. auto-restart of crashing processes) is built right in - Elixir is a functional language, which makes the code you…
Former Ruby, now Elixir, developer here and I agree. The one use case where Ruby still wins for me, though, is a little one-off script. Last time I had occasion to do that, I found you couldn't use any Elixir hex packages without generating a whole mix application. In ruby you could just globally install the gem and require it right into your script. I forget why this came up, but I think it was something like just w…
I've been using Elixir for one-off scripts lately and this is something I miss. In my book, it is a clear advantage that Ruby and other scripting languages have over Elixir. In the case of HTTP(S) my solution has been
{data, 0} = System.cmd("curl", ["-sf", url])
but as soon as you need a JSON library it is time to create a project. (The "-f" flag ensures you get a non-zero exit status from cURL if the HTTP status code isn't 2XX.)I do not particularly like the usual global package installation model, though, because it means that you can only have a single version of a package available for your scripts to require. The best package management model for standalone scripts that I have seen is Groovy's [1]: a script can include a special directive that downloads a specific version of a package just for that script. Any versions can be stored in the global (per-user) package cache so that you don't have to redownload them every time a script runs, but your import statements always give you strictly the version you asked for. This is the model I'd adopt for Elixir.
[1] http://docs.groovy-lang.org/latest/html/documentation/grape....
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#46Earlier quoted context omitted.
Here's a list of things Elixir things I love: - pattern matching - immutable data - built-in supervision tree - async message passing w/ mailboxes - networking modules - much of Elixir is written in Elixir Here's stuff I'd like to see in the standard library (which may come over time anyway): - Better time/calendar options (I still like using Timex) - Rational numbers - Ruby's BigDecimal in Elixir - Dialyzer for Elix…
As far as Dialyzer, we use the dialyxir project, and it behaves well enough. Depending on how macro heavy your code gets, it gives up earlier than it should, but you can still get it to flag you for doing bad things when it gets down to modules calling modules. Combined with lint rules around making sure stuff has @spec, it catches a lot of things.
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#47I think it comes down to this: with Elixir, you gain a lot over Ruby and lose very little. Any Elixir app will be significantly more performant and reliable than its Ruby counterpart. This is due to several reasons: - Elixir runs on a battle-tested virtual machine, and stuff like supervisor behavior (e.g. auto-restart of crashing processes) is built right in - Elixir is a functional language, which makes the code you…
Former Ruby, now Elixir, developer here and I agree. The one use case where Ruby still wins for me, though, is a little one-off script. Last time I had occasion to do that, I found you couldn't use any Elixir hex packages without generating a whole mix application. In ruby you could just globally install the gem and require it right into your script. I forget why this came up, but I think it was something like just w…
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#48Earlier quoted context omitted.
Former Ruby, now Elixir, developer here and I agree. The one use case where Ruby still wins for me, though, is a little one-off script. Last time I had occasion to do that, I found you couldn't use any Elixir hex packages without generating a whole mix application. In ruby you could just globally install the gem and require it right into your script. I forget why this came up, but I think it was something like just w…
>In ruby you could just globally install the gem and require it right into your script. I've been using Elixir for one-off scripts lately and this is something I miss. In my book, it is a clear advantage that Ruby and other scripting languages have over Elixir. In the case of HTTP(S) my solution has been {data, 0} = System.cmd("curl", ["-sf", url]) but as soon as you need a JSON library it is time to create a project…
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#49Earlier quoted context omitted.
Former Ruby, now Elixir, developer here and I agree. The one use case where Ruby still wins for me, though, is a little one-off script. Last time I had occasion to do that, I found you couldn't use any Elixir hex packages without generating a whole mix application. In ruby you could just globally install the gem and require it right into your script. I forget why this came up, but I think it was something like just w…
>In ruby you could just globally install the gem and require it right into your script. I've been using Elixir for one-off scripts lately and this is something I miss. In my book, it is a clear advantage that Ruby and other scripting languages have over Elixir. In the case of HTTP(S) my solution has been {data, 0} = System.cmd("curl", ["-sf", url]) but as soon as you need a JSON library it is time to create a project…
Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]
#50Earlier quoted context omitted.
Former Ruby, now Elixir, developer here and I agree. The one use case where Ruby still wins for me, though, is a little one-off script. Last time I had occasion to do that, I found you couldn't use any Elixir hex packages without generating a whole mix application. In ruby you could just globally install the gem and require it right into your script. I forget why this came up, but I think it was something like just w…
I am currently working on a RoR project and I am looking at Elixir for a side project. Kindly advice how I can get started in Elixir.