“these libraries are just what otp does natively”.
“Here are some things in this library that otp doesn’t do natively.”
“You could build a erlang library for that”
Having enthusiasm for erlang/otp is fine. It’s a pretty great stack. But there are lots of reasonable reasons not to use it and lots of distributed systems knowledge we’ve picked up since it was designed. Some of which are encoded in libraries like these.
Imitation is the sincerest form of flattery that mediocrity can pay to greatness...
Im guessing that pretty much sums up how you feel. "Why isn't my tool more popular" is really the subtext of your question here.
A lot of GO devs came from java,ruby,python,php ... For 3 out of 4 of those static typing is an upgrade. For all of them compile to executable is a massive change and a good one. We're not moving code and runtime to a box to execute...
Its a breath of fresh air that if I need a tool I can quickly write it in go, compile it, throw it on to the server its needed on and be done with it. I dont have to instal vm/runtime/server to make that code work.
Dont think that matters? I have a Rpi camera server that is just a go binary running... All I did was wget it and turn it into a service.
Furthermore every one who is coming from those languages has seen upgrades go all sorts of directions.. php 4-5-6-7 were somewhat smooth but evolved the language, there is a way. Python 2 v 3 you can evolve a language and there is a BAD way. Python venvs are a pain... and ruby gems have their issues... Go's no breaking promise and packaging choices speaks to all the things that these devs lived through.
And the laments of "go lacks" or "too much boiler plate" are features not defects. Write dead simple, easy to read code. Deal with your errors on the spot in a pattern that everyone will recognize. Im not sure that I qualify Erlang/Elixir easy to read or "simple" (effective I will give it).
So yes, people are stealing OTP... take the compliment and go out and invent something else cool that we can "borrow".
Pick a language, any one, and there's probably a post by someone complaining about a bad design decision or a wart on its fuzzy ass... Nothing is perfect.
Yes go has flaws... I find that first class, high speed, testing makes the fact that I screw these things up all the time moot. Test, fix move on to the next project.
OTP has either a usability issue or a marketing issue
Static typing: I've worked for years with dynamically typed languages and won't go back. Dynamic typing was a big mistake that have wasted years of developer time. Dialyzer isn't an option.
Syntax: Erlang's syntax is not great. Enough said. I think Elixir isn't better, or at least doesn't offer enough of a value proposition over straight Erlang.
Native compilation: Erlang works well for control systems. It's absolutely subpar for anything requiring compute performance or I/O. This means you may find yourself in a sticky position if your backend app has hotspots needing very low-latency, high-performant logic. You may have to write bits in C or some other natively compiled language.
Friction: Erlang is hardly used anywhere. It is sufficiently weird (functional, Prolog syntax, immutable, the process model, antique tooling, not to mention OTP itself) that it's not just something most developers are going to pick up in a day. Forcing Erlang on a team not consisting of a monoculture of Erlang developers is a huge ask in any company. It's hard to hire for. You can't just reassign a random "full stack" developer within a company to a team that uses Erlang, if all they know is JavaScript/TypeScript or Go for that matter.
I think fans of Erlang have to realize that no matter how much they post comments like yours, it's just not going to take off. Sometimes superior tech just doesn't pan out (Amiga, BeOS, QNX), but we move on.
I am optimistic about Gleam, though. A much better language that I would actually want to use, and there's interop with Erlang/OTP, which is a great way to bootstrap a language.
This is mostly accurate, but I think Erlang is a good fit for network I/O, especially network I/O with lots of concurrent clients.
> Friction: Erlang is hardly used anywhere. It is sufficiently weird (functional, Prolog syntax, immutable, the process model, antique tooling, not to mention OTP itself) that it's not just something most developers are going to pick up in a day.
At my Erlang job, almost nobody we hired had Erlang experience. It certainly took longer than a day, but IIRC, my first big Erlang server stuff deployed (and mostly worked) a month in, and I was focusing on a PHP service. I probably did some minor stuff earlier, but I no longer have changelogs to reference.
Yeah, some of the OTP philosophy takes a while to understand. As for antique tooling, we just used Make, and that's what I continue to use for my Erlang projects, and well Make is Make... once you learn it, it works. Figuring out how to get dist running and pop debug shells when and where you need them is work, but if you're dropped into a place that already has that, you don't need to figure it out yourself, either.
If you'd like, you can attribute that to lack of Erlang experience or skill on my part. But in practice, we instead replaced that system with Go running on a Kube cluster and it's now been rock solid.
I would choose Go every single time. It has a better story for teams working together, largely due to better typing. Lacking types (and specs don't cut it), I still found I had to go up multiple function calls to understand what the parameters were, how they could be used, etc. so much state has to stay in your head, which I did not expect from a functional language
Recreating programing language stuff, after telling us we don't need them.
Just as adding more routing functionality recently.
To some extent golang fills that void because of net, it's application in projects liks k8s, and it's concurrency dx through goroutines. But it's also had problems that I don't want to dive into here that I think make it more divisive than would be expected.
- https://medium.com/coryodaniel/from-erverless-to-elixir-4875...
- https://elixirforum.com/uploads/default/original/2X/f/fdd70a...
Perhaps you’ve heard of Discord, Pinterest, WhatsApp, Spotify, Moz, PepsiCo? I’m sure I’m missing a whole bunch of names as I’m in the bootstrapped world where you’re seeing a lot of Elixir (especially now that LiveView is stable).
Tell me, why would you pick something that needs 8 servers to do the job Go or Rust could do with only 1?
Allow me to introduce you to this language called PHP.
Usually the hardest thing for devs I've seen learning Elixir is just getting used to immutability. What were the severe problems with the learning curve your former startup encountered?
https://laravel.com/ (or Django or Rails)
because it brings most of the things you need to write in other frameworks by yourself. Too many reject it, because, PHP!
Can build for Linux, macOS, Windows, Android and iOS, either JIT (better for servers, sometimes GUI/Games) or AOT (better for phones, CLI, serverless).
Its build system and CLI tooling is very productive and easy to get started with.
In PHP:
return base64($myText);
is all I need (or sha1(), etc). The standard library (with it's bizarre inconsistencies that you stop noticing after half a decade) is quite complete.In C#, it's much more involved to do these "easy" things. Even reflection is easy in PHP:
$class->$dynamicMethod(...$props);
I moved away from C# about 3-4 years ago, and I don't miss it.The base64, in most languages, requires importing the right package or namespace.
Converting bytes to Base64 is just Convert.ToBase64String/CharArray(bytes).
I can't believe someone would seriously and unironically suggest PHP. It does not even compete at the only area it's applicable at being back-end or server-side rendering.
> It does not even compete at the only area it's applicable at being back-end or server-side rendering.
I'm not sure what you mean here. I've deleted my blog, but I once published benchmarks showing PHP was faster than C# in some cases. I'm currently working on a reimplementation of some C# stuff in PHP and competing with C# quite well.
PHP is written in C; it's quite fast.
To think that an interpreter, where each single instruction is, in the very best case, a computed goto jump with args evaluation, would execute the code faster or comparable to code that is compiled to CPU instructions, is insanity. Even when/if PHP gets JIT compiled, it still has the same language constraints where even something as sophisticated as V8 has to contend with language spec so it cannot optimize away e.g. property access.
It might be best to re-evaluate prior assumptions and knowledge which do not correspond to reality.
heh, right back at you dude. Opcache JIT is running on an actual CLR just like C#, it can even AOT compile.
From the article: Spotify is using Elixir for an internal ad debugging portal.
So no. Spotify backends are not written in Elixir but:
"The listener-facing backend services are done with Java."
But of course most large orgs have a little bit of everything.
Elixir is promoted by enthusiasts a lot but once you start writing a project in it, you’ll realize after a couple of months you are writing a lot of things yourself, popular tools don’t have bindigs, lot of libraries that do exist are abandoned etc.
I worked on a Phoenix project that had a Graphql API, we couldn’t integrate it with Apollo Graphql because the Elixir library didn’t support some features, had them in the backlog for years. The company had 20+ other services in different languages, none had this issue.
Though I am not buying the idea that lack of static typing would hinder adoption as many of the most popular backed languages are traditionally dynamic with gradual typing only becoming popular in recent years.
We need to drop this fight around tools. Discussions are fine, but "My tool is better than your tool" doesn't get us anywhere (not saying you're doing this).
In general there is not a lot of innovation (in the mainstream), the only recent thing that comes to mind is Rusts borrow checker.
It's been painful to see how much Java has squandered it's potential. Putting aside something like OTP, just the concurrency in Java has been confusing - project loom has been on the horizon for a long time, and it makes it difficult to invest in something reactive like Reactor/Webflux. Or, having quickly reviewed elixir, since it uses the actor model, something like Akka - which words don't even describe how much of a dumpster fire that whole thing became (which I feel like I dodged a bullet because my old boss was super gung-ho about how Akka was the next big thing a few years ago). And if we're talking about things on a platform level, then... spring is not it. Others have mentioned K8s, what takes a simple yaml config there takes like huge guides, a wing and a prayer on Baeldung articles, and a soul crushing soup of XML for config (yea I know Spring supports other formats, but it's roots are in XML and old guards just copy that stuff over).
It doesn't seem like Erlang/Elixir community have these problems. Idk if it's because I am not invested in it so the grass looks greener on the other side, but it really does seem like they've got a productive and focused solution.
I only have some experience with Scala/Akka. Not sure if Akka was bad or it's the actor model, I found it hard to debug and understand code written by others.
I'm now 50+ and I use Go. It's so simple it even works for old people.
While others nod and think, "I did choose Go for some valid reasons, great library."
I just see too many comments on HN from people that have decades more experience than me that say that the theory of these amazing languages simply does not survive contact with the real world most of the time. I'm sure there are great things built with them somewhere out in the world. I just don't think its worth it for the vast majority of developers to worry about.
(amongst other languages!)
The other people that comment on it say the same thing. They use it for personal projects but can never make it work at a corp job.
I was a little bit unclear though in my previous comment. I mean production as in at work with lots of people besides yourself.
And there's some Elixir based loggers: https://logflare.app
Also, we shot ourselves historically with Scala which had the same promises.