"It's gonna be elixir" "And that language... is erlang" "It's been used for a lot more, including my favourite language, elixir" We got there eventually
@FernandoMumbach3 ай бұрын
To be fair they are all part of BEAM VM, which is what he's talking about (OTP, processes, ...)
@sagojez3 ай бұрын
@@FernandoMumbach Is like saying that Kotlin, Scala and Java are the same because they use the same JVM.
@FernandoMumbach3 ай бұрын
@@sagojez well... yeah? What Theo talks in the video are mostly related to BEAM itself and not specific to the languages
@jamesblack27193 ай бұрын
@@sagojez Elixir and Erlang is similar to Rails and Ruby. Elixir just makes Erlang easier to use, as Erlang is a very steep hill to climb to learn.
@JoeyTen3 ай бұрын
@@jamesblack2719is that really accurate? My understanding is that Elixir is a language, and Rails is more like a framework using the Ruby language. I've used Elixir, but have not used Ruby, so please correct me if I'm wrong. Based on my understanding, I think a closer analogy might be "Elixir is to Erlang as Clojure is to Java". Or maybe "Phoenix is to Elixir as Rails is to Ruby".
@swodaw12473 ай бұрын
theo should grow his mustache out and cosplay as dr eggman
@pencilcheck3 ай бұрын
and gain weight, then hire someone to cosplay as sonic (sanic)
@faqihawang2363 ай бұрын
and make an announcement
@EvaGillard-yp4op3 ай бұрын
what a monkey
@steve-adams3 ай бұрын
@@pencilcheck gotta go fast
@Snuffsis3 ай бұрын
@@pencilcheck Primeagen has already had blue hair. He could do it
@JonGretarB3 ай бұрын
The “let it crash” mantra can be considered to it’s origin as a telecom language. Dropping a phone call because of an error is preferrable to trying to fix it and letting the problem propogate up and crashing the whole system or leaving it in an unstable state.
@tantalus_complex3 ай бұрын
Yeah, why have the whole town's network go down when the failure could be isolated to the street
@yawaramin47713 ай бұрын
Even better to hold the phone call on one end, try reconnecting until it succeeds, and then switch the call to the new successful connection 🙂
@eltreum13 ай бұрын
@@yawaramin4771 In the analog phone system days you want to kill the call to reset a switch and make them retry because of mechanical reasons. Once we had digital phone switching that's basically what happens now. The user dials and can wait up to a timeout we set while the switch network builds them a virtual circuit path with real-time backup pathing for seamless reliability.
@سنابل-الفردوسАй бұрын
@@yawaramin4771you relise phone calls cost money for every sec tho
@quinndirks56533 ай бұрын
7:52 Using chat gippity to look up facts, big yikes Per Wikipedia: Early programming languages with pattern matching constructs include COMIT (1957), SNOBOL (1962), Refal (1968) with tree-based pattern matching, Prolog (1972), St Andrews Static Language (SASL) (1976), NPL (1977), and Kent Recursive Calculator (KRC) (1981).
@MrLordLowbob3 ай бұрын
damn, Prolog is that old? I remember having to use it in my logic course for university 10 years ago. was actually kinda fun to use, but nothing that I will ever touch again probably
@christoferluiz3653 ай бұрын
Using Wikipedia is not much better
@germanandresruizhernandez97473 ай бұрын
I think that the pattern matching that is present in the majority of languages is inspired from ML. Oh God, SML teaches me don't hate any programming language.
@LightTheMars3 ай бұрын
@@christoferluiz365 Wikipedia has some misinfo, but it's a reproducable, tracable, and most of the time source-specifying resource. ChatGPT is none of that, and by design gives a different response every time.
@konberner1703 ай бұрын
Using Wikipedia to look up facts, bigger yikes.
@NuncNuncNuncNunc3 ай бұрын
They didn't have the idea of virtual machines back then, lol. Kids. BEAM was a play on JAM (Joe's Abstract Machine), a precursor to BEAM. JAM was a play on WAM (Warren Abstract Machine) a prolog abstract machine. Before that there was Pascal a decade earlier 5:30 sounds like MULTICS. Not knocking Erlang, but there was a lot going on in the world of CS that Erlang inherited and evolved into a unique solution for its problemspace
@sstillwell3 ай бұрын
Heck, IBM's VM/370 (virtualization at the OS level) was released in 1972...and even it was a rewrite of CP/CMS that came before it. Multiple MAINFRAME operating systems running in a maximum of 16 MB of real storage (RAM). When I was in college we had MUSIC (McGill University System for Interactive Computing) for terminal users and DOS/VSE for batched punched card jobs...and instances of each of those for four campuses, all running under VM/370 on an IBM 4331 that had a maximum RAM of 8 MB. It wasn't particularly fast, but it supported hundreds of concurrent users and got the job done.
@donwomick3413Ай бұрын
VMs were already textbook material by the time I took Operating Systems as a CS student in the early 80s. Much "recent" technology was actually conceived many decades ago, but has only become practical in the last 10-20 years (Lisp and functional programming in general, for example).
@Gorabora3 ай бұрын
just saw your interview with josé valim, dived right into elixir, again but for real this time! so exciting
@mattilindstrom3 ай бұрын
My hat's off to the Swedish engineers for inventing something that satisfied an immediate need, and unforeseenly carried on to spark on further inventions. I was in an industry where parallel processing of data was almost required, this was the final years of the transputer. It was close, we could have chosen Erlang, but the processor speed slope took us to conventional toolchains and at first single thread workloads.
@beerrepository3 ай бұрын
Glad you are continuing to promote what is also my favorite stack I have ever worked with. I wish more companies took it seriously and it got the same support and recognition as other languages do.
@eltreum13 ай бұрын
I work in telco eng and automation and the concept of 'let it fail' is a necessity. When your infrastructure is spread over a portion of the planet or floating in orbit exposed to the elements something is certain to be broken somewhere 24/7. Failures are expected for too many reasons to count or write edge cases around. Programs have to handle unreliable conditions as well as spikes of demand. Unix and mainframe approaches were developed to meet the demands to manage a multiuser infrastructure. We use the worker factory pattern a lot. It's cost effective and easier to maintain but most of it is Py nowadays. I didn't know about the gen server feature, that is really cool for distributing compute.
@SimonClarkstone3 ай бұрын
7:37 At a glance of that article, "Core Erlang" isn't normal Erlang; it's an intermediate representation produced by the compiler that programmers woudn't normally see.
@radekszymczyszyn87103 ай бұрын
Great video! Erlang is a fantastic technology which definitely deserves more attention! And Elixir has brought some new energy to the whole ecosystem! One remark about "let it crash", though. It's a common misconception, but it's not there to allow for avoiding proper handling of edge cases. When you think of it in general, there are two types of errors: those you can avoid (logic aka programmer errors) and those you can't (hardware failures: disks malfunctioning, network packets dropped, etc.). ""Let it crash" utilises process supervision, i.e. restarts of some parts of an application. If data doesn't change and there's a logic error in the code (an edge case missed), then it's as likely to occur after a restart as it does in the first place, i.e. "let it crash" doesn't solve programmer errors, because trying again doesn't solve the problem in code. It's there for the errors one cannot avoid and cannot foresee, like corrupted network packets, faulty hardware, or others components' nondeterministic misbehaviour. Happy to see Erlang and Elixir material on KZbin!
@ray738643 ай бұрын
Load balancing, including web server load balancing existed in the '90s, it didn't come about because of Ruby :) Man, you are making me show my age here now, darn youngin's that think everything happened during their life :P
@nekogami873 ай бұрын
Felt the same way, when RoR got popular, nearly no framework was scaling at all (github was only starting lol), blaming ruby/rails specifically for that is a little bit much.but they indeed took much longer to be able to do it properly (performance wise and until Puma appeared basically)
@JarheadCrayonEater3 ай бұрын
Yeah, exactly. I've been building computers and programming since 1986, and hear this kind of stuff all the time. One would think that with all of the information we have today at our fingertips, others would actually do some homework to discover how we got here.
@diamondkingdiamond62893 ай бұрын
I think he’s talking about load balancing between different processes on the same machine.
@ray738643 ай бұрын
@@diamondkingdiamond6289 Then he may wish to make that more clearer, because the way he said it made it sound like it was just load balancing in general.
@krunkle51363 ай бұрын
Software engineering is easier to get into than any engineering profession that deals with physical things.
@arthur0x2a3 ай бұрын
The real hero is Ejabberd, which singlehandedly gave rise to WhatsApp, Messenger, Google Push Notification, about every game chat (LoL). Damn they were good !
@manofacertainrage8563 ай бұрын
Pattern matching is fundamental to functional languages - much like inheritance for object oriented languages. Prolog and ML (72/73) had "modern" pattern matching.
@infantfrontender61313 ай бұрын
Yep, Call of Duty Black Ops, MW, MW2, and World at War. Also LoL and some other games
@immaterial_vivi3 ай бұрын
prolog (72) was a year earlier than ml (73) and had pattern matching, plus there were apparently older languages on ibm mainframes that also had it - at least wikipedia says s, and i'm a lot more inclined to believe that than whatever chatgpt hallucinated, Theo pls (edit: oop, not the first to see that)
@studiousllama47763 ай бұрын
BEAM languages are just so cool. I'm always blown away by the stuff you can do with actors and other BEAM features.
@VijayKumar-dq5xo3 ай бұрын
As per wikipedia, first languages to have COMIT (1957), SNOBOL (1962), Refal (1968) with tree-based pattern matching, Prolog (1972). It seems ChatGPT have a lot of hallucinations!
@zeikjt3 ай бұрын
Why anyone trusts it after this amount of time is beyond me, you still have to fact check the dang thing so just don't even bother asking it anything.
@RyanIsHoping3 ай бұрын
Gleam is the best BEAM language!! Clean type system, ADTs/case statements, and a type-safe version of almost all the lovely BEAM stuff
3 ай бұрын
You convince me to start studying Elixir! Thanks!
@demolazer3 ай бұрын
Elixir is a brilliant introduction to functional programming IMO. The clean and reasonable syntax is great for those of us from a purely OOP background.
@arivanhouten63433 ай бұрын
10:14 Hot swapping in java is actually possible but there are a lot of constrains. Small changes can be done quickly without any effort (especially useful when debugging larger applications), but removing / adding classes etc. is normally not possible. There are projects tho that managed to aid in this manner but I can't remember how well they work.
@weasleyafslaan3 ай бұрын
groovy did it in the JVM
@KonstantinShutkin3 ай бұрын
Apache Karaf
@luissantos91203 ай бұрын
Clojure does it.
@arivanhouten63433 ай бұрын
good to know that there are possibilities nowadays. But never had the usecase for hotswapping, since our infrastructure uses containers which only run for a period of time. Updating those is not really difficult. But I really wanna try out elixir, looks like something nice and handy to have in one's toolbox
@aufdem23 ай бұрын
Also throwing down Groovy, because it doesn't get mentioned enough 😁
@zegg903 ай бұрын
elixir and erlang are also great when you are constrained to 1 server because it scales vertically seamlessly as well, just add more cores, your program will automatically use all cores
@kristun2163 ай бұрын
i heard you can also scale horizontally as well with something like swarm?
@hamm89343 ай бұрын
@@kristun216yes, thats built in. Essentially each process is its own node in the virtual machine, like a docker cluster
@ray738643 ай бұрын
Well actuallllllly...... Erlang was 1986, the "official" birthdate of the internet was 1983, so technically the internet existed before Erlang :) Now if you mean 'The Web' or the 'WWW' then yes, because WWW was 1989. It's a common mistake people make, The Internet != The WWW. The WWW runs on-top of The Internet.
@swodaw12473 ай бұрын
@ray73864 I love how "!=" has just become universal notation for "not the same as" outside of programming
@chockman38333 ай бұрын
@@swodaw1247we’re almost all programmers here
@TragicGFuel3 ай бұрын
@@swodaw1247 it's not really though, only for people who went to college and encountered a bit of programming get it
@VivekYadav-ds8oz3 ай бұрын
@@swodaw1247 I've just now I realised I casually drop it in texts everywhere, not realising it's not a common lingo.
@hannessteffenhagen613 ай бұрын
It's just one of the many ways people used to type ≠ when the character wasn't available.
@zwanz0r3 ай бұрын
Oh man! You're right! I need to incorporate Flutter in my next project. Thanks for the vid!
@jwingy3 ай бұрын
Great video! Minor nitpick but I think you mean scale "out" (horizontal scaling) vs "up" (making your one server beefier)
@Endelin3 ай бұрын
Discord's blog has an article about how they tried different data structures and used Rust to speed up Member List updates. It would be a nice part 2 to this video showing when Rust is worth it. Blog title "USING RUST TO SCALE ELIXIR FOR 11 MILLION CONCURRENT USERS"
@xyzzyb3 ай бұрын
Fun fact: Infocom games were also written against a "virtual machine" they called the z-machine. That's one of the reasons Infocom games were (are) everywhere. Once the z-machine itself was ported to a system then all the games were immediately runnable.
@therashidiqbal2 ай бұрын
Performance can be defined by several key factors: 1. Developer Experience (DX) 2. Scalability 3. Ease of Learning 4. Code Maintainability Just because a language uses ownership and borrowing doesn't necessarily make it highly performant. These are only part of the picture and don’t guarantee performance on their own.
@StickySli3 ай бұрын
My ICT Systems Engineering undergraduate taught us a full course on Erlang/OTP. Sadly, we were only taught how to make algorithms and functions in Erlang, and the final project we implemented a secure system for an elevator/lift, where one sensor of the elevator was it's own process, and could die and respawn again without the elevator halting. This is not a real-case scenario, but a metaphor for why Erlang is so powerful. I also understand that COD servers use Erlang?
@MrLordLowbob3 ай бұрын
I had to use erlang for an assignment. real time application, we had a variable number of "senders" that would send stuff to an "orchestrator". the orchestrator gave each sender a timeframe of 30ms (via network, but at least everything in the same lab, just different machines) and the senders had to send their response in that timeframe. if your code was shit, the senders were too slow and missed their windows constantly. the only things other than that timeframe was the API provided for this and each team had to build both a sender implementation and an orchestrator that tracked how many messages came in in time and from what sender, your sender and orchestrator had to get 90% successful sends within the 30ms timeframe over a few minutes for the assignment to be successful. and with that basically one team started their orchestrator and everyone else started their senders. that was the first time that we build something with (fake) hard real time constraints and it was difficult to do it because 30 sec with network round trips really isn't much, took way too much time, but was also very interesting and fun.
@artxiom3 ай бұрын
Good video and these languages are definitely underappreciated but the real hero here is it's runtime system imho, not the languages themselves. And no mean to start a flame war but comparing languages like Rust and Erlang/Elixir/etc... is comparing apples and oranges. Erlang and Elixir are almost like DSLs - for distributed computing, Rust is a general purpose systems programming language. Of course it will fare worse in a domain than something that was specifically designed for it. Nothing prevents one also to implement an Erlang-like runtime system in Rust (maybe only time and money). It's a different kind of scalability. And async in Rust is perfectly fine - people just tend to forget how low-level it actually is. By itself it does actually ....nothing (it's literally zero-cost). It's just syntactic sugar for a state machine and just a building block and not even meant to compete with higher level concurrency systems.
@cyberreaper8553 ай бұрын
If I remember correctly, the first Erlang Abstract Machine was written in Prolog. Erlang's syntax is very similar to Prolog but the mental model is not. That is why the syntax is strange at first. Also, Erlang relies heavily on pattern matching and immutability, which makes some use cases harder than usual. Elixir fixed this by introducing the pipe operator. I have not yet watched the entire video, but yes, you can do hot-code-upgrades with zero downtime but it is discouraged and should only be done if you know what you are doing. Most of the time, the application is not that critical that this feature is actually required. This was even stated in either the Elixir docs or the Phoenix Framework docs.
@madlep3 ай бұрын
7:38 Erlang syntax *is* crufty, but that code snippet isn’t Erlang source code. It’s showing core Erlang - which is an intermediate representation generated by one of the compiler passes as with a more restrictive set of features so it can be optimized further in later passes. It’s not really meant to be read or written by humans.
@TimothyWhiteheadzm3 ай бұрын
I love the 'just spin up another server' idea, but don't know of any actual use cases for that. The majority of api's only need heavy compute when they have large numbers of requests, and in that case you can just as easily do load balancing instead of doing anything at the language level.
@rallisf12 ай бұрын
I totally agree. I've never built anything that needs the scale that Elixir provides. Modern server hardware have like 192 cores and 1 TB for RAM. Even an express app (which is considered slow) with pm2 can hold millions of concurrent users when running on such a beast. The reason many projects use an HTTP load balancer is because the need better local performance via geolocation routing (which can also work as fail-over). Now if behind that load balancer are a few bare metal machines or a kubernetes cluster doesn't really matter. AFAIK most applications' bottleneck is the database, not the compute.
@justafreak15able3 ай бұрын
Bro updated the thumbnail cause last thumbnail had a pic of erlang. Realised not getting views. Still can't sit through another 30mins of him reading a blog article.
@DzintarsDev3 ай бұрын
Exelent sales pitch! Looking for some books now. :) P.S. I would love also to hear about dark sides of the Erlang.
@saurabhchopra3 ай бұрын
@16:59 "because elixir is not a compiled language" Wrong, Elixir is a compiled language. When you write Elixir code, it's compiled into bytecode that runs on the Erlang Virtual Machine (BEAM).
@Z3U5.0g3 ай бұрын
So like Java
@gustavcoetzee50183 ай бұрын
Erlang is awesome. I have started it 30 days ago to this day. Still busy with the erlang for a great good book. Make that book a youtube tut. I think tomyself. One needs to write many lines and see patterns. Not all brains work that way. Mine i need to train to know. I believe in erlang. I believe its good.
@lethicanthus2 ай бұрын
Most of the functional features you can think of came from ML -- immutability by default, algebraic data types, type inference, curried functions by default, etc. Fun fact: the basis of async/await was developed in ML. Haskell built upon this and had something that was probably what you would recognize as async/await, and then, F# (OCaml for .Net) brought it to the .Net platform in 2006/7 (somewhere around there). Once the IL had the async primitives, C# adopted and then the rest is history. Few things leave the ivory tower of Haskell, so you can thank F# for making the async/await pattern popular.
@AlessandroMencarini3 ай бұрын
I also don’t use Elixir day to day and am a fanboy, thanks for making these videos and making me feel less alone 😭
@ryanseipp69443 ай бұрын
The constant rust hatred is getting old. I get it, it's not the language for you. Just because you don't like it doesnt mean it has no place in the ecosystem, has no benefits, or that nobody else will enjoy working with it. It's almost like this is just a petty grudge you're holding at this point with how frequently you mention it.
@_unknown_guy3 ай бұрын
Same goes for Ruby...
@andgatehub3 ай бұрын
the hate is absolutely deserved
@WHYUNODYLAN3 ай бұрын
In a more recent interview I saw with Jose, he said that he wasn't so much wanting Erlang with better syntax so much as he was wanting Erlang with Lisp macros. There was already a Lisp for BEAM when he started, so he decided to implement a similar macro system in a Ruby-like syntax, so that Elixir stood out as something different.
@kasenlow3 ай бұрын
I think this kind of programming also opens up the Actor Model/Framework. Which is just so less seen in today's Web world. I came from the Industrial Programming background. I use Actors and also Queue Message systems everyday. I understand how efficient Erlang can be, and we need even more modern syntaxes for greater adoption.
@DisFunctor3 ай бұрын
The BEAM is awesome, and it's a shame it's not way more popular than it is. I can't really explain why. Erlang is not that complicated, especially when you consider how old it is and the fact that none of the "easy" languages like Python existed at the time it came out. I suppose maybe it's because by the time it was open-sourced, there were some "easier" languages around. But then there's Elixir, which has syntax a lot more familiar to your average programmer coming from the traditional education system. Maybe it's just a matter of tooling, and once it gets better (which I fully believe it will now that there's a unified effort working on an Elixir LSP), it'll finally blow up. Unrelated, but there's also some very interesting stuff going on in WASM land right now that allows you to bring your own language as long as it compiles to WASM and allows for almost invincible programs that can survive even hardware and network failures without complicated CQRS or Event Sourcing architectures. But who knows if it'll gain popularity.
@MrDomiko3 ай бұрын
Scaling is not about speed but concurrency. Asynchronicity and Actors are at the core of Erlang OTP. Scala was pretty much built around Actors. Akka took the concepts steps further and Vert.X (although not centered around Actors) makes concurrency simple. It's funny how certain developers go through life pretending the JVM doesn't exist.
@smanqele3 ай бұрын
That message passing model was actually how OO programming was supposed to be
@kacaii33493 ай бұрын
Im growing my mustache because of you, it looks good lol
@flipperiflop3 ай бұрын
Would love some more Elixir content.
@victorpinasarnault91353 ай бұрын
Yeah, sequencial programming can be weird but I love the dot as final statement instead of semi colon like in the other languages.
@user-qr4jf4tv2x3 ай бұрын
you didn't avoid distributed systems because you used their underlying distributed language which is erlang.. erlang,go,rust,js,java,c#,python etc.. has their places its more like xyzw problem dev speed,code speed,code safety,personal bias, etc. but something like distributed communication should be at least available as a standard library. not everyone is interested in containers or external libraries
@nicejungle3 ай бұрын
communication + real time + concurrency, of course I knew it was Erlang
@rickdg3 ай бұрын
So what’s the catch with Erlang? Painful deployments? Doesn’t play well with other stacks? What’s preventing adoption when so many use cases need scalable real time interactivity?
@lunalangton57763 ай бұрын
As someone who doesn't mind weird syntax and tried to convince other people to learn Erlang... nobody wants to learn Erlang's syntax. Elixir's a huge help. I'm not sure why more people don't use Elixir. Theo went over it pretty well, I hope this video opens more eyes.
@urbankoistinen56883 ай бұрын
It is different. There are many more jobs with other requirements. It is hard to find Erlang programmers, people have had the feeling that Java/C# has more job security.
@pokefreak21123 ай бұрын
@@lunalangton5776for me lack of static typing was a turn off, gleam kinda solves that problem I don't know enough about BEAM to make any real judgement but I'm definitely interested lately iirc I saw stuff about erlang having first class features for parsing binary protocols which is really awesome
@JonLauridsen3 ай бұрын
Maybe like VHS vs. Betamax it's a lot more about perception and marketability and things not directly about the quality of the product? Elixir is functional, and I assume that seems scary to some? No more objects, no more muting state, it must be crazy hard and weird?? It's actually a totally trivially simple change to adopt to, but I guess a majority feels it must be difficult.
@mattevans35113 ай бұрын
FUD really. Deployments with Elixir are no more difficult than other languages really.
@pillmuncher673 ай бұрын
Joe Armstrong was the GOAT.
@anthonydoan19913 ай бұрын
RIP. GOAT.
@user-eg6nq7qt8c3 ай бұрын
The BEAM is my superpower.
@aGj2fiebP3ekso7wQpnd1Lhd3 ай бұрын
I built the same thing in Go. A $5 vm now scales 800k concurrent connections with traffic and TLS. It's an order of magnitude (at least) more efficient.
@Z3U5.0g3 ай бұрын
Are you serious?
@aGj2fiebP3ekso7wQpnd1Lhd3 ай бұрын
@@Z3U5.0g yep. Running millions of concurrent connections on a fault-tolerant mesh network that can scale to billions. Nothing against Erlang or Elixer.
@infantfrontender61313 ай бұрын
It depends. You can achieve similar results with C, C++, Rust, or almost any other language. Of course, with system languages, it will be faster, but you’ll miss out on all the features that BEAM and OTP offer. If you need fault tolerance and self-healing, you can use Kubernetes, which will cost you at least $20 per month. However, if your system experiences frequent failures, the costs can quickly add up. With BEAM, you don’t need Kubernetes because you achieve fault tolerance and self-healing at the application level, not the cluster level. When working with Go, you need to be careful with memory usage and goroutines. With BEAM, you worry less because of immutable variables, isolated processes with their own heap, and messaging that relies only on a mailbox - without ‘stop the world’ pauses. For me, Elixir makes reasoning about concurrency much easier than any other language I’ve tried. It’s much more expressive than Go. You can connect Elixir VMs together and seamlessly use local or remote processes. You can update code without stopping the program or dropping connections. You can open a shell on a live system to inspect, debug, and modify with the full power of the language, find a misbehaving process, and trace everything it does. The ‘every process has an ID and a single dynamically-typed mailbox’ model is easier to reason with than fire-and-forget goroutines and channels. Another advantage I’ve often seen in Elixir’s favor is the significantly reduced need for guard code, such as nil checking, thanks to Supervision trees. Go is good. Elixir is good. Just use the right tool that is more suitable for your needs. My 5 cents.
@Rohinthas3 ай бұрын
Not necessarily a correction because I know too little about the details, but the idea of lightweight processes you describe was not invented by Erlang. As any Go-Dev probably knows, the foundational paper on this topic is "Communicating Sequential Processes" by Hoare from the 70s and it outlines many of the basic concepts Erlang seems to implement. This is very exciting, I should have a look at Erlang and its history, it seems like it's the oldest surviving adopter of (some of) Hoare's principles or they knowingly diverted and did their own thing, which would be equally interesting!
@PeerReynders3 ай бұрын
Yes but the BEAM was never constrained to "CSP"-so one could argue CSP was more about the channels rather than processes. The BEAM is more about using messages to perform asynchronous tasks (while computation inside a process is uncompromisingly synchronous; processes that aren't doing anything/block/wait are incredibly cheap) and the communication paths between processes can form a mesh. Also people bring up actors but the team wasn't aware of Carl Hewitt's work at the time; what they arrived at just happened to be similar and ultimately actors are a red herring: “the big idea is "messaging"”; i.e. the process's mailbox is the core primitive that gives the BEAM its power. Similarly FP wasn't adopted in pursuit of some academic pursuit of purity but because it optimally aligned with the BEAM's philosophy of “shared nothing” concurrency (“Beyond Functional Programming with Elixir and Erlang” 2016-05-25 plataformatec blog). Finally the first version of the BEAM was implemented in Prolog; this may at least in some part had an influence on (performant) pattern matching becoming the core conditional construct on the BEAM.
@Rohinthas3 ай бұрын
@@PeerReynders Hey thank you very much for your answer, especially the references, I really appreciate it! I will start digging into them right away :)
@markeggers83563 ай бұрын
Sounds like Elixir and Rust are the tools of choice for some of the problems I'm currently working on in Java. Scaling in Java is currently annoyingly complex. Scaling is not impossible. It's just that I have to sometimes think about scaling more than the problem domain. That's not good. Maybe Elixir for the scaling part and Rust for the speed part will help. I still have to figure out how to version-manage developed components (artifacts), along with a standard way to store and retrieve them. This is a solved problem in Java (Ivy, Maven, Gradle). I don't know if it's a solved problem in the Erlang and Rust ecosystems (I should look). Remember, the cost of a project isn't in the first build, it's in the maintenance and modification. Tools to make that easier are important.
@Z3U5.0g3 ай бұрын
First try Golang
@coryfitz70123 ай бұрын
If you don't like Python because it's slow, or you don't like whitespace, or it's too single threaded, I understand that. But I don't get saying that you think its syntax is less readable than Ruby's
@JonLauridsen3 ай бұрын
I used to say that but go flatten a nested list. What's that in Python? [item for sublist in nested_list for item in sublist]? Maybe itertools...?? In Ruby it's `nested_array.flatten`. I still love Python even after a decade of leaving it behind, but Ruby goes the extra mile in terms of syntax. That's not even getting into Ruby's blocks, etc. (that said I'd personally take Python over Ruby any day because of Ruby's proximity to Rails, but I recognize Ruby presents a very friendly experience)
@samuraijosh15953 ай бұрын
@@JonLauridsen are you kidding me? can you not even write a flatten operation yourself?
@JonLauridsen3 ай бұрын
@@samuraijosh1595 pff, hand-roll the byte-code, dog!
@_unknown_guy3 ай бұрын
@samuraijosh1595 are you kidding me? Your language does not have one in standard lib and you have to write your own? Ruby one is written is C so speeed reeee
@PS3PCDJАй бұрын
There's a BIG reason why LISP and it's derivatives are still popular
@bookie-o3t3 ай бұрын
I love your channel
@voidmind3 ай бұрын
BEAM Supervisor reminds me of Kubernetes
@my_name_is_ahad3 ай бұрын
You forgot to mention that Vercel is using Erlang/Elixir and Phoenix for their cloud infrastructure.
@zero3juan3 ай бұрын
Also Supabase's "Realtime" is an Elixir cluster
@my_name_is_ahad3 ай бұрын
@@zero3juan yes.
@impulse89753 ай бұрын
Vercel doesn't use it
@meltingmoody3 ай бұрын
Got any articles or links?
@hauleth3 ай бұрын
@@zero3juan a lot of code in Supabase is Elixir (source - I work on that code).
@gemini-user3 ай бұрын
We all know it's just a PHP backend with some COBOL mixed in for that sweet performance, that's the secret to success.
@seaviasfo3 ай бұрын
yo that elixir meme made my effing day 🤣🤣🤣
3 ай бұрын
"I love every word of this, except for the word FLUTTER..." 🤣🤣🤣 I couldn't agree more on this.
@bourgtai3 ай бұрын
"[Ruby syntax] is like if Python didn't hate you." Best take of 2024
@DavidTrejo3 ай бұрын
👴🏽: “in my day we…” 🧒: “we still do…” 😛
@AleksandrPodyachev3 ай бұрын
The funny thing is that I am going to present Elixir and Phoenix on September 11, so this is timely for me
@DNA9123 ай бұрын
One of my colleagues worked with Erlang in the 90s. His quick description of it was "process oriented". Wanna do something? Make a process
@Heater-v1.0.03 ай бұрын
Yeah but I'm wondering what "process" means here. A operating system process as we have in. Linux, Windows, etc or just a blob of work as defined by the Erlang Virtual Machine? I'm guessing that if we are speaking of 10's of thousands of processes it is the latter. Much more light weight than OS processes.
@DNA9123 ай бұрын
@@Heater-v1.0.0 in this case he used the word process as the vague concept of it. Process in process oriented was a description on how you tackle problems in Erlang, just like you tackle problems in java with objects as it's object oriented. It would be kinda weird to spin up OS processes if you're coding in Erlang, kinda loses the point of even using Erlang then
@Heater-v1.0.03 ай бұрын
@@DNA912 Indeed. I like to think it is "process" as in Tony Hoare's writings on "Communicating Sequential Processes" back in the day.
@wanton73063 ай бұрын
@@Heater-v1.0.0process here is like Golang green thread but has it's own memory, they are isolated and own garbage collector. Erlang VM BEAM doesn't use global garbage collector for processes. Big reason BEAM runs with very low latency even with garbage collected.
@Heater-v1.0.03 ай бұрын
@@wanton7306 Is the Erlang VM running processes as native code or is it running a byte code like the Java VM or WASM?
@davidsiewert86493 ай бұрын
If Erlang is so good, why did Theo switch from it to React/Next.js?
@emonymph69113 ай бұрын
Cuz it sucks and Theo has ADHD.
@emonymph69113 ай бұрын
Cuz it bad at cloud (almost 0 integrations) and Theo has ADHD.
@fredbcruz3 ай бұрын
So you're telling me everything I love about Async/Await started way back with erlang?
@df292083 ай бұрын
Nice review.
@nsttt3 ай бұрын
Erlang mentioned
@df292083 ай бұрын
Even the new version of "Battlestar Galactic" figured out how not to drop the 'f-bomb'. If it is part of the normal speech of your ''friend group" ......... perhaps ..... limit the use of word around them only.
@ansidhe3 ай бұрын
It would be interesting to run some real-life comparative tests of Rust-on-Tokio, Go-on-actor-model (I forgot the name of the lib but found it one day) and Elixir-on-C-NIFs… That could at least resemble a fair comparison among apple varieties 😉 instead of the typical apples vs oranges stuff.
@emeraldbonsai3 ай бұрын
like actually i really dont understand theo's anti rust async and parrellel like ive done it in almost every lang ( inculding go ) plus a ex MPI die hard. Rust is great has channels concurrency and async is easy. could we get a video of you actually breaking it down? like i heavily use it everyday like instead of go routine you just tokio::spawn() thats great for alot of stuff if your doing channels , arc mutexs or like long lived shit. and for like mass deploying of proccesses using futures with a unordered scatter from a vec of jobs then i jsut collect and match the results within its own tokio spawn which data after some others stuff gets put into a arc mutex. i do come from the dark ages of nodejs though back in the bluebird times so maybe my view is off
@universebot23633 ай бұрын
I just saw title and thumbnail. My brain immediately worried it would be PHP...' PHP trauma anyone?
@tordjarv38023 ай бұрын
"Need more performance, just spin up an other server", well do I look like I'm made out of money?
@yesitsreallyOtter3 ай бұрын
so what you're saying is i should learn elixir
@MrEnsiferum773 ай бұрын
Of course, u don't need crap k8s to scale.
@Khari993 ай бұрын
If Theo used Flutter for mobile dev for 1 month, the next video would be “Why I LOVE Flutter”
@tanmayntupe3 ай бұрын
I 100% agree with spirit of what you said around 17:00 . However how can you have so much experience with Elixir and say at 16:59 that it is not a compiled language? Elixir is compiled language. Was it a slip? Did you mean to say it is not statically typed language?
@aisdjsiasiodjisoajd76983 ай бұрын
Thanks for changing the thumbnail to be more clickbaity Theo. I was worried for a minute there
@TheKennyWorld3 ай бұрын
Erlang is amazing
@Kane01233 ай бұрын
Unlike KZbin chat which uses a single mac living in a closet.
@n30v42 ай бұрын
So what was not mentioned? The Database they use. Discord works now with ScyllaDB which is writtein in C++, before this they worked with Cassandra and MongoDB and Postgres. Erlang solves a specific use case and thats the real time chat. When they need performance they would never write it in erlang. It was never erlang > rust or erlang > java. Smart people will use a specific language to solve specific problems.
@Jonjolt3 ай бұрын
How does it handle foreign functions?
@victorpinasarnault91353 ай бұрын
I started to learn Erlang.
@WAPBAN3 ай бұрын
Let me tell you, i learnt erlang for more than a year just to grasp syntax. once you understand its syntax everything else is purely simple.
3 ай бұрын
Please correct me if I'm wrong: - With Rust, you can achieve the same or better level of concurrency for the same machine as in Beam languages, unsing Async. You can have the Actor model in Rust Async and do message passing with queues. - Rust can also "just let it crash": Awaiting a Tokio task's handle that panics doesn't finish the application, the panic is encapsulated in an error. Since panics are the main source of failures (aborts and seg-faults only occur with badly written unsafe code), it can be very true that Rust can just let tasks fail without compromising the whole application. Coupled with an orchestrator and good message passing tools, I think Rust can be better at scaling and equal in robustness as Beam languages.
@zegg903 ай бұрын
Async rust is not pre-emptive, you cannot start a million async tasks and not have them trip over each other (afaik). You also cannot easily make that code simply run on a hundred machines. So you would end up reimplementing the beam in rust, which is certainly possible, but you'd be playing catch up to decades of development and battle testing.
@infantfrontender61313 ай бұрын
@@zegg90, Bastion tried to make BEAM on Rust, but now this project abandoned. Lunatic is also abandoned
@perchant29253 ай бұрын
I would really love to see Theo playing around with elixir on stream and maybe making something with it in combination with NextJS as FE. Because if we search for elixir videos there is not a lot of them and the quality sucks
@vdeantoni3 ай бұрын
I guess I'm learning a new language now...
@netero88883 ай бұрын
elixir mention!!
@daa52493 ай бұрын
Time stamp?
@netero88883 ай бұрын
@@daa5249 😂
@netero88883 ай бұрын
@@daa5249 😂
@sleeepey3 ай бұрын
Elixir sounds interesting, but Ruby syntax confuses the hell out of me and when you say the syntax is based on Ruby that gives me the heebie jeebies
@gearboxworks3 ай бұрын
Came here to say essentially the exact same thing. Ruby syntax? 🤮
@petursteinn97183 ай бұрын
Did twitch stop using Elixr? What are they using instead? I imagine they have huge scalability problems to deal with right?
@ffeliziani3 ай бұрын
So... Kubernetes before kubernetes?
@Malix_Labs3 ай бұрын
Without the complexity, but also without the flexibility
@infantfrontender61313 ай бұрын
Kind of. Kubernetes works on a cluster level, Erlang/Elixir/Gleam on an app level
@patximartel3 ай бұрын
Secret? It's the telecommunication's gold standard