"Teaching is a humbling and deeply educational experience, and I cannot recommend it enough!"
--Jon Gjengset.
Thank you, Jon, for giving your time, expertise, and energy to write a masterclass on Idiomatic Rust. I've always admired your knack for teaching and hope to do the same.
I just finished studying Rust for Rustaceans by @jonhoo.
After studying the Rust Book, like @davidtolnay said in the preface, I noticed a knowledge gap between concepts explored in TRPL (The Rust Programming Language) Book (a.k.a., the Rust Book) and terminology in the std library and Rust Reference. I wanted to close that gap, to truly understand, because I've come to LOVE Rust. I wanted to leave no stone unturned. I found the best 2nd book after the Rust Book (goes without saying, I highly recommend).
As advised, in Chapter 13, Jon, I'll learn by teaching too. In the coming days, I'll share blog posts and hopefully hold live sessions where I debunk the myth that "Rust is too hard." Chipping at topics bit by bit.
It used to be that if you wanted to learn the inner workings of computer programming that'd tell you to learn C. Today, I'd tell you to learn Rust. Rust teaches you to appreciate the power you wield when you write, build and run a computer program. Yes, it is complex, but "complex is better than complicated." It might take some getting used to, yes, but with time and focus anyone can master the language and that's what I hope to do.
PS. Thank you @OReillyMedia for access to a plethora of golden technical resources. Thank you @timoreilly. That's two Rust books in 3 months! Grateful.
I've finished studying the Rust Book 🦀 (also known as The Rust Programming Language Book) by Carol Nichols and Steve Klabnik. Precisely, the interactive version by C.S. Brown University, (also known as the Rust Book experiment) which is available online for free via the link: https://t.co/PRps6DTSh0
Think of yourself as an LLM.
Every social interaction, every meeting, burns your tokens.
Unless someone is a paid subscriber to your attention, you are under no obligation to answer low-quality prompts.
“We’ve done the analysis, reusable rockets aren’t economic.”
SpaceX makes reusable rockets economic.
“We’ve done the analysis satellite internet isn’t economic. The antenna alone is tens of thousands of dollars. The cost to manage a constellation that size, the radiation, the space hardened solar cost…”
Satellite internet appears to be a very good business with antennas in the $100 range.
“We’ve done the analysis, orbital data centers aren’t economic. The radiators, launch costs, the radiation, the solar…”
You are here.
🔥 Hot out of the oven: we ported Wasmer's 7-year-old Django backend to Rust.
The result:
• 220 CPUs → 24
• 800 GB RAM → 64 GB
• p95 API latency: 120ms → 30ms
• Query timings: 5–10x faster
• Startup: >60s → ~1s
Django served us well. Rust is powering what comes next! 💪
Using impl Trait in the return position is one of Rust's most useful features for library authors.
It allows you to change the concrete type without breaking semver.
e.g. `fn printable() -> impl std::fmt::Display` would enable you to return anything that you want that implements Display.
one of the quotes i find most inspiring on a hard day:
"Whatever your hand finds to do, do it with all your might, for in the realm of the dead, where you are going, there is neither working nor planning nor knowledge nor wisdom"
Ecclesiastes 9:10
I don't know who needs to hear this, but most things in life are way more achievable than you think. If you decide what you want, and go after it with full effort and intensity, the world will bend to your will far more easily than you might think. You can just do things.
Rust 1.96 is out!
My favorite change is the new core::range::* types.
Today in Rust, 0..10 still creates the legacy range type.
The thing is: that type is also an Iterator, so it has iteration state. Once you start consuming it, it changes:
let mut r = 0..3;
r. next(); // Some(0)
r. next(); // Some(1)
And this is why making it Copy would be kind of dangerous, because you would be copying something that also has internal iteration state, which can get confusing pretty fast. The new core::range::Range fixes this by separating the idea of “a range” from the act of iterating over it.
It uses IntoIterator instead of being an Iterator directly, and now a range can behave more like plain data: just start and end.
This makes it possible to store ranges inside small Copy types, like spans, slice accessors, parser tokens, compiler ranges, editor selections, and similar stuff.
Small change, but very Rust!
Rust + databases just got better. SQLx 0.9.0 is out. 🦀
Highlights:
→ New sqlx.toml config : multi-database and multi-tenant setups made easy
→ SqlSafeStr trait : SQL injection safety baked into the type system
→ smol & async-global-executor runtime support
→ SQLite extension loading at compile-time
→ MySQL collation bug finally fixed
→ Repo moving to a new org: https://t.co/JLqTvWoDYz
🔗 https://t.co/fC1A7XB2T5
#Rust #RustLang #SQLx #Database #OpenSource #BackendDevelopment
@tomilola_ng One question: how do you maintain the "used" BMW vehicle with your LinkedIn job payout?
That 75M investment should remain untouched for the next 3-5yrs. I'd advise instead that you buy a durable Toyota corolla, manage your pride, be content and allows yourself space to grow.
Today was the end of the humiliation ritual.
Feels like we sacrificed our souls and this season, for upcoming years of Alonso ball and hopefully a serious Chelsea.
Take the punches and L’s of this season, like men.
We will be back.
I have talked with thousands of developers. One thing many of them have in common is that they worked very hard for a period of their life: 3, 6, or 12 months. This paid off later. If you are in this phase, remember that you do not have to do this forever, just for a while.
Bun in Rust is better than the original, and it’s going to keep getting better.
We fixed a lot of bugs inherited from the original. We’re fuzzing a lot more.