Adventures in Rust
Jan. 8th, 2014 11:02 pmI'm a *huge* fan of Mozilla Rust the programming language. The short reason is that it's a powerfully typed language with optional garbage collection & ability to call into unsafe code.
I have a playground of data structures (flaky data structures, get the pun? ha ha). I've roughly kept it maintained for about a year now & updated some of it recently to Rust on master.
Wow. So change compared to Rust 0.6.
* No more @ pointer. Now it's rc::Rc, .borrow(), and .clone(). Really tedious.
* Total confusion on my part on how to build traits for things that wind up being rc:Rc'd. Still have no idea. I'll need to sort this out with #rust at some point.
* match(ref foo, ref bar, ref baz) is new. Argh!
Other than that, there are a few oddities but nothing catastrophically weird. Although it was vaguely amusing writing myself an infinite loop by accident, I was able to get the linked list and circular buffers compiling.
Next time I'm looking for low-stress coding & debugging, I'll fix up the binary tree and start work on a 1-dimensional range tree (Data structure #1 in Samet's multi-dimensional data structures book).
I have a playground of data structures (flaky data structures, get the pun? ha ha). I've roughly kept it maintained for about a year now & updated some of it recently to Rust on master.
Wow. So change compared to Rust 0.6.
* No more @ pointer. Now it's rc::Rc, .borrow(), and .clone(). Really tedious.
* Total confusion on my part on how to build traits for things that wind up being rc:Rc'd. Still have no idea. I'll need to sort this out with #rust at some point.
* match(ref foo, ref bar, ref baz) is new. Argh!
Other than that, there are a few oddities but nothing catastrophically weird. Although it was vaguely amusing writing myself an infinite loop by accident, I was able to get the linked list and circular buffers compiling.
Next time I'm looking for low-stress coding & debugging, I'll fix up the binary tree and start work on a 1-dimensional range tree (Data structure #1 in Samet's multi-dimensional data structures book).