Live data from Hacker News

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

news.ycombinator.com

171–180 of 297 posts

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

#171
post #89
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…

It astounds me how much I hear about the “VSCode extension uses all my CPU” thing. Yes, the extension uses a ton of CPU for 15 minutes the first time you set it up. It’s building a giant database for type information to give you type checking and hints. It does this ONE TIME when you first set it up. It explains this. It’s really not a big deal. I’ve found the extension to be great, I’m not really sure what you are r…

It isn't just "ONE TIME" for me. The extension freezes up often and completely stops giving autosuggestions or warnings, and the only way to fix it is to delete the .elixir_ls file and rebuild the database. When I say "often", I mean there are some days where I have to do that at least once an hour, and 5-15 minutes of high CPU usage every hour is just way too much to be acceptable.

I love Elixir and the ElixirLS extension is the best I've found so far, but that's not saying much. The extension has enough issues with it to make it very frustrating to work with, and even enough to make the entire Elixir experience not worth it in many cases.

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

#172
post #45

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…

I write very few fragments and many more raw queries. No ORM is worth the trouble of going too deep into the rabbit hole of learning for the nth time how to write SQL in X.

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.Repo.all()
generates very clean SQL:

    SELECT c0."id", c0."color", c0."vin_number", c0."specification_id"
    FROM "cars" AS c0
    LEFT OUTER JOIN "specifications" AS s1 ON c0."specification_id" = s1."id"
    LEFT OUTER JOIN "transmissions" AS t2 ON s1."transmission_id" = t2."id"
    LEFT OUTER JOIN "engines" AS e3 ON s1."engine_id" = e3."id" 
    WHERE (c0."color" = $1) AND (t2."type" = $2) AND (e3."horse_power" > $3)

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

#173
post #116

Earlier quoted context omitted.

> 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.

You usually don't need to understand the entirety of OTP to work on an elixir code base. For some Phoenix projects you don't even need to know what OTP is to get things done.

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

#174
post #90

It's not argument "against" selecting it (it's a free world, and mileage vary), but a couple of scar-earned advice: - Be careful about libraries. If you know that your system has to interact with X, don't assume that there is a running, idiomatic, maintained libary for X on `hex.pm`. Do a bit of due diligence. We had experience ranging from `meeh` (oauth2, graphql, http) to `pretty bad` (mqtt, swagger.) But as other…

What you said about releases is somewhat true, but I’d like to clarify. It has absolutely changed a decent amount over the last few years. Because it used to suck. It’s not really in flux, more like being improved because everyone knew it sucked. It’s in a much better state now and I’m very happy with it where I wasn’t before. Also, I would say that “in flux” isn’t a proper characterization because it was always back…

Fair enough. I just haven't fully recovered from the PTSD of "deploying something that reads environment variables at startup" four years ago.

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

#175
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...…

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

Really appreciate the effort that you've put into this post but it's 99% saying you can do better but without examples of stacks that would be better. For those who don't have your knowledge could you provide some examples?

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

#176
post #141

Earlier quoted context omitted.

Admittedly it's more or less London-based at the moment, unfortunately! Which timezone are you in?

Currently, with summertime, it would be GMT+2. Not far from UK, CZ :)

We're hiring in CZ :)

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

#178
post #89

Earlier quoted context omitted.

It astounds me how much I hear about the “VSCode extension uses all my CPU” thing. Yes, the extension uses a ton of CPU for 15 minutes the first time you set it up. It’s building a giant database for type information to give you type checking and hints. It does this ONE TIME when you first set it up. It explains this. It’s really not a big deal. I’ve found the extension to be great, I’m not really sure what you are r…

It isn't just "ONE TIME" for me. The extension freezes up often and completely stops giving autosuggestions or warnings, and the only way to fix it is to delete the .elixir_ls file and rebuild the database. When I say "often", I mean there are some days where I have to do that at least once an hour, and 5-15 minutes of high CPU usage every hour is just way too much to be acceptable. I love Elixir and the ElixirLS ext…

Is it possible to share more details about your particular setup? I believe you, but this doesn't sound right. I've used the plugin on all three major operating systems in a wide variety of projects and configurations, and have never had this happen to me. Curious to learn more about what could be the culprit for you.

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

#179
I think it's the greatest thing ever. I wrote like 300 words over two blog posts here: https://amattn.com/p/the_sublime_developer_efficiency_of_eli...

tldr:

- It’s quirky - There’s a learning curve - Taking the time to climb that curve can result in elegant solutions - The endgame is high developer efficiency

Not only that, but I find it fun and enjoyable. The ecosystem isn't the largest, but the other positives more than make up for the deficits for me.

I only started learning elixir around November or so last year and I've launched two SaaS products in the past 6 months.

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

#180
My 2c. I was learning Elixir / Phoenix for a startup but found it was missing way too many libraries & lacked the breadth & depth of the Stack Overflow knowledge base as compared to the Ruby on Rails ecosystem.

It was a cool experiment. Most devs would have learnt other Object Oriented Programming languages but learning Elixir would mean switching to a different paradigm.

Post reply on HN