I hope nobody considers "true + 1 = 2" to be a "feature". That language broken, yo.
@licriss9 ай бұрын
Lol the lodash description for curry is absolutely horrendous
@sklarenbach10 ай бұрын
Hey I have a consulting project regarding marrying a local langchain env with purescript's compiler to generate the most robust code. Wanna talk $ and your avail but don't have twitter
@sklarenbach10 ай бұрын
I haven't written JavaScript in a while but I would do tco like this: Function.prototype.call_with_tco = function () { var c = [this, arguments]; var escape = arguments[arguments.length - 1]; while (c[0] !== escape) c = c[0].apply (this, c[1]); return escape.apply (this, c[1]); }; The problem with js is it doesn't have macros. then it can finally become totally umanageable
@DB-nl9xw10 ай бұрын
can you explain the a -> a -> a I still don't understand
@stevenpe7819 ай бұрын
related to partial application (a 2 param fun is in fact a 1 param fun returning a function)
@licriss9 ай бұрын
The Haskell: a -> a -> a add x y = x + y In plain JS terms that would be like: function add(x) { return (y) => x + y; } And calling it would be like: const x = add(1)(2) In this case 'a' refers to the type for the values, so x, y, z should all be the same type for it to be equivalent to "a -> a -> a" meaning const x = add("Hello ")("Currying") Would also fit that function type
@sachindraragul109410 ай бұрын
Great intro to Haskell for Javascript devs
@kazuhisamatsumoto9383 Жыл бұрын
I'm not fluent in English, so I use Google Translate. Thanks for the interesting video. I'm just starting to re-learn category theory using Haskell and Javascript. I wrote a simple program about function composition, associativity, identity morphism, and unit rate. Javascript f = x => { return (x + 2) } g = x => { return (x * 2) } h = x => { return (x ** 2) } i = x => { return h( g(x)) } j = x => { return g( f(x)) } id = x => { return x } c1 = x => { return h(g(f(x))) } c4 = x => { return i ( f(x) ) } c5 = x => { return h(j (x) ) } c1 (3) => c4 (3) => c5 (3) => 100 c1(id(3)) => c4(id(3)) => c5(id(3)) => 100 id(c1(3)) => id(c4(3)) => id(c6(3)) => 100 Haskell f = \x -> x + 2 g = \x -> x * 2 h = \x -> x ^ 2 i = h . g j = g . f c1 = h . g . f c2 = (h . g) . f c3 = h . (g . f) c4 = i . f c5 = h . j c1 3 => c2 3 => c3 3 => c4 3 => c5 3 => 100 Since Haskell provides id (identity function) as standard, we omit the explanation. The result is similar to Javascript. It was so timely and I was so happy that I commented.
@raianmr2843 Жыл бұрын
So many languages, so little time to learn. Right now my learning queue goes like Rust -> Clojure -> Haskell -> programming endgame?. Would've probably started Haskell by now if it were more popular and man do I wish Haskell were more popular.
@ProjectExMachina9 ай бұрын
How is it going?
@vikingthedude9 ай бұрын
Clojure is great. I'm a year into it and I love its simplicity. it takes a bit more thought to create an "elegant" solution to problems if you're from an imperative/OOP background, but once that kind of thinking becomes second-nature, the code really does read very well
@user-tx4wj7qk4t5 ай бұрын
It's pretty popular, but go learn PureScript instead which works on node and the browser
@taududeblobber221 Жыл бұрын
i watched the first 2 minutes of this and i don't really understand it at all. maybe it's because i only know python and scratch.
@raianmr2843 Жыл бұрын
come back to this video next year, im sure it'll make a whole lot more sense then. i have a whole playlist of videos that i return to every single year and it's testament to my learning that i always find something new in them.
@hashtag9990 Жыл бұрын
javascript will never be fixed, that's the beauty of it.
@raianmr2843 Жыл бұрын
sounds like ur in a toxic relationship my dude
@hashtag9990 Жыл бұрын
@@raianmr2843 if javascipt was to be fixed, it would've been ages ago, and we don't have to rely on transpilers, 100s of frameworks
@echoptic775 Жыл бұрын
@@hashtag9990its impossible to change js cuz you cant make any breaking changes
@0xvector850 Жыл бұрын
This is really cool! Please continue doing videos like this!
@vgilalejandria Жыл бұрын
Got a notification from this channel and I was like "who is this girl?, Why I'm subscribe to her?, Why does she have a better voice than I?" Until I realized the channel theme 😛...
@kaifujhuang12802 жыл бұрын
I get a better understanding of closure. Thanks!
@hakilucky59123 жыл бұрын
thank uuuuuu!
@idgam3r4183 жыл бұрын
"To Develop IOS apps, you need a Mac" *Slams desk* I have a Windows PC because I cannot afford a mac, because Apple the capitalist company overprices computers that are limited in their uses, welp, I'll have to wait until never to make iOS apps and games then.
@pachipalabhanuchandra11613 жыл бұрын
Create a generic protocol named StackProtocol which consists of following methods which can perform operations on a stack of any data-type (e.g. String, Int, etc.): push(item) which will add an item in stack pop() which will return an item from stack count() which will count and return number of items in stack Create a generic class named CustomStack which can be used to represent a stack of any data-type. It will conform to StackProtocol and has a private stored property in form of array to store the items of a stack. Use proper error handling such that an error is thrown if we try to access an element from empty stack or add an element when stack is full. (Note: assume that maximum size of stack is: 5). Also create an extension of CustomStack which contains a method to calculate and return the average of all elements of stack if elements are numeric. Can u provide the code for this in Swift language
@TechnologyLearningLive3 жыл бұрын
I LOVE YOUR CHANNEL THX SO MUCH ..I LOVE YOUR HUMOR ..VERY FUN
@ninjanerdstudent69373 жыл бұрын
Well, I learn a lot.
@KrisTong4 жыл бұрын
Not sure if anyone's watching in 2020, I watched it, and figured in Swift 5.0 (Xcode 12 beta) the find (in array, something) is no more supported, and I changed it into let gotAFind = acceptableFinds.firstIndex(of: algorithmResults.pattern) and it worked.
@tenminutetokyo26434 жыл бұрын
DOOD!
@ben64 жыл бұрын
I hope they move away from this shitty xml file, which they branded a plist file. Maybe a JSON file? Then they can do away with the Xcode plist editor.
@beethovenloco26924 жыл бұрын
You should upload more videos for the newer ios version!
@sangharramesh4 жыл бұрын
Best tutorials
@ushadesai63064 жыл бұрын
How do we get autocomplete for code in Xcode 11.3?
@Mucksauce5 жыл бұрын
Planet.Pluto.toRaw() => 9 Never forget
@halleykuncoro3545 жыл бұрын
should be more detail for explaining the class Human
@jacktoddy97835 жыл бұрын
Excellent tutorial - I actually understood it.
@obo1905 жыл бұрын
Helpful hints: Must use IOS playground to import UIKit "println" is now "print"
@obo1905 жыл бұрын
It is greeting.count now rather than countElements(greeting)
@excelsoftware5 жыл бұрын
See how to protect and license Swift apps at www.excelsoftware.com/qlrtxcode
@moviepracticing5 жыл бұрын
A little zoom would help. Think phone screen
@pitmanra5 жыл бұрын
Live views may have been lacking, but I used to really enjoy your Swift videos.
@mikebarta74915 жыл бұрын
you could make the row check a bit more concise by just returning the playable target: var plays = [Int:Int]() plays[1] = 1 plays[3] = 1 plays[4] = 1 plays[7] = 0 plays[8] = 0 func rowcheck(player:Int, row:[Int]) -> Int { var playable = false var found = 0 var play = -1 for spot in row { if plays[spot] == player { found += 1 }else if plays[spot] == nil { playable = true play = spot } } if found < 2 || !playable { play = -1 } return play } rowcheck(player: 1, row: [1,2,3]) rowcheck(player: 0, row: [1,2,3]) rowcheck(player: 1, row: [1,4,7]) rowcheck(player: 0, row: [7,8,9])
@hyperunstable93975 жыл бұрын
ive coded mostly in c# very little c++ and some shell
@martinmak86285 жыл бұрын
It is a good video.
@j91455 жыл бұрын
Shouldn't you be using a static IP?
@evil09ification5 жыл бұрын
good work man!
@iamricobryant96045 жыл бұрын
Did this video work for you? Thanks for your input😊
@acbonbe70595 жыл бұрын
Agijillion is not a number actually aflipingbignumberthatsoundsweirdenoughtobebigbutnottoweirdtosoundfakeormadeupillion Is the correct number
@benvarma34275 жыл бұрын
How would you do this on iPad. I have the playgrounds app, but how would I get lines and import them?
@xheroz12895 жыл бұрын
Great video, clear explanation. But this is outdated. Where can I get a newer version?
@benvarma34275 жыл бұрын
Even though this vid is so old this is just so helpful. Thanks
@paultang54795 жыл бұрын
For people who are looking to parse JSON with swift: this tutorial is kind of outdated, search for newer ones, they are much more straight forward.
@robj74815 жыл бұрын
“Some boxes are made for numbers, and some boxes are made for strings, some boxes can hold anything.” If this teaching thing doesn’t work out, I think you have a career as a Dr. Seuss writer 😀
@robj74815 жыл бұрын
Do you still need the Apple developer account even when you’re just learning Swift, and not yet ready to release programs?
@moocowawesome5 жыл бұрын
Does anyone else wish programming wasn't so obtuse? what happened to electrical engineering jobs?
@guykp57785 жыл бұрын
Thanks for sharing the knowleadge
@lumenous65405 жыл бұрын
I’m only in 4 minutes of the video and I can already tell your doing a good job at the explaining this process step-by-step :D so I subbed
@akpokemon5 жыл бұрын
What the hell why in the f*** would you hide the human part. Find a different example that you can demonstrate without having to write hidden code.
@oceanwave85705 жыл бұрын
Y do you use a function when you can just println? Pls answer by replying
@oceanwave85705 жыл бұрын
swift is so much like python
@oceanwave85705 жыл бұрын
Thx a lot for the video. im an 11 year old kid who wants to learn everything but your video made the basics easy even though i got help from my Python knowledge
Пікірлер
I hope nobody considers "true + 1 = 2" to be a "feature". That language broken, yo.
Lol the lodash description for curry is absolutely horrendous
Hey I have a consulting project regarding marrying a local langchain env with purescript's compiler to generate the most robust code. Wanna talk $ and your avail but don't have twitter
I haven't written JavaScript in a while but I would do tco like this: Function.prototype.call_with_tco = function () { var c = [this, arguments]; var escape = arguments[arguments.length - 1]; while (c[0] !== escape) c = c[0].apply (this, c[1]); return escape.apply (this, c[1]); }; The problem with js is it doesn't have macros. then it can finally become totally umanageable
can you explain the a -> a -> a I still don't understand
related to partial application (a 2 param fun is in fact a 1 param fun returning a function)
The Haskell: a -> a -> a add x y = x + y In plain JS terms that would be like: function add(x) { return (y) => x + y; } And calling it would be like: const x = add(1)(2) In this case 'a' refers to the type for the values, so x, y, z should all be the same type for it to be equivalent to "a -> a -> a" meaning const x = add("Hello ")("Currying") Would also fit that function type
Great intro to Haskell for Javascript devs
I'm not fluent in English, so I use Google Translate. Thanks for the interesting video. I'm just starting to re-learn category theory using Haskell and Javascript. I wrote a simple program about function composition, associativity, identity morphism, and unit rate. Javascript f = x => { return (x + 2) } g = x => { return (x * 2) } h = x => { return (x ** 2) } i = x => { return h( g(x)) } j = x => { return g( f(x)) } id = x => { return x } c1 = x => { return h(g(f(x))) } c4 = x => { return i ( f(x) ) } c5 = x => { return h(j (x) ) } c1 (3) => c4 (3) => c5 (3) => 100 c1(id(3)) => c4(id(3)) => c5(id(3)) => 100 id(c1(3)) => id(c4(3)) => id(c6(3)) => 100 Haskell f = \x -> x + 2 g = \x -> x * 2 h = \x -> x ^ 2 i = h . g j = g . f c1 = h . g . f c2 = (h . g) . f c3 = h . (g . f) c4 = i . f c5 = h . j c1 3 => c2 3 => c3 3 => c4 3 => c5 3 => 100 Since Haskell provides id (identity function) as standard, we omit the explanation. The result is similar to Javascript. It was so timely and I was so happy that I commented.
So many languages, so little time to learn. Right now my learning queue goes like Rust -> Clojure -> Haskell -> programming endgame?. Would've probably started Haskell by now if it were more popular and man do I wish Haskell were more popular.
How is it going?
Clojure is great. I'm a year into it and I love its simplicity. it takes a bit more thought to create an "elegant" solution to problems if you're from an imperative/OOP background, but once that kind of thinking becomes second-nature, the code really does read very well
It's pretty popular, but go learn PureScript instead which works on node and the browser
i watched the first 2 minutes of this and i don't really understand it at all. maybe it's because i only know python and scratch.
come back to this video next year, im sure it'll make a whole lot more sense then. i have a whole playlist of videos that i return to every single year and it's testament to my learning that i always find something new in them.
javascript will never be fixed, that's the beauty of it.
sounds like ur in a toxic relationship my dude
@@raianmr2843 if javascipt was to be fixed, it would've been ages ago, and we don't have to rely on transpilers, 100s of frameworks
@@hashtag9990its impossible to change js cuz you cant make any breaking changes
This is really cool! Please continue doing videos like this!
Got a notification from this channel and I was like "who is this girl?, Why I'm subscribe to her?, Why does she have a better voice than I?" Until I realized the channel theme 😛...
I get a better understanding of closure. Thanks!
thank uuuuuu!
"To Develop IOS apps, you need a Mac" *Slams desk* I have a Windows PC because I cannot afford a mac, because Apple the capitalist company overprices computers that are limited in their uses, welp, I'll have to wait until never to make iOS apps and games then.
Create a generic protocol named StackProtocol which consists of following methods which can perform operations on a stack of any data-type (e.g. String, Int, etc.): push(item) which will add an item in stack pop() which will return an item from stack count() which will count and return number of items in stack Create a generic class named CustomStack which can be used to represent a stack of any data-type. It will conform to StackProtocol and has a private stored property in form of array to store the items of a stack. Use proper error handling such that an error is thrown if we try to access an element from empty stack or add an element when stack is full. (Note: assume that maximum size of stack is: 5). Also create an extension of CustomStack which contains a method to calculate and return the average of all elements of stack if elements are numeric. Can u provide the code for this in Swift language
I LOVE YOUR CHANNEL THX SO MUCH ..I LOVE YOUR HUMOR ..VERY FUN
Well, I learn a lot.
Not sure if anyone's watching in 2020, I watched it, and figured in Swift 5.0 (Xcode 12 beta) the find (in array, something) is no more supported, and I changed it into let gotAFind = acceptableFinds.firstIndex(of: algorithmResults.pattern) and it worked.
DOOD!
I hope they move away from this shitty xml file, which they branded a plist file. Maybe a JSON file? Then they can do away with the Xcode plist editor.
You should upload more videos for the newer ios version!
Best tutorials
How do we get autocomplete for code in Xcode 11.3?
Planet.Pluto.toRaw() => 9 Never forget
should be more detail for explaining the class Human
Excellent tutorial - I actually understood it.
Helpful hints: Must use IOS playground to import UIKit "println" is now "print"
It is greeting.count now rather than countElements(greeting)
See how to protect and license Swift apps at www.excelsoftware.com/qlrtxcode
A little zoom would help. Think phone screen
Live views may have been lacking, but I used to really enjoy your Swift videos.
you could make the row check a bit more concise by just returning the playable target: var plays = [Int:Int]() plays[1] = 1 plays[3] = 1 plays[4] = 1 plays[7] = 0 plays[8] = 0 func rowcheck(player:Int, row:[Int]) -> Int { var playable = false var found = 0 var play = -1 for spot in row { if plays[spot] == player { found += 1 }else if plays[spot] == nil { playable = true play = spot } } if found < 2 || !playable { play = -1 } return play } rowcheck(player: 1, row: [1,2,3]) rowcheck(player: 0, row: [1,2,3]) rowcheck(player: 1, row: [1,4,7]) rowcheck(player: 0, row: [7,8,9])
ive coded mostly in c# very little c++ and some shell
It is a good video.
Shouldn't you be using a static IP?
good work man!
Did this video work for you? Thanks for your input😊
Agijillion is not a number actually aflipingbignumberthatsoundsweirdenoughtobebigbutnottoweirdtosoundfakeormadeupillion Is the correct number
How would you do this on iPad. I have the playgrounds app, but how would I get lines and import them?
Great video, clear explanation. But this is outdated. Where can I get a newer version?
Even though this vid is so old this is just so helpful. Thanks
For people who are looking to parse JSON with swift: this tutorial is kind of outdated, search for newer ones, they are much more straight forward.
“Some boxes are made for numbers, and some boxes are made for strings, some boxes can hold anything.” If this teaching thing doesn’t work out, I think you have a career as a Dr. Seuss writer 😀
Do you still need the Apple developer account even when you’re just learning Swift, and not yet ready to release programs?
Does anyone else wish programming wasn't so obtuse? what happened to electrical engineering jobs?
Thanks for sharing the knowleadge
I’m only in 4 minutes of the video and I can already tell your doing a good job at the explaining this process step-by-step :D so I subbed
What the hell why in the f*** would you hide the human part. Find a different example that you can demonstrate without having to write hidden code.
Y do you use a function when you can just println? Pls answer by replying
swift is so much like python
Thx a lot for the video. im an 11 year old kid who wants to learn everything but your video made the basics easy even though i got help from my Python knowledge