Programming Isn't Special
Programming is often dismissed as merely functional, but it is fundamentally an art form. Using AI in programming disregards this artistic nature and undermines the creative value involved. (blog.glyph.im)
Python 3.15 introduces lazy imports, a syntax that lets import statements become lightweight placeholders so modules are only actually loaded when first used (examples: lazy import json; lazy from decimal import Decimal). It’s literally a one-word change per import line and means unused dependencies are never brought into memory. The semantics turn imported names into proxies until the program references them, reducing unnecessary startup work while preserving normal behavior once modules are accessed.
A simple command-line tool that imports 16 modules (standard libs like csv, json, decimal, sqlite3, asyncio, xml, zipfile, tarfile, statistics and third-party packages such as numpy, pandas, requests, rich) was benchmarked on Python 3.15.0b4 running on an Intel Xeon Gold 6548N with numpy 2.5 and pandas 3.0. Three paths were tested: version (prints a string), mean (uses csv and statistics.fmean), and stats (uses pandas). Eager imports cost ~295-299 ms; with lazy imports startup fell to 20 ms for version, 24 ms for mean and 224 ms for stats, yielding ~15×, 12× and 1.3× speedups respectively. Subtracting interpreter startup (11.7 ms) shows import overhead dropping from ~283 ms to ~8 ms (≈35× reduction). The trade-off is that missing-module errors surface on first use rather than at startup, possibly later and deeper in execution. Source code is available.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
Programming is often dismissed as merely functional, but it is fundamentally an art form. Using AI in programming disregards this artistic nature and undermines the creative value involved. (blog.glyph.im)
Efforts to minimize undefined behavior in the C programming language aim to improve program safety and predictability. These include potential language enhancements and best practices for developers. (lwn.net)
Bitmaps are a fundamental data structure in the Linux kernel, alongside linked lists, used for efficient resource management. They are part of the kernel's implementation of low-level primitives and algorithms for system operations. (0xax.dev)
Spinal is a predictive surface that provides near-instant insights into any codebase, streaming live changes and understanding code evolution. It offers ultra-low-latency search and anticipates user needs, demonstrated by its performance on the Linux kernel's extensive commit history. (spinal.sh)
The video discusses the current state of the Racket programming language, highlighting its features and community. It emphasizes ongoing development and the language's role in education and research. (youtube.com)
GTKX is a framework that enables developers to build native Linux applications using React, TypeScript, and Adwaita widgets. It aims to simplify creating desktop apps with modern web technologies. (github.com)
Today's best Hacker News stories, summarized and screenshotted, one email a day.