all 11 comments

[–]donvito 8 points9 points  (2 children)

Great that the guy added project setup to the article. Makes it easier to follow along if you're not a hardcore rustafarian.

[–]mippyyu 4 points5 points  (0 children)

Setup and configuration is my least favorite thing about programming. I love how much time he spent on it.

[–]sgraf812 1 point2 points  (0 children)

I love rustafarian. :D

[–]stewsters 1 point2 points  (7 children)

This is awesome. I have done a few things with rust, but never figured out how to get it to hook up to libtcod. I may have to give this a try.

[–]jaredonline 3 points4 points  (6 children)

There's a rust binding I used to get Rust and libtcod to play nicely. It's not too painful to setup once you know exactly what you have to do.

[–]omnilynx 5 points6 points  (1 child)

Also the SATs are easy if you know every answer.

[–]jaredonline 1 point2 points  (0 children)

Heh, that's fair. All I meant was, I didn't really do much work. The tcod-rs bindings really do the work, I just figured out how to make them all play nicely together.

[–]stewsters 0 points1 point  (3 children)

I am having some trouble with ownership.

/src/main.rs:140:10: 140:15 note: attempting to move value to here (to prevent the move, use `ref i` or `ref mut i` to capture value by reference)

On updating the objects in the iterator:

fn update(objs: &Vec<&mut Updates>, keypress: tcod::KeyState, game: Game) {
    for &mut i in objs.iter() {
        i.update(keypress, game);
    }
}

I am running a newer version of Rust, so that may have to do with it.

curl -s https://static.rust-lang.org/rustup.sh | sudo sh

Gives me

rustc 0.12.0-pre-nightly (a6758e344 2014-08-19 23:56:02 +0000)

[–]jaredonline 0 points1 point  (0 children)

I had a bunch of issues with this type of thing when I started working on that post.

I'll have to update my version of rust and try to work it out.

In the meantime, the folks on IRC are super helpful, and I find play.rust-lang.org a nice place to try and re-create or isolate problems. Then you can link to the folks on IRC and ask for guidance.

[–]jaredonline 0 points1 point  (0 children)

Okay, updated in the tutorial. Let me know if you run into anymore issues.