Top all-time · #462
Mathias Bynens
Personal blog · mathiasbynens.be · on HN as mathiaswebprogramming
Mathias Bynens's personal blog at mathiasbynens.be covers web and programming. Since 2010, 124 different Hacker News readers have linked it 195 times, most often “How to support full Unicode in MySQL databases”. The last post was in 2019, but the archive is still widely read.
Rarely recommended · 2 of 40 sampled comments recommend it?
Why HN links it
Linked as the go-to reference for JavaScript Unicode and encoding quirks, MySQL utf8mb4 and the jQuery size demo. One commenter calls a Unicode article good and another calls a globalThis note a little pearl.
- Recommended for · 2 comments
- one commenter calls a Unicode article a good article; another calls a globalThis note a little pearl
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Mathias Bynens is a web standards enthusiast currently working on Chrome at Google.
Most-linked posts?
- /demo/jquery-size11 people · 11 mentions · first linked 2015-06-25
- How to support full Unicode in MySQL databases9 people · 10 mentions · first linked 2014-11-19
- JavaScript Engine Fundamentals: Shapes and Inline Caches9 people · 9 mentions · first linked 2018-06-14
- JavaScript and Unicode8 people · 9 mentions · first linked 2015-03-29
- JavaScript’s internal character encoding: UCS-2 or UTF-16?6 people · 9 mentions · first linked 2012-01-20
- In search of the perfect URL validation regex (2010)6 people · 7 mentions · first linked 2015-02-02
- A horrifying globalThis polyfill in JavaScript6 people · 6 mentions · first linked 2019-04-23
- Asynchronous stack traces: why await beats .then() – Mathias Bynens6 people · 6 mentions · first linked 2017-10-02
- ECMAScript regular expressions are getting better (2017)5 people · 5 mentions · first linked 2017-01-25
- /notes/javascript-encoding5 people · 5 mentions · first linked 2017-12-26
What Hacker News says?
I disagree with your characterization. Take jQuery for example. 1. Small, fast and minimal. 2. Easy to create plugins. 3. Budding ecosystem and explosion of plugins. 4. Conflicts ensued and some plugins got pulled into the core project. Eventually, the growth of jQuery tapered off as the project stabilized. Not only did the size taper off, it got smaller as well. After nearly 10 years, we're talking about a payload…
Comment linking /demo/jquery-size
on “Atom 1.0”Submitted Plain text wrapping in Gmail as a story · 171 points
HN discussionHeh. https://mathiasbynens.be/demo/url-regex https://lostechies.com/chadmyers/2010/11/20/parsing-a-url-wi... https://stackoverflow.com/questions/27745/getting-parts-of-a... What do all these have in common? They all demonstrate that it is hard to write a regex that parses URLs. Regex's hide programming mistakes because they not only become harder for humans to parse as they get more complicated, but also there isn't…
Comment linking /demo/url-regex
on “LastPass autofill exploit”Submitted A horrifying globalThis polyfill in JavaScript as a story · 154 points
HN discussionExcept when the site in question is completely broken wrt astral codepoints. Which is unexpectedly common as MySQL's "utf8" can't handle codepoints outside the BMP and will just truncate text at the first astral codepoint[0]. You need MySQL 5.5 .3 (because adding a whole new encoding in a minor version makes perfect sense) and "utf8mb4" (because why would a codec called "utf8" actually do UTF8?). And then the regex…
Comment linking /notes/mysql-utf8mb4
on “Unicode Text Converter”Submitted In search of the perfect URL validation regex (2010) as a story · 152 points
HN discussionIn Javascript, many unicode characters are allowed [0], so háćḱéŕŃéẃś is a valid variable name [1]. Note: The number of іllэБіъlэVаѓіаъlэИамэѕ [2] used in your production code is inversely proportional to the number of friends you'll make in the maintenance team. [0] https://mathiasbynens.be/notes/javascript-identifiers [1] https://mothereff.in/js-variables#h%C3%A1%C4%87%E1%B8%B1%C3%... [2] http://www.panix.com/~eli…
Comment linking /notes/javascript-identifiers
on “Unicode Text Converter”Submitted ECMAScript regular expressions are getting better (2017) as a story · 146 points
HN discussionThe author of original article links to this one in their post: https://mathiasbynens.be/notes/mysql-utf8mb4#utf8-to-utf8mb4 And yeah, there's gotchas in there, the main one being that strings that barely fit now won't fit, and also maximum lengths on indexable strings.
Comment linking /notes/mysql-utf8mb4
on “In MySQL, use “utf8mb4” instead of “utf8” (2016)”Submitted Using CSS without HTML as a story · 125 points
HN discussionIt is beyond correct. Mysql's "utf8" only stores stuff from 1-3 bytes. https://mathiasbynens.be/notes/mysql-utf8mb4 You have to use utf8mb4 to have proper utf8 support. Yes its stupid, this is the main reason I prefer not using mysql for anything. Too many gotchas lurking about.
Comment linking /notes/mysql-utf8mb4
on “Be Careful with UUID or GUID as Primary Keys”Submitted In search of the perfect URL validation regex as a story · 97 points
HN discussionThat's also possible in JS with __proto__. The prototypes of the classes in the chain can be mutated at runtime too. How to handle these cases is well understood for JITs though and python could do the same. See also the warning here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... And this related article: https://mathiasbynens.be/notes/prototypes
Comment linking /notes/prototypes
on “Python's experimental JIT to be removed”Submitted Valid JavaScript variable names as a story · 91 points
HN discussionJQuery Minified and GZipped is also 30KB: https://mathiasbynens.be/demo/jquery-size When doing comparisons, don't be disingenuous. Compare like numbers.
Comment linking /demo/jquery-size
on “Bootstrap 5 will remove jQuery as a dependency”Submitted JavaScript Engine Fundamentals: Shapes and Inline Caches as a story · 87 points
HN discussion> It's one less network request, saves bandwidth Given that most stuff these days is packed together with Webpack or at least concat'd together, you don't really save much, plus jQuery in gzip'd form is clocking in at <30 kB anyway ( https://mathiasbynens.be/demo/jquery-size ). > and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon) So w…
Comment linking /demo/jquery-size
on “Bootstrap 5 will remove jQuery as a dependency”Submitted JavaScript has a Unicode problem (2013) as a story · 83 points
HN discussionScrew it, let's abandon all markup and content: https://mathiasbynens.be/demo/css-without-html (Explanation: https://css-tricks.com/using-css-without-html/ )
Comment linking /demo/css-without-html
on “HEAD – A guide to <head> elements”Submitted The smallest possible valid (X)HTML documents as a story · 81 points
HN discussion> If it's really common for everything to become a performance bottleneck, it's worth profiling from the start so that you avoid having major pitfalls anywhere. If it's rare and exceptional, FFI for those cases is fine. You can have it both way, code evolve. It is pretty common in performance critical code that a minor, almost never call function in one scenario, become a performance critical bottleneck in an other.…
Comment linking /notes/prototypes
on “Chromium project finds that 70% of security defects are memory safety problems”Submitted The three levels of HTML5 usage as a story · 70 points
HN discussionThe major criticism of jquery comes from its "overhead" which comes from wrapping a lot of functionalities onto relatively(at the time of its onset) large file[1]. While they were legitimate(internet was slow) at the time, at its cost jquery worked as a go-to-solution for browser incompatibility. This was a major issue which jquery solved magnificently. And frankly, a significant portion of jquery usages are a very…
Comment linking /demo/jquery-size
on “You probably don't need a JavaScript framework”Submitted Shell script Mac Apps as a story · 69 points
HN discussionJavaScript is: https://mathiasbynens.be/notes/javascript-encoding
Comment linking /notes/javascript-encoding
on “This Month in Ladybird”Submitted In search of the perfect URL validation regex as a story · 65 points
HN discussionThis somewhat reminds me if this little entry on how "tolerant" JavaScript is... https://mathiasbynens.be/notes/javascript-identifiers
Comment linking /notes/javascript-identifiers
on “Mimic – abusing Unicode to create tragedy”Submitted How to use HTML5 to make your CSS look like brainfuck as a story · 52 points
HN discussionI got curious and looked it up, looks like Jquery is about 30kb compressed & minified nowadays: https://mathiasbynens.be/demo/jquery-size
Comment linking /demo/jquery-size
on “What's TypeScript compiling? Use a treemap to find out”Submitted JavaScript’s internal character encoding: UCS-2 or UTF-16? as a story · 37 points
HN discussion