Jekyll2024-06-24T14:04:58-07:00https://shift.click/feed.xmlshift.clickshift.click: Thom Chiovoloni's Website/BlogThom ChiovoloniI wish `#[non_exhaustive]` worked with struct update syntax2024-04-10T00:00:00-07:002024-04-10T00:00:00-07:00https://shift.click/blog/non-exhaustive-fru-sadThom Chiovoloni<![CDATA[It’s pretty annoying that in Rust, #[non_exhaustive] structs don’t support “struct update” / “functional record update” syntax (the syntax that powers Stuff { a: b, c: d, ..blah }).]]>Why is there no realloc that takes the number of bytes to copy?2024-04-09T00:00:00-07:002024-04-09T00:00:00-07:00https://shift.click/blog/missing-alloc-apiThom Chiovoloni<![CDATA[I’d like a variant of realloc that takes the number of bytes that should be copied, in the case a copy is needed.]]>Allocator trait 1: Let’s talk about the Allocator trait2023-08-06T17:08:12-07:002023-08-06T17:08:12-07:00https://shift.click/blog/allocator-trait-talkThom Chiovoloni<![CDATA[There are… several things I find wanting about the current version of the core::alloc::Allocator trait (as of 2023-08-06). I’m going to do a short series where I post about some of the bigger issues, and explore the different tradeoffs and design choices we might make. This post is an introduction to that.]]>Miri Feature Wishlist2021-11-07T00:00:00-07:002021-11-07T00:00:00-07:00https://shift.click/blog/miri-wishlistThom Chiovoloni<![CDATA[Miri is an evaluator for rust that detects many kinds of undefined behavior. Here are some things it could (possibly) do that would catch bugs I’ve had/seen before.]]>Codelet: A better `saturate`/`clamp01` function2021-04-02T00:00:00-07:002021-04-02T00:00:00-07:00https://shift.click/codelet/codelet-saturateThom Chiovoloni<![CDATA[Let’s talk about clamping a float between 0.0 and 1.0.]]>Introducing “Codelets”2021-04-01T00:00:00-07:002021-04-01T00:00:00-07:00https://shift.click/blog/introducing-codeletsThom Chiovoloni<![CDATA[In an effort to post more, I’m going to start posting shorter (and frankly, lower effort) blog posts known as “Codelets”.]]>Futex-likes2021-01-04T00:00:00-08:002021-01-04T00:00:00-08:00https://shift.click/blog/futex-like-apisThom Chiovoloni<![CDATA[Most major OSes offer some form of futex-like functionality at this point. Some of these are a bit obscure and hard to remember, though, so I thought I’d write some stuff about them down so that I can refer to it or link it later.]]>A Few Github Action “Recipes” for Rust2020-09-06T00:00:00-07:002020-09-06T00:00:00-07:00https://shift.click/blog/github-actions-rustThom Chiovoloni<![CDATA[Here’s some blocks of yaml you can copy-paste to make github actions work for your Rust project. Go nuts.]]>“Tear”able Puns, and Worse Ideas: A Minimally Thread-Safe Cell2020-06-11T00:00:00-07:002020-06-11T00:00:00-07:00https://shift.click/blog/tearcellThom Chiovoloni<![CDATA[If you’ve ever thought “Using a Mutex<[f32; 3]> is pointless, what’s the worst thing that could happen here?”, I’ve written the Cell type that empowers you to find out the answer to that question yourself.]]>Layouts and `dealloc`: An unfortunate aspect of Rust’s allocation API2020-06-10T00:00:00-07:002020-06-10T00:00:00-07:00https://shift.click/blog/on-deallocThom Chiovoloni<![CDATA[Note: This assumes you have familiarity with Rust, memory allocation, etc.]]>