Great video, Ethan! You do acknowledge Erlang, but I think the framing could give it more credit. The concurrency challenges you describe-like race conditions, structured concurrency, and managing parallelism-are definitely contemporary issues for many languages, but Erlang and the BEAM VM solved these decades ago. Concepts like message passing, preemptive scheduling, and supervision trees have been foundational in BEAM-based languages since the '80s. What’s being positioned as cutting-edge today has been core to Erlang for over 30 years, so while these are still challenges for many, for BEAM languages, they’re old news!
Ooh! Well done. I don't think I like it, but it's a really interesting approach. So, the important thing about promises is that you can tell clearly when a transaction will run to completion, without an interleaving task, and when you are enqueing a new task to be run later. Blurring this line is a great way to start a bug farm. Building off of this approach, I think it would be cleaner not to conflate tasks and contexts. Allow a function to return to the caller but still leave work to do, and use a separate context object to track ownership of the run queue and donate time to it. This is how the scheduling interface in my own system works. I think in practice I'd rather just use promises directly, but there are absolutely scenarios where resource management is more important than pure expression.
Yea it’s always a bit hard trying to balance maintaining the narrative while stopping to explain the examples- always more to improve But I would say I lean towards the mindset of like “if you are really curious pause and ponder for a second”
Using 'goto' isn't necessarily bad. It is used quite a lot in C code, for example in the Linux kernel, primarily for error handling and cleaning up. Correctly used, it does not result in spaghetti code but in very clear code.
Agreed it has uses for places as low level as kernel code Disagree it does not result in spaghetti code- it creates control flow that coolaid man smashes all of the “walls” of your program by jumping between functions Again, it has its uses but it’s just not a sustainable way to program
@@ethanniser To me, "goto spaghetti code" means jumping back and forth, a flow that is difficult to follow. It was common in early BASIC code where there was no WHILE statement and perhaps not even subroutines. The way 'goto' is used in the Linux kernel one usually only has jumps forwards, from a failing call into a cleanup section. In my opinion that's not spaghetti code since the flow is easy to follow.
Are you an educational channel or are you advertising your NPM package? I just want to know if I should be subscribed with notifications on or if your videos will all be about the Effect library.
the first 3/4ths of this video don't mention effect at all I am quite passionate about effect, and it is a great example of an implementation of many really interesting programming concepts I would expect some more videos approximately similar to this: talk about general concept that applies to any language, then look at how effect makes it really easy but I have plans on making many videos completely independent of effect as well feel free to turn notifications off and just click on the videos if they seem interesting to you and if you click away the second I mention effect that is perfectly reasonable too (lastly, it is not my package)
I would prefer if you can keep yourself and your toxicity away. Some of us value the free and informative content people invest hours on, and I don't want people like you pissing the creators
Kotlin has coroutines as their solution for their structured concurrency. I'd love to see what your thoughts on the strengths and weaknesses of it versus Effect
Corrections:
Effect.die('todo')
11:31: Queue has element type number, but is given strings: offer("hi")
Great video, Ethan! You do acknowledge Erlang, but I think the framing could give it more credit. The concurrency challenges you describe-like race conditions, structured concurrency, and managing parallelism-are definitely contemporary issues for many languages, but Erlang and the BEAM VM solved these decades ago. Concepts like message passing, preemptive scheduling, and supervision trees have been foundational in BEAM-based languages since the '80s. What’s being positioned as cutting-edge today has been core to Erlang for over 30 years, so while these are still challenges for many, for BEAM languages, they’re old news!
Ooh! Well done. I don't think I like it, but it's a really interesting approach.
So, the important thing about promises is that you can tell clearly when a transaction will run to completion, without an interleaving task, and when you are enqueing a new task to be run later. Blurring this line is a great way to start a bug farm.
Building off of this approach, I think it would be cleaner not to conflate tasks and contexts. Allow a function to return to the caller but still leave work to do, and use a separate context object to track ownership of the run queue and donate time to it.
This is how the scheduling interface in my own system works. I think in practice I'd rather just use promises directly, but there are absolutely scenarios where resource management is more important than pure expression.
I wish you could spend some time explaining the code snippets, but thanks for the effort (I can always pause and pay close attention).
Yea it’s always a bit hard trying to balance maintaining the narrative while stopping to explain the examples- always more to improve
But I would say I lean towards the mindset of like “if you are really curious pause and ponder for a second”
@@ethanniser Yup you're right. The concepts are hard to summarize in a short video. I'll explore further, thanks for the advice.
Using 'goto' isn't necessarily bad. It is used quite a lot in C code, for example in the Linux kernel, primarily for error handling and cleaning up. Correctly used, it does not result in spaghetti code but in very clear code.
Agreed it has uses for places as low level as kernel code
Disagree it does not result in spaghetti code- it creates control flow that coolaid man smashes all of the “walls” of your program by jumping between functions
Again, it has its uses but it’s just not a sustainable way to program
@@ethanniser To me, "goto spaghetti code" means jumping back and forth, a flow that is difficult to follow. It was common in early BASIC code where there was no WHILE statement and perhaps not even subroutines.
The way 'goto' is used in the Linux kernel one usually only has jumps forwards, from a failing call into a cleanup section. In my opinion that's not spaghetti code since the flow is easy to follow.
Underrated video
WHERE ARE THE OCAML FIVE EFFECT AND DATA RACE FREE PARALLELISM MENTIONS!?!?!
Nice video tho :)
Are you an educational channel or are you advertising your NPM package? I just want to know if I should be subscribed with notifications on or if your videos will all be about the Effect library.
the first 3/4ths of this video don't mention effect at all
I am quite passionate about effect, and it is a great example of an implementation of many really interesting programming concepts
I would expect some more videos approximately similar to this:
talk about general concept that applies to any language, then look at how effect makes it really easy
but I have plans on making many videos completely independent of effect as well
feel free to turn notifications off and just click on the videos if they seem interesting to you
and if you click away the second I mention effect that is perfectly reasonable too
(lastly, it is not my package)
@@ethanniserNice try Diddy
I would prefer if you can keep yourself and your toxicity away. Some of us value the free and informative content people invest hours on, and I don't want people like you pissing the creators
Ethan I love the quality content you put up, regardless of whether it’s about Effect or not. Thanks a lot! 🤩🙏🏻
Kotlin has coroutines as their solution for their structured concurrency. I'd love to see what your thoughts on the strengths and weaknesses of it versus Effect
great video erhan
Cool!
first