News for hackers. Stuff that matters.
Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by jerf on Tuesday May 18, 2021 @12:54PM (#27197520)
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 you can get with such a model, thinking that fairly massive monoliths are still really the only way to scale up.

Rather than specific examples, let me provide terms to google, as these are now such rich spaces that even a list of examples would be impoverish. Google "message bus"; there's half-a-dozen solid production options you can deploy yourself, and all the major clouds have at least one option, often more. Pervasively use a message bus in your architecture and you can't hardly help but end up programming in a very Erlang-esque fashion.

"Database"; no longer is an SQL database over a socket your only option. Some databases even combine a bit of message bus functionality, like Redis, or Postgres.

Restarting and reliability: Process-level restarting of much smaller processes has become popular with things like Kubernetes, Docker, and even just plain ol' Systemd. (This is one place that I will assert that systemd is better than the init.d-based system, which had a solid story on how to start processes but a very ad-hoc one on restarting failed processes.) Internally, consult your favorite language for monitors or restarts within a process; I've got one for Go called suture. Getting an idiomatic restart into a language depends on tons of details and I don't have a good sense of the options across dozens of languages. Note this only really matters if your language and program is handling a lot of things at once in a single process, which is not always the case.

That's most of what would matter, I think. Most of the rest of Erlang like "pattern matching", well, do whatever they do in your language. Which may be pattern matching.

Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by louissm_it on Wednesday May 19, 2021 @06:45PM (#27215470)
This comment sold Elixir for me more than anything. On a small team, each of those are massive headaches. Using Elixir I can have all of that with a unified vocabulary, documentation, deployment, syntax, repository, etc. Sure, each might be slightly worse that the best thing on offer today, but I don’t have to glue them together.
Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by rhizome31 on Thursday May 20, 2021 @03:42AM (#27218486)
And you can swap a built-in feature for an external component later, if the need arises.
Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by rhizome31 on Tuesday May 18, 2021 @10:12PM (#27203776)
Sure, you can achieve what Elixir does by combining a bunch of different components replicating its features, all with their different execution schemes, configuration syntax, deployment constraints. That's the whole point of Elixir, it gives you an integrated environment to do these things with consistent vocabulary, documentation and deployment strategies.
Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by nahuel0x on Tuesday May 18, 2021 @02:16PM (#27198795)
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 ch... by shdh on Wednesday May 19, 2021 @07:49AM (#27207292)
Do you mean actors? I kinda hate how they’re always referred to as processes.

https://github.com/actix/actix https://github.com/akka/akka

Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by ramchip on Wednesday May 19, 2021 @12:47PM (#27211175)
The actor terminology isn't used in any official sources since Erlang processes are not quite "actors" in the actor model sense. They were inspired by OS processes.

http://erlang.org/pipermail/erlang-questions/2014-June/07979...

Re:Ask HN: Are you satisfied with Elixir or do you regret ch... by klelatti on Tuesday May 18, 2021 @02:56PM (#27199363)
Thanks - that's very helpful.