What is Nostr?
vnprc /
npub16vz…mhgd
2025-01-16 13:39:02
in reply to nevent1q…x5qw

vnprc on Nostr: Digging a little deeper to understand this. Apparently, if my LLM is to be trusted, ...

Digging a little deeper to understand this. Apparently, if my LLM is to be trusted, you need to index arrays with usize because they can be stored either on the stack or the heap and need to behave consistently across CPU architectures.

I didn't realize that arrays could go on the heap, but it seems this is what happens when you instantiate an array with Box, Vec, Rc, or Arc.

```
Box::new([1, 2, 3, 4, 5])
vec![1, 2, 3, 4, 5]
Rc::from([1, 2, 3, 4, 5])
Arc::from([1, 2, 3, 4, 5])
```

If only they could make the instantiation code more uniform...😅
Author Public Key
npub16vzjeglr653mrmyqvu0trwaq29az753wr9th3hyrm5p63kz2zu8qzumhgd