编程 · 最新文章
今日新增 29 篇 · 共 2,701 篇 · 来自 79 个博客
0034: perf handover, compaction unchained, crash harder, sketching the query engine, focus catchup, android update policies, legopunk, a world without email, nobody cares, segcache, bloomRF, existential consistency, ssd parameters, fantastic ssd internals
Thoughts on async closures
AI 摘要The author explores how async closures could work in Rust once static async fn in trait is available. They explain that modeling async closures as closures returning futures would require deep, complicated lifetime handling. Instead, they conclude that async transformers offer a surprisingly natural way to make async closures 'just work'.
Tailwind CSS v3.3: Extended color palette, ESM/TS support, logical properties, and more
Tailwind CSS v3.3 is here — bringing a bunch of new features people have been asking for forever, and a bunch of new stuff you didn't even know you wanted.
Generators
AI 摘要The author argues that shipping generators would greatly benefit users by simplifying the writing of imperative, iterative code that interacts well with asynchrony and fallibility. They express frustration that generators have been nearly ready for years with little visible progress, especially since the core compiler transform already exists because async functions are implemented using the same generator-to-state-machine mechanism.
Surprising Scalability of Multitenancy
AI 摘要The article argues that short-term peak-to-average traffic ratios, which are often overlooked, are critical to cloud economics because costs scale with peak traffic while generated value scales with average traffic. Multi-tenancy—running many uncorrelated workloads on shared infrastructure—reduces the system-wide peak-to-average ratio, which improves economics and enables impressive per-workload scalability, as illustrated by examples from AWS S3 and Lambda. Since real-world workloads are spiky, autocorrelated, and non-Poisson, mixing diverse uncorrelated workloads is essential to smoothing overall load and achieving these benefits.
React Labs: What We've Been Working On – March 2023
In React Labs posts, we write about projects in active research and development. We've made significant progress on them since our last update, and we'd like to share what we learned.
The AsyncIterator interface
AI 摘要The article discusses the ongoing debate around Rust's AsyncIterator trait, whose current interface relies on a low-level poll_next method similar to Future::poll. Because poll-style methods are harder to write correctly than async functions, some argue that AsyncIterator should instead expose an async next method, effectively becoming an 'asyncified' version of the Iterator trait. This connects to the author's earlier concept of 'registers'—the idea that Rust code can be written at different levels of abstraction, all of which deserve proper language support.
The End of Front-End Development
AI 摘要The article addresses the viral social media narrative that large language models like GPT-4 are advancing so rapidly that software developers will no longer be needed within a couple of years. The author pushes back on this claim, expressing a much more optimistic perspective on what AI advancements mean for the future of software development.
Contrast Ratio has a new home — and this is great news!
AI 摘要The author launched contrast-ratio.com over a decade ago as a tool to calculate WCAG 2.1 contrast ratios between CSS colors, addressing flaws in existing tools such as lack of support for semi-transparent colors and non-hex color formats. The site became widely popular, but the author has been too busy with other projects to actively maintain it. Siege Media has now purchased the domain and committed to maintaining the open source project, which the author believes ensures a much brighter future for the tool.
Must move types
AI 摘要The author explores the idea of adding 'must move' types to Rust, observing that while the language has many mechanisms to prevent bad practices, it currently has no mechanisms that force good ones. Although they have long resisted this idea because it would add fundamental complexity to the language, they are increasingly encountering problems it could help solve. They aim to sketch what such a feature might look like so the community can better judge whether it is worthwhile.
Introducing react.dev
Today we are thrilled to launch react.dev, the new home for React and its documentation. In this post, we would like to give you a tour of the new site.
Const as an auto trait
AI 摘要This article is part of a series on Rust language design, but unlike previous posts that explored high-level concepts like language registers and when to form abstractions, this one focuses entirely on technical details. It discusses the idea of 'const' as an auto trait, using content that was cut from the previous post so that post could stay focused on its broader argument.
Temporary lifetimes
AI 摘要The Rust lang team design meeting reviewed the author's document on temporary lifetimes, whose current rules date back to a 2014 blog post. Almost a decade later, these rules have rough edges that are a common source of bugs, and the Rust 2024 Edition provides a chance to address them. The document, which is not a proposal, discusses what works well and what doesn't, along with a few sketchy ideas for improvement.
Patterns & Abstractions
AI 摘要This post, the second in a series on async Rust design in 2023, discusses 'keyword generics,' a proposal to introduce a new kind of abstraction in Rust that would allow types to be abstracted over certain effects such as async, const, and try. The author draws on two blog posts by the Rust design team as reference points and observes that the effects considered by the keyword generics working group overlap with, but are not identical to, the effects identified in the author's previous post.
My Startup Banking Story
RSC with Dan Abramov and Joe Savona Live Stream
I had a live streamed conversation with Joe Savona and Dan Abramov. Here's a summary of our discussion.
To async trait or just to trait
AI 摘要The article examines whether traits containing async functions should be explicitly labeled as 'async traits' as opposed to ordinary sync traits. While the author initially saw no need for the distinction and later considered potential advantages for supporting 'maybe async' code, further reflection led them to conclude that introducing this distinction should not be done, at least for now.
Embedded and cloud Elixir for grid-management at Sparkmeter
A case study of how Elixir is being used at SparkMeter.
Zero-effort type safety
AI 摘要SvelteKit now offers 'zero-effort type safety,' where the framework automatically infers and injects types for load functions, route parameters, and data props based on its file-system routing conventions, eliminating the need for explicit annotations. This works through changes to the Svelte language server and TypeScript plugin, which auto-insert the generated types from virtual $types.d.ts files, and is available via the latest Svelte VS Code extension, other LSP-compatible editors, and svelte-check 3.1.1+. Beyond convenience, the feature improves correctness by preventing mix-ups between similar event types, and the team plans to extend type safety to areas like links in the future.