So what has come to my mind recently is this:
#Rust has a lot of new concepts that are not found in other mainstream languages. On the one hand, it is great, because these concepts are really great and make a lot of sense.
But there is also another aspect to it - which is #curiosity.
These new concepts make you curious! You want to learn more and more about it until you reach #flow state and eventually mastery.
So Rust is actually laid out to be mastered, not just known, which makes everything better.
#Spin is a framework for building, deploying, and running fast, secure, and composable cloud microservices with #WebAssembly:
Wow, so many new #Rust people here!π
Of course, other new people, who don't do Rust, are welcome as well.β€οΈ
How to turn a String into a &'static str?
Box::leak(a_string.into_boxed_str())
Be careful, though, as this causes memory leaks.
In my case, i needed this in the setup of some benchmark test, so not a problem in that case.
Tip for unit testing:
Have a test case that executes your method under test _twice_.
This will account for any side effects or inner state mutation your method has.
(in Rust you pretty much only need to do this, if your method takes &mut self (of course there _are_ exceptions to this like inner mutability etc.))
#Rust just sets a new standard on how programming languages will look like in the future.
#RustLang #Future #ProgrammingLanguage #Programming #TypeSafety #StronglyTyped
#Rust 101 - a tutorial for the Rust programming language by Ralf Jung (2020):
Learn the following functions from the std::mem module in #Rust. They are really useful, if you get into certain borrowing issues:
mem::take:
https://doc.rust-lang.org/std/mem/fn.take.html
mem::replace:
https://doc.rust-lang.org/std/mem/fn.replace.html
Uiiii...maybe we get scoped threads in #Rust soon π€
https://doc.rust-lang.org/nightly/std/thread/fn.scope.html
Tracking issue (8 of 10 tasks resolved):
https://github.com/rust-lang/rust/issues/93203
An implementation of the OPAQUE password-authenticated key exchange protocol - written in #Rust:
Practice #Rust with challenging examples, exercises and projects
Software Development Languages: #Rust - by Colin
https://www.fosskers.ca/en/blog/rust-software-dev
"Rust is a serious tool for Software Development, and not because of its language features, its performance, or how it looks. It's the entire package, and I see myself enjoying it for some time."
cargo-deadlinks
https://github.com/deadlinks/cargo-deadlinks
A #Cargo subcommand for checking your documentation for broken links.
Generate QR code easily for free - QR Code Generation as a Service:
Main library used:
https://github.com/kennytm/qrcode-rust
If you are struggling with #Rust right now, here is a question/tip:
Have you tried to clone() it already?!
As long as your clone army doesn't execute order 66 it's not the end of the wor... galaxy (and I've heard that those clones have a long lifetime)!
Ok, some lovely people have already answered and what it comes down to is this:
Do not use a non-cryptographic hash function for equality comparison! The chance of collisions is just too high (even when combining multiple hash functions).
#CsvDiff will use #blake3 in the future, probably the fastest cryptographic hash out there:
https://lib.rs/crates/blake3
Join the discussion over at the #Rust user forum on how we can fix the mistakes I've made with the #hash function used in #CsvDiff π€¦:
csv-diff:
https://lib.rs/crates/csv-diff
There is a reason, why this crate is still in alpha. π
Passionate Software Developer with an incredible thirst for knowledge, who shares that knowledge with others, so that they can become their best selfs.
Interested in #Rust, #TypeScript, #Node, C# and a lot of other interesting stuff.
Dare to think for yourself.
Striving for technical excellence.