Skip to content

Instantly share code, notes, and snippets.

View joeltok's full-sized avatar

joeltok joeltok

  • Singapore
View GitHub Profile
@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active October 9, 2025 04:55
ES Modules are terrible, actually

ES Modules are terrible, actually

This post was adapted from an earlier Twitter thread.

It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.

It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)

And then there's Rollup, which apparently requires ESM to be u

@yang-zhang
yang-zhang / cross-entropy.ipynb
Last active December 21, 2024 11:51
Cross entropy implementation in pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.