Live data from Hacker News

10 years-ish of Elixir

dashbit.co

91–100 of 127 posts

Re: 10 years-ish of Elixir

#91
post #8

Happy Elixir user here. At work we have a use case that isn't covered by José's high-level overview of the domains Elixir's used in: we run a massive multiplayer game server on it. This is actually a really good fit. (It kind of rhymes with the original use of Erlang, being telecoms infrastructure.) We get outstanding concurrency support, high reliability, and really efficient development times. I can't imagine shipp…

Do you use it for server side game logic too?

It's not as ambitious as an MMO, but I like to use MUDs to learn new languages. I've been (slowly) working on one to learn Elixir and I'm actually finding the concurrency model somewhat difficult to use for the MUD - especially the single world that every player connects to.

I ended up writing my own kind of software transactional memory library to help me out: https://github.com/stevbov/stm_agent

But altogether my design feels fairly un-Elixir-like. It seems like the language would shine more in a problem space with more process isolation. When it comes to the game world, pretty much any process could potentially depend upon any other process. Especially once you get into scripting NPCs.

Re: 10 years-ish of Elixir

#92

it looks really awesome! Can someone point out the negative sides (or drawbacks of any kind) ? What about finding elixir experts/freelancers? What about integration with .Net and the xamarin forms ecosystem?

Drawbacks I see are: 1. no static typing. With typescript having taken off, and now even python and ruby becoming more and more feasible to use in production with static typing, switching to a new dynamic language is a hard sell for me. 2. limited ability to take full advantage of some of its unique features in many cases. The runtime and the included OTP library/paradigm has some really cool features with its approa…

> limited ability to take full advantage of some of its unique features in many cases. The runtime and the included OTP library/paradigm has some really cool features with its approach to processes and concurrency with the actor model, and features like hot code reload. But IMO the industry and popular best practices have evolved in a different direction that make these things less compelling.

Think about it this way. You already reap a lot of benefits by just handling requests with Phoenix. Pre-emptively scheduled light-weight processes that does not have to run GC in most cases is already a huge win. Don't you think?

You certainly don't have to be 100% buy-in in every single OTP or Beam feature. Really. Actually, it makes sense to do things "the old" way when you feel more confident about them.

Re: 10 years-ish of Elixir

#93

it looks really awesome! Can someone point out the negative sides (or drawbacks of any kind) ? What about finding elixir experts/freelancers? What about integration with .Net and the xamarin forms ecosystem?

Drawbacks I see are: 1. no static typing. With typescript having taken off, and now even python and ruby becoming more and more feasible to use in production with static typing, switching to a new dynamic language is a hard sell for me. 2. limited ability to take full advantage of some of its unique features in many cases. The runtime and the included OTP library/paradigm has some really cool features with its approa…

Elixir has @spec and Dialyzer and we enforce using it where I work.

Re: 10 years-ish of Elixir

#94

Earlier quoted context omitted.

Drawbacks I see are: 1. no static typing. With typescript having taken off, and now even python and ruby becoming more and more feasible to use in production with static typing, switching to a new dynamic language is a hard sell for me. 2. limited ability to take full advantage of some of its unique features in many cases. The runtime and the included OTP library/paradigm has some really cool features with its approa…

> 1. no static typing. With typescript having taken off, and now even python and ruby becoming more and more feasible to use in production with static typing, switching to a new dynamic language is a hard sell for me. While it's true that Elixir is a dynamic language, there's much less "magic" compared to Ruby or PHP, the language server has good autocompletion and warnings.

There's not a lot of magic in php nowadays with strict typing and unions.

Warnings at compile time are a plus yes.

Re: 10 years-ish of Elixir

#95

Meanwhile te company I work for is moving away from it. We cannot find enough people with enough knowledge to be already productive in it. Not many want to learn it because it is considered pretty niche, and the ones willing to learn will need many months or years to be productive and build with some level of quality, and once they learn they move away to bigger companies which pay more. We end up paying to people to…

Just curious, what is your company moving to, and are you far enough into the transition to verify that productivity and retention are better with the new language?

Re: 10 years-ish of Elixir

#96

Earlier quoted context omitted.

Thanks, I'm not GP but have the same questions. What about access control? That's often directly tied into business logic, but it's so elegant and convenient to do it in the controllers or even the router using the pipelines. In fact a ton of the examples (I think even the Chris McCord Phoenix book) does exactly this, presumably for that reason. However I did that with an app and haven't been very happy with it becau…

Personally, here is what I do: if access control is part of the business model, then I put it in the context and, almost always, I raise. Otherwise, continue doing it in plugs. That's it! For web apps, you should almost never be triggering these invalid access control state, because it means the UI is allowing users to do something they are not really supposed to do. If the user cannot delete a resource, then the but…

That is incredibly helpful. Thank you!

Re: 10 years-ish of Elixir

#97

Earlier quoted context omitted.

Thanks, I'm not GP but have the same questions. What about access control? That's often directly tied into business logic, but it's so elegant and convenient to do it in the controllers or even the router using the pipelines. In fact a ton of the examples (I think even the Chris McCord Phoenix book) does exactly this, presumably for that reason. However I did that with an app and haven't been very happy with it becau…

There’s already an article on this you can find here: https://dashbit.co/blog/a-new-authentication-solution-for-ph... The GitHub for the generator is here: https://github.com/aaronrenner/phx_gen_auth Basically if you need something different it might be worth forking the generator. I might look at passwordless login at some point.

That's phenomenal, thank you! I added the link to my "to do" list and realized it was already there :doh:

This is wonderful, exactly what I need.

Re: 10 years-ish of Elixir

#98

Meanwhile te company I work for is moving away from it. We cannot find enough people with enough knowledge to be already productive in it. Not many want to learn it because it is considered pretty niche, and the ones willing to learn will need many months or years to be productive and build with some level of quality, and once they learn they move away to bigger companies which pay more. We end up paying to people to…

Thanks for sharing your experience. I love Elixir, but I have yet to find a way to be truly productive with it. Funnily enough I had a very similar experience with Go.

* It was very hard for our startup to find any Go developers.

* The Go language server would very often cause massive CPU spikes.

* At the time I was using it, the community support in Go was really, really bad.

I'm sure things have changed a bit, but there are always growing pains when choosing a niche technology.

Re: 10 years-ish of Elixir

#99
Celebrating my sixth year with Elixir! The adoption rates here is still quite low (Malaysia) but I'm glad to say that onboarding new Elixir developers has always been a breeze.

Re: 10 years-ish of Elixir

#100
Great read. Two days I wrote about my own experience learning Elixir to build Xkit[1]. As I wrote there, the language guide is one of the best I've ever seen and is pretty much all you need to get started.

There are drawbacks of course (typing, deployment) but the pros far outweigh the cons for me so far. Here's to the next ten years!

[1] https://xkit.co/post/pivoting-with-elixir-how-i-learned-a-la...

Post reply on HN