Teaching Haskell
24:48
7 жыл бұрын
Working with Monads in OCaml
22:48
7 жыл бұрын
Пікірлер
@EvanMildenberger
@EvanMildenberger 17 күн бұрын
I started learning programming in the imperative style with Python and Javascript. After learning Rust and then recently basic Haskell, my mind was opened to how functions are all you need (according to lambda calculus). But what I also took from Rust and Haskell is that algebraic data types are all you need: just like using "and" and "or" allows you to state so many combinations of phrases in English, product and sum types cover so much of the spectrum. But functions are like implications in English: "if I have A then I have B". They're like pseudo-values where they will have a definite value but only when applied with the required argument. That allows you to work backwards by parameterizing the multiple variants (aka "or" sums) in your output type according to various "or" sum variants in the input domain. So defunctionalization is expressing the sum variation as values rather than function pseudo-values. And that means you can serialize them for storage and transfer compared to true functions. It probably also is important for designing compatibility layers because a C function and Ruby function may not be the same but if they can be serialized to equivalent sum types, then they should be compatible.
@EvanMildenberger
@EvanMildenberger 23 күн бұрын
10:00 This all makes me think about tensors and the ability to talk about covariance and contravariance at the same time explicitly: for example, a vector is a (1,0)-tensor, a covector/linear form is a (0,1)-tensor, a linear vector space map is a (1,1)-tensor, etc. It seems that (co-)functors are either fully covariant or contravariant but never mixed. What would be a category theory / type theory / functional programming equivalent of a mixed tensor which could have some number of covariant and contravariant pieces? Edit: It seems he explained something like a (1,1)-tensor from abstract algebra as a Profunctor in that it takes 1 contravariant input type and gives 1 covariant output type. But I'm wondering about the terminology that generalizes (p,q) tensors so that you could talk about something that takes 42 contra- input types and gives 314 covariant output types.
@tomchengxiang
@tomchengxiang Ай бұрын
Really a good idea, wonder few people watch
@SkellatinaSkellington
@SkellatinaSkellington 2 ай бұрын
I have enjoyed going back to look at some of these concepts. Thank you for your presentation. Being a low vision individual, SEEING what you are speaking of is almost impossible unless it is on a black or dark blue background. Fortunately, you were very clear in speaking about what appeared on the screen. Thank you. Please consider us "low vision folk" in the future? <3 💘
@SkellatinaSkellington
@SkellatinaSkellington 2 ай бұрын
* For context, I peruse these videos on my lunch breaks. 🙂 ;-)
@Lircking
@Lircking 6 ай бұрын
nice
@Lircking
@Lircking 6 ай бұрын
amazing
@GuyDude-hk8uy
@GuyDude-hk8uy 8 ай бұрын
Don't quote me on this, but regarding the "open vs. closed" tradeoff, I think the issue relates closely to the expression problem - therefore, we could use a solution to that in order to recover the openness. Again, don't quote me, but I think this could be achieved (in Haskell, at least) using a typeclass with an associated data type. That way you can create instances of the class "SerializableFn" where you must provide a Data type for each instance and a mapping function to/from said data type cases to the appropriate function/s relevant to that instance. That way - whilst you still need to update the code to handle the new case of course - any old code that just uses the typeclass will have the changes propagated automatically; the same way the definition of (+) itself doesn't need to be modified for each new instance of Num a. Not sure whether this would be able to work out with the kinds, or regarding (multiple) type variables, but it seems somewhat promising. I have a feeling the Haskell MemoTrie library and associated paper "Memo Functions, Polytypically!" may bear some relation.
@dooZyz
@dooZyz 10 ай бұрын
Great speaker and great talk!
@kahnfatman
@kahnfatman Жыл бұрын
Is Maybe a special case of Either Nothing?
@DougBeardsley
@DougBeardsley Жыл бұрын
Maybe is equivalent to Either ()
@mathandemotion
@mathandemotion Жыл бұрын
For everyone who is suffering because of the audio: Easyeffects with noise reduction and autogain makes it sound pretty ok :)
@dengan699
@dengan699 Жыл бұрын
wow good talk!
@a0um
@a0um Жыл бұрын
Please, ask some help from an audio technician!
@dustin20541
@dustin20541 Жыл бұрын
Great video. Please keep making more of them George.
@vpryt18
@vpryt18 2 жыл бұрын
Donya? or Sonya? Is that a typo too?
@djgreyjoy1495
@djgreyjoy1495 2 жыл бұрын
I finally understood monads. Thanks Dr Riehl!
@lucasa8710
@lucasa8710 2 жыл бұрын
good
@asitisj
@asitisj 2 жыл бұрын
Nat <: nat , so how influenced is this from Russell's type theory? Also you can't derive subsumption rule when row type instantiated Jury is still out on, if 0 is nat
@pushinweight
@pushinweight 2 жыл бұрын
KDA will be legendary.. amazing technology
@Voltra_
@Voltra_ 2 жыл бұрын
9:04 you can in C++ :3
@Evan490BC
@Evan490BC 2 жыл бұрын
Yes, using SFINAE, but it is a low-level hack, as C++ doesn't really have formal interfaces.
@sohangchopra6478
@sohangchopra6478 2 жыл бұрын
Ptghci is also quite good for a terminal REPL
@TheRealSTR
@TheRealSTR 2 жыл бұрын
Here we go boys
@craia25
@craia25 2 жыл бұрын
this is a crazy way to produce music.... i am wondering how this sounds? ;-)
@jsmdnq
@jsmdnq 2 жыл бұрын
Can this analyze the program Ken Griffin uses to manipulate the fraud market?
@asandax6
@asandax6 2 жыл бұрын
"Lock-step simulation is child's play" Me: This must be the reason I can't do it because I'm not a child anymore 😥
@dinoscheidt
@dinoscheidt 2 жыл бұрын
Even in 2022 great talk. Well done
@English1108
@English1108 2 жыл бұрын
I just want to say this technique is obnoxious. Pretty much the whole point of the this technique would be to apply it to the task of iteratively walking through a tree structure and accumulating a value from it. When this gets brought up on the internet, its always (like this video) walking through a tree structure and NOT accumulating a value or, like other articles, accumulating a value from a sequence structure (like summing a list). Table stakes for this technique to be useful is walking a tree AND accumulating a value - but once you do that, the method shown here just doesn't work - why? because you have 2 different conceptual stacks to maintain (one to maintain position in the tree and one to accumulate the value) and the inlining no longer works the same way and there is just nothing out there that bridges the gap.
@1210divs
@1210divs 2 жыл бұрын
Correct! Talk is kind of misleading. The reason why the tree traversal function prints the traversal path instead of returning it as a list is because it CAN'T accumulate the path and return it.
@williamd4866
@williamd4866 2 жыл бұрын
​@@1210divs That's not true! As TJ above mentions, you can accumulate a value like a list through a tree using this technique. The things you end up accumulating together are just represented by functions arguments for the continuation.
@1210divs
@1210divs 2 жыл бұрын
@@williamd4866 I will believe you if you show me a version of the code from this video that returns the output as a sequence rather than printing it.
@williamd4866
@williamd4866 2 жыл бұрын
@@1210divs Something like this would accumulate a list in CPS: List listTree(Tree tree, Function kont) { if (tree != null) { return listTree(tree.left, (L) -> { return listTree(tree.right, (R) -> { return kont(L + [tree.content] + R); }); }); } else { return kont(List()); } }
@1210divs
@1210divs 2 жыл бұрын
@@williamd4866 at this point, you are no longer using the continuation and doing plain old recursion that will lead to stackoverflow.
@dean2951
@dean2951 2 жыл бұрын
12:41 프로세스
@michaelmroz7433
@michaelmroz7433 2 жыл бұрын
I watched this talk for the first time around when it was delivered, when I was first properly getting into FP. Even given that, I've watched it at least three times in the past three months. It's just so fun.
@spiraeth
@spiraeth 2 жыл бұрын
Bret Victor reference detected.
@chickengoatfish
@chickengoatfish 2 жыл бұрын
\m/..\m/
@juliannevillecorrea
@juliannevillecorrea 2 жыл бұрын
thank you sir ❤️
@parietal100
@parietal100 2 жыл бұрын
Wonderful presentation. Thank you.
@kaqqao
@kaqqao 2 жыл бұрын
Excellent talk. Terrible audio. But excellent talk.
@marissa3248
@marissa3248 2 жыл бұрын
22:11 live coding begins
@MohammedAli-go2uc
@MohammedAli-go2uc 3 жыл бұрын
Kadena ✅🔥
@WarrenLeggatt
@WarrenLeggatt 3 жыл бұрын
Great talk and props for the King Chrimson shirt :)
@linhe6729
@linhe6729 3 жыл бұрын
Great talk even in 2021!
@s90210h
@s90210h 3 жыл бұрын
'I have to get back to Science...' <3 the music was cool af tho the code could watch out for timing 'errors' in the human's playing too perhaps to derive micro timings?
@JosiahWarren
@JosiahWarren 3 жыл бұрын
We need more of them
@АнимусАнанимус
@АнимусАнанимус 3 жыл бұрын
23:52 Lmao, George Wilson is there! 😂
@k1m1
@k1m1 3 жыл бұрын
You are amazing!
@StudentOfKyoto
@StudentOfKyoto 3 жыл бұрын
Amazing talk
@andrewsorenson6750
@andrewsorenson6750 3 жыл бұрын
Great name!
@slowpnir
@slowpnir 3 жыл бұрын
What font does he use?
@GurwinderSingh-mk8db
@GurwinderSingh-mk8db 2 жыл бұрын
Iosevka
@droidcrackye5238
@droidcrackye5238 3 жыл бұрын
great work
@Bratjuuc
@Bratjuuc 3 жыл бұрын
i'm really glad I stumbled upon this talk. Thanks
@hotpaws_maths_and_science
@hotpaws_maths_and_science 3 жыл бұрын
i like how he says DO DO
@i6g7f
@i6g7f 3 жыл бұрын
Thank You for this wonderful talk! Very helpful! :) that explain of map and fmap at 1:20 is very very comprehnsible, cool!
@jdubbs9655
@jdubbs9655 3 жыл бұрын
I am very intrigued. I would like to learn more!
@AshkanKiani
@AshkanKiani 3 жыл бұрын
The person dying of consumption in the audience with their phlegmy coughs is really distracting, but the talk is fantastic.
@reen6904
@reen6904 3 жыл бұрын
lol, tere's a guy with tuberculosis in every meeting