Get value out of your monad - Mark Seemann

  Рет қаралды 24,988

NDC Conferences

NDC Conferences

Күн бұрын

Пікірлер: 34
@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. 👍
@redpepper74
@redpepper74 2 жыл бұрын
25:52 holy hell database querying just turned into a Haskell ‘do’ block!!
@TihomirKit
@TihomirKit 4 жыл бұрын
Does anyone have any idea what was used for animating the presentation / code moving around?
@Xarbrough
@Xarbrough 10 ай бұрын
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?!
@AzazeoAinamart
@AzazeoAinamart 6 жыл бұрын
Aaaah, this is beautiful!
@CodeRiff
@CodeRiff 3 ай бұрын
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?
@fuzzylollipop1429
@fuzzylollipop1429 Жыл бұрын
Any Go implementations of these ideas?
@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
@yingliu4203
@yingliu4203 5 жыл бұрын
wonderful talk with practical examples
@humphreybflaubert
@humphreybflaubert 5 жыл бұрын
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
@joebowbeer
@joebowbeer 11 ай бұрын
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 11 ай бұрын
@@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 11 ай бұрын
@@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.
@inversebrah
@inversebrah 2 жыл бұрын
great talk
@Endomorphism
@Endomorphism 4 жыл бұрын
code github.com/ploeh/asynchronous-injection
@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 10 ай бұрын
🤯
Domain Modeling Made Functional - Scott Wlaschin
51:35
NDC Conferences
Рет қаралды 28 М.
Refactoring to Immutability - Kevlin Henney
1:03:22
NDC Conferences
Рет қаралды 93 М.
У вас там какие таланты ?😂
00:19
Карина Хафизова
Рет қаралды 23 МЛН
Async injection - Mark Seemann
1:01:01
NDC Conferences
Рет қаралды 4,2 М.
From Dependency injection to dependency rejection - Mark Seemann
59:39
NDC Conferences
Рет қаралды 51 М.
What is a Monad? - Computerphile
21:50
Computerphile
Рет қаралды 607 М.
The Functional Programmer's Toolkit - Scott Wlaschin
1:05:51
NDC Conferences
Рет қаралды 70 М.
Functional architecture - The pits of success - Mark Seemann
1:00:10
NDC Conferences
Рет қаралды 143 М.
"Outperforming Imperative with Pure Functional Languages" by Richard Feldman
34:55
Strange Loop Conference
Рет қаралды 89 М.
What is IO monad?
36:32
Tsoding
Рет қаралды 70 М.
What the Heck Are Monads?!
21:08
ArjanCodes
Рет қаралды 74 М.
F# for C# programmers - Scott Wlaschin
1:00:01
NDC Conferences
Рет қаралды 69 М.