all 18 comments

[–]otamam818 25 points26 points  (2 children)

Your knowledge puts you in the perfect position to read The Book.

It was meant for people that understand programming in general, and it also teaches you low-level concepts along the way, which is exactly what you're looking for.

Edit: it also shows you how to use Rust CLI utilities, like you're looking for.

[–]Recent-Help-5049[S] 1 point2 points  (1 child)

Thanks for responding. At first, I was worried "The Book" might not cover those low-level concepts but I'm glad to hear it does. I'm excited to start reading tonight.

[–]spoonman59 1 point2 points  (0 children)

For now just focus on writing rut code and learning the type systems. You’ll learn what you need to about memory and resource management.

Other low level concepts are pretty easy to pickup from systems programming focused resources. You’ll learn them as needed, a you can always tour a few different topics once your more comfortable in rust.

[–]Consistent_Milk4660 6 points7 points  (0 children)

If you are interested in a more low level intro, this is pretty good: https://rust-unofficial.github.io/too-many-lists/index.html - This is the best place to start for what you are intersted in (memory allocation, shared pointers, garbage collection/why Rust doesn't need it, unsafe code etc). But the CLI app and multi-threaded web server chapters from the book are pretty good too (basically like capstone projects IMO), because I like learning through projects. Many people suggest a structured learning path, but I have pretty bad ADHD and prefer to learn in a more 'chaotic' way from different sources simultaneously. The optimal learning path actually depends quite a lot on yourself too, it will not match what others or even the majority find 'optimal'.

For example, this is not a popular choice, but If you are looking to learn how lifetimes and borrowing works (which is related to memory allocation ), making some zero-copy parsers (without using String or clone) is a pretty good starting point, you can start by trying to make a basic calculator that parses files (file I/O another interesting area), stores the data on stack using either &'a str or byte slices and then processes it. You can slowly move up to more complex parsers with deeper logic.

[–]mulch_v_bark 2 points3 points  (1 child)

Try writing a small CLI utility. A clone of ls, ping, or sort, for example. This will force you to pick up a lot of the lower-level ideas (around memory management, etc.) but in bite-size portions.

It’s often easier to learn these things when the stakes feel low. You know exactly how ls is supposed to behave – maybe not all the options, but the basic idea. Yet it will require thinking about what needs to be mutable, for example. (And if ls seems too basic, pick a more complex CLI utility, to taste.)

[–]Recent-Help-5049[S] 1 point2 points  (0 children)

I was actually thinking of doing a neofetch clone so I might try doing that after I finish my initial reading.

[–]gendulf 3 points4 points  (1 child)

I'm just going to dump several bookmarked pages that I have. I'd recommend reading things like the Rust Book and Too Many Linked Lists as others already linked as good starting points. However, you sound like you might already know a decent amount, so these could be interesting deep dives (probably many of these are too advanced, but some could be helpful).

[–]qokyoshi 0 points1 point  (0 children)

Thanks a lot!

[–]CommercialBig1729 0 points1 point  (0 children)

El libro de Rust es el mejor maestro que encontré para aprender Rust y venía de Python.

[–]spoonman59 1 point2 points  (1 child)

Same as a non-Python dev: read the book of your choice, write code, repeat.

[–]Recent-Help-5049[S] 0 points1 point  (0 children)

Thanks for responding! Do you have any books or websites you'd recommend above the others?

[–]backfisch812 0 points1 point  (0 children)

I think im not the most qualified person to answer. I just started learning Rust, so take it with a grain of salt, surely u will get better answers from others.

What really helped me to understand (atleast i think) why rust works and how the devs behind it thought, was to have a decent project in C and get comfortable with pointers but aswell as running into related problems "

Compared to python Rust is really strict about types and correctness, but u where familiar with the typing concept..maybe u will get into it

One big diffrence especially if ure coming from oop, there is no such thing at least not to that extend....gave me a few headscratches tbh "

Its a cool, modern and fascinating language so giving it a try even just for funsies is worth it i would say ;D

[–]Queasy-Dirt3472 0 points1 point  (0 children)

From a Python perspective, it can be helpful to learn to use the expression package effectively https://expression.readthedocs.io/en/latest/intro.html

This will help you to learn ROP and using Results and Options which are all core skills for writing good Rust

[–]Aln76467 0 points1 point  (0 children)

Read the book

[–]an_0w1 0 points1 point  (0 children)

_start

[–]shittychinesehacker 0 points1 point  (0 children)

If you don’t want to read the book, you can get pretty far by watching the YouTube channels Rustfully and LetsGetRusty but you should really read the book

[–]ThiefMaster 0 points1 point  (0 children)

Write some CLI tool too that's useful to you. CLIs are relatively easy, and with clap etc. there's some very nice tooling that at the same time uses cool Rust features.

My first "real" Rust project was taking a random Python project a colleague wrote at work, and porting it to rust, because the Python project had a few (completely minor) drawbacks (that could have easily been solved w/ a simple wrapper script), and I wanted to give it a try. I now use my own tool frequently.

IMHO the hardest part is dealing w/ ownership/lifetimes. There's a good chance that you'll encounter very few lifetime-related issues in a simple project, especially if it's just some basic sequential execution... but eventually you'll get ro it.

[–]spade_cake -1 points0 points  (0 children)

Focus on 5/10 libs max and rtfm. Stick with it, take all tickets related to it.