AI 摘要The article discusses a Rust problem known as "Barbara battles buffered streams," based on Tyler Mandry's recent post, in which the buffering adapters from the futures library (Buffered and BufferUnordered) interact poorly with `for await` loops when the loop body contains asynchronous processing (i.e., await expressions). The author argues that visualizing control flow helps clarify the issue, and begins by illustrating how a normal for loop consumes a non-asynchronous Iterator, calling its `next` method and processing items until none remain.
AI 摘要In the GopherCon USA opening talk 'Go Changes', the author examined how the Go language evolves, stressing the importance of data in making shared decisions and arguing that opt-in telemetry in the Go toolchain is a useful, effective, and appropriate new data source. The re-recorded talk has been posted online with links to related resources. The author also issued an errata, correcting a probability mistake in the talk: (2/3)^100 is about 2.46×10^-18, not 1.94×10^-48, though the conclusion remains that the probability is vanishingly small.
AI 摘要The author reflects on what makes Rust unique, citing slogans like fearless concurrency and stability without stagnation, but argues that the community still lacks a unified set of guiding principles. Dissatisfied with the earlier Rustacean Principles, the author presents a new framework called Rust's design axioms and invites the community to help refine them by contributing examples, counter-examples, or feedback through a repository.
AI 摘要The author opened GopherCon Australia with a talk titled "Go Testing By Example", which was re-recorded at home due to A/V issues and posted online. The talk presents 20 tips for improving Go testing, covering practices like making test cases easy to add, using coverage wisely, separating test cases from test logic, and using tools such as txtar and rsc.io/script. The author concludes by encouraging developers to continually improve their tests and aim for continuous deployment.
AI 摘要This blog post explores Rust's fmt::Arguments type and the format_args!() macro, which power common text formatting macros such as print!(), format!(), and log::info!(). The author describes fmt::Arguments as a great building block that is indirectly used in nearly every Rust program. The post covers how it works, how it is implemented today, and how it might change in the future.
AI 摘要This December 2023 Svelte update recaps the Svelte Summit Fall 2023 conference, which featured launches of new Svelte DevTools, image optimization via @sveltejs/enhanced-img, and a preview of Svelte 5.0, along with the start of Advent of Svelte daily challenges. Key developments include native TypeScript support in the Svelte 5 preview, new $effect.active and $effect.root runes, SvelteKit project templates now offering the Svelte 5 beta and defaulting to Prettier 3, and Vercel adapter support for nodejs20.x. The post also highlights community apps, learning resources, and new libraries and tools built around the Svelte ecosystem.
AI 摘要The author celebrates Elon Musk's destruction of Twitter, arguing that the platform's collapse under a single billionaire's control demonstrates the dangers of centralized social media run by dictatorial owners. He urges readers to abandon Twitter for good and embrace decentralized, open-source alternatives like Mastodon, where he has relocated. He is also auctioning ten brass plaques commemorating the best tweet of all time, with proceeds benefiting The Trevor Project for LGBTQ youth.
AI 摘要This article explores the complicated and often overlooked topic of temporary lifetimes in Rust, noting that while simple cases work automatically, there are many situations where temporaries don't last exactly as long as desired. The authors rediscover the rules governing temporary lifetimes, examine several use cases for temporary lifetime extension, and introduce a proposed new language feature called 'super let' that would give developers more control over temporary lifetimes.
AI 摘要The article discusses how the Pin API in Rust was designed so that high-level users would never need to interact with it, allowing futures to store self-references while remaining immovable during polling. However, Pin still leaks into high-level code in three ways: selecting a Future in a loop, calling Stream::next, and awaiting a Future behind a pointer. Two of these problems can be addressed through better AsyncIterator affordances, while the third stems from a design mistake that cannot be fixed without a breaking change.
AI 摘要The author follows up on a previous post by examining coroutines for asynchrony and iteration from a more abstract perspective. They explain that their earlier point about AsyncIterator being the product of Iterator and Future makes more sense when considering the 'base case' of code that is neither asynchronous nor iterative. The post also features another ASCII diagram to illustrate the concept.
AI 摘要The author proposes 'project goals,' a new kind of RFC that defines a specific objective a specific group aims to achieve within a set timeframe, along with the commitments required from various teams to complete it. The teams being asked for support would decide whether to accept each goal, and accepted goals would serve as an incremental, rolling roadmap that declares intent and tracks follow-through. The author believes this mechanism would boost morale, help get work done, provide a clearer path to getting involved in Rust, and attract more paid maintainers, with plans to draft sample goals and a formal RFC to develop the idea.
AI 摘要This article explores how improved time synchronization—exemplified by AWS's new microsecond-accurate clock service for EC2—lets distributed systems rely on physical time more than the traditional advice of treating it as fit only for human consumption. The author walks through a progression of use cases, from log-based observability and absolute-time TTLs, to leases, consistent reads, consistent snapshots, and last-writer-wins conflict resolution, showing how better clocks with bounded error reduce the need for coordination while introducing subtle correctness risks. The conclusion is that high-quality clocks make time-based designs increasingly practical and safe, though some well-known downsides of coordination avoidance are fundamentally unrelated to clock quality.
AI 摘要The author argues that the Rust project should immediately stabilize AsyncIterator using the existing poll_next interface rather than continuing to pursue the alternative 'async next' design favored by some influential contributors. Responding to Yosh Wuyts' post defending the async next approach, the author finds its arguments uncompelling and reiterates that adopting poll_next now is the right course for the project.
AI 摘要This article is an interactive tutorial on CSS Grid, a powerful tool for building web layouts that comes with a significant learning curve. The author aims to help readers build a mental model of how CSS Grid works and how to use it effectively, sharing the biggest insights and 'lightbulb moments' from their own learning journey.
AI 摘要The author introduces River, a new open-source job queue for Go built on Postgres and the pgx driver, now available in beta. He explains why transactional, database-backed job queues avoid a host of distributed systems problems, and argues that past troubles with Postgres queues (like those at Heroku) are now mitigated by modern advances such as Go generics and goroutine concurrency, Postgres features like SKIP LOCKED and index optimizations, and a minimized single-dependency stack. River offers strongly-typed jobs, batch insertion, unique and periodic jobs, and solid performance, processing around 10,000 trivial jobs per second on a laptop.