HackerTube

What the heck is the event loop anyway? | Philip Roberts | JSConf EU

JSConf16 HN recommenders · recommended in 14 months, 2015–2025
YouTube
talk · intermediate · evergreen · 2015–2025 on HN

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.

HN commenters repeatedly name it as the best explanation of the JS event loop and the first thing to watch before tackling async code.

12 comments from Hacker News

@krisgenre2020-11 · in “How does the event loop work in JavaScript? [video]”

This one is my all time favorite - What the heck is the event loop anyway? | Philip Roberts | JSConf EU ▶ this video

Strongly recommends View on HN
@_bxg12020-02 · in “Ask HN: How do I learn JavaScript?”

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: ▶ this 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.

Strongly recommends View on HN
@keyvin2018-10 · in “Ask HN: What are some of the best technical talks you've heard?”

Another event loop talk from Philip Roberts. The tool he created to display the event loop in real time is fantastic. ▶ this video

Strongly recommends View on HN
@zappo29382016-10 · in “Understanding Async JavaScript”

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] ▶ this video

Strongly recommends View on HN
@lollipop252016-03 · in “Ask HN: How do I go about truly “understanding” JavaScript, or any language?”

> 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 ( ▶ this 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.

Strongly recommends View on HN