Live data from Hacker News

Ruby and Elixir: Polyglottin' FTW

neo.com

1–10 of 24 posts

Re: Ruby and Elixir: Polyglottin' FTW

#3
post #2

Yeah, be polyglot by speaking American English and British English! I mean, Ruby and Elixir! http://satwcomic.com/multi-language/moby-is-a-dick

While Ruby and Elixir have quite similar syntax, their underlying run time models are fundamentally very different.

Re: Ruby and Elixir: Polyglottin' FTW

#4
Best thing I ever learned - probably 15 years ago at this point - is just use the right tool for the job.

We're a mobile game company, and we use C, C#, Objective C, Java, Python, Go, Erlang, JavaScript, Lua, and more where they make sense.

I love language talk and debates (and hate the language hate) here on HN. But if you're only using a single language in production, you're likely not that big, or more likely have a lot to gain by reworking certain bits with other technologies where they make sense.

Re: Ruby and Elixir: Polyglottin' FTW

#5
post #2

Yeah, be polyglot by speaking American English and British English! I mean, Ruby and Elixir! http://satwcomic.com/multi-language/moby-is-a-dick

That's like claiming any two C syntax inspired languages are the same because they share curly braces, semicolons and naming conventions.

Re: Ruby and Elixir: Polyglottin' FTW

#6
Polyglot web IDE that allows you to mix Python, Javascript, R, Ruby, Scala, Java: http://BeakerNotebook.com work with them all in the same page. As a corollary, you can work with Python2 and Python3 in the same notebook, and share data.

I totally agree that each language has its strength and each facet of your problem may best be solved in a different language.

Re: Ruby and Elixir: Polyglottin' FTW

#7
Why are you adding an extra level of abstraction in between Rails and Sidekiq? Why not just have Rails push to redis queue and elixir process finishes the job of sending email or doing what it has to do. Why have Sidekiq run at all? It seems adding multiple layers as such will make it harder to understand, debug and maintain in future.

EDIT: Also your example of polling on Redis queue using elixir is very inefficient and makes your article not so credible in my eyes or eyes of other good software architects. Redis is meant for pub sub and not polling.

Re: Ruby and Elixir: Polyglottin' FTW

#8
post #3
post #2

Yeah, be polyglot by speaking American English and British English! I mean, Ruby and Elixir! http://satwcomic.com/multi-language/moby-is-a-dick

While Ruby and Elixir have quite similar syntax, their underlying run time models are fundamentally very different.

Yes very different model, and you realize that the syntax is not so similar once you really start working with Elixir: you start using constructs that don't belong to procedural languages at all.

Similarities don't go much further than def do end (but there are too many do and too many different def in Elixir) and the sensible naming of some Library.functions() to match classes and methods in Ruby's standard library. But hey, making a good first impression is extremely important and Elixir has been engineered well in that regard. It's not one of those I'll-never-ever-be-able-to-read-it languages.

Re: Ruby and Elixir: Polyglottin' FTW

#9

Why are you adding an extra level of abstraction in between Rails and Sidekiq? Why not just have Rails push to redis queue and elixir process finishes the job of sending email or doing what it has to do. Why have Sidekiq run at all? It seems adding multiple layers as such will make it harder to understand, debug and maintain in future. EDIT: Also your example of polling on Redis queue using elixir is very inefficient…

Redis has blocking list primitives which you can use to build an efficient queue (push and pop in O(1)), if you look at the code you'll see he's using brpop

Re: Ruby and Elixir: Polyglottin' FTW

#10

Best thing I ever learned - probably 15 years ago at this point - is just use the right tool for the job. We're a mobile game company, and we use C, C#, Objective C, Java, Python, Go, Erlang, JavaScript, Lua, and more where they make sense. I love language talk and debates (and hate the language hate) here on HN. But if you're only using a single language in production, you're likely not that big, or more likely have…

I never got those "I am language X developer".

It is like "I only do hammers and nails. For drilling ask the guy over there."

Post reply on HN