Rust

So I’ve been trying to learn Rust. In all honesty – it’s slow going. I don’t usually have trouble picking up new lanuagues, but learning the basics of Rust reminds me of learning the basics of Haskell. It feels like a completly new paradigm. It is a repacement for the C family, but it definetly isn’t in the C family. I did write a tree clone, by write I mean stare at the documentation until rusty_tree popped out. But rusty_tree is more of a script than a real program. And though Rust is definetly usable as a scripting language, using it how I did to write rusty_tree plays more on Rust’s weaknesses than strengths. I didn’t use traights or the type system at all – Ah! And I spent a lot of time fighting the compiler, in order to write a program that would’ve taken <30min in Python (or BASH if I knew it). And I also spent a long time with weird Unicode bugs, maybe I’ll write about that later. Oh well, I got my feet wet with Rust, so now on to more idiomatic Rust projects.

I’m taking a lot of systems-level classes at school this semester, but unfortunatly they expect us to code in C for Network Programming, and Operating Systems, and C++ for Advanced Computer Graphics. It’s not that I don’t like C/C++, but that I already know a fair amount of those languages, and I think it would be much less boring than writing that systems code in a futuristic language like Rust. From the school’s POV though teaching everyone Rust and Operating Systems etc. would be too much to handle in one class. Maybe doing it this way will allow me to learn the system stuff first and then go back later (this summer) and write some of those assignments in Rust.

I also had the idea that it would be fun to learn Neural Networks by programming a simple one in Rust, after coming across this Typescript simple NN by the TensorFlow guys. Needless to say - I haven’t made any progress on that project yet. :(

But, I have been slowlly learning Rust by keeping up with Rust news and projects, and reading some projects by more experienced Rustaceans (what a fun word). I read through the Snatch source code just before starting this post. I think reading whole Rust projects gives me something that you can’t get from the Docs. Like how traits are used in the context of a problem to leverage the power of the type system, and how errors are handled in a real world scenario.

I still need to finish reading the Book. I think I made it to the section on Attributes.

Written on January 21, 2017