Live data from Hacker News

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

news.ycombinator.com

291–297 of 297 posts

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

#291

We’ve skipped so many additional things like Redis, Memcached, Sidekiq and tons of libraries because it’s so easy to write a module to replace stuff. Switched from ruby to elixir 4 years ago and the only time we touch ruby is to maintain some old system. It’s so darned easy to add functionality to an exiting app that you have to be careful of bloat. And the functional paradigm is like second nature now. It’s hard to…

How do you deal with deployments and not losing things you could otherwise persist in Redis or Memcached? Of is your application stateless in that way?

It’s stateless in that way. We’ve redesigned things in such a way that there is more idempotency in the code that does not depends on an external holder of state that is not the primary database.

It’s hard to explain, but the end result is that we don’t reach for Redis as much as we used to.

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

#292

Earlier quoted context omitted.

It is tempting to just drop down to raw queries but then when I read about things like composable Ecto queries ( https://medium.com/flatiron-labs/how-to-compose-queries-in-e... ) it makes me want to stay at the higher abstraction level. The final example in that post: EctoCars.Car |> EctoCars.Car.with_color("blue") |> EctoCars.Car.with_transmission("automatic") |> EctoCars.Car.with_engine_horse_power(200) |> EctoCars…

Yes, we use that pattern in the Elixir project I'm working on. But that's a simple query despite all the JOINs. It's just a waste of time to convert complex queries into Ecto. Maybe the reason is that I build them in the database using it as a REPL. Then I have working SQL and a lot of hard work to turn them into Elixir. Or Ruby, or Python or whatever. I played that game for far too long. I give up immediately now, w…

I think the parent commenter is not saying to write your one time use query in elixir using wrapper modules with Ecto, but tried to show that queries generated by Ecto are pretty clean and understandable in compare to other popular DataMappers/ORMs

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

#293

I've had an niche event ticketing Elixir/Phoenix app in production for 4 years and have had next to zero problems. It gets very bursty traffic (100s of simultaneous users when an event opens for ticket purchases with load quickly tapering off in a negative exponential distribution) and the load average barely changes with insanely fast responses on a $10 VM. I think the only downside for me is having to squint sidewa…

That sounds like a fun but challenging project: Convert sql to idomatic ecto. Mostly as a way to help people learn ecto better. Probably a long-tail-y issue, but maybe one where a 70% solution is useful?

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

#294
post #106

Having done python for many years and coming to Elixir the things that I find Elixir does really well are: - mix and the general tooling (package management, testing, deployment) - iex - specifically being able to run a shell at the same time as running my app. It makes it easy to test and explore code from the REPL - documentation (both in iex and hexdocs) - Navigating Elixir documentation is standardized and easy -…

and the standard way of doing config is great.

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

#295
post #201

Earlier quoted context omitted.

Those advantages are really overblown and not worth the hit in missing libraries or missing hires.

Totally agree. I've been in this industry since 2001 and never, ever had a performance problem which couldn't be solved with just thinking what your code is actually doing. The bottleneck has been always the database, or the network, etc. The only problem I've had with threaded languages is running out of threads/processes due to making external API network requests, etc, but you learn to not block threads by using j…

Performance is one thing. I think another major benefit people cite for using Elixir/functional programming in general is the productivity aspect. Of course you may argue that this is easily outweighed by hiring pains as a company grows. Just wanted to mention that from a pure language/developer perspective, I'd much prefer to work with Elixir than something like Java or even Go.

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

#296
post #151

Earlier quoted context omitted.

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 dr…

thank you for sharing, I am removing elixir from my resume after reading all these comments haha

lol not sure if you're serious or not, as Elixir job offers are certainly still on the rise.

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

#297

As an SRE who has had to baby sit production elixir apps I'd highly recommend first having a talk to your operations guys. I've never had a more challenging system to debug and keep running. It's only a matter of time until you hit something as confusing as https://elixirforum.com/t/dbconnection-connectionerror-pid-x...

Haha I'm not sure if we know each other since I know the issue you describe in this link. Regardless, I think this is a somewhat weird example since the it should not be DevOps' duty to look at and try to understand an error that stems from Ecto. And our company did face this issue, but this was largely related to the DB optimization and the Postgres instance instead of anything language-specific. If you have bad DB schemas and optimizations you're gonna face the same issue no matter in Java or Go. Saying that you've "never had a more challenging system to debug and keep running" sounds really dramatic as our Elixir apps have been running fine 99% of the time and barely even triggered any on-call incidents.
Post reply on HN