#borrowchecker

2025-06-12

So, this is an interesting thing from the Browser Company, dia. It did generate this article based on my blog and believe me, it does sound like me.

Scary, right?
#AI #ArtificialIntelligence #Coding #RustLang #ProgrammingHumor #DevLife #Productivity #TechTrends #Automation #LearningToCode #Debugging #BorrowChecker #TechReflections #selftaught
(even the tags are ai generated!)

I did, during my previously mentioned workshop, do one thing to offend #Rust’s #borrowchecker. I was implementing an Account struct that had a current balance and a Vec containing a history of balances. This was using #PyO3 so there are some special types. Because of inheritance, I have self_ instead of self. Here’s the bad thing I said:

self_.history.push(self_.as_super().balance);

@algo_luca had to explain it to me. He didn’t even need to think about it. He instantly knew what was wrong. Now I am enlightened. I won’t make this particular kind of mistake again.

Of course the mistake is that I was trying to use a mutable reference (so I could push to history) and anything else at the same time.

you╭👺+300╭🐈x5╭⁂+3╭(Ⓐ+aunspeaker
2024-09-02

oh my, oh my. so this week i have a little more time to hack on the but... it's a mess 😬

trying to genericize the Render trait over render inputs/outputs (`ratatui::Buffer` + `ratatui::Rect` -> `Result<Rect, Box<dyn Error>>`) so that i can try passing parent focus state into the render inputs, and be done with the whole "how to focus widgets" thing

it works when passing them as two separate args, but wrapping them in a struct trips up the ... ouch

screenshots of bacon and neovim side by side in a tmux
2024-06-19

I spent the last 2 hours dealing with C++ value categories in templated code.
Could someone please kill me?

Most people focus on the #BorrowChecker when they compare #RustLang and #CPP, but I feel that it should also be highlighted how much more intuitive (and a lot saner) it is to deal with moving/copying/referencing in Rust.

2024-06-15

blog.polybdenum.com/2023/03/05

I'd be really interested in building a toy borrow checker for Typescript, curious if that'd be able to catch strange bugs

#Typescript #Rust #BorrowChecker #TypeSystems

2023-12-13

Fighting with the #BorrowChecker is a rite of passage for new #Rustaceans. But once you get to know the hardware and the borrow checker, you start to see why it complains all the time. It makes you wonder - "Could I have prevented these mistakes on my own?". Clearly not - you manage to trigger it all the time, after all! #Rust is a wonderful gift! :ferris:

2023-12-04

Completed day 4 of #AdventOfCode in #rust! I think it was actually easier than day 3, but I had a big fight with the #BorrowChecker, as we all do from time to time. Something about trying to reference elements of a vector while iterating through that vector... It is amazing all the abstractions #Python and #JavaScript do for programmers.

github.com/ks982579/coding-cha

2023-11-21

I figured my issue with rust: it's alloc anxiety. Every time I have to do explicit allocations I feel like I’m doing things wrong, not fighting the borrow checker enough, or not writing the proper APIs.

And that inner gripe with the poisonous taint of `clone()` makes me feel like I failed as a programmer, because I should have known my tool better.

Reasoning with that, I start to feel there are many cases where allocating is just not a problem, and it's something you can optimize for after the rest is done. Even though, at times, it means that you need to redesign some inner workings.

Oh, also, rust sucks to read, but nowhere close to C++

#rust #borrowchecker #anxiety

Steffen Uhligsuhlig@chaos.social
2023-08-29

Getting the #Rust #ESP board to work was really simple. Maybe the #borrowchecker and I will become friends, some day?

Anupam 🇮🇳《ミ》λ≡haskman@functional.cafe
2023-08-22

The way I write #Rust is by first thinking of the code in #Haskell and then translating it to Rust, while praying that the #BorrowChecker doesn't get in the way!

#FunctionalProgramming #RustLang

2023-05-11

I’m just also gonna note that Rust is always undefeated in memory allocation. #borrowchecker

Astra Kernel :verified:AstraKernel@infosec.exchange
2023-04-05

#RustQuiz

What's the output?

A. It will print "hello"
B. It will print "rusty"
C. It will give a compilation error
D. It will give a runtime error

#rustlang #rust #borrowchecker

casraf 🇮🇱casraf@fosstodon.org
2023-03-15

`my sanity` does not live long enough 🙄 #rust #borrowchecker

Thomas Laferrieretlaferriere@fosstodon.org
2023-01-05

This thread on the #rustlang forum has taught me so much more than any other resource about the #borrowChecker that I think its content should become part of some official docs (like a deep dive section in the #rustBook ) users.rust-lang.org/t/what-is-

Benoît Allardbenallard@osna.social
2022-12-08

I just completed "No Space Left On Device" - Day 7 - Advent of Code 2022 #AdventOfCode adventofcode.com/2022/day/7

Screw the #borrowChecker, #python rulez!

github.com/benallard/advent/bl

nosh :fosstodon: (ʘ‿ʘ)nosherwan@fosstodon.org
2022-12-07

:rust: Borrow Checker

#Primeagen does a brilliant job of describing what is #borrowChecker in #rust

youtube.com/watch?v=ZNFdkTIzdX

As in the past I had learnt C & C++ I know about value vs reference so it was easy for me to grasp the concept.

Gabriela Noriega 🏳️‍⚧️ 🇧🇷gabri@tech.lgbt
2022-12-06

The one "#IllegalTrick" to make #rust's #BorrowChecker shut the hell up :)

A piece of rust code in a vaporware aesthetic window/frame. The code is:

fn fuck_ref<'a, T>(ptr: &T) -> &'a T {
unsafe { &*(ptr as *const T) }
}

fn fuck_mut<'a, T>(ptr: &mut T) -> &'a mut T {
unsafe { &mut *(ptr as *mut T) }
}
Michael Connor BuchanTheFake_VIP@linuxrocks.online
2020-09-12

Feel like I achieved something today. Got a nice #treeStructure going in #Rust, with a lot of convenient functionality, that finally satisfies the #borrowChecker! Doing something in Rust is almost always rewarding when you're new to it, because you've likely spent many hours battling through compile errors and re-architecting your solution. #myJourneyWithRust

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst