I think I will never be able to use neovim: at 5:57, if I write `let payload = b"Hello World";`, JetBrains IDE will show me the type of `payload` while neovim shows nothing.
At 4:44, `SigningKey::generate(&mut csprng)`: the `&mut` means that this function will modify the argument? If that's true, this is a very bad function, IMO. I always try not to modify the arguments of a function. If we want to modify the argument, then the argument will stay untouched and the modified version of that argument will be returned. Maybe I use Java too much where we don't think about the memory when creating a new object from an existing one.
In Rust it is quite common to modify the argument in-place as the '&' means it's a reference so it saves duplicating - but, if you prefer more functional programming style you can use "clone" but that can be more expensive.
At 4:49, is this neovim configured properly? When `signing_key.` is typed, I expect neovim to show me the method names that I can use with that signing_key (i.e. `verifying_key`) instead of the words that already exist in this file (`Verifier`, `VerifyingKey`).
well spotted, yes, that does work on my other laptop, I used this one for recording. I need to compare init.vim files, and get this one to do show method names.
2 หลายเดือนก่อน
Nice one. I’m going to try if I can encrypt & decrypt io/files based upon this principle
I think I will never be able to use neovim: at 5:57, if I write `let payload = b"Hello World";`, JetBrains IDE will show me the type of `payload` while neovim shows nothing.
At 4:44, `SigningKey::generate(&mut csprng)`: the `&mut` means that this function will modify the argument? If that's true, this is a very bad function, IMO. I always try not to modify the arguments of a function. If we want to modify the argument, then the argument will stay untouched and the modified version of that argument will be returned. Maybe I use Java too much where we don't think about the memory when creating a new object from an existing one.
In Rust it is quite common to modify the argument in-place as the '&' means it's a reference so it saves duplicating - but, if you prefer more functional programming style you can use "clone" but that can be more expensive.
At 4:49, is this neovim configured properly? When `signing_key.` is typed, I expect neovim to show me the method names that I can use with that signing_key (i.e. `verifying_key`) instead of the words that already exist in this file (`Verifier`, `VerifyingKey`).
well spotted, yes, that does work on my other laptop, I used this one for recording. I need to compare init.vim files, and get this one to do show method names.
Nice one. I’m going to try if I can encrypt & decrypt io/files based upon this principle
Ah yes, as opposed to just digitally sign? 👍
@@learning_rust yes. Let’s see if i can store it in a file somehow