Taking Erlang to OCaml 5 (with Leandro Ostera)
Vložit
- čas přidán 7. 07. 2024
- Erlang wears three hats - it’s a language, it’s a platform, and it’s an approach to making software run reliably once it’s in production. Those last two are so interesting I sometimes wonder why those ideas haven’t been ported to every language going. How much work would it be?
This week we’re going to dig right down into that question with Leandro Ostera. He’s been working on Riot - a project to bring the best of Erlang’s runtime system and philosophy to OCaml. But why OCaml? Is it possible to marry together OCaml’s type system with Erlang’s dynamic dispatch systems? And what is it about the recent release of OCaml5 that makes the whole project easier?
-
Leandro’s Blog: www.abstractmachines.dev/
Why Typing Erlang is Hard: www.abstractmachines.dev/post...
Riot: riot.ml/
Riot source: github.com/riot-ml/riot
ReasonML: reasonml.github.io/
ReScript: rescript-lang.org/
Leandro on Twitter: / leostera
Kris on Mastodon: mastodon.social/@krisajenkins
Kris on LinkedIn: / krisjenkins
Kris on Twitter: / krisajenkins
--
0:00 Intro
1:42 Podcast
1:02:34 Outro
#podcast #softwaredevelopment #erlang #ocaml #softwaredesign
Hi Comment section 👋 and thanks a million for hosting me Kris, I had a *ton* of fun! 🤩✨🐫 - happy to answer anything folks, just @ me :)
OcaML is my camel
Which big erlang book are you talking about ?
Nice talk btw
@@__samuel-cavalcanti__i was talking about Learn You Some Erlang For Great Good
¹❤❤❤❤❤❤q❤❤1❤1❤
I'm so happy I found this channel. It's easily the best software development content I've found on CZcams.
I feel the same, is really good content
Leandro ostera is a 1000x developer. Truly inspiring contributions to the ocaml eco system
You always know how to choose my favorite topics. This channel is such a CZcams gem.
new favorite episode of the podcast :)
Thanks for removing the looping music in your intro speech. It is easier to listen to what you are saying.
Great podcast as always :D
Great interview, really loving your content! In a similar vein to the topic at the end of this interview about the work stealing, I think it would be really interesting to do some interviews/questions about the new Java Virtual Threads and the Golang Scheduler, and how they compare to BEAM.
Woohoo, more ML Lang talks. Love it.
So effing cool!
Quality! This content is what we love!
41:17 "And that means you don't need Redis". Topical!
I wrote something loosely resembling the genserver pattern in OCaml once and don't remember having any significant problems with typing it. I simply made the genserver a functor over a module defining types of the state, request and response messages. The argument module provided a message handlers for messages, while the functor implemented the main loop of the thread, taking messages from mailbox and passing them to the handfler one at a time. The mailbox itself, I think, was provided by lwt already. So the argument module type was pretty slim: three types and two or three functions. Of course OCaml was still single-threaded back then, so I was using lwt library for concurrency. It worked pretty well, even in the browser, compiled to JS.
No extensible type ugliness, no message filtering and complete type safety guaranteed by the compiler. No developer headaches about that. :)
Great episode. I learned about some really interesting sounding projects that I hadn't heard of before (ReasonML and ReScript).
I really like the idea of bringing Erlang and OCaml together. Really interested to see where this project goes!
11:35 Rescript mentioned 🙌 I'd love to use it in some Typescript projects but was never quite able to get the hang of its TS integration though
I might like the idea of limiting message size to have persistent messages. Force the user to persist the data and send a reference/id to it in the message...
First things first: 🧡 OCaml 🧡 My intro to functional programming. This looks like a fascinating project!
Also, please do Rust!
very interesting, I've discover so much.
You should get Mitchell Hashimoto on and talk about the new terminal emulator "Ghosty" he's building :)
I think Melange is the compiler that compiles Ocaml/Reason to Javascript and Rescript (which has diverged from Ocaml/Reason syntax/semantics) has its own compiler.
Wooo!!!
You should cover rescript, it's pretty cool
very cool
I don't think what you said in the intro is correct. The letting it crash thing is not about just shipping code and hoping it works but about the mechanism it gives you to handle runtime errors.
Yeah, I was perhaps a bit cavalier there. 🤦♂️
Of course OCaml programmers want to monitor and handle runtime problems, just as Erlang programmers want to get their code right before they ship. I was just trying to find a way to highlight the main point - Erlang's got a very unique and interesting approach to runtime problems. 🙂
I don't think "effect handlers" is only used at runtime, i thought it can also be used in AOT compile-time, to assist a semantics-transistent transpile from one language to another (call it `cross-language monolithic DSL fusion`...)
A program on a runtime system can be viewed as a sequence of "effects", this can be monolithic, while different language impls can be polymorphic
Right