最新文章

今日新增 423 篇 · 共 7,353 篇 · 来自 241 个博客

Without Boats·

Wherefore art thou Romio?

AI 摘要The article introduces Romio, a project that ports a small part of the Tokio project to the newer futures APIs, which the author started to gain experience migrating code from the old futures API to the new one. After realizing the code could be useful to others experimenting with networking code using the new async/await syntax, the author and collaborators polished it during the RustFest Rome 'impl days'. Romio is now being released for people to experiment with.

Andrew Kelley·

Using Zig to Provide Stack Traces on Kernel Panic for a Bare Bones Operating System

AI 摘要The author describes adding stack traces to kernel panics in ClashOS, a bare bones arcade game OS for Raspberry Pi written in Zig, where the default freestanding panic handler merely hangs the CPU. By embedding DWARF debug sections into the kernel image via a linker script (which required patching an overly strict LLD check that was later merged upstream into LLVM 8), and writing glue code that maps the debug info from memory using Zig's standard library APIs, the kernel can print annotated stack traces on panic. Finally, the kernel's own source files are included in memory so panic output can display the corresponding source lines.

Without Boats·

Making progress in await syntax

AI 摘要The article discusses the still-unresolved question of the final syntax for the await operation in Rust's async/await feature. In the current implementation, awaits are written through a compiler plugin, as in 'await!(bar())'. This choice is not due to any technical limitation, but simply because the precise, final syntax has not yet been decided.

Without Boats·

Anchored and Uniform Paths

AI 摘要The article discusses a major pending decision for Rust 2018 concerning the modules and paths system. The language team plans to implement an idea called '1path,' which would ensure that paths are interpreted consistently no matter where they appear in a project, whether in a use statement or in normal code.

Without Boats·

Shifgrethor IV: Tracing

AI 摘要This post explains how shifgrethor implements tracing in its garbage collector, building on the previous post's coverage of rooting. While rooting tracks which objects are alive, a tracing garbage collector must also trace from rooted objects through all objects they reference. This design means users only need to root a few objects, from which all live objects can be reached.

Without Boats·

Shifgrethor III: Rooting

AI 摘要This article returns to explaining how shifgrethor, a garbage collector for Rust, handles rooting of garbage-collected objects. The author notes that shifgrethor's rooting approach is somewhat novel and leverages Rust-specific language features. Before diving into the details, the post briefly surveys the two broad categories of rooting strategies commonly used by precise, tracing garbage collectors.

Without Boats·

Shifgrethor II: Notes on tracing garbage collectors

AI 摘要This post, part of a series on the shifgrethor project, deviates from its planned topic of rooting to first provide an overview of how tracing garbage collectors work. The author explains the design of the underlying garbage collector in shifgrethor, describing how memory in a Rust program with garbage collection can be conceptually divided into three sections: the stack, the 'unmanaged' heap, and the 'managed' heap.

James Clear··James Clear

How to Make Your Future Habits Easy

AI 摘要This article, an excerpt from Atomic Habits, describes IT developer Oswald Nuckols's 'resetting the room' strategy, in which each space is tidied after use not just to clean up but to prepare for the next action. It explains how priming your environment—such as laying out workout clothes ahead of time or pre-sorting greeting cards—reduces friction and makes good habits easier, while adding friction, like unplugging the TV or leaving your phone in another room, makes bad habits harder. The author argues that by mastering habits of preparation, we can design a world where doing what's right is also the easiest thing to do.

Without Boats·

The hard parts of talking about open source

AI 摘要The article praises Evan Czaplicki's Strange Loop talk 'The Hard Parts of Open Source,' highlighting his identification of three harmful behavioral patterns in open source communities: dismissive 'Why don't you just..' suggestions, challenges to maintainers' authority ('On whose authority?'), and the belief that all discussion is constructive. The author finds these patterns valuable for understanding unpleasant interactions in their own open source work. However, the author objects to the talk's final segment, which shifts to sketching a proposed discussion platform designed to foster more positive conversations.

Without Boats·

Shifgrethor I: Garbage collection as a Rust library

AI 摘要The author introduces shifgrethor, a Rust library developed over the past 5-6 weeks that implements a garbage collector with an API believed to be properly memory safe. This post kicks off a series with a high-level overview of the project's purpose and design decisions, with technical details to be covered in future blog posts.

brandur.org··Brandur Leach

How to Manage Connections Efficiently in Postgres, or Any Database

AI 摘要The article explains why Postgres enforces strict connection limits (defaulting to 100, with cloud providers capping even large databases at 500): because of its process-based architecture and shared-memory bottlenecks, performance degrades reliably as the number of active connections grows. It then presents techniques for using connections more efficiently, including node-local connection pools, holding connections only for the minimum span of core application logic, releasing them during slow foreign API calls, and using PgBouncer as a global pool across nodes. The author concludes that developers should treat database connections as a scarce resource and understand connection management directly rather than relying on framework abstractions.

James Clear··James Clear

The Habits Scorecard: Use This Simple Exercise to Discover Which Habits You Should Change

AI 摘要This article, excerpted from Atomic Habits, describes the Japanese railway system's Pointing-and-Calling safety technique, which reduces errors by up to 85% by bringing nonconscious actions to a conscious level of awareness. The author adapts this concept into the Habits Scorecard, an exercise where you list your daily habits and label each as good, bad, or neutral based on whether it supports your long-term goals and desired identity. The initial goal is not to change anything but simply to observe your behaviors without judgment, since behavior change always begins with awareness.

Lil'Log·

Flow-based Deep Generative Models

AI 摘要This article introduces flow-based deep generative models as a third type of generative model, following previous discussions of GANs and VAEs. It explains that neither GANs nor VAEs explicitly learn the probability density function p(x) of real data, because computing p(x) requires integrating over all possible values of the latent variable z, which is intractable.