/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

sdowney.org
| | donsbot.com
3.1 parsecs away

Travel
| | I've been learning Rust for the past twenty days or so, working through the Blandy & Orendorff book, coding up things as I go. Once I got into playing with Rust traits and closures and associated types, the similarities to programming in Haskell with typeclasses, data structures, closure passing and associated types was pretty obvious....
| | quuxplusone.github.io
3.5 parsecs away

Travel
| | Consider the following example of an "STL-style algorithm," taken from a lab exercise in one of my training courses: template<class It> bool is_palindrome(It first, It last) { while (first != last) { -last; if (first == last) break; if (*first != *last) { return false; } ++first; } return true; } A palindrome is equal to itself when read forwards or backwards, so, I said blithely, we could rewrite it like this: template<class It> bool is_palindrome(It first, It last) { return std::equal( first, last, std::reverse_iterator(last), std::reverse_iterator(first) ); } But look out - this code has a bug that causes undefined behavior! Do you see it?
| | www.kuniga.me
2.8 parsecs away

Travel
| | NP-Incompleteness:
| | os.phil-opp.com
17.2 parsecs away

Travel
| In this post, we explore cooperative multitasking and the async/await feature of Rust. We take a detailed look at how async/await works in Rust, inclu