Systems programming language that runs blazingly fast, prevents almost all crashes, and eliminates data races.

learn more… | top users | synonyms

4
votes
0answers
65 views

Representing arithmetic in Rust or C++

I need a method to represent basic arithmetic to help me better understand context-free grammar, so I wrote these. Am I writing it the right way? Is there anything that can be improved? Rust ...
2
votes
1answer
43 views

Text formatting with embedded markup for terminal output

I'm learning Rust. I wrote the following library to format text and output it to terminal, so that the formatting markup is embedded with the string itself (looks similar to HTML4). I feel the code ...
5
votes
2answers
867 views

How can I find out why this Rust program to echo lines from stdin is slow?

Given the following Rust program: ...
1
vote
0answers
21 views

Sum of N primes in parallel-ish

I'm primarily a C# guy--day job, most of my hobby projects, etc. Linq's AsParallel() call would be my normal way of doing something like this, but--tragically!--Rust hasn't stolen that just yet... ...
1
vote
1answer
72 views

K-Means in Rust

I have implemented for learning purposes a simple K-Means clustering algorithm in Rust. For those who are not familiar: you are given N points, say in the plane, ...
2
votes
1answer
175 views

Chat console using Ruby and Rust

One of the exercises I like to program when learning a new language is a chat client for the console. I've programmed it in many languages (Perl, Python, C, C++, JavaScript, ...). One of the versions ...
6
votes
1answer
74 views

Project Euler #11“numbers in a grid” in Rust

To learn more about Rust, I implemented Project Euler #11 "Numbers in a grid". Contrary to some people, I prefer not having the actual data grid in my code, so I put it in a file, which I read in the ...
26
votes
1answer
491 views

Shift and merge numbers as in 2048 game code

I started to learn Rust last night. Given its parallelization capabilities, I thought a good starting point would be porting my C++ AI for 2048 to Rust. This is the function implementing the shift ...