AI summaryThis blog post documents nearly six weeks of significant progress on the async/await feature in Rust, building on the problem laid out in the first post of the series. The author highlights work on the Future trait and the pinning API, including an RFC titled 'Standard library API for immovable types'.
Interpretability techniques are normally studied in isolation. We explore the powerful interfaces that arise when you combine them -- and the rich structure of this combinatorial space.
AI summaryThe author plans to release version 1.0.0 of the failure crate on March 15 and does not intend to make any further breaking changes afterward. This matters because failure is a significant part of the public API of other libraries, whether they use the Error struct or derive Fail for custom error types, so the 1.0 release represents a long-term stability commitment for its dependents.
AI summaryAn MIT instructor teaching 6.813 User Interface Design and Implementation has shared slides from three new 2-hour intro-to-web-development labs, created for students who are technically experienced but new to web development. The slides include notes explaining live-coded demos, were tested mainly in Chrome, and are shared as-is with no support, though others may use them for non-profit teaching or submit pull requests to fix issues.
[Updated on 2020-09-03: Updated the algorithm of SARSA and Q-learning so that the difference is more pronounced. [Updated on 2021-09-19: Thanks to 爱吃猫的鱼, we have this post in Chinese].
AI summaryThis January 2018 review of the Zig programming language highlights its readiness for LLVM 6 (with Zig 0.2.0 planned for a week after its release), a friendlier error-handling syntax (try, errdefer, catch), and a new 'error return traces' debugging feature that traces where errors originate at nearly no cost in Debug and ReleaseSafe builds. Additional updates include an automatic documentation generator, the self-hosted compiler now building on Windows and macOS, mandatory explicit function return types, .h file generation for extern declarations, improved C-to-Zig translation, and new standard library crypto functions such as MD5, SHA-1, and integer rotation utilities.
AI summaryThe article discusses integrating the self-referential generator API into the futures ecosystem as part of the async/await work. Following a previous proposal and an improved interface suggested by eddyb, the author begins by documenting the generator API that will serve as the starting point for this integration.
AI summaryThe author unexpectedly revisits the async/await API proposal from their previous post after eddyb demonstrated that immovability can be achieved with a safe interface. They had originally planned for this fourth post in the series to explain transitioning from the generator API to a futures API that avoids heap allocating every async call. Instead, this development changes the direction of the discussion around the proposed API.
AI summaryThis is the third post in a series on async/await, following earlier discussions of the relationship between generators and self-references, as well as the core problem that must be solved to make generators work. The author had previously rejected several potential solutions as not shippable in the near future. In this post, the author aims to deliver on a promise from the original post by presenting a near-term, shippable solution by the end of the series.
AI summaryThis is the second post in a series on async/await, which previously established that generators with references across yield points amount to self-referential structs. The author narrows the discussion to the specific problem that must be solved to make generators work and examines some proposed solutions that they believe are false starts. No concrete proposal is made yet, but one is promised in a future post.
AI summaryThis is the first post in a blog series about generators, async, and await in Rust. The author plans to eventually propose how these features could be brought to stable Rust within the next 12 months while resolving major ergonomics issues in the futures ecosystem. Before presenting that concrete proposal, the series first needs to establish the scope and nature of the problem, beginning with self-referential structs.
AI summaryThe article demonstrates that unsafe Zig is safer than unsafe Rust by comparing equivalent code that reinterprets a byte array as a struct. In Rust, using mem::transmute to cast a misaligned pointer silently produces undefined behavior at the LLVM level due to mismatched alignment, while Zig's compiler rejects the cast outright with an alignment error unless the programmer explicitly declares the correct alignment. The author argues that Zig fully solves alignment issues at compile time, with @alignCast providing a safety-checked escape hatch.
AI summaryThis article extends a runtime reflection system in C++11 by showing how to add support for new built-in types: primitive types like double are supported by specializing the getPrimitiveDescriptor<>() function template in any .cpp file, while template types like std::unique_ptr<> are handled through a partial specialization of the TypeResolver<> class template that generates a per-specialization type descriptor. It explains how these descriptors work internally, using template constructors and lambda-generated helper functions to handle each instantiation generically. Finally, the author discusses further improvements, such as replacing virtual functions with a table of function pointers (TypeKey) and using a Python script to auto-generate the reflection macros, and notes the system's heavy use in a custom game engine.
AI summaryThe article introduces the multi-armed bandit problem, noting that algorithms have been implemented for the Bernoulli bandit. It explains the core exploration vs exploitation dilemma through a restaurant analogy: sticking with a known favorite guarantees satisfaction but risks missing better options, while constantly trying new places can lead to unpleasant experiences. This same trade-off applies to online advisors balancing known successful ads against potentially more effective new ones.
AI summaryThe author expresses fondness for a niche genre blending political and film satire: alternate or revisionist film commentaries. Examples include the Twitter-born 'The People's History of Tattooine,' which humorously recasts Mos Eisley and Obi-Wan through a social-justice lens, and a fictional DVD commentary by Howard Zinn and Noam Chomsky that reinterprets The Lord of the Rings as a story about pipe-weed economics and propaganda. The piece ends with 'The Passion of the Christ: Blooper Reel' and an invitation for readers to share more examples of the genre.
AI summaryThe author explains that despite their blog appearing abandoned with no posts in two years, they haven't disappeared but have been posting on Medium instead since joining Tesla, as it is faster and easier. They still plan to return to this blog for longer posts when they find time, but will default to Medium for short to medium-length content. They direct readers to check out their Medium blog.
AI summaryThe author announces a new project called configure, which aims to provide a uniform way to load configuration variables from a program's environment. The goal is to give libraries a standard mechanism to rely on, so applications can control how configuration is loaded without writing bespoke configuration management glue. The project draws on 'The 12 Factor App' advice about storing configuration in the environment.
Elixir v1.6 includes a code formatter, defguard, dynamic supervision and new module attributes that improves code quality and the developer experience.
AI summaryThe article presents a small, flexible runtime reflection system for C++11 that uses preprocessor macros and templates to generate TypeDescriptor metadata objects describing the structure of other runtime types. Originally built to support serialization in the author's custom game engine, the system also powers features like 3D rendering and JSON asset importing. Through a compact 242-line GitHub sample project, the author demonstrates how the REFLECT() macros, SFINAE-based type resolution, and the TypeDescriptor class hierarchy work under the hood.