GUIDO PETRI

Rust

Rust Logo

As a primer in other programming, I decided to learn a new programming language. Rust seemed like a cool language to learn, since it was being used in so many new applications (such as Firefox and Tor). It's also a very memory-safe language, and (thankfully) doesn't deal too directly with memory allocation and the almighty heap. I also figured it would be good to learn a fast, efficient language, since my current main language is Python - a relatively slow scripting language.

I'm still working my way through the Rust book, and it'll probably be some time before I feel comfortable saying I know Rust very well, but I have high expectations for my knowledge in Rust. I think it'll complement my scripting nicely. My "intro" project for this is a small baseball simulator that can be found on my GitHub.

I actually also ended up implementing OLS regression (as well as regularized via both L1/L2 norms) in Rust. That project can be found here. It was a pretty tough task, since I implemented everything from scratch - elementwise matrix addition, matrix multiplication, a matrix/dataframe object, as well as operations on this object. I took a test-driven approach and it turned out pretty nicely, although I am sure there are better implementations out there.

I also did a few Project Euler problems with Rust; these can be found here. In the process, I also made a few comparisons with Python. Man, is Rust faster! Some of those problems took 100x longer with Python. I'm really enjoying this language so far.