7 posts with tag Rust

Trampolines and algebraic Fibonacci in Rust

Rust does not guarantee tail call optimization. We implement a trampoline and discover that Fibonacci is not about numbers at all.

· 5 minutes reading time

Static lifetimes and factories

Some Rust values, particularly string literals, persist beyond their variable's scope, and how this behavior enables factory-like patterns.

· 3 minutes reading time

Internal rate of return calculation

Deconstructing the math of investment: estimate the annualized rate of return with the IRR algorithm and its Rust implementation.

· 12 minutes reading time

Entering the Battlesnake arena

It's an online game where programs play against each other. My program needs survival strategies!

· 14 minutes reading time

Text scrambler

A text is still readable if you rearrange the letters of every word, but leave the first and last character in place.

· 4 minutes reading time

Working with Rust's num-bigint

Rust is my new programming language project. A problem called for big integers, so my fight with the crate num-bigint began.

· 4 minutes reading time