Get value out of your monad - Mark Seemann

  Рет қаралды 25,146

NDC Conferences

NDC Conferences

Күн бұрын

Пікірлер
@osman3404
@osman3404 6 жыл бұрын
I really LOVE Mark Seemann’s talks ... he is one of the few engineers/architects who can also teach
@DaniloJr
@DaniloJr 2 жыл бұрын
I've watched a bunch of monad videos. By far, this is the best!
@abdulwahabshahid4151
@abdulwahabshahid4151 Жыл бұрын
One of the best talks on the topic
@jchandra74
@jchandra74 6 жыл бұрын
Been waiting for this one to be published so I can show this to my co workers.... Finally. So cool. 👍
@TihomirKit
@TihomirKit 4 жыл бұрын
Does anyone have any idea what was used for animating the presentation / code moving around?
@redpepper74
@redpepper74 2 жыл бұрын
25:52 holy hell database querying just turned into a Haskell ‘do’ block!!
@CodeRiff
@CodeRiff 4 ай бұрын
what if your business method needs to call a domain service that returns Task and await it in order to do one thing or another?
@AzazeoAinamart
@AzazeoAinamart 6 жыл бұрын
Aaaah, this is beautiful!
@Xarbrough
@Xarbrough Жыл бұрын
How does he make the source code slides use a typewriter animation effect and also have syntax highlighting? I always assumed that any code showing syntax highlighting was screenshot images in Powerpoint, but apparently there's a way to add syntax highlighting to actual text?!
@joebowbeer
@joebowbeer Жыл бұрын
54:25 For more robustness, I would like to see the get-then-set data race handled
@fjf2002
@fjf2002 Жыл бұрын
Q: "Get value out of your monad?", A: "You don't." - Well, er, as far as I understand, functions like "Match" (see 40:23) or "Aggregate" or "reduce" or "fold" or what you might call them ARE actually a way of getting information out of the monad, aren't they?
@andrew_ray
@andrew_ray Жыл бұрын
Yes and no. Match and Aggregate are ways to get _a_ value out of certain specific monads, but it doesn't make sense to talk about getting _the_ value out of a monad in general, because some monads like collections and Maybe aren't guaranteed to contain any value at all, so your Aggregate call might just return the seed, and your Match call might just return the nothing value. Furthermore, there are other monads, like Task mentioned here or Haskell's IO whence you cannot extract any value at all (barring esoteric language features well outside the everyday repertoire). (And await is not really extracting a value; it's just a syntactic shortcut for injecting the rest of the function into the monad, at the end of which it will inevitably be wrapped back up in another Task; Haskell actually generalizes this with its do-syntax.) And so you have async operation all the way up to the program entry point in C# and Haskell's main is always of an IO type.
@EduardoSilvaLopez
@EduardoSilvaLopez Жыл бұрын
@@andrew_rayI don't think that this is the point. The point is that the answer was "no, you project" and this nor always feasible nor always done. At the end, I see no difference between using a Match to get the value or asking = m.HasValue ? m.Value : nothing .
@andrew_ray
@andrew_ray Жыл бұрын
@@EduardoSilvaLopez But you can't always do that either. Again, take Haskell's IO: you don't to ask if it has a value; it always does. But you can't just ask for the value to be unwrapped, except be the ominously-named `unsafePerformIO`, which from the name you might guess is not something you're calling every day.
@EduardoSilvaLopez
@EduardoSilvaLopez Жыл бұрын
@@andrew_ray Maybe but this was not the answer. It was not "you can't do always", it was "you don't do it". And yes, sometimes I do. And for good reasons. If the only option is calling a method called "unsafePerformIO" then I am sorry I think that's bad language design. Sorry.
@andrew_ray
@andrew_ray Жыл бұрын
@@EduardoSilvaLopez There is a reason for that design. In general, Haskell functions must always return the same value when given the same inputs. The only way to ensure that is to avoid interacting with the outside world. The IO monad is an encapsulation of all the interactions between the program and things outside the program. By simple logic, if a function _f_ calls a function _g_ that depends on interactions with the outside world, then function _f_ must also depend on interactions with the outside world. Therefore, it must also bear the IO monad. Bypassing the monad with something like `unsafePerformIO` allows you to create a function that appears not to depend on the outside world but actually does, which limits your ability to reason about your code and also limits the compiler's ability to point out where you've made mistakes. They say of Haskell that is your code compiles, it's probably correct, but that goes out the window when you start throwing around unsafe code.
@fuzzylollipop1429
@fuzzylollipop1429 Жыл бұрын
Any Go implementations of these ideas?
@yingliu4203
@yingliu4203 5 жыл бұрын
wonderful talk with practical examples
@jessepoulton224
@jessepoulton224 6 жыл бұрын
anyone know what font is used for that code?
@hkmix
@hkmix 6 жыл бұрын
Jesse Poulton Looks like Consolas, stock Microsoft font.
@MarkSeemann
@MarkSeemann 6 жыл бұрын
Indeed, it's Consolas 👍
@jessepoulton224
@jessepoulton224 6 жыл бұрын
@@MarkSeemann ha really? thats bizarre, looks smoother or smth. Perhaps i just need to up my font size lol
@humphreybflaubert
@humphreybflaubert 6 жыл бұрын
Is there any code available for this talk? Would be keen to see the code of the extensions used in the last slide.
@herowanders9130
@herowanders9130 5 жыл бұрын
Previously Mark has published the article called "Asynchronous Injection" and this is the accompanying code: github.com/ploeh/asynchronous-injection
@Endomorphism
@Endomorphism 4 жыл бұрын
code github.com/ploeh/asynchronous-injection
@inversebrah
@inversebrah 2 жыл бұрын
great talk
@kahnfatman
@kahnfatman 2 жыл бұрын
Q: Get value out of your monad? A: You don't.
@JonathanPeel
@JonathanPeel 3 жыл бұрын
In this talk he uses the "cool" C# logo 😁
@Tumorlike
@Tumorlike 11 ай бұрын
🤯
Fractal architecture - Mark Seemann - NDC London 2022
54:31
NDC Conferences
Рет қаралды 4,6 М.
🎄 Advent of code 2024 in F# - day 03
8:28
Jo Van Eyck
Рет қаралды 200
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Async injection - Mark Seemann
1:01:01
NDC Conferences
Рет қаралды 4,2 М.
F# for C# programmers - Scott Wlaschin
1:00:01
NDC Conferences
Рет қаралды 69 М.
Refactoring to Immutability - Kevlin Henney
1:03:22
NDC Conferences
Рет қаралды 94 М.
What is a Monad? - The Last Monad Intro You'll Ever Need
15:48
走歪的工程師James
Рет қаралды 25 М.
Domain Modeling Made Functional - Scott Wlaschin
51:35
NDC Conferences
Рет қаралды 28 М.
From Dependency injection to dependency rejection - Mark Seemann
59:39
NDC Conferences
Рет қаралды 51 М.
What is IO monad?
36:32
Tsoding
Рет қаралды 71 М.
The Functional Programmer's Toolkit - Scott Wlaschin
1:05:51
NDC Conferences
Рет қаралды 71 М.
What the Heck Are Monads?!
21:08
ArjanCodes
Рет қаралды 76 М.