Latest articles

400 new today · 7,371 articles · from 241 blogs

Lil'Log·

Neural Architecture Search

AI summaryAlthough most popular model architectures are designed by human experts, we have not fully explored the entire network architecture space and cannot be sure we have settled on the best options. Adopting a systematic and automatic approach to learning high-performance model architectures would give us a better chance of finding the optimal solution.

Without Boats·

Propane: an experimental generator syntax for Rust

AI summaryThe author has released a new Rust crate called propane, which provides an experimental syntax for writing generator functions. The crate currently only works on the nightly Rust compiler, as it depends on unstable features like generators, generator_trait, and try_trait. The post includes a code example demonstrating a fizz_buzz generator that yields strings using the #[propane::generator] attribute.

Eugene Wei··Eugene Wei

TikTok and the Sorting Hat

AI summaryThe author, a self-described cultural determinist, long believed that cultural distance made it nearly impossible for tech companies to succeed across borders, citing examples like WeChat's failure in the US and Uber's struggles in China. TikTok challenged this view: Musical.ly, built by two Shanghai founders, gained traction among American teenage girls by closely heeding user feedback, and after Bytedance acquired it, massive ad spending combined with a remarkably effective recommendation algorithm (the For You Page) propelled it past US incumbents like YouTube and Facebook. The author concludes that in some product categories, a sufficiently accurate machine learning algorithm can abstract away culture and pierce what he calls the veil of cultural ignorance.

Preshing on Programming··Jeff Preshing

Automatically Detecting Text Encodings in C++

AI summaryThe article describes how the open-source Plywood C++ framework automatically detects text file formats, addressing the inherent ambiguity of encodings like UTF-8, UTF-16 (with or without BOM), and Windows-1252, along with varying line endings. Plywood examines the first 4KB of a file, checks for valid UTF-8 decoding, and scores alternative encodings using heuristics based on whitespace, ASCII characters, and decoding errors. The author benchmarks this approach against a 50-file test suite, noting that editors like Notepad++, Sublime Text, VS Code, and Windows Notepad achieve comparable detection rates, and invites contributions to improve support for formats like Shift JIS on GitHub.

Jay Alammar·

How GPT3 Works - Visualizations and Animations

AI summaryThe article explains how GPT-3 works as a massive transformer decoder model with 175 billion parameters, trained on 300 billion tokens of text at an estimated cost of $4.6 million and 355 GPU years. It describes the training process of predicting the next word, calculating errors, and updating parameters across 96 transformer decoder layers with alternating dense and sparse self-attention within a 2048-token context window. Finally, it notes that the model generates output one token at a time and that upcoming fine-tuning capabilities will make it even better at specific tasks.

Lea Verou··Lea Verou

Introspecting CSS via the CSS OM: Get supported properties, shorthands, longhands

AI summaryThe article explains how to introspect a browser's CSS OM to obtain a complete, always up-to-date list of CSS properties, shorthands, and their longhands, instead of maintaining a hand-written data structure that quickly goes stale. It shows how to get all properties cross-browser (handling Firefox's CSS2Properties quirk via the prototype chain) and how to derive a shorthand's longhands by setting it on an element's inline style and spreading element.style, noting the inconsistent behavior of the 'all' property.

Lea Verou··Lea Verou

Import non-ESM libraries in ES Modules, with client-side vanilla JS

AI summaryThe article explains techniques for importing non-ESM libraries—such as those relying on globals or CommonJS—in browser-based ES Modules using vanilla JavaScript. Global-based libraries can be loaded with a bare import statement for their side effects, while CJS libraries can be handled by stubbing window.module and using dynamic import() (since static imports are hoisted), wrapped in a custom require() helper. The author also shares some gripes with ESM design, such as its lack of backward compatibility, forced strict mode, and same-origin restrictions, while remaining overall enthusiastic about native JS modules.