10 ms·
Erlang/OTP 26 Highlights
- elitepleb 3y ago>functions can now be defined directly in the shell Finally, Joe can stop rolling in his grave, as newbies will no longer have to ask why Erlang forms are not possible to express in the shell. See the "Funs and defs are not the same" section from https://joearms.github.io/#2013-05-31%20A%20week%20with%20Elixir https://joearms.github.io/#2013-05-31%20A%20week%20with%20El... for details
- arthurcolle 3y agoI don't think I'd come across this blog post before but I'm a big fan of Joe Armstrong. Thanks for linking!
- nvarsj 3y agoI’ve been doing Erlang professionally for the last few months. I have to say, it’s a breath of fresh air after decades of Java/Scala/ /golang/. It’s unfortunate it isn’t more popular. OTP and Erlang make it so easy to build distributed systems end to end. It makes my past professional efforts look like a shoddy amateurish joke. If you find yourself needing to build a distributed stateful service, Erlang/OTP should be the top choice.
- ed25519FUUU 3y agoIsn’t akka basically a Javafied version of OTP?
- cmrdporcupine 3y agoThe Joe Armstrong blog post linked by another commenter above actually addresses some of this: https://joearms.github.io/#2013-05-31%20A%20week%20with%20Elixir https://joearms.github.io/#2013-05-31%20A%20week%20with%20El... TLDR: GC and runtime behaviour generally are built from the ground up in OTP with this kind of concurrency and programming model in mind. Its advantages can be approximated but not fully replicated in "general purpose" runtimes like the JVM. Consider that the JVM model is for long-running shared memory systems. So its GC in particular is built around that model. Erlang/OTP as I understand is a lot of short lived processes that communicate through messages, sharing little state. Designing a GC for a system like that has entirely different trade-offs. Isolated short lived actors can throw-away their entire memory state at process end, without waiting for a generational collector to discard the garbage, etc. And that's just the GC. In general in a system bolting "actors" onto another shared memory language it's always going to be possible to "escape" that framework and do things in another paradigm. That might be fine for the real world, but it negates some of the advantages that OTP brings to the table.
- sph 3y ago"It didn't take long, but pretty soon my gut feeling kicked in. This is good shit." — Joe Armstrong, on Elixir (2013)
- bmitc 3y agoI recommend the talk The Soul of Erlang and Elixir by Sasa Juric. https://youtu.be/JvBT4XBdoUE https://youtu.be/JvBT4XBdoUE The thing that Erlang and Elixir have different is the BEAM VM and its support of concurrent processes at the VM level. So there are some things that they can do that Akka can't. For example, the scheduler is preemptive and keeps processes alive even though there may be rogue processes pegging the CPU.
- nvarsj 3y agoYeah kinda. Akka is an excellent option if you’re in the JVM ecosystem. I find it’s encumbered by a lot of complexity and cost though - which kinda comes with Scala and the JVM. It’s also a kitchen sink that tries to be everything for everyone - Akka was positioned to be the Spring of Scala, after all. Whereas Erlang/OTP is a very pragmatic, simple language and runtime geared solely towards building distributed services. The gen_* behaviours are awesome and I’ve never seen anything like it (at least in terms of simplicity and practicality) in other languages or runtimes.
- nologic01 3y ago>It’s unfortunate it isn’t more popular what might explain this? I mean hypes and infatuations are common but tangible advantages usually win the day because in the end people will pick the right tool for the right job. is it that distributed systems are not actually as big a domain so it does not get much press?
- Jtsummers 3y ago> tangible advantages usually win the day because in the end people will pick the right tool for the right job No, they don't. They pick the familiar and the easy-to-hire-for. I've worked on systems (written in C++, Java, others) that would have been perfect for Erlang, but at most I was able to present a prototype. No one is interested in a better solution that they can't hire for or have to retrain their staff for. (The familiar and the easy-to-hire-for may, by some metric, be the right tool for the job, but it isn't necessarily the right tool by technical metrics.)
- devoutsalsa 3y agoI am pretty strong with Elixir, and I've done a little bit of Erlang. Anyone who understand the basics of Erlang features that get used in Elixir should be able to program in Erlang with a bit of a ramp up period. Not too long ago I interviewed with a company that only uses Erlang, not Elixir, and they rejected me because I am not an Erlang expert. There wasn't anything I could say that would change their minds. I even volunteered to do a coding challenge of some type & they still wouldn't consider me further. Sometimes a talent shortage is a state of mind.
- ollien 3y agoThat's what I did! I learned Elixir in my spare time and then started a job that used Erlang. There's some quirks that I had to get over, but it wasn't a huge change over.
- devoutsalsa 3y ago
- jononomo 3y agoI completely agree -- it blows my mind that the BEAM/OTP is not more widely used. It is such a phenomenally well-designed system and it suits modern use cases perfectly.
- davidw 3y agoI've been using Erlang for nearly 20 years, on and off, and I think a reason it's not more popular is that it has always felt like a tool that is really good for some things, but maybe not so good for this or that random task. If you pick Python or Ruby or Java, you know you can probably do the thing in question, whatever it is, even if that language isn't the perfect fit for it. As well as the next thing and the thing after that. There's something in your toolbox for it. With Erlang, the toolbox didn't always have that depth. It's gotten better with Elixir on the scene, but there were times when I would wade in and fix upstream bits and pieces with Erlang libs. That very rarely happens to me with Ruby. That said, it is a fantastic system for some problems and I really miss working with it.
- arrowsmith 3y agoCan you elaborate on which problems you think Erlang is really good for, and which ones it's less good for?
- davidw 3y agoI think the closer you hew to the original Ericsson use, the more certain you are that it's going to be a great fit. We used it as the command and control language for these: https://www.icare-world.com/us/product/icare-eidon/ https://www.icare-world.com/us/product/icare-eidon/ * Semi-embedded system that's used as an appliance, not a computer. * Runs in an environment where people mostly don't want to mess with it. Might be days between reboots; might get turned off every night. * Has to be pretty deterministic in terms of memory usage, response times, and so on. * Recovers from something going wrong by going to a known-good state. We didn't actually use any of the distributed aspects of it, but it worked out great for the other stuff.
- 3y ago
- davidw 3y agoWhat are you using it for, out of curiosity? I am not at all saying this is you, to be clear, but one problem I have had in the past looking for Erlang jobs is that occasionally you find people who view it as some kind of magic sauce, or "I'm curious to see what it's like". In the former case, they think just writing their code in Erlang is going to give it magic scaling powers. This is probably less common these days, but I recall a while back when Erlang first got a bit of hype, there were people who weren't thinking very clearly about it. In the latter case, sometimes it's not the best tool for the job but someone wanted to learn the intriguing new thing. Edit: and of course there are great use cases for it. See my other comment elsewhere on a system where it was a great fit. I'm always curious to see where others are using it successfully.
- sph 3y agoThere is no silver bullet. but also Choose the right tool for the job. Plenty of people build highly tolerant, robust distributed system of top of regular languages when Erlang exists, and no one bats an eye. Erlang is no magic sauce, but for its niche it is unrivalled and yet routinely ignored in favour of subpar platforms because of dubious concerns such as "there are no Erlang/Elixir developers around", which is nonsense. The true reason is that there are plenty of engineers and architects that have no exposure to the BEAM, so have no idea how productive they could be developing their distributed system on it. They simply do not know what Erlang & co. could do for them.
- davidw 3y ago> Choose the right tool for the job. Certainly, but for each and every small task you do, you don't evaluate a new language for it. If you have a web application that's done in Rails and have a bunch of Ruby programmers, if you need to, say, add a simple web scraping system to it in house, you're likely going to reach for a Ruby tool at first. On one side, you have shops that are like "we only use Java". They're maybe missing out on some good tools for various tasks. The other extreme would be a big list of languages, and that's difficult to maintain as people come and go.
- 3y ago
- zelphirkalt 3y agoIf only I could convince people of learning and giving it a try in professional context, then I would already have worked with it. But few people are willing to learn.
- whalesalad 3y agoI'm struggling recently to build consensus with my team that Elixir is the right technology choice for a core element of our infrastructure. I've figured I just need to do it myself to demonstrate the value and then snowball from there.
- bongobingo1 3y agoI saw a funny comment on another thread, where the PM was unsure if Elixir was good/stable/whatever enough to build the core business service on. The dev responded that 3 of their primary third party services were built on Elixir, so they're worried about using it in house they should probably drop those too. AFAIK that worked.
- rob-olmos 3y agoPretty sure referring to this one: https://news.ycombinator.com/item?id=35929275 https://news.ycombinator.com/item?id=35929275
- throwawaymaths 3y agoIt did not work :(
- bongobingo1 3y agoNuts!
- dpflan 3y agoThis post on "How to sell Elixir again" [0] may have some useful ideas for convincing others. __ 0. HN post: https://news.ycombinator.com/item?id=35914216 https://news.ycombinator.com/item?id=35914216 1. Article: https://gist.github.com/evadne/c9aeca424d30f024ba048158bcad385f https://gist.github.com/evadne/c9aeca424d30f024ba048158bcad3...
- darkmarmot 3y agoIf the success of Cisco, Whatsapp, Discord and nine nines worth of uptime isn't enough... you can link to our stodgy Fortune 100 company using it successfully! https://www.erlang-solutions.com/blog/how-hca-healthcare-used-the-beam-to-fight-covid-code-beam-v-talk-review/ https://www.erlang-solutions.com/blog/how-hca-healthcare-use...
- Alifatisk 3y agoHopefully Gleam & Elixir changes that
- Thaxll 3y agoPerformance is very average and it's not a strongly typed language. Also with Kubernetes and the like Beam is not so useful anymore.
- Jtsummers 3y ago> it's not a strongly typed language Yes, it is. It's not a statically typed language. strong typing is not synonymous with static typing.
- zambal 3y agoKubernetes and the BEAM are actually a great match. Kubernetes for management and supervision of nodes/containers and the BEAM for management and supervision of processes. I see them as complimentary technologies.
- bsaul 3y agoi've always wondered : it seems to me that handling hordes of process is today made quite simple thanks to tools like kubernetes, and middlewares like queues or databases of various kinds for process 2 process communication with various guarantees. What's not solved by erlang is IMHO the hard part : how does your system ensures data persistence, availability and consistency ? Rolling my own cassandra or kafka or distributed db isn't really something that enchants me, and i don't see how the beam can makes this any easier ( they are fundamental problems, not technological ones).
- ralphc 3y agoHave you used Elixir? I ask because the Elixir books mention that setting up GenServers is easier in Elixir, with behaviours and callbacks you don't have to write code for all the functions in a GenServer if you're not using them, while it's required in Erlang.
- nvarsj 3y agoThe callbacks in Erlang are for the most part optional. I think gen_server only requires init defined. Elixir is a cool language but I prefer Erlang.
- hpeter 3y agoOne day I will switch to Erlang/OTP ,I really want but it's not easy. We need a larger ecosystem, because most of the times when people like me look for what language to use to solve a problem, we try to select the best / easiest tool for the job, and many times if the ecosystem has easy to use tool, we go with that. Not all developers build distributed systems and even tho I'd love to, many times I don't have the capacity to build things I need from scratch so that leads me more towards java/js/python sadly.
- alberth 3y agoNo mention of BeamAsm. I really hope the focus on performance improvements hasn't waned.
- lvass 3y agohttps://www.erlang.org/blog/otp-26-highlights/#improvements-in-the-erlang-compiler-and-jit https://www.erlang.org/blog/otp-26-highlights/#improvements-...
- Nezteb 3y agoI'm excited about incremental Dialyzer! I'm hoping to work on adding support for the new mode in Dialyxir as well! https://github.com/jeremyjh/dialyxir/issues/498 https://github.com/jeremyjh/dialyxir/issues/498
- nextmove 3y agoI began my journey into functional programming a couple months back with Erlang. Interestingly this language helped me truly comprehend the functional like ways of Rust. My only gripes would be that I've had to switch to Elixir as it's more developed for web development. I actually like the syntax of Erlang more (I don't come from Ruby) and it's a shame that they're split. Also, in Elixir, I attempted to write the fibonacci sequence using memoization and the solutions I saw online were horrendously ugly. Maybe it's because I'm still a beginner but I did see an example in Haskell and it looked so much cleaner. I love how simple the actor model is and how it just works in Erlang. No ifs, ands, or buts.
- ralphc 3y agoThe feature hiding in Elixir, and I assume Erlang, is the binary pattern matching, on either whole bytes, big or little endian, down to individual bits in a byte. I'm helping with a project to recreate the old Prodigy network, and the combination of FP principles and the ability to slice and dice bytes like I did with C in the '80s has me hooked on Elixir.
- voicedYoda 3y agoThese updates are quite nice. Autocomplete, SSL, map comprehensions, all look really great! I know a lot of the comments are about the awesomeness, or how hard it is to build teams, but honestly, the language is great. When i learned about :ets and could move data around at lightening speed without having to use a database, i was in love!