Live data from Hacker News

Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

joaomdmoura.com

41–50 of 62 posts

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#41
post #30

Can the Ruby people please stop blogging about Elixir and explain things relative to Ruby? There are way too many 'Elixir-for-Ruby-programmers' tutorials on the net already. Elixir is pretty great and enthusiasm is good but I feel this leaves a large group of people in the dark.

The last thing I want Elixir to be is shoehorned into the web app space and community of Ruby, but it seems inevitable. Oh well.

Amen to that. Ick.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#42

If you had to make a comparison, what would be the pros and cons of using elixir vs node.js?

I'm currently working in both. If we are just talking about them in terms of their respective merits, Elixir is my preference. It has a wonderful compiler, pipes allow for composable chains of logic, the Phoenix framework is wonderful for web development. Literally every interaction with it I've had has made me think "wow that's just a great example of excellent programming taste...". In terms of scaleablilty, I've h…

Regarding CI/CD pipeline. I found SemaphoreCI pretty nice. It supports Elixir/Erlang without the need for Docker and can deploy to Heroku pretty painlessly using the available buildpack. Got a full pipeline working for a Phoenix app going in about 30mins.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#43
post #31

As a Ruby programmer trying to take a look at Elxir, i still find it hard to read. Maybe functional languages take time to get used to but it doesn't seem as "clear" as procedure or oop style. I know the added benefit of speed and concurrency, but for most apps we build it is not needed for now. Do any Ruby programmer find Elxir easier to write or read? Im genuinely curious to hear about this because a lot of Ruby de…

I find Erlang itself to be pretty easy to read and write, if a bit repetitive/verbose at times. There are not very many 'magical' things happening; it's all pretty clearly spelled out. Elixir is mostly an improvement on Erlang unless people are getting crazy with the macros.

While learning Elixir and Phoenix, I found Cowboy source code easier to read with no knowledge of Erlang other than what's inferred from learning Elixir than Phoenix's generated app scaffolding.

In Erlang, I look at 'module_name:function_name' I can simply open the module file and look at the function definition.

In Elixir, I had to ask "Was this function aliased?", "Is it imported from a module? Which module?", "Was it imported/aliased through a use statement?" The code was more concise, but harder to read IMO. Of course you can simply reference functions by their full name in Elixir as well, which is what I'm doing with my own code.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#44
post #42

Earlier quoted context omitted.

I'm currently working in both. If we are just talking about them in terms of their respective merits, Elixir is my preference. It has a wonderful compiler, pipes allow for composable chains of logic, the Phoenix framework is wonderful for web development. Literally every interaction with it I've had has made me think "wow that's just a great example of excellent programming taste...". In terms of scaleablilty, I've h…

Regarding CI/CD pipeline. I found SemaphoreCI pretty nice. It supports Elixir/Erlang without the need for Docker and can deploy to Heroku pretty painlessly using the available buildpack. Got a full pipeline working for a Phoenix app going in about 30mins.

Yeah I started off using that exact pipeline and it worked well. We ended up moving to AWS which Semaphore only supports if its Elastic Beanstalk (could be different now to be fair). We couldn't go that route for more reasons than I care to list here. My hope is that Elixir gets popular enough that we can start to see some first class build tools integrated into more of these products.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#45

Earlier quoted context omitted.

I'm currently working in both. If we are just talking about them in terms of their respective merits, Elixir is my preference. It has a wonderful compiler, pipes allow for composable chains of logic, the Phoenix framework is wonderful for web development. Literally every interaction with it I've had has made me think "wow that's just a great example of excellent programming taste...". In terms of scaleablilty, I've h…

You mention setting up a Phoenix app in Docker so I'll link to a couple of posts I wrote describing how I do that: https://dev.bleacherreport.com/starting-a-phoenix-project-wi... , https://dev.bleacherreport.com/brunch-in-a-container-phoenix... . I almost always start new Elixir projects in Docker for local development now, and deploy the images to Elastic Beanstalk. If you're not setting up a cluster it's not a bad…

Thanks for the links! I've successfully Dockerized Elixir apps now but I'm always looking for new and better ways to do things. I'll check your stuff out and see how my approach stacks up. Thanks again!

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#46
post #30

Can the Ruby people please stop blogging about Elixir and explain things relative to Ruby? There are way too many 'Elixir-for-Ruby-programmers' tutorials on the net already. Elixir is pretty great and enthusiasm is good but I feel this leaves a large group of people in the dark.

Why do they have to stop blogging internet is fairly open you have an option to not read things that are not of interest to you. (BTW. I am not a Ruby developer)

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#47
post #30

Can the Ruby people please stop blogging about Elixir and explain things relative to Ruby? There are way too many 'Elixir-for-Ruby-programmers' tutorials on the net already. Elixir is pretty great and enthusiasm is good but I feel this leaves a large group of people in the dark.

The last thing I want Elixir to be is shoehorned into the web app space and community of Ruby, but it seems inevitable. Oh well.

I've been writing Elixir for almost a year, and have yet to build a Phoenix app. I did write a Plug hello world app once, just to see if my container was wired up correctly.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#48
post #30

Can the Ruby people please stop blogging about Elixir and explain things relative to Ruby? There are way too many 'Elixir-for-Ruby-programmers' tutorials on the net already. Elixir is pretty great and enthusiasm is good but I feel this leaves a large group of people in the dark.

The last thing I want Elixir to be is shoehorned into the web app space and community of Ruby, but it seems inevitable. Oh well.

This might be a controversial thing to say, but Ruby would be a pretty obscure language today if it wasn't for Rails.

If you want Elixir to remain obscure as well, keep hoping that it doesn't get picked up by web developers and Rubyists.

I for one want the language to eventually overtake Ruby in popularity (hopefully with Phoenix overtaking Rails). So yeah, the more individuals and communities that adopt it, the better.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#49
post #30

Can the Ruby people please stop blogging about Elixir and explain things relative to Ruby? There are way too many 'Elixir-for-Ruby-programmers' tutorials on the net already. Elixir is pretty great and enthusiasm is good but I feel this leaves a large group of people in the dark.

Consider that content can have way more potential to be educational and interesting when crafted with a specific audience in mind. For an Elixir post, that audience need not be "all programmers". I see nothing wrong with the author's approach and would gladly welcome more writing of this style.

Perhaps what you mean to say is that you'd like to see more folks in your own communities writing about Elixir with your relevant needs and perspectives in mind.

Re: Learn Elixir with a Rubyist (IV) – Types, Data Structures and Pattern Matching

#50

If you had to make a comparison, what would be the pros and cons of using elixir vs node.js?

Elixir:

1. Has a better standard library, plus easy access to all of Erlang's standard library.

2. Handles concurrency, instead of having to rely on an event loop, and does so in a clean and accessible way.

3. Makes it easy to communicate between processes, not on the same machine, but processes running on other machines as well.

4. Is faster and consumes less resources.

5. Is easier to create, manage, and maintain code and deployments.

My last point is subjective, but I like Elixir's syntax much, much better than Javascript's.

In my opinion, comparing Elixir to Node is like comparing a Tesla to a high-end roller skate.

Post reply on HN