31 Dec 2023 |
max397 | * like here
fn main() {
// Create a Vec
let mut my_vec = vec![1, 2, 3];
// Create multiple immutable references to the Vec
let ref1 = &my_vec;
let ref2 = &my_vec;
// You can read from the references
println!("Reference 1: {:?}", ref1);
println!("Reference 2: {:?}", ref2);
// You can still modify the original Vec
my_vec.push(4);
// Print the references again
println!("Reference 1 after modification: {:?}", ref1);
println!("Reference 2 after modification: {:?}", ref2);
} | 15:05:00 |
max397 | nah I never used threads | 15:05:08 |
max397 | they scare me | 15:05:10 |
.vhyrro | not even tokio? | 15:05:17 |
.vhyrro | damn fair | 15:05:19 |
max397 | actually I happen to use that | 15:05:31 |
max397 | I think | 15:05:32 |
max397 | lemme check again | 15:05:34 |
max397 | yes I do use it | 15:06:09 |
max397 | for fs operations | 15:06:11 |
max397 | but not for actual logic | 15:06:16 |
.vhyrro | not just threads but anything that executes async can, according to Fn and FnMut, cause issues
which is why you have to do the same sorta hurdle jumping as you would if you were sending data across threads | 15:06:18 |
sevoris | I just loove how Rust lets you know that you‘re trying to do cool things/s | 15:06:38 |
.vhyrro | i was tempted to say "the same sort of bullshit" but i don't wanna sound too harsh | 15:06:47 |
max397 | https://tenor.com/view/hurdle-fail-face-plant-fall-jump-gif-13497863 | 15:07:02 |
sevoris | This however, is spiffy | 15:07:05 |
max397 | vhyrro | 15:40:19 |
max397 | how long until there is something testable? | 15:40:26 |
.vhyrro | no idea | 15:40:34 |
.vhyrro | until people learn to use semantic versioning i guess 😭 | 15:40:42 |
max397 | tbh I doubt that's rn the main blocker | 15:41:32 |
.vhyrro | your doubts are wrong then ☠️ I can't publish anything to crates.io because my package uses git dependencies | 15:42:01 |
max397 | ooof | 15:42:22 |
max397 | cringe | 15:42:23 |
.vhyrro | it has to because a specific team of people cannot publish a single new release of their project for over 9 months now despite having 20000 new commits | 15:42:35 |
.vhyrro | that project may or may not be a popular parsing library used within neovim nowadays | 15:42:47 |
max397 | | 15:44:10 |
max397 | Download Screenshot_2023-12-31_at_16.51.17.png | 15:51:26 |
max397 | .vhyrro you're not alone | 15:51:26 |
max397 | my code just got 100000x times nicer with that | 15:52:22 |