Well, I'd appreciate a writeup explaining this, if/when you have the time and inclination 🙂
Your answer make it sound like places are always on the stack? The heap isn't a place?
That's not intuitive to me, sorry. I don't understand how this relates to something that can be passed between threads, because it is SOMEthing, so there must be a place that contains it.
IMO the lifetime metaphor fits static better. "It's valid, because it's always alive" is easy.
Fair enough, but what's the intuitive explanation for static, in this POV?
Mockito is a rust crate that creates actual http servers, that run mocked logic.
share.google/h6PKe6Dzs6QW...
I'm not exactly sure what you're asking here, but it sounds like a problem that mockito solves.
That's roughly our solution, too.
Joined AWS just when they started sanctioning new projects in Rust, and our team started a new project.
Shamanic versioning, where you choose a version according to your spirit animal.
Thank you for all the good work!
Selfishly hoping that your project will be another great book.
Succeed. If you want to force an at least 1 condition, it should be defined in the attribute argumenta.
After reviewing, feedback, and more review, I gave up. It was frustrating to harangue claude to REPLACE ALL THE STRINGS, YES THAT ONE TOO, and also to ensure that it should keep `Result`s, instead of finding "clever" ways to avoid returning errors.
Claude just wants to have strings, I guess.
On the journey, it deleted the whole test suite of one class, and as mentioned, got completely stuck once, which required a manual edit of the code.
On the other hand, after 2 hours the change was complete - I just need to review the change.
Claude just moved the logic around, but still used the combined string throughout the code, until I explicitly told it to delete / change the inputs on every function that takes a string.
The change isn't very complex - the code splits addresses to host + port, but then saves those addresses as `format!("{host}:{port}")`, only to split them again when the address is used. I just wanted to save the split value, instead of combining and splitting again.
well, this is going to slow me down
Claude added this change, but couldn't trace back the open quotes to the offending line.
The code didn't compile, with the error
```
error[E0765]: unterminated double quote string
--> path/to/file.rs:464:57
```
and Claude just couldn't fix the issue, probably because it originated on the other side of the file, in line 130:
`if let Some(bracket_end) = addr.find("]:') {`
I tried playing with Amazon Q & Claude 4 today. It worked reasonably well (that is, made slow progress over the code, requiring repeated prompt explaining my goals and why the changes it made were incorrect), until it hit a wall and couldn't make any more progress.
Really impressive. Any plan to have named enum variants, like Rust has? Relying on unique types per variant is a pain point of std::variant that exists here, too.
The twist: the single argument is a tuple.
Are you interested in feedback on the video?
I used it 3 years agothrough iai_callgrind, which was fairly easy to setup IIRC.
Somewhat less realistic when discussing the indexing operator for hashmaps without knowledge of keys. You created a map from a deserialized JSON - don't make assumptions on its contents.
it's what happens when developers allow `usize`s to misbehave.
Compiler error: "note: this error originates in the macro `implement_iterators` which comes from the expansion of the macro `implement_commands` (in Nightly builds, run with -Z macro-backtrace for more info)"
As someone who came to Rust after struggling with C++, I'm continuously astounded by the quality of the error messages. rustc can point out the source of an error through nested macros!
Fun Fact: Ducks are often seen standing still in the rain. Most think it’s because their waterproof feathers keep them dry and that staying still helps conserve energy, but we have our own theory🦆🌧️🐥 #naturalhabitok #naturalhabitat #naturalhabitatshorts
Yup.
IMO even weirder is that Arc<T> can be two different types.
Shadowing makes perfect sense when variables aren't reassignable by default. I'm not so sure that combining reassignable and mutable into a single keyword was the right choice, though.