Live data from Hacker News

Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

youtube.com

1–10 of 50 posts

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#2
I 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 write more testable

- State in Elixir is immutable, which greatly reduces the side effects of running code

I used to develop in Ruby circa 2014-2015. It will always have a special place in my heart, but to be frank, I don't really miss it. Elixir, as a language, is better in almost every way. And once the ecosystem becomes a bit more mature, it will be unstoppable (OK maybe not really, but it's definitely here to stay).

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#3

I 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…

I love Elixir, and came from Ruby. I do find it hard to describe to people why I like it more it more. There is no one thing that is a killer feature to me. I do not miss inheritance at all.

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#5

I 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 seemed like in the panel they just kept looping back to the performance and concurrency, to which the Ruby guys would say "So what, Ruby is fast enough for 99% of apps", completely ignoring all of the other strengths of Elixir.

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#6

I 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 wanting to download a web page and parse out a certain bit of it into a CSV file or something like that. Pretty trivial in Elixir with HTTPoison and Floki, but no real way to use those in a one-off .exs file (I don't think?). Whereas in ruby, I've already got HTTParty and Nokogiri in there somewhere, and you can toss it together in a minute.

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#7

I 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…

Playing around with Elixir, it seems like it loses Ruby's Smalltalk like "everything is an object" that allows things like:

  > 4.even?
  => true
That's not to say that what Elixir provides is (or is not) worth giving up everything-is-an-object because Erlang's design does what it is supposed to do very very well.

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#8

I 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]

#9
post #7

I 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…

Playing around with Elixir, it seems like it loses Ruby's Smalltalk like "everything is an object" that allows things like: > 4.even? => true That's not to say that what Elixir provides is (or is not) worth giving up everything-is-an-object because Erlang's design does what it is supposed to do very very well.

There's basically data and functions, so 4 wouldn't really have any methods attached to it and instead you'd just call Number.even?(4). Purely psuedo code example.

It's a deep subject but one of the biggest things is that it's virtually impossible to end up with the untenable monolith that many ruby apps eventually grow into. Since you aren't dealing with crazy inheritance trees attached to data separating things out really just becomes moving code around.

I do both Ruby and Elixir code right now. There are times when I like the convenience of Ruby for command line scripts or monkey patching a quick modification for a 3rd party library...but there are other times when you hit problems that you just can't solve effectively without rewriting in something else and that gets annoying. That's one of the reasons you see so many posts about moving from Ruby to Go or Elixir because both languages are much better at Ruby's weakest points.

But it's always worth noting that Ruby got those projects to market with maturity and helped them grow customer bases with enough traffic to JUSTIFY a rewrite. What gets people so excited about Elixir is that you lose very little in the development time department for full stack while avoiding the long term complications due to the language rules. All that said, it makes you think about problems differently which will be a challenge for people at first.

Re: Ruby vs Elixir – Panel discussion at Wroc_love.rb [video]

#10
post #7

Earlier quoted context omitted.

Playing around with Elixir, it seems like it loses Ruby's Smalltalk like "everything is an object" that allows things like: > 4.even? => true That's not to say that what Elixir provides is (or is not) worth giving up everything-is-an-object because Erlang's design does what it is supposed to do very very well.

There's basically data and functions, so 4 wouldn't really have any methods attached to it and instead you'd just call Number.even?(4). Purely psuedo code example. It's a deep subject but one of the biggest things is that it's virtually impossible to end up with the untenable monolith that many ruby apps eventually grow into. Since you aren't dealing with crazy inheritance trees attached to data separating things out…

Or like this, thanks to the pipe operator

  4 |> Integer.is_even
Above can be even shortened if you import Integer module:

  import Integer
  
  (...)

  4 |> is_even
Post reply on HN