
What the heck is the event loop anyway? | Philip Roberts | JSConf EU
About this video
Philip Roberts explains the JavaScript event loop, call stack, callbacks and asynchronous behavior with live visualizations using a tool he built. It demystifies terms like non-blocking and single-threaded.
Why it appears in the archive
HN commenters repeatedly name it as the best explanation of the JS event loop and the first thing to watch before tackling async code.
AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.
From the Hacker News discussion
> How do I take, say JS, and learn it to the point where it really clicks to the point where I can visualize what's going on under the hood when I write programs? Learn how a JS engine works. Any engine will do, although V8 is very discussed on the internet. Here's a few things to get started with: - How the event loop works ( [VIDEO] ). This show how JS works under the hood, what's part of "JS" and what's extended, how async operations are scheduled on a single thread. After watching this, everything will just "click". - How objects are represented in V8 ( [LINK] ). It's v8-specific but nevertheless tells you how objects are represented in memory. Keeping these concepts in mind, you will be able to write efficient code on the get-go. - ES6 spec ( [LINK] ). Optional reading (if you want to read 500+ pages), but it's a handy reference when in doubt. You can literally slap this thing to a person who doesn't know what they're talking about. Not that you should, but backing evidence is always great.
Read original comment ↗The corner stone of understand async JavaScript code is a deep understanding what happens under the hood with the Event loop. Philip Roberts has a great lecture called what the heck is the event loop anyway? [1] Once that video is watched once, everything else just makes sense. [1] [VIDEO]
Read original comment ↗Another event loop talk from Philip Roberts. The tool he created to display the event loop in real time is fantastic. [VIDEO]
Read original comment ↗I got to know the nuances of the language by working with it for years and having to figure out why various things didn't work at different points, but it doesn't sound like that's your style. This isn't comprehensive, but it's probably the most helpful deep-dive I've ever seen about some aspect of JavaScript. It's about the Event Loop, which is one of the biggest differences between JS and comparable languages like Python: [VIDEO] Contrary to what you might think, even though the event loop is in some sense "distinct from the language", it isn't simply an API. You can't really have JavaScript without the event loop; it exists in both the browser and in Node, and is the basis for most of the language's advantages.
Read original comment ↗This one is my all time favorite - What the heck is the event loop anyway? | Philip Roberts | JSConf EU [VIDEO]
Read original comment ↗i cannot believe i didn't have the mental model outlined in this video (the intro video to the site) after developing for the web for so long. [VIDEO] ...a great, very simple explanation.
Read original comment ↗Paul Buchheit - Startup School Europe 2014 [LINK] Anjana Vakil: Learning Functional Programming with JavaScript - JSUnconf 2016 [LINK] Bret Victor - Inventing on Principle [LINK] Philip Roberts: What the heck is the event loop anyway? | JSConf EU 2014 [VIDEO]
Read original 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: [LINK] [VIDEO] 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+)!
Read original comment ↗