Live data from Hacker News

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

news.ycombinator.com

221–230 of 297 posts

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

#221
post #196

Earlier quoted context omitted.

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

The core insight of Erlang is that having lots of little processes communicating over a message bus is a great way to design code. It also proves by demonstration a statement that many programmers, especially in the past decades, would have found hard to believe, that you can structure code as a whole bunch of relatively small self-contained services. Many programmers, perhaps even today, would not believe how far yo…

But Erlang provides something that Kubernetes/Docker/Systemd isolation does not: fine granularity / per request isolated processes. Is the difference between a code bug killing a single call in a VoIP system vs killing an entire OS process with hundreds of them.

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

#222

Earlier quoted context omitted.

OOP also leads to spaghetti code. Everything turns into a steaming pile of crap if you don’t work to avoid that reality.

Yes, but the difference is that OOP can scale indefinitely but FP cannot. If you don't co-locate related state and logic, ensuring that each piece of state reaches the correct components becomes a logistical nightmare at scale (either needs to traverse many intermediate components or needs to be exposed globally to all components). If you don't allow components to mutate state locally, you need a strategy to distribu…

>> If you don't allow components to mutate state locally,

Code mutation is, in my personal experience, a shit show. With Elixir, you I have to worry about some random process mutating your data because it can't, as it's literally immutable. I have never, not a single time, wished I could mutate a data structure in Elixir, because I can think of no case where it makes my life easier. Even quasi-objects, in the C++/Java OOP sense, like GenServers w/ internal state may appear to be mutating data from the outside, but from the inside they still rely on copying the data to update the state. It's so much easier for me to reason about.

Maybe different things simply appeal to different people. I could make arguments for OOP being harder to scale, but maybe that's just true for how my brain works.

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

#223
I have been writing Elixir full time for over 4 years now and I could not be happier with the language and surrounding community! With an incredibly small team (just myself and one colleague working on the backend), we are able to develop and operate very high throughput applications that reliably handle over 100k requests/s (2 main web facing apps, plus a handful of supporting services). We generate millions of dollars of revenue for our customers each week, and sleep very well at night.

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

#224
post #164

I'm very bullish on Elixir as a language, but I temper that with the reality that I don't think it will become a mainstream language (in the next few years, at least). I picked up Elixir probably 4-5 years ago when a co-worker kept recommending it and wanted to explore it more. We finally got the approval to do a microservice in it that was well-suited for it. Over time it became one of the two "blessed languages" al…

Shrink probably, sorry its not growing and it never became popular...

Sorry, have you worked with the former employer I'm mentioning? I'm talking about a specific use case that has specific needs and challenges. Blanket comments like yours aren't really helpful or necessary.

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

#225
post #196

Earlier quoted context omitted.

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

The core insight of Erlang is that having lots of little processes communicating over a message bus is a great way to design code. It also proves by demonstration a statement that many programmers, especially in the past decades, would have found hard to believe, that you can structure code as a whole bunch of relatively small self-contained services. Many programmers, perhaps even today, would not believe how far yo…

Thanks - that's very helpful.

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

#226
I work for an Elixir shop right now, and am very fresh (started a few months ago) and this is my first Elixir job.

My first impressions are that Elixir is different, but not necessarily better. Having come from Go, which is a very manual process, Elixir comes with a lot baked in.

With any niche language (which I consider Elixir to be) the benefits don't really kick in until the last 20% of adoption. The first 80% can be done by any language, with very little deviation from the other.

That last 20% is ETS, OTP, and other Elixir/Erlang-esque features, and I don't think 90% of the companies that adopt a language really gets into that level. Kubernetes, Caching, Horizontal Scaling is now so much easier and cheaper to bring in than an expert or the investment into the language that niche languages don't provide all that much value at this point.

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

#227
I don't like the operators' logic in elixir. There should be one for assigning variables, one for pattern matching and there is no rebinding of variables.

Something like:

  //for assignment

  x = 1 

  //for pattern matching 
  x == 1
Automatically translated.

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

#228
post #18

Earlier quoted context omitted.

Interesting, some of the libraries you mention such as graphql and http, I feel there aren't better libs that exist than absinthe and ranch/cowboy. Which graphql library do you prefer over absinthe in other ecosystems?

From what we understood (back when we shopped for a lib, which was a long time ago), absinthe advertised itself a lib to write graphql servers ; we were looking for a graphql client,so we ended up using a smaller lib. (And it's entirely possible that we simply picked the wrong lib ! Which is, still, kinda my point. Every elixir lib is "young" by virtue of the language being "young", so you can't use "age" as a heuris…

> absinthe advertised itself a lib to write graphql servers ; we were looking for a graphql client

> And it's entirely possible that we simply picked the wrong lib !

This is 100% a failure of a decision-making process, not the language ecosystem. Picking the wrong library could be avoided by the smallest amount of diligence, it's pretty language agnostic.

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

#229
post #144

I don't use it professionally, but I built a side-project in Elixir a few years ago and was amazed at how much I was able to get done with such a little amount of code. The service is still running today with basically no maintenance. For me it was a great choice and I would totally build my next project with Elixir on the backend.

I think of this "applications don't need much maintenance" observation when reading some of the "libraries don't get updated often" complaints here. A lot of the libraries in the ecosystem are already super stable and that's a great thing!

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

#230
post #197

Earlier quoted context omitted.

You can use alpine.js. There is even a way to integrate it with LV: https://dockyard.com/blog/2020/12/21/optimizing-user-experie...

response.text()) .then(html => { $refs.dropdown.innerHTML = html }) " @click="open = true" >Show Dropdown Seriously? This has to be a joke.

I was stumped when I saw it just now. What the heck...I guess the next thing, an amazing breakthrough, is going to be Alpine.scss style="background-color:$red-secondary;font-weight:bold"
Post reply on HN