Live data from Hacker News

Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

news.ycombinator.com

151–160 of 297 posts

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#151
post #31

My company is moving away from it. We built a few services but after a few years some of the original people that introduced it left the company and it became very difficult to hire for. New hires were either people wanting to learn (so we had to spend a good bunch of resources into teaching + end up with a system built by noobs to the language) or very expensive developers with a lot of experience in erlang and elix…

I worked on an elixir project at a ruby shop for about a year. We had complex distributed system, and were replacing core ruby services with elixir. Ultimately the project was a failure, and was re-re-written in Ruby, and the Elixir devs were let go.

We faced similar issues to you, bad tooling, weak libraries, and very few knowledgeable devs.

Finding people to hack on elixir was extremely difficult, and likely the driving force that killed the project. Having an inexperienced team who had no experience with many of the language features elixir offered created a very difficult to work in code base.

This killed productivity, so management threw resources at it. Code quality dropped further when we were no longer just a group of noobs interesting in hacking on elixir, and became a group of noobs begrudgingly hacking on elixir.

I feel pretty scared from the experience, and wouldn't be interested in using elixir professionally again. Which is a shame, it can be a nice language to write, and some of its tooling like hex is quite nice.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#152
post #55

Earlier quoted context omitted.

> Specially now we are using all the hotwire stuff. Maybe I'm missing something, but doesn't this have precisely the same latency characteristics as live view? I do agree that some of the "you don't need redis" and similar are overblown (particularly claims about tasks replacing background jobs), but I think there is truth to these claims in the following sense: Particularly in Rails, Redis gets used not just as a to…

> Maybe I'm missing something, but doesn't this have precisely the same latency characteristics as live view? There's an open GitHub issue on LV which mentions when using live_redirect you're paying a very large penalty in page load speeds due to extra latency being introduced by LV: https://github.com/phoenixframework/phoenix_live_view/issues... Before this issue existed my non-scientific impression was the same. Th…

Interesting analysis. Do you have any quick examples of site's that use LV? I'm curious.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#153
post #129
post #31

My company is moving away from it. We built a few services but after a few years some of the original people that introduced it left the company and it became very difficult to hire for. New hires were either people wanting to learn (so we had to spend a good bunch of resources into teaching + end up with a system built by noobs to the language) or very expensive developers with a lot of experience in erlang and elix…

"Also, I've read some comments where people mention "we don't need redis", "we don't need workers" everything is so much easier. That was our thinking at first. But then you realize on deployments you will lose your cache, or your background jobs, etc. So you have to persist them either in mnesia or in the database. At that point you're just reinventing your crappy undocumented and untested version of delayed_job...…

Erlang started in the late 80s and saw production use roughly 95

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#154
post #31

My company is moving away from it. We built a few services but after a few years some of the original people that introduced it left the company and it became very difficult to hire for. New hires were either people wanting to learn (so we had to spend a good bunch of resources into teaching + end up with a system built by noobs to the language) or very expensive developers with a lot of experience in erlang and elix…

> Most of what you get from elixir in terms of redundancy, high availability, etc you can have that anyway from kubernetes, heroku or any PaaS.... you will need more than 1 server anyway, so...

For what is worth, that's one of the reasons why Elixir exists in the first place. I find the Erlang VM a fantastic platform and there is no reason to restrict it to high availability/distributed scenarios. Elixir developers should be productive and write performant and maintainable applications, even if at the end of the day they are just pushing to Heroku. Especially if you are coming from another dynamic language, such as JS/Ruby/Python.

As I like to say, in the "worst" case scenario, you can use Elixir as you would any other language, and that's completely fine!

If you want/need to go deeper, the abstractions are there to do so, and that's the difference compared to K8s: it is happening one layer inside. The high-level principles of redundancy and availability exist at the library level, so you can look at your connection pool, message queue, http clients, and find the same ideas there. Another area where K8s directly complements Erlang is in helping establish clusters. Overall, they are rather working together rather than stepping on each other toes. I wrote more about this here: https://dashbit.co/blog/kubernetes-and-the-erlang-vm-orchest...

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#155
We're using in a project (through Nerves framework) and slowly walking away from it. Hiring is the biggest hurdle; our product is simple enough that we can just have a bunch of .NET backend developers rewrite everything in Elixir. Hiring a .NET person is simple and cheap; hiring an Elixir dev is impossible where I live.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#156
post #31

My company is moving away from it. We built a few services but after a few years some of the original people that introduced it left the company and it became very difficult to hire for. New hires were either people wanting to learn (so we had to spend a good bunch of resources into teaching + end up with a system built by noobs to the language) or very expensive developers with a lot of experience in erlang and elix…

> Most of what you get from elixir in terms of redundancy, high availability, etc you can have that anyway from kubernetes, heroku or any PaaS.... you will need more than 1 server anyway, so... Yeah, last time I tried to get a hang in Erlang I felt it was trying to solve stuff that is already being solved by my infrastructure in a language agnostic way.

I'd say it's rather the other way around. Your infrastructure now solves what Erlang did 25 years ago.

Not to argue your point, though.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#157
I initially wrote the backend for my current startup in Elixir, using Phoenix. As many Elixir developers, I'm coming from the Ruby and Rails world. I really enjoyed the language and there are definitely things in Phoenix that are a vast improvement compared to what's available in Rails (changesets are awesome for instance).

However, after some weeks of development, I decided to move the project to Rails. We were still pre-launch so it didn't impact any users and only took a couple of days. The two main reasons for the move were:

1. *Ecosystem.* The Ruby and Rails ecosystem is just so much bigger and more mature. I cannot criticize Elixir for that, I'm just stating the fact. Ruby is many years advance and that shows in the breadth and maturity of libraries and deployment options. 2. *Re-learning basic things.* I found myself needing to learn how to do things in Elixir that I fully mastered in Ruby. I had to reinvent my own wheel in a way. And when you're trying to move fast to get your product out there, this is a waste of time.

