logo
episode-header-image
About this episode

In this episode of Syntax, Wes and Scott jump into part 2 of their look at Rust for JavaScript developers, including variables in Rust, type systems in Rust, signed and unsigned integers, and more.

Show Notes

let x = 5;  // x is immutable let mut x = 5; // x is mutable const MAX_POINTS: u32 = 100_000; // must be defined at compile time 
  • 10:42 Type System in Rust
  • 15:52 Types in Rust
  • 19:06 Why does Rust have signed and unsigned integers?
  • 23:35 Slicing strings with &str
  • 27:35 enum
  • 27:55 struct
  • 28:19 Vec
  • 29:33 HashMap and HashSet
  • 33:00 Converting Signed to Unsigned Numbers
let unsigned_value: u8 = 200; let signed_value: i8 = unsigned_value as i8; 
  • 36:12 What’s up with &str?
  • 43:31 Rust error messages
  • 45:28 What is a Struct?
struct User {    username: String,     email: String,     sign_in_count: u64,     active: bool, }  // You can create an instance of a struct like this: let user1 = User {     email: String::from("someone@example.com"),     username: String::from("someusername123"),     active: true,     sign_in_count: 1, };  impl User {     fn login(&mut self) {         self.login_count += 1;     } } 
  • 49:17 SIIIIICK ××× PIIIICKS ×××

××× SIIIIICK ××× PIIIICKS ×××

Shameless Plugs

Tweet us your tasty treats

Up next
Yesterday
932: Vibe Coding’s Huge Problem
Wes and Scott talk about the dangers of vibe coding when it comes to authentication and access control. They share real-world examples of security fails, discuss how to avoid client-side-only checks, and offer practical tips for protecting sensitive user data in your apps. Show N ... Show More
22m 57s
Aug 25
931: Project Init - How to Make Good Choices When Starting a New Coding Project
Scott and Wes dive into the fundamentals of project initialization and planning, from outlining ideas and choosing the right tools to making smart technology decisions. They also chat about leveraging AI and collaboration to shape better projects before rolling up your sleeves an ... Show More
30m 46s
Aug 20
930: Text Editor Keybindings, WASM Replacing Docker, LLM apathy and hosting mini apps
In this potluck episode of Syntax, Wes and Scott answer your questions about VS Code vs Cursor, navigating promotions and job titles, database fundamentals, avoiding decision paralysis, how AI is shaping frameworks, and more! Show Notes 00:00 Welcome to Syntax! 00:56 Brought to y ... Show More
55m 37s
Recommended Episodes
Dec 2019
Rust: A language for the next 40 years with Carol Nichols
Learn what makes the programming language Rust a unique technology, such as the memory safety guarantees that enable more people to write performant systems-level code. Scott talks to Rust core contributor Carol Nichols about what she's so excited about Rust and the future. 
32m 1s
Oct 2022
Heavy Networking 652: Why Networkers Should Want Routing Protocols Written In Rustlang
On today’s Heavy Networking episode, I talk with Nick Carter about Flock Networks, his routing protocol stack startup, as well as Nick’s love of the Rust programming language. As a network engineer, maybe you don’t think you care about Rust. Nick’s here to explain why the discern ... Show More
1h 11m
Jun 2022
ESLint and TypeScript
Josh Goldberg joins Nick, Chris & a very nasally-sounding KBall for a fun conversation around TypeScript ESLint. They discuss why we need ESLint when we have TypeScript, some useful rules in typescript-eslint, how it works, and a few hot takes along the way! Discuss on Changelog ... Show More
1h 3m
May 2024
They made Python faster with this compiler option
Fundamentals of Operating Systems Course https://oscourse.win Looks like fedora is compiling cpython with the -o3 flag, which does aggressive function inlining among other optimizations. This seems to improve python benchmarks performance by at most 1.16x at a cost of an extra 3M ... Show More
29m 4s
Jun 2024
Episode 75: *Rerun* of The OG Bug Bounty King - Frans Rosen
Episode 75: In this episode of Critical Thinking - Bug Bounty Podcast, Justin and Joel are sick, So instead of a new full episode, we're going back 30 episodes to review.Follow us on twitter at: @ctbbpodcastWe're new to this podcasting thing, so feel free to send us any feedback ... Show More
2h 44m
May 2024
Rust in the Cosmos Part 3: Embedded programming for space (Ep. 256)
In this episode of "Rust in the Cosmos" we delve into the challenges of building embedded applications for space. Did you know that once you ship your app to space... you can't get it back? :P What role is Rust playing here? Let's find out ;)   Sponsors Arctic Wolf Learn what the ... Show More
44m 36s
Jul 2023
Episode 27: Top 7 Esoteric Web Vulnerabilities
Episode 27: In this episode of Critical Thinking - Bug Bounty Podcast, we've switched places and now Joel is home while Justin is on the move. We break down seven esoteric web vulnerabilities, and talk Cookies, Config File Injections, Client-side path traversals and more. We also ... Show More
1h 20m
Jul 2024
Episode 78: Less Writing, More Hacking - Reporting Efficiency Techniques
Episode 78: In this episode of Critical Thinking - Bug Bounty Podcast we’re talking about writing reports. We share some tips that we’ve learned, and discuss ways that AI can (and can’t) help with that process. We also talk about the benefit of using tools like Fabric, Loom, and ... Show More
1h 6m
Mar 2024
AI vs software devs
Daniel and Chris are out this week, so we’re bringing you conversations all about AI’s complicated relationship to software developers from other Changelog pods: JS Party, Go Time & The Changelog.Join the discussionChangelog++ members save 2 minutes on this episode because they m ... Show More
57 m
Apr 2024
A Solid primer on Signals
Ryan Carniato joins Amal & Nick to discuss Solid with a major focus on Signals, which are the cornerstone of reactivity in Solid. Leave us a comment Changelog++ members save 11 minutes on this episode because they made the ads disappear. Join today! Sponsors: Clerk – Clerk is a c ... Show More
1h 28m