Live data from Hacker News

Elixir v1.10

elixir-lang.org

51–60 of 141 posts

Re: Elixir v1.10

#51
post #38

What’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?

Elixir (really, the Erlang VM it's built on) is designed for highly concurrent, reliable systems. For my org, building a distributed webapp, we chose it over the languages you listed because of how much you get "out of the box" with Elixir.

Saša Jurić's talk "The Soul of Erlang and Elixir" (https://www.youtube.com/watch?v=JvBT4XBdoUE) is a good introduction to why someone might choose Elixir. The payoff is the slide (https://imgur.com/gallery/G6lfUW6) where he compares the stack of a "traditional" web app (Nginx + Ruby on Rails + Go + Redis + Mongo + Cron + Upstart) to the Erlang rewrite of the same app, which is... just Erlang.

This isn't to say that Erlang ships a complete replacement for Redis, Mongo, Upstart, etc.—but it provides most of the functionality that most apps will need, such that your dependency tree can be much simpler. It's really nice to not have to become an expert in all the infrastructure surrounding a normal web app and instead just learn Erlang/Elixir.

Re: Elixir v1.10

#52

Earlier quoted context omitted.

Alchemist Camp has good video tutorials https://alchemist.camp Also this blog post helped my understanding http://www.petecorey.com/blog/2019/05/20/minimum-viable-phoe... Phoenix LiveView [0] is really exciting to try out in Elixir. I'd recommend building an auto updating dashboard. I had a micro controller that had various sensors on it that I connected to over a serial port using circuits_uart[1]. I then read the s…

Thanks fellow person. The idea of having a project-based course like Alchemist is just was I was looking for.

Great to hear! Feel free to ask questions on the site if you get stuck anywhere.

Or, if you want to dive straight into the free screencasts, this YT playlist has them in order: https://www.youtube.com/watch?v=G3JRv2dHU9A&list=PLFhQVxlaKQ...

Re: Elixir v1.10

#53
post #38

What’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?

Distributed concurrency, fault tolerance and consistent low latency are the key advantages of BEAM, the Erlang virtual machine Elixir runs on.

Re: Elixir v1.10

#54

Earlier quoted context omitted.

How easy (or hard) is it to learn Elixir for someone with Python/PHP/JS background and zero knowledge of functional programming? Also, are there job opportunities for Elixir or is it a niche language?

As far as functional programming languages go, I think Elixir is probably one of the best intros: especially for someone coming from another dynamically typed language like Python or PHP. The syntax will be far less foreign than a language like Lisp or Haskell. You won't have to deal with types (though they are neat to learn, too). Elixir is not quite as popular as Go. But there are absolutely job opportunities out t…

I don't really agree that Elixir is a good intro to functional languages. It doesn't really teach you much about the functional paradigm as Elixir is fairly imperative by nature.

It focuses on practicality rather than adhering to the functional paradigm (lambda calculus etc.). That's probably the right choice for building highly concurrent industrial systems, but purely for learning about FP not quite as good as something like Elm would be.

Re: Elixir v1.10

#55
post #51
post #38

What’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?

Elixir (really, the Erlang VM it's built on) is designed for highly concurrent, reliable systems. For my org, building a distributed webapp, we chose it over the languages you listed because of how much you get "out of the box" with Elixir. Saša Jurić's talk "The Soul of Erlang and Elixir" ( https://www.youtube.com/watch?v=JvBT4XBdoUE ) is a good introduction to why someone might choose Elixir. The payoff is the slid…

> It's really nice to not have to become an expert in all the infrastructure surrounding a normal web app and instead just learn Erlang/Elixir.

It is also so much easier to test when all of your architecture is in one form. You don't have to spin up whole deployments on real infrastructure to see if the parts still talk - your normal local unit testing architecture gets you much more confidence.

Re: Elixir v1.10

#56
post #38

What’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?

This isn't to say there aren't disadvantages , too. But for advantages, specifically, I think some pros of Elixir are: - It runs on the Erlang VM, which is (tech-wise, anyway) fairly old and battle tested. It was deliberately built for resiliency and concurrency. It has some very clever concepts, like supervision trees, cheap processes, interprocess communication via message passing (hey, sounds like OO, right?), and…

> and value a lot of the same things Rubyists do: good documentation

In my opinion, the Elixir community (at least for the core language and major libraries) does documentation better than any other environment I've used. Almost every question I've ever had about using Elixir, Phoenix, or any of a dozen other libraries has been answered by using hexdocs.pm. The few things that aren't clear from those docs can generally be resolved by reading the source.

After that, elixirforum.com or the elixir slack give me higher level discussions on less immediate issues. I don't recall ever needing Stack Overflow for any elixir question.

Re: Elixir v1.10

#57
post #38

What’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?

The language itself is a dynamic, functional programming language. The benefits of functional programming languages have been much discussed (and much disagreed with), but Elixir is a particularly gentle introduction to the space while being a great language to work with.

The other key feature is that Erlang/Elixir/Beam implement 'the actor programming model'. This is a series of separate bits of code that have their own state and communicate to each other with messages. It turns out that for long running processes (web servers, control software etc.) this model is an excellent way to build your code. A lot of code ends up doing a subset of this, and usually not that well. Elixir gives you the tools to do it properly and easily.

Re: Elixir v1.10

#58

A very interesting language on powerful platform with a promising web framework. Many saw it, myself included, as a Ruby / Rails Improved, and expected its quick growth. Unfortunately, initial enthusiasm a few years ago did lead to its wide adoption. I talked with a couple of companies that jumped on it initially, but later decided to move to Java, Kotlin, Go. The main reason was difficulty to hire engineers to scale…

I recently had a convo with a company that moved into Elixir because they had an easier time hiring as they could tap into the local Ruby developers and into folks interested in functional programming (in France). Would you mind saying which country in Europe in particular? Was it also France?

Re: Elixir v1.10

#59
post #38

What’s the advantage of using this language over Rust, Go, Java (or any other JVM language), or Python?

This isn't to say there aren't disadvantages , too. But for advantages, specifically, I think some pros of Elixir are: - It runs on the Erlang VM, which is (tech-wise, anyway) fairly old and battle tested. It was deliberately built for resiliency and concurrency. It has some very clever concepts, like supervision trees, cheap processes, interprocess communication via message passing (hey, sounds like OO, right?), and…

Speaking of excellent documentation, from the documentation you can jump right into the code and see how a particular elixir function is implemented. Super useful personally for me as a learner. For example , go to https://hexdocs.pm/elixir/Enum.html#map/2 and click on the little "" on the top-right

Re: Elixir v1.10

#60
post #54

Earlier quoted context omitted.

As far as functional programming languages go, I think Elixir is probably one of the best intros: especially for someone coming from another dynamically typed language like Python or PHP. The syntax will be far less foreign than a language like Lisp or Haskell. You won't have to deal with types (though they are neat to learn, too). Elixir is not quite as popular as Go. But there are absolutely job opportunities out t…

I don't really agree that Elixir is a good intro to functional languages. It doesn't really teach you much about the functional paradigm as Elixir is fairly imperative by nature. It focuses on practicality rather than adhering to the functional paradigm (lambda calculus etc.). That's probably the right choice for building highly concurrent industrial systems, but purely for learning about FP not quite as good as some…

Isn't the fact that it isn't "pure" exactly what makes it a good introduction to the paradigm?
Post reply on HN