I learned more about FP in this video that in an entire semester at college
@Arijanitsalihu
2 жыл бұрын
me to
@TravisWatson
6 жыл бұрын
This video was awesome! I code a lot of functional(ish) stuff in JS and am interested in Haskell. When you said "no arrays" you broke my brain. I kept watching and it feels like my eyes were just opened! It's so clear now why recursion is important! Thank you thank you thank you!!!
@johnnyphoney5669
6 жыл бұрын
It's not really true about "no arrays", you could have it if your really need it (for performance-critical parts for instance), look at this package: hackage.haskell.org/package/array But how you work with this arrays differs from how you do it in imperative languages.
@johnnyphoney5669
6 жыл бұрын
See also hackage.haskell.org/package/vector
@bratezoran2102
4 жыл бұрын
@@johnnyphoney5669 Was asking this as a standalone comment. Array/Vector is much more efficient if you do non-iterative stuff. In fact, lists are even discouraged in haskell for anything but iteration. Length, index, elem, everything that does more than `head` is discouraged. www.imn.htwk-leipzig.de/~waldmann/etc/untutorial/list-or-not-list/
@chromosundrift
3 жыл бұрын
Also note there are a lot of purely functional datastructures and the following book is a good resource for them: www.cambridge.org/core/books/purely-functional-data-structures/0409255DA1B48FA731859AC72E34D494
@KotoOo
Жыл бұрын
is that make any sense that we're rejecting arrays, but allowing hashmaps a.k.a objects? because hashmaps are more complicated in their implementation, and usually based on arrays under the hood. and if array are not allowed, does that mean that standard JS map/filter/reduce are not pure?
@Pitometsu
6 жыл бұрын
Nix-shell, Haskell, Emacs. Good, very good! You had chosen the right side.
@cranknlesdesires
4 жыл бұрын
@Gabriel Klenner well I can think of one you might have missed, vim is not Emacs.
@obinator9065
4 жыл бұрын
Gabriel Klenner VS Code + HLS + HLINT, emacs is for sheeps
@cranknlesdesires
4 жыл бұрын
@@obinator9065 man, microsoft marketing is taking a bazaar route these days.
@bratezoran2102
4 жыл бұрын
@いあ I'm so torn apart. Using vim for a couple or years now, but only "really" using it for a couple of months to program. I don't want this big emacs ship, also vims community is much bighger. But so many advantages when using emacs as an IDE...I don't know.
@waltherstolzing9719
3 жыл бұрын
@@bratezoran2102 I'm not a pro, so take all this with a truckload of salt -- but neovim remedies some of vim's disadvantages as a IDE (& some of its features are 'backported', so to speak, into regular Vim via plugins). The upcoming 0.5.0 introduces a native LSP client & syntax engine; & the RPC interface makes it easily extensible, as it makes it trivial to communicate with whatever else over tcp or unix sockets.
@nitinchandurkar3303
6 жыл бұрын
Amazing. Never seen this style of presentation. Thanks. Learnt a lot about Haskell this way. Would like to see some more of these videos.
@CubOfJudahsLion
4 жыл бұрын
"Functional programming is about *composing* pure functions". Thank you! Many definitions of FP leave aside this essential component. We don't just compute with pure functions -- we combine code itself with some more code and into different contexts! Now *that* is reusability taken to its ultimate expression.
@sumantkanala
6 жыл бұрын
Alright, I'm gonna be a subscriber for life. You have so much knowledge in one video, it's too good to be missed. Recommended for any modern developer!
@williaamlarsson
3 жыл бұрын
This video made me understand Haskell more than any of the dussins of Haskell tutorials I've watched so far
@RoniellBerrios
3 ай бұрын
Tsoding even though this video is old, your other videos inspired me to try haskell since it seems so cool and I don't know magical and this video helped me a lot, I finally made my own function that I understand!
@marcusaccount1008
2 жыл бұрын
this is pure gold
@eboubaker3722
2 жыл бұрын
imagine he hits F5 in the middle of the video.
@SomeMrMindism
4 жыл бұрын
This is so cool, you type insanely fast! One of the limitation I would have highlighted for the passage to Haskell is strong typing, indeed fizzbuzz in JS returns a list of strings and numbers while the Haskell version returns a list of strings only. JS is more similar to Scheme in this sense
@jacobscrackers98
4 жыл бұрын
If you watch his streams you'll learn he doesn't. He probably just speeds it up.
@taragnor
3 жыл бұрын
I don't really think strong typing is all that new of a concept to most programmers, so it's something glossed over compared to things like currying. And really given Haskell's generic patterns and typeclasses, the strong typing isn't really as big an issue as most would expect. And honestly while you can pass in a bunch of weird arguments of different types into a JS function, you probably shouldn't. It makes the code a lot harder to understand.
@guillaumequittet9418
4 жыл бұрын
I thought I knew functional programming. I was wrong. Since watching your videos I have been able to solve some problems with the functional code I made. Thank you !
@mnslr
6 жыл бұрын
I love how you basically construct lisp in js here. Got here interested in JS and running emacs basically as an os, implying some lisp comprehension... gonna learn me some haskell now
@andrepadez
2 жыл бұрын
Awesome! only one suggestion to get rid of the "dirty" functions: const a2l = arr => [...arr].reverse().reduce((l, i) => pair(i)(l), null) const l2a = xs => (xs === null ? [ ] : [head(xs), ...l2a(tail(xs))])
@bradynglines5898
5 жыл бұрын
I'm new to the functional world and you have helped me greatly understand what is going on. Thank you so much for this video.
@mohammedsalman3397
6 жыл бұрын
Great video, well explained. You should make more like this
@MyriadColorsCM
Жыл бұрын
This has to be one of the coolest coding videos i´ve ever seen.
@samirelsouki466
3 жыл бұрын
This its increible bro!!! You are the best profesor of functional programming i see! A hug from Venezuela. Thanx
@Fc11235
4 жыл бұрын
I learnt haskell because I wanted ro improve my recursional thinking. Now I’m in love with it. The best decision ever.
@skryonline5825
3 жыл бұрын
спасибо большое. Очень четко и ясно. хотелось бы больше таких примеров с чистыми функциями и сравнения JS c Haskell
@stephenjames2951
4 жыл бұрын
Very succinct description of FP in JavaScript. I couldn’t help but thing of lisp with the FP list that you created
@junnior8003
Жыл бұрын
Amazing!!!!! I hadn't thought of it that way. you have a fan here brazil!
@btavia-q9n
5 жыл бұрын
Wow, this is mind bending
@ramongonzalezfernandez8904
2 жыл бұрын
I just decided to learn Haskell after seeing some of your videos, and after searching, this was the first thing I found
@ColePanike
Жыл бұрын
Incredible. This helped me grok FP and haskell SO MUCH BETTER! Thank you!
@treseymour5788
3 жыл бұрын
Thanks so very much. I've made FP a personal study since 2013. I've wanted to break into Haskell and have been thwarted more than once. This is a great Haskell intro imho.
@georgespanos4680
3 ай бұрын
You are great man, thank you for the content.
@trashcan3958
7 ай бұрын
Excellent video.
@PedroPiquero
Жыл бұрын
I loved the explanation and now I am more interested in knowing Haskell.
@hansdampf2284
Жыл бұрын
The fact that you can just hammer that in the keyboard from the top of your head is impressive. When I program is more like hm hm hm think think *type thing in* hm oh no *delete again* hm think hm oh yeah *types thing in* I think people can hear the sound of an old modem coming from my brain in the thinking phases
@Gigasharik5
7 ай бұрын
Saaammeee
@rodelias9378
2 жыл бұрын
Really good and useful video! Thanks a lot!
@GuitarreroDaniel
3 жыл бұрын
This is the BEST FP video that I've ever seen. Thanks man.
@hansschenker
4 жыл бұрын
Very carefully crafted and easy to follow presentation! thank's a lot!
@akritworanithiphong
Жыл бұрын
This is so useful. Your explanation is so informative and insightful.
@hansschenker
2 жыл бұрын
Every Javascript Programmer should learn this presentation by heart!!
@adjbutler
Жыл бұрын
THANK YOU VERY MUCH, VERY HELPFUL IN WHAT FUNCTIONAL LOOKS LIKE
@harshitjoshi3082
4 жыл бұрын
That was a great video! absolutely loved it ❤️ you should have more subscribers.
@nicolashumbert8344
Жыл бұрын
What a starting point. Pure genius.
@diegodorado
2 жыл бұрын
Great video!
@ChickenMaster7
10 ай бұрын
That was beautiful
@user-qe6rh2qq9z
11 ай бұрын
This explanation is so damn good
@rezmed1144
Жыл бұрын
Mind blowing pedagogue !
@MarkusBurrer
11 ай бұрын
Even though I hate JS, this video is great. I learned so much about FP from your videos. I really hope you are doing well.
@vyacheslavogai
6 жыл бұрын
Great video about pure functions! Similar to when you visit another country and meet new people and learn something new about theirs' culture :)
@lucasa8710
2 жыл бұрын
genius, i'd never thought in this way
@The14Some1
9 ай бұрын
Mindblowing!
@juancasilla684
4 жыл бұрын
I thought I was gonna hate the video but turns out it was great, keep it up!
@Fullflexno
Жыл бұрын
Impressed!👌✨
@NabeelFarooqui
6 ай бұрын
I knew what was going on and was lost simultaneously. Very strange
@ongoinglives
3 жыл бұрын
amazing demonstration of haskell skill
@waynee95
6 жыл бұрын
Really liked that video!
@kirilvedmidskiy
11 ай бұрын
great video, thank you!
@alexnd98
4 жыл бұрын
This video is pure gold!
@nelsonjoppi
3 жыл бұрын
wow. amazing video, really!
@antontikhonov5028
Жыл бұрын
Great video! Bravo!
@halotroop2288
Жыл бұрын
Thank you for teaching me just how bad functional programming can be. I'll never attempt to step away from OOP again.
@AllanMedeiros
7 ай бұрын
Fantastic!
@WilliamHolden0
4 жыл бұрын
Really slick, great video!
@w0xy
4 жыл бұрын
this is really amazing stuff, thanks for sharing! i've been wanting to try to apply some of the knowledge of fn programming to my js knowledge but didnt know where to start
@pabloduran203
2 жыл бұрын
Amazing explanation. Maybe you should repeat it with porth (if you implement anonymous functions)...
@nicolareiman9687
5 жыл бұрын
in the first argument it's actualy use a condition checker which is like if Statement. in recursion we must find a way to get out so if statement it's required i think.
@Brynjar1
7 ай бұрын
Great way to explain
@zacksargent
3 жыл бұрын
This was really helpful! Thank you
@andrueanderson8637
2 жыл бұрын
I do love me some javaskriept, great video!
@notgate2624
4 жыл бұрын
Incredible video
@CaptainWumbo
4 жыл бұрын
I tried PureScript once but I could not for the life of me figure out how to write the type signatures of effects or really understand their syntax. The pure functional types make sense, but the others were very confusing.
@iambasanta
11 ай бұрын
mind blown
@FunkschyIsWatchingYou
Жыл бұрын
Amazing ❤
@enverhoxha2698
4 жыл бұрын
masterful editing
@snoopy8870
2 ай бұрын
i don't understand why would somebody write all that code instead of if else statements and for loops, what's the benefit of FP over OOP?
@Zorgatone
4 жыл бұрын
Name of the outro song?
@ratkentheinfinity9841
5 жыл бұрын
Id expect n to return true.. Learned new on the JS side as a plus. Learning never ends!
@arshadpakkali
3 жыл бұрын
This video just made a 501 in my brain
@SwarajDhumne
6 жыл бұрын
When you implemented array2list why did you reverse the list instead of just iterating from xs.length - 1 down to 0?
@DavidAguileraMoncusi
4 жыл бұрын
They're equivalent solutions... so probably his was the first one that came to his mind
@jacobscrackers98
4 жыл бұрын
@@DavidAguileraMoncusi One is more efficient than the other though.
@chromosundrift
3 жыл бұрын
@@jacobscrackers98 efficiency is clearly not a high priority in these examples (although of course Haskell does gain efficiency through pure functional laziness).
@jacobscrackers98
3 жыл бұрын
@@chromosundrift If it doesn't cost anything extra, one should go for the more efficient option imo
@taragnor
3 жыл бұрын
@@jacobscrackers98 Efficiency in Javascript wasn't the point. Lots of stuff he's doing like function currying are horribly inefficient in JS, but the idea was to understand Haskell better. Keep in mind that in haskell the compiler optimizes a lot of these things for you. So a lot of inefficient practices in JS aren't inefficient in Haskell, because Haskell is designed for that style of solution in mind.
@MrBenjjj6
6 жыл бұрын
That was amazing, thank you.
@thepawday
Жыл бұрын
Looks fancy, but how much Stack Overflows does occuring in functional languages?
@chadthunder6915
4 жыл бұрын
quality content comrade
@dynamite-bud
2 жыл бұрын
beauty
@telnobynoyator_6183
4 жыл бұрын
Ah, yes, how to blow up the stack by creating a range. Great video tho !
@kawaikaede2269
2 жыл бұрын
comfy
@dawid_dahl
5 жыл бұрын
I love this video!
@gonzalochristobal
4 жыл бұрын
awesome video! thanks :)
@joseagustinrios9666
3 жыл бұрын
If you don't account the Array limitation, you don't need to re-implement map and arrays to list, list to array. I understand why you did that, but in practice the only thing you really need is ranges.
@ne4to777
3 жыл бұрын
Люто лайкую. Топчик.
@gargleblasta
4 жыл бұрын
Beautiful
@DJJOHN92
4 жыл бұрын
I think as a disclaimer it should be made clear that types also have to be pure in functional languages. Having a function returning either an integer or string is not possible in Haskell without a unifying type.
@dericbytes
4 жыл бұрын
Thanks, this was cool.
@AndrewLewman
4 жыл бұрын
Thank you so much because now i fan of fp
@ehza
2 жыл бұрын
Thanks man
@raphaelradespiel9970
Жыл бұрын
Why are ternary operators allowed but not other forms of conditionals? Are nested ternary operators allowed?
@georgecernat6166
5 жыл бұрын
Great video
@dawid_dahl
5 жыл бұрын
Cool video, thanks!
@peterostertag8699
5 жыл бұрын
Great fun!
@mechmaker9346
4 жыл бұрын
I think,that separating on 2 parts it's not a good trick, because haskeller also should know how write good Side Effect code using monad and etc. And using Side Effects through the powerful mathematic conceptions - it's actually beauty of haskell.
@The14Some1
9 ай бұрын
Oh that's what is the purpose of monads! I've seen the example of monad that does the logging, and after reading this my eyes have opened.
@MuslihAlAqqad
3 жыл бұрын
Thank you....
@stefanusayudha1853
2 жыл бұрын
that fisbuzz example using if statement. while you said we cannot using ifs ?
@valle6354
7 ай бұрын
It's probably a bit late, but the Haskell "if ... then ... else ..." works like a ternary. The thing that's not allowed is just if ... then ..., because then there is no return value when the check fails.
@davidfromnorth7836
4 жыл бұрын
Как раз изучаю функциональное программирование на js
@blocktech26
Жыл бұрын
why should there be no if conditions for it to be functional
@mo3ath12
4 жыл бұрын
😍👍😎 Awesome!!!!
@laurentgauthier8742
4 жыл бұрын
Thank you for this video. I wonder though about the use of ternary operators... In a way, is it not like using a "if"?
@tomaszzielinski1704
3 жыл бұрын
In functional programing else is mendatory, because expressions always have value. Ternary operator enforces this constraint in procedural language.
@nilstrieb
3 жыл бұрын
if is a statement and returns no value, so it cant be used
Пікірлер: 201