Latest articles

409 new today · 7,402 articles · from 241 blogs

Baby Steps·

Dyn async traits, part 6

AI summaryIn this follow-up to his previous post on dyn async traits, the author shares a better approach to 'roll your own' boxed dyn traits, suggested by dtolnay: instead of constructing a vtable struct of function pointers, one creates a 'shadow trait' that mirrors the vtable's contents, similar to the technique used by the erased-serde crate. He also sketches out a crate he would like to see built for experimenting with this approach.

Lea Verou··Lea Verou

Custom properties with defaults: 3+1 strategies

AI summaryThe article explores strategies for providing default values for CSS custom properties when building customizable components with a CSS API, noting that setting defaults directly breaks inheritance and repeating fallback parameters is verbose. The author's preferred approach is 'pseudo-private custom properties,' where an internal property (e.g., --_color) is set to the exposed property with a fallback, while alternatives include using a fallback variable or @property registration—the latter being Chromium-only, global, and prone to silent conflicts. The article also showcases a pure-CSS checkbox switch built with the pseudo-private technique, which doubles as self-documentation of the component's custom property API.

Baby Steps·

Dyn async traits, part 5

AI summaryOn nightly Rust, async functions in traits can already be modeled with GATs and impl Trait, as done by the Embassy runtime and the real-async-trait crate, but this approach does not support dynamic dispatch. The author has been exploring why this limitation exists and what language primitives would need to be exposed to overcome it, and still favors stabilizing those primitives to enable experimentation. However, they realized that procedural macros could almost enable this experimentation today, though it falls short due to some obscure Rust type system rules that they have long wanted to change.

Baby Steps·

CTCFT 2021-10-18 Agenda

AI summaryThe next Cross Team Collaboration Fun Times (CTCFT) meeting will take place on 2021-10-18, with a theme focused on empowering and organizing contributors. The agenda includes opening remarks, a CTCFT update, a session on sprints implementing the async vision doc, a rust-analyzer talk, and an introduction to a contributor survey. Afterwards, an experimental social hour will be held with breakout rooms coordinated via the rust-lang Zulip.

Eugene Wei··Eugene Wei

And You Will Know Us by the Company We Keep

AI summaryThe article argues that the defining architectural flaw of Western social media incumbents is conflating the social graph with the content feed, forcing users to build a network of follows just to populate their feeds. This design produces negative network effects at scale—such as context collapse, diminishing entertainment value, and path-dependent outcomes like Pinterest's early skew toward female users—and because users rarely unfollow people, these graph choices act as nearly irreversible 'one-way decisions.' The author suggests the next wave of social startups should treat graph design with great care and consider alternatives, such as algorithmically deriving an interest graph, rather than copying incumbent patterns out of survivor bias.

Baby Steps·

Dyn async traits, part 4

AI summaryThis article is the fourth part of a series exploring dynamic dispatch for async traits in Rust. Building on a previous post about implementing Iterator for dyn Iterator using new primitives, the author examines what core capabilities would be required to extend the same approach to async iterator traits. The article also discusses that calling an async fn through a dyn trait requires the return type to be a Box, but only in the dyn context rather than universally.

Baby Steps·

Dyn async traits, part 3

AI summaryThis post continues a series on 'dyn async traits' in Rust, building on the idea that the compiler can be viewed as synthesizing an impl that performs dynamic dispatch. The author explores a theoretical future in which Rust programmers could manually write this 'impl Trait for dyn Trait' themselves. Though partly a thought exercise, giving programmers such control could enable many new use cases and may inform a future language design.

Sara Soueidan··Sara Soueidan

The CSS prefers-color-scheme user query and order of preference

AI summaryThe author discovered that the CSS prefers-color-scheme media query reflects the user agent's (app's) color theme preference rather than the OS-level setting, after a dark-mode detection script reported dark mode ON inside Reeder's in-app browser while the phone's OS was set to light mode. Testing across devices confirmed that the app-level theme takes precedence over the OS-level preference. Consulting the CSS specification revealed this is intentional behavior, as user agent preferences are expected to override OS-wide settings.

Baby Steps·

Dyn async traits, part 2

AI summaryThis article is the second part of a series on dyn async traits in Rust, addressing the key challenge that dyn types must specify values for all associated types. It explores how dyn traits currently work in Rust, explaining that a dyn-safe trait like DoTheThing is implemented by its corresponding dyn type. The post also examines the background behind this limitation and where it comes from.

Maggie Appleton·

October 2021

AI summaryAfter five years at egghead, where the author progressed from illustrator to art director and eventually focused on UX and product design, they decided it was time to move on. Driven by a desire to engage more deeply in the growing 'tools for thought' ecosystem, they have now joined HASH as design lead. There, the team is building a knowledge management platform backed by schemas and structured data.

Svelte Blog·

What’s new in Svelte: October 2021

AI summaryThis October 2021 edition of "What's new in Svelte" marks one year of the monthly roundup and covers recent Svelte releases, including no-op SSR lifecycle functions and improved TypeScript integration. It also details SvelteKit's progress toward version 1.0 with nearly 100 pull requests, breaking changes, and a call for community contributors, alongside community showcases of apps, podcasts, tutorials, and new libraries. The post concludes with a call for speakers for Svelte Summit Fall 2021, scheduled for November 20.

Baby Steps·

Dyn async traits, part 1

AI summaryThe author and Tyler Mandry have been working on implementing async fn in traits in Rust, with their design thoughts collected on the async fundamentals initiative website. This blog post series focuses specifically on the challenge of combining dyn with async fn. This first post introduces the problem and the overall goal they are aiming for, though they don't yet know the best way to achieve it.