Live data from Hacker News

Why Elixir (2014)

theerlangelist.com

41–50 of 71 posts

Re: Why Elixir (2014)

#41
I recently used Elixir for Advent of Code 2023. It is elegant in many places, at least from what I have explored during puzzle solving. However, to me it does not reach the elegance of Scheme or Lisp and I switched back to Guile while solving more puzzles. Due to its not as simple syntax, naming choices are more limited than in many Lispy languages. Also the way anonymous functions are written did not appeal to me especially that much and how they must be written when being passed to other function and how to reference functions in the same module sometimes requiring to still write the name of the module and all that is not that intuitive.

Re: Why Elixir (2014)

#42
post #10

Earlier quoted context omitted.

Servers are 99% of the code I write, so yes I choose Elixir, though for very conservative clients and small projects I use Go. For everything else, which is not a lot, there's Rust, Scheme, Lisp and many other fun languages to explore. My focus these days is on my business rather than consulting, so I have a lot of freedom.

How do you manage to convince employers of such language choices? (Do you need to convince?) And what kind of jobs or positions are that? I would love to use my skills like that, instead of building CRUD in Python, not really being able to apply my skillset, but employers are not ready to make the smallest leap it seems.

I've convinced the CEO that Elixir/BEAM/OTP is a good choice for a fairly large, multi-application project. It wasn't very hard, factors like high availability, the same programming language and runtime in the entire system, extremely fast prototyping, battle tested in absurdly demanding settings, sounds very nice to a business strategist able to understand at least some of the implications.

The drawbacks are basically in recruiting and a few other areas and quite manageable.

Edit: There's a book for this particular purpose, convincing the suits, https://pragprog.com/titles/tvmelixir/adopting-elixir/ .

Re: Why Elixir (2014)

#43
I'm fascinated by Elixir, but more so for using to do neural network experiments with more unique topologies, training methods, and activation functions. Being able to spin every neuron out into a process just seems too damn elegant for doing work with spiking neural networks. Will it be as fast as the python stacks? Probably not, but not being constrained to the implicit assumptions in a lot of those libraries will be worth a lot. Plus, there's already good neural network and genetic algorithm libraries for Elixir. I really think this langauge is gonna go places.

Re: Why Elixir (2014)

#44

I recently used Elixir for Advent of Code 2023. It is elegant in many places, at least from what I have explored during puzzle solving. However, to me it does not reach the elegance of Scheme or Lisp and I switched back to Guile while solving more puzzles. Due to its not as simple syntax, naming choices are more limited than in many Lispy languages. Also the way anonymous functions are written did not appeal to me es…

> how to reference functions in the same module sometimes requiring to still write the name of the module

Not sure what you mean here. If the function is in the same module then you should be able to refer to it without including the module name.

Can you give some example code to show what you mean?

Re: Why Elixir (2014)

#45
post #28

“Why not Elixir” is a more interesting question and I suggest you go ask it to engineering managers of polyglot organizations. They will usually bring you the super low nps from not-elixir-only devs and the resignation letters from elixir “talents” that are asked to do non elixir stuff.

This often happens regardless of tech. The old school Unix guy that does everything in C... The C# person who hates Java... The Ruby guy that won't do Python... The backend developer that despises Javascript... on and on. Some people compromise, some don't.

Re: Why Elixir (2014)

#46
post #34
post #28

“Why not Elixir” is a more interesting question and I suggest you go ask it to engineering managers of polyglot organizations. They will usually bring you the super low nps from not-elixir-only devs and the resignation letters from elixir “talents” that are asked to do non elixir stuff.

> super low nps Net Promoter Score? > resignation letters from elixir “talents” that are asked to do non elixir stuff. I mean, I would prefer to be working in Erlang, but I took a Rusty job recently. OTOH, if I was working in Erlang for you, and you made me switch to something else, I would most likely not be happy and if my job is changing, I may as well change jobs, or at least consider it. Leaving behind simple co…

yes, Net Promoter Score

about the second part of your answer; my (probably very rare) opinion is that our job is not to "work in erlang" or "work in rust", is "solve problems/automate stuff". If I ask you to work in Foo instead of Erlang, it's the same job. I highly doubt that your job is slow because Go and fast because Rust, it's slow because process/idiots in other teams/idiots in your team/idiots as your "agile coach" etc.

I understand wanting to have a good career, but language is never the obstacle to a successful career. Also, this implicit bias that people who know exotic languages are better is completely false.

Re: Why Elixir (2014)

#47
I see so much effusive praise for Elixir that I feel like something must have gone really wrong with our codebase, because build times from scratch are horrible (10 minutes or so), and I frequently have problems with the incremental build when switching between branches which force me to do a clean build.

Coming from a Node and PHP background makes me really appreciate the lack of compile step.

Re: Why Elixir (2014)

#48

I recently used Elixir for Advent of Code 2023. It is elegant in many places, at least from what I have explored during puzzle solving. However, to me it does not reach the elegance of Scheme or Lisp and I switched back to Guile while solving more puzzles. Due to its not as simple syntax, naming choices are more limited than in many Lispy languages. Also the way anonymous functions are written did not appeal to me es…

> how to reference functions in the same module sometimes requiring to still write the name of the module Not sure what you mean here. If the function is in the same module then you should be able to refer to it without including the module name. Can you give some example code to show what you mean?

I don't know exactly where it happened, but here [1] is a typical AoC code using Elixir. At some point I got so annoyed by Elixir telling me it does not find the functions of the very same module, that I simply defaulted to always writing the module name.

[1]: https://codeberg.org/ZelphirKaltstahl/advent-of-code-2023/sr...

Edit: Ah yes, I remember it happening in |> pipes a lot.

Re: Why Elixir (2014)

#49
post #42

Earlier quoted context omitted.

How do you manage to convince employers of such language choices? (Do you need to convince?) And what kind of jobs or positions are that? I would love to use my skills like that, instead of building CRUD in Python, not really being able to apply my skillset, but employers are not ready to make the smallest leap it seems.

I've convinced the CEO that Elixir/BEAM/OTP is a good choice for a fairly large, multi-application project. It wasn't very hard, factors like high availability, the same programming language and runtime in the entire system, extremely fast prototyping, battle tested in absurdly demanding settings, sounds very nice to a business strategist able to understand at least some of the implications. The drawbacks are basical…

Recruiting was exactly the one argument that I got to hear. That hiring people would be difficult and people demanding high wages and so on. I could not convince an employer to not weigh that heavily. At least that is the brought forward argument. There might also be an element of "don't know it myself, don't want it in my company".

Re: Why Elixir (2014)

#50
post #47

I see so much effusive praise for Elixir that I feel like something must have gone really wrong with our codebase, because build times from scratch are horrible (10 minutes or so), and I frequently have problems with the incremental build when switching between branches which force me to do a clean build. Coming from a Node and PHP background makes me really appreciate the lack of compile step.

Here's a nice series of articles if you haven't seen it before, which can help you to reduce your compilation times: https://medium.com/multiverse-tech/how-to-speed-up-your-elix...
Post reply on HN