Talks to Watch

Jake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...

808K views · Feb 9, 2018 · 35:12 · 7 HN recommenders · 9 mentions · discussed 2018–2023

Jake Archibald's JSConf.Asia 2018 talk "In the Loop" explains the browser event loop, covering tasks, microtasks, requestAnimationFrame, and how rendering interleaves with JavaScript. It uses visual walkthroughs to show why code runs in surprising orders and why setTimeout fixes are unreliable.

Why Hacker News points people here: HN treats it as the best primer on the event loop, praising its entertaining, easy-to-grasp visual explanations.

“actually making it both entertaining and easily grokable!”HN comment, 2018

What Hacker News said 9

Strongly recommendswattengardOct 2018

“actually making it both entertaining and easily grokable!”

Entertaining and easy-to-grasp explanation of the JavaScript event loop.

Full comment

Jake Archibald talking about the javascript event loop and actually making it both entertaining and easily grokable! this video

in “Ask HN: What are some of the best technical talks you've heard?” · view on HN
Strongly recommendsolavggOct 2018

“Awesome video for every javascript developer.”

Visual explanation of how the event loop works.

Full comment

Jake Archibald's "In the Loop", Visual explanation of how the javascript event loop works! Awesome video for every javascript developer. this video

in “Ask HN: What are some of the best technical talks you've heard?” · view on HN
Strongly recommendsphist_mcgeeNov 2020

“The best primer for the event loop I have found is here”

Best event loop primer with a likeable, knowledgeable speaker.

Full comment

The best primer for the event loop I have found is here: this video The speaker (Jake Archibald) has that rare ability to be both likeable and relatable, while also being incredibly knowledgeable and enthusiastic. I wish a lot more talks were like this!

in “How does the event loop work in JavaScript? [video]” · view on HN
RecommendsmxschumacherJul 2018

“Here are two great talks to help you”

One of two great talks for understanding the event loop.

Full comment

Be sure to understand the event loop. Javascript as an asynchronous language often comes back to bite beginners. Here are two great talks to help you: this video link Your life will be easier if you learn to use Chrome Dev tools (or the Firefox equivalent) early. In the beginning, you don't have to worry about browser compatibility - embrace modern JS (ES6+)!

in “Ask HN: What you wish you'd known before getting into JavaScript?” · view on HN
RecommendsluuuzetaNov 2022

“I think it's finally clicking after watching these YouTube videos”

One of several videos that helped async JS finally click.

Full comment

I've been struggling with wrapping my head around asynchronous programming with callbacks, promises and async/await in JS, however I think it's finally clicking after watching these YouTube videos and creating a document where I explain these concepts as if I'm teaching them to someone else: * Philip Roberts's What the heck is the event loop anyway? - link * The Story of Asynchronous JavaScript - link * JavaScript Callbacks, Promises, and Async / Await Explained - link * Async Javascript Tutorial For Beginners (Callbacks, Promises, Async Await). - link * Jake Archibald: In The Loop - setTimeout, micro tasks, requestAnimationFrame, requestIdleCallback, - this video Edit... I've been rewatching these videos, reading the MDN docs, the Eloquent JavaScript book, javascript.info, blogs about the subject, etc. This further proves you shouldn't limit yourself to a single resource, and instead fill up the laguna with water from different sources if you will.

in “Ask HN: Do you recall any book or course that made a topic finally click?” · view on HN
RecommendscassepipeJul 2023

“And also that talk on the event loop”

Helped a C developer grasp async in JS.

Full comment

Coming from C and having used thread and being totally ignorant to javascript, this article really helped me grasp async in js by clearing away implicit misconceptions I held : link And also that talk on the event loop : this video

in “How to think about `async`/`await` in Rust” · view on HN
RecommendsmananaysiempreOct 2023

“see Jake Archbald’s superb talk[1]”

Superb talk on how the browser schedules tasks.

Full comment

> It basically flickers between tasks very rapidly to simulate concurrency. That’s usually used a description of preemptive multitasking, like what you get running a modern OS on a single core (on multiple cores it’s also this but on each core). Every once in a small while, the current task is made to inhale chloroform, another task is chosen to wake and takes its place. Pro: you can’t hang any given task from a single thread; con: shared memory is very difficult to impossible, as you never know when you’ll be interrupted. Browser JavaScript and UI interactions instead use cooperative multitasking, which you’ll also find in classic Mac OS, 16-bit Windows, basically every embedded system ever, and languages like Python and Lua. A task has to explicitly call out to the scheduler to hand off execution resources to the next one. Pro: as task switching only happens at clearly visible points, many of the horrors of shared memory are diminished; con: you can and will hang the UI (or other outside-world interactions) if you accidentally write an infinite loop or just do too much CPU-bound work without yielding (as any developer using one of the aforementioned systems knows). For how this works in the browser environment specifically, see Jake Archbald’s superb talk[1]. [1] this video

in “Populating the page: how browsers work” · view on HN
Cites itmemcoMay 2019

“Just rewatched this talk on Monday”

Talk called out Safari's rAF behavior later fixed.

Full comment

Just rewatched this talk on Monday from last year where Safari was called out for the rAF behavior that was fixed here. Cool to see this change. this video

in “Release Notes for Safari Technology Preview 81” · view on HN
Cites itativzzzAug 2023

“the browser event loop”

Example of deep JS knowledge worth having.

Full comment

I think there's never been a better time to be a JS developer. JS is now everywhere. It runs on browsers, it runs on servers, it runs on mobile devices. You can use it as a scripting language if you really hate python and ruby. You can compile it to webassembly. There's game engines that use JS. Typescript is great as JS projects grow larger and more complex (if you can get over the fact that reading complex types is stupid) So the more and more JS devs are coming in, the more we need JS experts who really understand how stuff works at lower levels. Like for example the browser event loop - this video Being an expert that deeply understands a tech stack will never go out of style

in “Ask HN: Should I move away from JavaScript based skillset because of saturation?” · view on HN