24 days of Rust - slow_primes

Important note: this article is outdated! Go to http://zsiciarz.github.io/24daysofrust/ for a recent version of all of 24 days of Rust articles. The blogpost here is kept as it is for historical reasons.

When I start learning a new programming language, I like to code at least several solutions to Project Euler problems. These are very math-oriented and may not be the best introduction to general purpose programming, but it's a start. Anyway, it's just fun to solve them! (...and way more fun to solve them in a fast way and not by brute force.)

Czytaj dalej »
Napisane 2 grudnia 2014

Beginning Rust - solving Euler problem #1

Rust is a relatively new programming language (first alpha released in 2012) which recently caught my attention. Although I'm mostly a Python hacker and Web developer, I still do lower level coding from time to time, including some open source work in C++. Besides, I enjoy the elegance of Haskell; the functional approach to solving problems is quite enlightening. Where does Rust fit into that? The language is still a work-in-progress territory (as of this post the current version is 0.10), but there are already many interesting features. Memory safety, strong typing (with type inference), pattern matching and a slick concurrency model are just a few of those. Let's jump in!

Czytaj dalej »
Napisane 27 kwietnia 2014