No AI. Build your own tree directory viewer in C by hand
The video demonstrates how to build a tree directory viewer in C without using AI. It focuses on manual programming techniques for creating a file system navigator. (youtube.com)
David Priver describes extensions he built into his C preprocessor while developing a personal C2Y compiler/REPL. He emphasizes that the preprocessor is a source-to-token translator rather than a simple text filter, then shows practical extensions that make macro development easier. Two debugging builtins, print(...) and where(...), send macro expansions and definition locations to stderr so developers can inspect macro behavior without dumping the entire translation unit. To avoid the classic, ugly macro-recursion tricks blocked by token "blue painting," he implemented a builtin map(macro, ...) that linearly applies a macro to every variadic argument with no fixed limit, demonstrated by mapping a PRINTINT macro across numeric and identifier arguments.
He also added VA_COUNT to return the number of variadic arguments directly, simplifying patterns like passing a count plus an array to functions (example: defining sum(...) as sum(VA_COUNT, (int[]){VA_ARGS})). These builtins eliminate complex preprocessor pumping, improve performance and readability, and reduce reliance on fragile macro hacks. All example code is public domain, and additional, deeper extensions - such as mutable preprocessor state - are hinted at for future exploration.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
The video demonstrates how to build a tree directory viewer in C without using AI. It focuses on manual programming techniques for creating a file system navigator. (youtube.com)
Microsoft introduces dotnetup, a user-friendly toolchain manager for .NET SDKs and runtimes on macOS and Linux. It enables easy installation, updates, and management of multiple versions without requiring admin permissions. (devblogs.microsoft.com)
Rust 1.99.1 is a new release that fixes regressions related to missing symbols, miscompilation of FFI bool return values, and linker issues on macOS. The update improves stability and compatibility for various targets and encourages users to test future versions. (blog.rust-lang.org)
Linus Torvalds criticizes the idea of banning AI and tools in kernel development, emphasizing that understanding and competence matter more than the tools used. He advocates for the use of new technologies, asserting that good developers focus on knowledge rather than tool restrictions. (lkml.iu.edu)
Sygal converts PDFs, scans, web pages, and other documents into clean, AI-ready Markdown and JSON locally on your machine. It reduces token usage for AI applications and standardizes various file formats for easier integration. (sygal.app)
C++26 introduces contracts to specify preconditions and postconditions for functions, replacing traditional assertions. Contracts are declared with function prototypes and evaluated during runtime to ensure code correctness. (cppstories.com)
Today's best Hacker News stories, summarized and screenshotted, one email a day.