In the end, I realized that for my purposes, Elixir/Phoenix is just not 10x better than Ruby/Rails. I can tell that learned from some of the mistakes of Ruby/Rails and many things are better. But they're not drastically better for the project that I'm building, which in the end is a GraphQL backend for a more-or-less CRUD mobile application.

Since the migration to Ruby, I'm much more productive and get things done much faster. I also spend a lot less time learning how to do X or Y. I felt relief when I didn't have to follow the Elixir ecosystem anymore and was able to unsubscribe from Elixir Newsletter and from the Elixir podcasts.

I know that my move does not help my criticism that the Elixir ecosystem is too small. But I value the success of my startup more than the need to help advance the Elixir world.

Maybe we will suffer long-term because of this choice, although examples like Shopify, Stripe or GitHub show that you can maintain massive codebases just fine in Ruby. But at this point of our startup, time to launch and velocity pretty much beats any other criteria.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#158
post #129
post #31

My company is moving away from it. We built a few services but after a few years some of the original people that introduced it left the company and it became very difficult to hire for. New hires were either people wanting to learn (so we had to spend a good bunch of resources into teaching + end up with a system built by noobs to the language) or very expensive developers with a lot of experience in erlang and elix…

"Also, I've read some comments where people mention "we don't need redis", "we don't need workers" everything is so much easier. That was our thinking at first. But then you realize on deployments you will lose your cache, or your background jobs, etc. So you have to persist them either in mnesia or in the database. At that point you're just reinventing your crappy undocumented and untested version of delayed_job...…

I think that it would be helpful if you provided examples about those things, good and bad. As it is it's mostly "erlang's" bad - perhaps if you offer the counterparts to what would be a better pick we could have a discussion - and then perhaps see how far the tree of dependencies goes on each side? And also what you would loose by picking up those solutions?

Just taking on some random stuff:

> Trivial pattern matching is replaced by this, and to be honest, non-trivial pattern matching is probably a code smell if not an antipattern; if you're reaching three levels down into a data structure

If the data structure is being accessed in a module to deal with it specifically then that is part of the knowledge of the module. And you can't escape that with or without pattern matching, since you'll have to codify those things in code anyway, be it long chains of ifs, switches, or whatever, you'll always have to write the code with the same level of knowledge about the data structure to express the same conditions?

> Modern Erlang performance is meh;

This I'm not sure. I've seen libs written in elixir beat libs written in C++ and they had to start a VM to be run. Obviously there will be plenty of stuff that a low level language can do more efficiently and faster I don't think anyone disagrees with that - but I think sometimes people sell erlang and elixir's speed short.

> but the entire gen_server set up, with its initialization phase and its three proscribed ways to call it and the need for an explicit "gen_server" module type are largely the creation of Erlang in the first place

I haven't seen any language with the concept of an independent program, that has a synchronous interface (mailbox), but can be modelled entirely asynchronously, and can't block whatever running loop. (and I read your other reply and thread). There's also a reason why some things have a particular way of being set up inside the beam, and that's mostly related to the guarantees it provides and with the fact that processes are transparent across nodes. If you take out the impossible to block scheduling and network transparency you'll be of course able to spin up something similar to a GenServer without the same "ritual" - but it no longer has anything to do with the former perhaps except its API?

> A modern message bus like Kafka or the dozen other choices doesn't impose an implementation language on you, nor does it impose that implementation language being the only one.

Given that you can have any socket, tcp or not, and easily handle it, this doesn't seem to be a fair point. On kafka or any other message bus the implementation language will be that of the sources and sinks communicating with kafka? Or you just write kafka and the other programs wake up as insects in a bed?

> Mnesia, a clustered DB was a neat idea, but in 2021 is so poorly featured and unreliable it doesn't even qualify as one anymore; nobody in their right mind would bring up an Erlang cluster just to back some other language's code to Mnesia as a database

I haven't used mnesia at scale and indeed heard people complaining about it, more than once so there's probably some issues there - having said that, in terms of similar db's (KV based and not SQL,etc) even db's like MongoDB and such need expensive and usually paid managing solutions right? And can still loose data unless you really cover your redundancy?

> But in 2021, you can do not just "better" than Erlang for all of them, you can do much better.

Could you tell us succinctly how? As a, usually, solo developer I would be really interested in knowing, and I'm not asking sarcastically.

I also don't understand how it's difficult to integrate Erlang with other things, it basically has a standard lib very accommodating of sockets and inter process communication through STDIN/OUT, with effective monitoring on top.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#159
post #116

A couple of guys at my company did their first startup using Elixir years ago, but they weren’t devs so they had to contract a company to do it. They regret it now because no one at our company can work on it, and they have to rely on the contractors who charge a lot. Sure someone could learn it, but we’ve got more important things to do. As much as everyone on HN loves it, you’re going to have to work hard to get ot…

> They regret it now because no one at our company can work on it > Sure someone could learn it, but we’ve got more important things to do If they can't give you 2 or 3 days to learn a language then they don't regret it that much I guess.

I'd say your unlikely to pick up the entirety of OTP in a few days, but agree that it should'nt be too daunting to train in it.

Re: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?

#160

Very satisfied with Elixir! I think it just fits my way of thinking. I love the terse, but explicit code, the VM, OTP, pattern matching, working with immutable data, integrated tooling, documentation support. The community is great, too. The popular packages are top-notch, but as others have said - there might be issues finding what you need. My personal experience seems to be the opposite though - when going from El…

"Installation - Caramel Manual" https://caramel.run/manual/getting-started/installation.html
Post reply on HN