Тёмный

Jafar Husain: Async Programming in ES7 | JSConf US 2015 

JSConf
Подписаться 284 тыс.
Просмотров 63 тыс.
50% 1

Currently there are ES7 features proposed for async programming that have never been seen in a programming language before. If accepted, these proposals could allow entire JS applications to be written without a single callback! By providing the same level of support for async functions as regular functions, ES7 could dramatically alter the way everyday developers write code. Imagine reading data from a stream or a web socket with a simple loop. Imagine catching async errors using try/catch, and never again finding yourself in the callback pyramid of doom.
Transcript: gist.github.co...

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@mallesbixie
@mallesbixie 9 лет назад
This guy fits a two hour talk in half an hour! Great! Watch it four times to get it all!
@RafiDude
@RafiDude 9 лет назад
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.
@powerlogic1992
@powerlogic1992 8 лет назад
His enthusiasm makes me feel enthusiastic.
@McG00f
@McG00f 7 лет назад
This person talks very well, he got me interested in the first 2 minutes, I wish I had more profesors like him at uni.
@nathanbrady9362
@nathanbrady9362 8 лет назад
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!
@JogoShugh
@JogoShugh 9 лет назад
Very good talk, and his enthusiasm makes it even better.
@Chorizzosoup
@Chorizzosoup 9 лет назад
Awesome to see c# influence to some of the features :)
@JSBroadcast
@JSBroadcast 8 лет назад
This guy is absolutely amazing..
@TheRealBobLazar
@TheRealBobLazar 6 лет назад
Blowing my mind with things I thought I already understood.
@atmark666
@atmark666 8 лет назад
this guy is amazing.
@Chorizzosoup
@Chorizzosoup 9 лет назад
Can you please make the code slides available as well? It's hard to see the code in the video.
@cmntkxp
@cmntkxp 5 лет назад
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
@stefanms8803
@stefanms8803 8 лет назад
that's good coffee right there
@kps2642
@kps2642 6 лет назад
async functions are awesome, thanks to c# we got this in javasctipt
@DaveJacoby
@DaveJacoby 9 лет назад
Man, JavaScript is gonna get mad over the next few years. That's a good thing.
@saisagarsharma
@saisagarsharma 5 лет назад
Yes, it is.
@Wentris71
@Wentris71 27 дней назад
Watching this vid 9years after. Still did not go mad 😀😮‍💨
@johnyepthomi892
@johnyepthomi892 2 года назад
What a great educator.
@Srikanthking1
@Srikanthking1 7 лет назад
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.
@konorokingdom
@konorokingdom 9 лет назад
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.
@mandulov
@mandulov 9 лет назад
+Dominic Watson The codes work, but he accidentally swapped "val1 = val2;" with "val2 = swap;".
@oiltycoonifUwill
@oiltycoonifUwill 8 лет назад
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);
@EuThiagoVideos
@EuThiagoVideos 7 лет назад
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) )
@yuchinglee5555
@yuchinglee5555 7 лет назад
Does anyone has this ppt ? can't find it by googling...
@Silentslink
@Silentslink 7 лет назад
Amazing!!!
@senecathestoic
@senecathestoic 7 лет назад
Even though code inside while loops in fibonacci example is incorrect the talk is great.
@aaravmehra8036
@aaravmehra8036 5 лет назад
this was intense..very nice.
@ajgubi19
@ajgubi19 9 лет назад
This is why youtube player offers SLOWING THE FUCK DOWN feature.
@mk677hd
@mk677hd 4 года назад
JS is freaking awesome.
@vishal_sharma_rha
@vishal_sharma_rha 5 лет назад
Great vedio
@jafargadvi9561
@jafargadvi9561 4 месяца назад
@true_podejrzany
@true_podejrzany 7 лет назад
I wish I could understand just half of it.
@devanggaur2511
@devanggaur2511 7 лет назад
@11:50 , shouldn't it be while( true ) { swap = val1 + val2 ; val1 = val2; val2 = swap; return swap ..... } ?
@ikumargaurav
@ikumargaurav 4 года назад
yes.
@NicolasSauveur
@NicolasSauveur 9 лет назад
for ... from instead of for ... on ?
@lorenzodigaetano3591
@lorenzodigaetano3591 5 лет назад
He speaks faster than my girlfriend, and it's a huge achievement! :-D
@smatsri
@smatsri 9 лет назад
#Rxjs #ErikMeijer
@chrispie
@chrispie 7 лет назад
observable is dead. long live the observable!
@crimsonalucard
@crimsonalucard 6 лет назад
Yearly release cycles for a language? Are you kidding?
@antonios.k
@antonios.k 9 лет назад
Will you just drink the damn coffee
@adinivermekistemeyengizley6396
how about es8 becomes phyton3.jssss?
@thedripfinallystops
@thedripfinallystops 9 лет назад
Someone needs too normalization the audio on these videos.
@lalitchaturvedi6626
@lalitchaturvedi6626 8 лет назад
hey you said blocking is easy. can u share the example how u implemented the blocking?
@danielbubenheim5951
@danielbubenheim5951 4 года назад
0.75 playback speed ftw ;-)
@paololucchesi2827
@paololucchesi2827 5 лет назад
This guy should do some Hip Hop, he would have a stunning flow for sure
@davidmaxwaterman
@davidmaxwaterman 8 лет назад
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.
@moveaxebx
@moveaxebx 7 лет назад
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.
@darrenking8941
@darrenking8941 7 лет назад
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.
@ChadZeluff
@ChadZeluff 6 лет назад
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.
@thirstypooch
@thirstypooch 6 лет назад
swap ´em
@hoegge
@hoegge 6 лет назад
Might be a good talk if you could see the slides
Далее
Asynchrony: Under the Hood - Shelley Vohr - JSConf EU
25:24
Вопрос Ребром - Серго
43:16
Просмотров 1,8 млн
Main Hall 06: Why is Functional Programming so hard?
37:44
i fell for mocks again...
9:08
Просмотров 19 тыс.
Netflix JavaScript Talks - Falcor
1:02:54
Просмотров 29 тыс.
Advanced Async and Concurrency Patterns in JavaScript
39:43
Вопрос Ребром - Серго
43:16
Просмотров 1,8 млн