- 116
- 489 600
Dario
United States
เข้าร่วมเมื่อ 18 มิ.ย. 2020
We build REAL software projects in Rust, Raspberry PI, Oculus.
Why API Documentation is Crucial: Avoid These Common Mistakes!
Are you struggling with building a distributed system? Learn why creating a swagger document or an open API is crucial for defining the contract between your devices and backend.
1:05 fake reasons not to add api documentation
1:50 What agile actually means
2:26 Not testing your software is stupid
4:17 writing parametrized tests in rust
1:05 fake reasons not to add api documentation
1:50 What agile actually means
2:26 Not testing your software is stupid
4:17 writing parametrized tests in rust
มุมมอง: 162
วีดีโอ
Embedded Rust: Streaming Accelerometer Data Over UDP
มุมมอง 67414 วันที่ผ่านมา
Learn how to broadcast accelerometer data over UDP using Rust on a Raspberry Pi in this tutorial. Dive into the world of embedded Rust and networking with this hands-on project! I also discuss why using UDP broadcasting might help you to build better distributed systems. #rustlang #udpbroadcast #raspberrypi Chapters 0:42 System Diagram: Controlling accelerometers with rust 2:22 Code: How to con...
Controlling a DC Motor with Rust: The Easy Way
มุมมอง 64314 วันที่ผ่านมา
In this complete guide, we'll show you how to control a DC motor using Rust programming language with PWM. Perfect for those interested in embedded Rust and motor control! 1:40 The Simplest way to control a DC Motor With Rust 4:02 How to create a PWM control with Rust and a Raspberry PI 5:08 Visualizing a PWM controller written in Rust #rustlang #embeddedprojects #raspberrypi #pwm
Rust: Pushing Limits with 100 Hz Accelerometer Control
มุมมอง 1.2K28 วันที่ผ่านมา
Watch this exclusive preview of controlling 3 accelerometers with Rust! Learn how to code with Rustlang and integrate ADXL345 accelerometers into your projects.
Python vs Rust: This Will Get Ugly
มุมมอง 2.6Kหลายเดือนก่อน
Are you trying to decide between #rustlang and #python for your next project? Look no further! In this video, Dario Lencina, staff engineer compares the two programming languages in terms of, syntax, readability, and ergonomics. Whether you're a seasoned developer or new to the scene, this video has something for everyone. So sit back, relax, and let us help you make an informed decision on Rus...
The Truth Behind Scientology's Mind-Reading Tech
มุมมอง 653หลายเดือนก่อน
The Truth Behind Scientology's Mind-Reading Tech
Mastering Rust in VS Code, Speed Up Your Workflow
มุมมอง 4132 หลายเดือนก่อน
Mastering Rust in VS Code, Speed Up Your Workflow
Uber Driver Abandons Me Mid-Ride! (What Happened Next)
มุมมอง 1.2K4 หลายเดือนก่อน
Uber Driver Abandons Me Mid-Ride! (What Happened Next)
WebRTC vs WebTransport: What's the difference?
มุมมอง 1.3K4 หลายเดือนก่อน
WebRTC vs WebTransport: What's the difference?
How to Build an MVP for Startups + Real Examples
มุมมอง 4718 หลายเดือนก่อน
How to Build an MVP for Startups Real Examples
Not Adding This Technology To Your Rust App Is Irresponsible
มุมมอง 8679 หลายเดือนก่อน
Not Adding This Technology To Your Rust App Is Irresponsible
We just released our rust teleconferencing system for free
มุมมอง 4.1K10 หลายเดือนก่อน
We just released our rust teleconferencing system for free
I Called Mom From 2000 Miles Away Using My Rust WASM App | Priceless Reaction
มุมมอง 1.3K11 หลายเดือนก่อน
I Called Mom From 2000 Miles Away Using My Rust WASM App | Priceless Reaction
We Built a Video Conferencing System in Rust & WASM
มุมมอง 7K11 หลายเดือนก่อน
We Built a Video Conferencing System in Rust & WASM
We built an AI that’s can actually code using the OpenAI API
มุมมอง 933ปีที่แล้ว
We built an AI that’s can actually code using the OpenAI API
My code is 1000x SLOWER than ChatGPT, Here’s Why
มุมมอง 1.1Kปีที่แล้ว
My code is 1000x SLOWER than ChatGPT, Here’s Why
Bye WebSockets! Boost Web Comms with Rust and WebTransport
มุมมอง 8Kปีที่แล้ว
Bye WebSockets! Boost Web Comms with Rust and WebTransport
Rust vs Java: A Staff Engineer's perspective
มุมมอง 10Kปีที่แล้ว
Rust vs Java: A Staff Engineer's perspective
Why Rust is the Quickest at Fixing Security Holes
มุมมอง 704ปีที่แล้ว
Why Rust is the Quickest at Fixing Security Holes
Pair Programming: Adding Screen Share to our Rust Zoom Clone
มุมมอง 1.4Kปีที่แล้ว
Pair Programming: Adding Screen Share to our Rust Zoom Clone
Why Rust is BETTER than C for programming
มุมมอง 1.6Kปีที่แล้ว
Why Rust is BETTER than C for programming
Rust made it into the Linux kernel, after all the drama
มุมมอง 2.7Kปีที่แล้ว
Rust made it into the Linux kernel, after all the drama
Build Server Side OAuth in Rust with Actix and Yew
มุมมอง 1.9Kปีที่แล้ว
Build Server Side OAuth in Rust with Actix and Yew
How to Build a Full Stack Rust App Using Yew and Actix! - Part 4: Server Side OAuth (GRAMMARLY)
มุมมอง 1.8Kปีที่แล้ว
How to Build a Full Stack Rust App Using Yew and Actix! - Part 4: Server Side OAuth (GRAMMARLY)
"Arc<Mutex>" is exactly why I strongly dislike Rust. I know how semaphores work, I know how automatic reference counting works. This looks like a type declaration, but I have no idea what "Arc<Mutex>" actually is. I know some 20 programming languages and cannot even guess what this is. I can see how you can get to love Rust just by using it long enough. Just like with Objective-C or perl. But is that really necessary? Why are these guys making it so hard? Objective-C did it because it comes from C and Smalltalk, no wonder the result is strange. Perl comes from the shell, awk and regexp - ok, get it. What is Rust's excuse?
I used Java a lot in the past and it was never the greatest pain in any project. It is noisy and requires to write quite a lot of boilerplate to setup dependency code, but you get a lot of high quality functionality for free that you won't easily find in other ecosystems. You occasionally run into problems with memory leaks and concurrency, but once you understand the typical causes, this is manageable. Java is often slower than compiled and optimized code, but I very rarely saw that being a real problem. That being said, I don't see that Java has any substantial advantages over more modern languages like Rust, Go, Zig, or Swift, unless you need the pool of high quality libraries available for Java. Of these modern choices, I like Zig best, because it is the least opinionated offering the best compatibility to the C family of languages. It has the potential to become the fastest language with the least overhead, maybe with the exception of Mojo and it is much less perly (really don't like the quirkiness of Rust). I find Rusts borrow checker problematic, because it's by far not as intuitive as garbage collection (just ignore memory management in most cases), creating quite a bit of learning overhead and managing non-local life-times is hard. Zig's approach to manual management is really nice, solving most problems through convention and static analysis while providing full control making this a practically viable model. Swift has an efficient reference counter not requiring garbage collection, which is ok but not great. What I love about Zig is that you maintain full control over everything and still have a lot of comfort, productivity and sufficient safety (the last is debatable, that's my opinion)
Prior Planning Prevents Piss Poor Performance. PPPPPP.
Has anyone tried to do this for an aerial drone?
Hey Christos I saw complete startups being created under this idea. By the same token I just tried the dji 4 pro and man they are awesome!!
Good one!
Thanks mate
Is there anything you wish I covered?
Nice video bruh this is very interesting to be my holiday project
Yaaaas!! I am so happy, you made my day with your comment 🤗🤗
i hope someone could show this to Moroccan gov digital infrastructure builders
Hahaha I would be happy to call them out 👀 do they have a Twitter account?
@@dario.lencina i am not sure if they even check their inbox
I wanted to generate openapi docs automatically by struct proc macro, but failed. Still writing path to generated route docs by myself. (Utoipa crate)
Whoa!! I love that!! Which backend are you writing the macro for?
@@dario.lencina its rust proc macro crud generation for postgresql table. axum + utoipa + sqlx + serde
The source self-documents.
Sure if you integrate API documentation generation into your code then that is awesome, is this what you are referring to?
@@dario.lencina Nah. Anybody could figure it out.
@@retheisen well it seems like you are a bit lazy?
the code: github.com/security-union/embedded-rust-projects-to-inspire-you/tree/v1.1.0
Just what I was looking for! Leetcode is full of tasks for such a list. Thanks!
OMG, so youre not a "React JS Engineer" from a bootcamp of 3 months, thats really sad.😂
XD it is, I wish I had the privilege
@@dario.lencina Sorry, only a few people have the privilege of being called "Engineers" on LinkedIn due to their amazing capacity to use any JS or Python framework. LOL XDD
Great video! :)
Thanks my friend!!
can you make tutorial how you add your code in raspberry pi please sir
I have good news! I describes one of the methods here: th-cam.com/video/MxUSSunT-yk/w-d-xo.htmlfeature=shared
@@dario.lencina thank you sir
so we make protobuf using docker ?
@dioalif1563 we do! And we generate c# and rust for unity and cargo respectively
@@dario.lencinasir can you explain how can i install protobuf to raspberry pi im so very confused 😢
Here's the code: github.com/security-union/rust-projects-to-inspire-you/tree/v1.0.1
"You were the chosen one! It was said that you would destroy the Sith, not join them!" - about using c library in rust
XD I know I feel bad too!! Is just that the underlying infra of Linux is all C 😭😭
Btw I’ll make a video about this, where I built a POC of gpio purely in rust
You are inspiring me 🤗🤗
@@dario.lencina Are you an embedded engineer or electrical engineer?
@kenzo3477 embedded electrical turbo chad engineer 🤗🤗🤗😹😹😹
How do I unlock 🔓 it
Hello: long story short that lock protects you 🤗🤗 it can’t be “unlocked” meaning, encryption can’t be disabled and that is a good thing
🤯
👏😱😱
Pero y le vídeo de los sensores donde quedó apá? jajaja
Tuve un problema y lo tuve que poner privado :( estoy esperando que ese problema :( muchas gracias por preguntar máster y una disculpa por la molestia
0.15ms vs 22ms vs 177ms, I think we know the winner performance wise
🦾🦾we do indeed mate
I think the ADXL 345 can handly reach 4kHz sampling rate in FIFO mode.
Nice! I thought that you could get 3200Hz max, would you mind sharing the rest of your config?
I am quite new to Rust and have only used ready made libraries for MPU6050 in arduino using C. I'm having a hard time understanding how fast this is, compared to the libraries that I have mentioned. Also, how different is the ADXL compared to the MPU. I apologize if I'm missing context here but can you inform me? I'm planning to use an IMU for a wheeled biped project and this info might be useful.
I am shopping with my mom but I’ll get back to you asap!!
Hello, It's great that you're exploring different sensors for your wheeled biped project! I'd be happy to help clarify the differences and the performance aspects. MPU6050 vs. ADXL Sensors: Regarding the sensors, the MPU6050 and ADXL series (like ADXL345) are somewhat different in their capabilities. The MPU6050 is a 6-axis IMU, which includes a 3-axis accelerometer and a 3-axis gyroscope. This allows it to measure both acceleration and rotational motion, which is particularly useful for balancing applications in robotics. On the other hand, the ADXL series typically includes accelerometers only. For instance, the ADXL345 is a 3-axis accelerometer, which means it does not provide gyroscope data. It measures linear acceleration but won’t be able to measure rotation on its own. Performance and Libraries: In terms of speed, Rust's performance is generally comparable to C, owing to its ability to operate at a low level with efficient memory use. This means that if you're switching from C to Rust, you should expect similar execution speeds. However, the actual performance can also depend on the specific libraries and how they're implemented. I hope this helps, and feel free to ask more questions as you progress with your project!
Hey! I'm not that familiar with Rust but in the code I see you have a 10ms sleep in your main loop which would limit you to the 100hz sample rate you're getting, would be interesting to know if you'd be able to get even faster results if you lower the sleep duration? And also, in your video you're logging the results (can't seem to find the logging in your code though so might be a log-breakpoint you set?), from previous experience with C# logging would limit the processing speed quite a bit when ran on the same thread as whatever code was running since it would be blocking Anyways, pretty cool!
Yes! I was throttling myself I removed that code and instead o am streaming the data over udp 🤷♂️🤷♂️🤷♂️
@@dario.lencina Yeah I noticed the UDP communication code, that makes sense then! Really curious to see what the upper limits would be without any delay hehe
Heck yeah, I am putting together a serious benchmark for the long form video
Here's the code: github.com/security-union/rust-projects-to-inspire-you
In Rust, accelerometer controls you! Btw, SPI is Serial Peripheral Interface. If you say Serial Port, most embedded guys would thing you're reffering to U(S)ART / RS232
Thank you for pointing out the distinction! I appreciate the clarification about SPI (Serial Peripheral Interface) and its differentiation from serial ports typically associated with UART or RS232. It's crucial to use precise terminology, especially in technical discussions like these, to avoid any confusion. Thanks for keeping the details sharp!
Thanks for the shout out brother! Excited to build.
Your project is next, I am ramping up production for the season bro
Dario, you are the best!! Thank you!
Thanks mate 👏👏what are you working on?
@@dario.lencina Hello Dario! I made an application on rust + yew, similar to Google Docs, where several people can change one document, I used the WebRtc protocol. Then I saw a video on your channel where you taught how to capture video from a web camera (for some reason I didn’t find this video on the channel now) and I thought that I needed to add video conference functionality to my site, I also implemented video transmission using the protocol WebRtc. Everything worked out, everything works. Now I want to implement all interaction via WebTransport, using your libraries and tutorials. Next, I want to compare the scalability performance of WebRtc and WebTransport. Dario, thank you for the amazing things you do!
@@dario.lencina Hello Dario! I made an application on rust + yew, similar to Google Docs, where several people can change one document, I used the WebRtc protocol. Then I saw a video on your channel where you taught how to capture video from a web camera (for some reason I didn’t find this video on the channel now) and I thought that I needed to add video conference functionality to my site, I also implemented video transmission using the protocol WebRtc. Everything worked out, everything works. Now I want to implement all interaction via WebTransport, using your libraries and tutorials. Next, I want to compare WebRtc and WebTransport in terms of performance and scalability. Dario, thank you for the amazing things you do!
@@dario.lencina Hello Dario! I made an application on rust + yew, similar to Google Docs, where several people can change one document, I used the WebRtc protocol. Then I saw a video on your channel where you taught how to capture video from a web camera (for some reason I didn’t find this video on the channel now) and I thought that I needed to add video conference functionality to my site, I also implemented video transmission using the protocol WebRtc. Everything worked out, everything works. Now I want to implement all interaction via WebTransport, using your libraries and tutorials. Next, I want to compare WebRtc and WebTransport in terms of performance and scalability. Dario, thank you for the amazing things you do!
@@dario.lencina Hello Dario! I made an application on rust + yew, similar to Google Docs, where several people can change one document, I used the WebRtc protocol. Then I saw a video on your channel where you taught how to capture video from a web camera (for some reason I didn’t find this video on the channel now) and I thought that I needed to add video conference functionality to my site, I also implemented video transmission using the protocol WebRtc. Everything worked out, everything works. Now I want to implement all interaction via WebTransport, using your libraries and tutorials. Next, I want to compare WebRtc and WebTransport in terms of performance and scalability. Dario, thank you for the amazing things you do!
hello friends, this video really helped me and I wanted to ask what the function of protobuf is for this RC
And the i want ask again can i code this raspberry pi with windows cause i dont have a ubuntu
Yes you can sir!! You can use VSCode over ssh
My wrist got hurt just by watching this
Quick, switch to tenting before you need a wrist brace for watching videos too! 😄
Have you tried other ergonomic keyboards like the Dygma Defy?
I have tried other split keyboards but not the Dygma Defy, it would be very cool to try it
What's your daily driver?
Thanks to the Kinesis folks for building such an awesome product and allowing me to test drive it!
How does this compare to livekit ?
Our stuff is much more r&d, from what I saw livekit is a turnkey solution. We use webtransport while they use webrtc.
Why is the video moving like that? I’m interested in your content but found it hard to watch.
Hey mate I know what it is, I am using the opus app to create clips and it messed up, I’ll get it fixed
I am just getting into coding and am trying to pick a language to learn. I have only a hobbyist level of attention but it feels like I want to try making things that do things. Possibly get into a bit of AI, but I'm not sure yet. It seems like Rust, Python, and JavaScript are the best options for what I'm looking for. (But I'm not sure so feel free to suggest something else) From my current understanding, Rust is an "operating system" level code that gives me an efficient way to set things up. Not sure it will be good for application stuff. Python is a very widespread language that's pretty general purpose. Kinda a happy medium between what feels like hard core code and stuff that regular folks in interact with. JavaScript is the English of the coding world. It's the most widespread language and its pretty good for making things that interact with actual people rather than computer to computer or within the same machine. Is it possible or practical to learn multiple languages? I see him doing both here but I'm just a hobbyist.
Hey @themarshmellowLife if your main interest is AI, python with PyTorch is the workhorse to get on for sure. Despite my strong opinions, as a hobbyist you want to build stuff without taking thousands of hours and I feel that python will get you what you want.
This is my endless cycle as a SWE, going from scripting languages to compiled languages and back again lol. I love lua, fennel, python but as soon as the project grows just slightly... well. I've found Go to have the best of both worlds, it feels like a scripting language to me, but it's compiled.
Without a doubt Go is super dope!! The cool thing is that on each iteration (going from interpreted languages to compiled and viceversa) is that languages and tooling gets better.
@@dario.lencina you tell me! We have type annotations now in Lua thanks to sumneko, type hints in python... And it'll keep getting better
5:58 the python implementation is actually shorter. 12 lines vs 13, you just counted 2 empty lines at the end of the python program i know this is nitpicky, but counting lines like this is nitpicky in the first place, and you overcounted by like 20% - and you're also counting the assert, which isnt required
Hey @danielschmider5069 thanks for your feedback, so I have the code in front of me and I am counting 7 lines in python (without the assert) and 5 in rust including the match curly braces: tbh they are similar imo ``` match n: case 0: return 0 case 1: return 1 case _: return fib(n- 1) + fib(n-2) ``` vs ``` match n { 0=> 0, 1=> 1. _ => fib(n - 1) + fib(n-2) } ``` Am I doing something wrong?
2:45 I feel like thats just not a valid argument, you can use a language server for python in vscode. If you enable it you'll get the following errors > Function with declared return type "int" must return value on all code paths Pylance(reportReturnType) [Ln 1, Col 20] "None" is incompatible with "int" A Expression value is unused Pylance(reportUnusedExpression) [Ln 7, Col 9]
as long as you set the type checking to at least basic in the settings.json { "python.analysis.typeCheckingMode": "basic" }
I hear ya, this is a very fair point, which language server do you recommend?
My python tooling is too basic
I'll make a short clarifying this, it is important to be fair and to get it right.
Pyright for LSP and mypy for static checks
I love that rust don't have inheritance, because I hate it 😂
Yeah!! It makes it damn hard to track where a particular method comes from, those inheritance trees can get pretty gnarly
How do you like rust so far?
@@dario.lencina sso far i like it and i'm getting comfortable with it
@hamdysaadpersonal nice!!
@hamdysaadpersonal good to know mate!!
Rust is not an OOP language. While you can write in OOP style yet it's not recommended. In Rust, you should prefer composition (via Traits) over inheritance (like in Python).
Thanks for your comment! Object-oriented programs are made up of objects. An object packages both data and the procedures that operate on that data. The procedures are typically called methods or operations. Under this definition, then, Rust is object-oriented: structs and enums have data and impl blocks provide methods on structs and enums. Yeah in Rust we use composition and we don’t have inheritance 🤷♀️🤷♀️🤷🤷🤷♂️
@@dario.lencina it's a long form debate on if rust is oo, mostly the debate comes because rust fundamentally is oo and yes you can write oo things but rust approaches the concept of oo differently than any other oo language so the answer of if rust is oo is a "yesnt"
Gotcha, 🙌🙌
Python is the Yin to Rust's Yang. They compliment each other's weaknesses almost perfectly.
Agreed! Rust Can learn about ergonomics from python and python could take some memory management ideas from rust!!
You're brave 🎉
I am a bit crazy 💀💀💀 but it was fun to pull a couple all nighters to just move out of python. Thank you so much for your kind comment 🤗🤗🤗
Pythons is VS Code, Rust is Neovim. And youre using VsCode, facts.
Weeeell not sure if I follow your analogy here, rust is not neovim, rust is a programming language and vscode has a great plugin for rust. Do you think that using VSCode will be a big turn off for the rust dev community?
@@dario.lencina It's a good analogy, think also about CPU and memory but in this case, VS Code is a monster while Neovim is efficient. Also, Neovim is harder to learn that VS Code, same for rust vs python.
@ncpeaksean4278 got it, let me look into it, I know that a lot of people is switching over so it is my duty to stay up to date. I do know how to use vanilla vim and eMacs so it should be fine. Do you have a plug-in to use for rust in neovim?
@@dario.lencina rustaceanvim, also with Masón Plugin Manager You can find related tools for Rust development in Nvim.
I write Python in Neovim, I've no idea how to interpret this 😄
Python is a toy, Rust is a Rocket. No doubts, stop it...get some help.
🤣🤣 word, 🚀🧨 it is what it is!
@@dario.lencina and C++ is dynamite 🧨
@@awnion Definitely a heavy hitter as well!!