now has almost 66,666 stars on πŸŽ‰

Come on little crabbies, we can do it!πŸ¦€

πŸ˜„

So what has come to my mind recently is this:
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 .

These new concepts make you curious! You want to learn more and more about it until you reach state and eventually mastery.

So Rust is actually laid out to be mastered, not just known, which makes everything better.

is a framework for building, deploying, and running fast, secure, and composable cloud microservices with :

github.com/fermyon/spin

Wow, so many new 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())

play.rust-lang.org/?version=st

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.))

Learn the following functions from the std::mem module in . They are really useful, if you get into certain borrowing issues:

mem::take:
doc.rust-lang.org/std/mem/fn.t

mem::replace:
doc.rust-lang.org/std/mem/fn.r

Software Development Languages: - by Colin

fosskers.ca/en/blog/rust-softw

"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."

If you are struggling with right now, here is a question/tip:

Have you tried to clone() it already?! :rust_thinking:

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)!

? ?

was invented around 1973.
hit version 1.0 in 2015.

These are 42 years.

Conclusion: Rust is the answer to life, the universe and everything.

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).

will use in the future, probably the fastest cryptographic hash out there:
lib.rs/crates/blake3

Show thread

Join the discussion over at the user forum on how we can fix the mistakes I've made with the function used in 🀦:

users.rust-lang.org/t/using-ah

csv-diff:
lib.rs/crates/csv-diff

There is a reason, why this crate is still in alpha. πŸ™ˆ

@rust_discussions

Show older
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!