Xah Talk Show 2025-11-17 Ep714 JavaScript Module System, Tutorial Plus Rant
Video Summary (Generated by AI, Edited by Human.)
This video, "Xah Talk Show Ep714 JavaScript Module System, tutorial plus rant," covers the JavaScript module system, its complexities, and the speaker's frustrations with it.
Here's a summary of the key topics:
Introduction to JavaScript Modules (0:29-1:00): The speaker introduces the JavaScript module system, which was introduced in 2015. He describes it as complex and notes the complications, such as the requirement for HTTP server to run local modules.
Initial Rant and YouTube Popularity (2:44-6:01): The speaker expresses his frustration with the low view count of his YouTube videos (around 300 views) despite the effort he puts into them. He then delves into a discussion about how to make YouTube videos popular, touching on topics like marketing, brainwashing, persuasion, and social trends. He criticizes the focus on popularity and money in the YouTube ecosystem.
YouTube Video Strategy (6:01-10:00): He outlines strategies for creating popular YouTube videos, including:
- Avoiding live streams: YouTube doesn't promote them.
- Making short, focused, recorded videos: Ideally 10-15 minutes long.
- Targeting beginners: As they form the largest audience.
- Using good packaging and thumbnails: With catchy titles and expressive faces.
- Avoiding random babbling or swearing.
- Critique of YouTube Content (9:27-10:48): He laments that following these strategies leads to "empty of humanity" content, devoid of substance and focused solely on profit, citing Mr. Beast as an example.
Emacs Demonstration and Promotion (11:34-15:00): The speaker shifts to demonstrating Emacs, a powerful editor he uses, and promotes his "Kasafly keys" package for Emacs users, claiming it makes them more efficient than Vim or NeoVim users.
JavaScript Module History and Definition (15:47-18:00): He explains that JavaScript lacked a module system for its first 20 years. In 2015, the ECMAScript standard introduced the module system, which allows JavaScript files to be used as libraries. A file is considered a module if it contains import or export statements.
- Loading JavaScript Modules in HTML (22:14-25:32):
- To load a JavaScript module in HTML, you need to use the
(ai stopped here)
From 25:00, the speaker delves into the complications of loading JavaScript modules. He explains that while you can load a main module, that module can then import other modules (25:00-25:32).
His main point of contention, starting around 25:36, is that JavaScript modules do not work over local files (e.g., accessed via file:///). They require an HTTP server to run. He demonstrates this problem (26:00-39:00), encountering debugging issues which are later resolved by disabling his ad blocker (47:26-48:10).
The speaker expresses strong criticism of this requirement, arguing it's an "idiotic" and "very bad" flaw (26:19-26:50). He elaborates that this "fs up" the concept of HTML, CSS, and JavaScript as a local documentation system or ebook format* (44:03-45:45). He emphasizes that for non-coders, needing to start an HTTP server just to view these files is a significant barrier.
He further rants about the "cross-origin" security mechanism (51:19-54:24), calling it "man-made complexity" driven by corporate interests rather than genuine necessity. He uses his own JavaScript applications (like a Unicode character search tool) as examples of how this module system forces him to either use outdated methods or require users to set up a server, making his content less accessible (54:40-57:40).
- JS: Module
- JS: Module. Import Export Example.
- JS: Module. Export
- JS: Module. Static Import
- JS: Module. Dynamic Import
- JS: Module Specifer
- JS: Module. importmap
- JS: CommonJS Module System (history)
- JS: AMD Module System (history)
JavaScript import export from 2015 (aka ECMAScript), is the worst shit possible.
- Idiotic default vs named to appease the status quo.
- One Complicated Mini language.
- One thousand different syntax to do the same thing to appease the industrial coders. (the way of the committee design.)
JavaScript coders, are the late milen gen and zoomer, aka the brogramers, is the beginning brainlessness. The npm and stackoverlow, are the virus that eats their brain. (and with ruby coders, and later python coders too.)