Winudf – DVD / BluRay driver for DOS, Windows 1.x – 3x / 95 / 98 / ME
WinUDF is an installable UDF file-system driver for DOS and Windows versions 1.x through ME. It enables older systems to access UDF-formatted DVD and Blu-ray discs. (github.com)
The piece explains how to iterate backward through a C array or buffer when the index has type `size_t`. A tempting loop that starts at `count - 1` and continues while `i >= 0` is incorrect: `size_t` is unsigned, so that condition is always true, and an empty range makes the initial value wrap to `SIZE_MAX`. Switching to a signed index can work, but it risks awkward conversions when the index is used with unsigned sizes, depends on `ssize_t` unless another type is provided, and can create width or promotion issues.
The recommended pattern is `for (size_t i = count; i--; )`. The post-decrement condition tests the old value, then decrements it before the loop body runs. Thus the body sees indices from `count - 1` down through zero, and an initial count of zero skips the body. When the condition tests zero, the decrement wraps the unsigned variable, but unsigned wraparound is defined in C and the loop ends before that value is used. The example applies this pattern to search for the last occurrence of a value, returning as soon as it finds a match. The central advice is to use this compact unsigned loop rather than converting the index to a signed type.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
WinUDF is an installable UDF file-system driver for DOS and Windows versions 1.x through ME. It enables older systems to access UDF-formatted DVD and Blu-ray discs. (github.com)
Lean can verify that a formal proof follows from its stated assumptions, but it cannot confirm that the coded theorem matches the informal mathematical claim. AI-generated Lean projects therefore need checks of their statements and proof setup before verification supports claims of correctness. (xenaproject.wordpress.com)
Dffy is a fast, Rust-based terminal viewer for Git diffs, designed to handle large repositories. It provides a terminal-native interface for reviewing code changes. (github.com)
Gavel is a free, MIT-licensed tool that guides Claude Code or Codex through presenting local Git changes in a browser. It breaks large diffs into focused reviews, where developers can ask questions, request revisions, and approve each part. (photostructure.com)
mini.nvim, now hosted on Tangled, is a collection of more than 45 independent Lua modules that enhance the Neovim experience. The repository includes versioned releases, with v0.18.0 listed as the latest tag. (tangled.org)
Parcel is a desktop email client for Linux, built with the Zig programming language. Its repository lists version 1.1.0 as the latest release. (tangled.org)
Today's best Hacker News stories, summarized and screenshotted, one email a day.