Mosh does not offer a course on RUST. I don’t expect anyone here to have any insights into it. But I’m going to ask anyway.
As an old-school C, C++, and C# developer, I’ve always enjoyed the mix of elegance and low-level performance those languages provided. This tempted to look into RUST. After a couple days, it just feels like it’s harder and trickier than C ever was. I’m debating if it’s worth the time to learn or not. Just trying to field some opinions from others who may have spent some time learning RUST.
I’ve been playing with Rust off-and-on for a while now, though I haven’t built anything significant with it, so take my opinion with a grain of salt. I found Rust’s learning curve to be very steep up-front. I spent more time than I’d like trying to appease the borrow checker, but eventually I reached a point where things got easier.
I find that the syntax can be clunky and can produce overly-verbose and less readable code, IMO. My development speed was also much slower than with other languages I’ve used, with the possible exception of Scala.
That said, I do like the large and active ecosystem of amazing FOSS software, the modernity of the language, its excellent build and dependency management system (Cargo), and the compile-time memory safety guarantees. But then again, I haven’t written any C code in years and am certainly no expert at writing memory safe C, so if you’re proficient with C, YMMV.
If Rust doesn’t appeal to you, there’s another new “bare metal” language called Zig. It also focuses on memory safety, but seems more ergonomic to me than Rust. Zig is still very new and is still missing some basic things (e.g. a package manager) that limit its usefulness for the time being. And it definitely doesn’t have the community or ecosystem of Rust, but once it gets to 1.0 it could be a better match for those familiar with C. I haven’t used it much, but it’s on my list to dig into. Check out this article comparing and contrasting both languages and discussing the the pros/cons of each.
Did you have any projects in mind when you started learning Rust, or just curious about it?
I don’t have any projects in mind. I just enjoy learning. I would say my truest objective is to explore what’s new regarding low-level programming. I honestly can’t even think of a project. I heard rust was a good emerging candidate to replace C. So I checked it out. Haven’t looked at anything else yet. Will explore your suggestions.
Since I’m an old retired guy now, I will probably never really use anything low-level again. React/ts and Python are probably all I’ll ever use for anything.
Rust does seem like the heir apparent to C for Linux kernel development, but it doesn’t sound like that will happen this decade, so who knows what else might come along in that time.
I just enjoy learning.
Love it. Same here. I eventually want to use Rust for something embedded or network related, but am planning to do some sort of CLI app first to get more practice. But React and TS are pretty darned great as well and can be used to accomplish just about anything.
I’ve thought about doing some embedded stuff, but not sure where to start.
When linux was in early beta, I was developing networking and modem device drivers for it. But none of my code made the cut for kernel v1. :). I created network drivers that could handle multiple IP addresses. But that turned out to be less effective than what they do now.
Then I wrote device drivers for specialized communications cards. With C, I used unions to map all the bits and bytes into an easily addressable structure. That was great.
So with that type of hardware programming background, embedded would be cool. But I haven’t looked at that at all. I have a couple of Raspberry Pis laying around. But no aduinos or anything like that. Would be cool to do some robotics work.
I did write a program for the Raspberry that counted people who passed by. I put it on the door at Costco and counted body traffic. Not very reliable though. The sensor was shite.
Given your hardware programming background I bet you’ll find some interesting uses for Rust with those Raspberry Pis. A robotics project does sound pretty interesting! Maybe something that uses AI/ML. I intend to use a R. Pi to build a proofing box for my sourdough breads/pastries, but kitchen space is a bit tight at the moment, so a kitchen remodel is on the list (once I start working again).
I didn’t get into Linux until '99 in my pre-SWE days when I was working as a unix sysadmin on Solaris machines (desktop and big iron). One day my boss drops off a PC on my desk and tells me to research using clusters of Linux PCs to replace some of our Sun machines. Unfortunately the dotcom bubble hit our company before I got to complete that assignment, but it was fun while it lasted. ¯\_(ツ)_/¯
I’ve been grinding hard on rust. I’m starting to see why people like it. It’s very unlike other languages and some of the tutorials out there are really hard to learn from.
Now I’m using rust to work on leetcode puzzles. It’s a bit more complicated, but run times are 100 times faster than Python code for the same problems.
That’s great to hear! I’ve also found many Rust learning resources to be terse. I assume you’ve tried the resources linked from Learn Rust - Rust Programming Language, but there’s also the interactive Tour of Rust, the Microsoft course, and several youTube courses that I can’t vouch for. Check your DMs - I have a couple of other resources I’d be happy to share.
You just reminded me that I need to start doing some Leetcode drills to prepare for interviews (Hoping the remote work market stays strong). Rust would also be a fun language to implement the classic data structures and algorithms in. I’ve been using TypeScript to implement them for practice (way nicer than using Java, IMO), but I may do a Rust version if I have time.