Hello some one at jsconf, please switch the slides into the larger video window and vice versa. For most people the content in slides may be more important than seeing the speaker.
Jafar, you are such a great natural teacher. After a few different videos, you made the light bulb turn on for me with generator functions. Thanks for all your work in the JS community!
You have an mistake in your fibonacci example at 12.5. should have assigned val1 with val2 and then assigned val2 with swap. Just changing the lines for assignment for val1 and val2 fixed the issue.
Few months later and we already can get the same result like this: async function getStockPrice(name){ return await getSymbolPrice(await getStockSymbol(name)) } getStockPrice().then( res => console.log(res) )
Neither of Jafar's fibonacci codes work :D Great talk. It's amazing how much simpler it becomes with a generator. Have to agree with Rafi "please switch the slides into the larger video window and vice versa. For most people the content in slides may be more important than seeing the speaker.". This is a common theme amongst most tech videos where the code is either secondary or not visible at all.
I disagree and think this is maybe the most confusing explanation I've seen so far...his statement that they're trying to make asynchronous code look synchronous makes me doubt their sanity. Surely code should look like what it actually does, not pretend to be something it isn't...this is too clever by half. Maybe I simply need to watch it four times, like someone suggests...though I kind of feel like that really shouldn't be necessary.
Well it does look synchronous. Key is that the consumer is doing heavy lifting and waiting/resolving promises..what is inside the generator is only sync like code. The async/await is nothing more than "in language consumer". Yes, it's a confusing pattern and it's not shame to watch it more than once.
Our brains work in a synchronous manner. And code, ultimately, unless it's the final machine code, is for humans. So, that being said, it makes sense for code to look as common-sensical as possible for our brains to consume and reason about.
Late reply to this, but wanted to comment that C# has had the async/await keywords for years and it's a fantastic way to write code. I wouldn't worry about code looking like/unlike what it actually does, given that our languages hide many of the details of what they actually do underneath, with regards to memory management, etc.
This guy fits a two hour talk in half an hour! Great!
Watch it four times to get it all!
Hello some one at jsconf, please switch the slides into the larger video window and vice versa. For most people the content in slides may be more important than seeing the speaker.
His enthusiasm makes me feel enthusiastic.
This person talks very well, he got me interested in the first 2 minutes, I wish I had more profesors like him at uni.
Jafar, you are such a great natural teacher. After a few different videos, you made the light bulb turn on for me with generator functions. Thanks for all your work in the JS community!
Very good talk, and his enthusiasm makes it even better.
Can you please make the code slides available as well? It's hard to see the code in the video.
Awesome to see c# influence to some of the features :)
This guy is absolutely amazing..
Blowing my mind with things I thought I already understood.
this guy is amazing.
async functions are awesome, thanks to c# we got this in javasctipt
Does anyone has this ppt ? can't find it by googling...
Talk was nice but the code shown inset if video spoiled the corner quality ...Why on earth someone would upload like this . It's good for a podcast
Man, JavaScript is gonna get mad over the next few years. That's a good thing.
Yes, it is.
Watching this vid 9years after. Still did not go mad 😀😮💨
You have an mistake in your fibonacci example at 12.5. should have assigned val1 with val2 and then assigned val2 with swap. Just changing the lines for assignment for val1 and val2 fixed the issue.
that's good coffee right there
In case anyone except me needs this.
function* getStockPrice(name) {
var symbol = yield getStockSymbol(name);
var price = yield getSymbolPrice(symbol);
return price
}
function spawn(generator) {
return new Promise((accept, reject) => {
var onResult = (lastPromiseResult) => {
var {value, done} = generator.next(lastPromiseResult);
if (!done) {
value.then(onResult, reject);
} else {
accept(value)
}
};
onResult();
})
}
spawn(getStockPrice("some")).then(console.log);
Few months later and we already can get the same result like this:
async function getStockPrice(name){
return await getSymbolPrice(await getStockSymbol(name))
}
getStockPrice().then( res => console.log(res) )
What a great educator.
Neither of Jafar's fibonacci codes work :D Great talk. It's amazing how much simpler it becomes with a generator. Have to agree with Rafi "please switch the slides into the larger video window and vice versa. For most people the content in slides may be more important than seeing the speaker.". This is a common theme amongst most tech videos where the code is either secondary or not visible at all.
+Dominic Watson The codes work, but he accidentally swapped "val1 = val2;" with "val2 = swap;".
@11:50 , shouldn't it be while( true ) { swap = val1 + val2 ; val1 = val2; val2 = swap; return swap ..... } ?
yes.
Even though code inside while loops in fibonacci example is incorrect the talk is great.
this was intense..very nice.
Amazing!!!
JS is freaking awesome.
how about es8 becomes phyton3.jssss?
for ... from instead of for ... on ?
This is why youtube player offers SLOWING THE FUCK DOWN feature.
❤
Great vedio
hey you said blocking is easy. can u share the example how u implemented the blocking?
I wish I could understand just half of it.
Yearly release cycles for a language? Are you kidding?
observable is dead. long live the observable!
He speaks faster than my girlfriend, and it's a huge achievement! :-D
#Rxjs #ErikMeijer
Will you just drink the damn coffee
Someone needs too normalization the audio on these videos.
0.75 playback speed ftw ;-)
This guy should do some Hip Hop, he would have a stunning flow for sure
swap ´em
I disagree and think this is maybe the most confusing explanation I've seen so far...his statement that they're trying to make asynchronous code look synchronous makes me doubt their sanity. Surely code should look like what it actually does, not pretend to be something it isn't...this is too clever by half.
Maybe I simply need to watch it four times, like someone suggests...though I kind of feel like that really shouldn't be necessary.
Well it does look synchronous. Key is that the consumer is doing heavy lifting and waiting/resolving promises..what is inside the generator is only sync like code. The async/await is nothing more than "in language consumer". Yes, it's a confusing pattern and it's not shame to watch it more than once.
Our brains work in a synchronous manner. And code, ultimately, unless it's the final machine code, is for humans. So, that being said, it makes sense for code to look as common-sensical as possible for our brains to consume and reason about.
Late reply to this, but wanted to comment that C# has had the async/await keywords for years and it's a fantastic way to write code. I wouldn't worry about code looking like/unlike what it actually does, given that our languages hide many of the details of what they actually do underneath, with regards to memory management, etc.