[rust-dev] Debugging rust for a newbie

2014-07-23 Thread Urban Hafner
Hey there, I'm still quite new to Rust. Until now I was able to fix all my bugs by writing tests and/or randomly adding lifetime parameters to keep the compiler happy. Now I've hit my first stack overflow. I assume it's due to the fact that I've screwed up the lifetimes and the objects live too

Re: [rust-dev] Debugging rust for a newbie

2014-07-23 Thread Urban Hafner
/src/engine/mc/mod.rs#L82 - Playout::run calls Playout::gen_move https://github.com/ujh/iomrascalai/blob/88e09fdd/src/playout/mod.rs#L42 - Playout::gen_move calls McEngine::gen_move https://github.com/ujh/iomrascalai/blob/88e09fdd/src/playout/mod.rs#L49 Huon On 23/07/14 17:42, Urban Hafner

[rust-dev] StrBuf and regular expressions

2014-05-26 Thread Urban Hafner
Hello there, I just updated the compiler (I use the git master branch) and now when I read in a file I get a StrBuf instead of a ~str. That is easy enough to change, but how do I use regular expressions now? I have the following in my code: let re = regex!(rSZ\[(\d+)\]); let captures =

Re: [rust-dev] StrBuf and regular expressions

2014-05-26 Thread Urban Hafner
try to use `str` where possible, only resorting to `StrBuf` when absolutely necessary (for example, when you need to accumulate a string dynamically). All APIs should also take `str` when possible. 2014-05-26 11:31 GMT+04:00 Urban Hafner cont...@urbanhafner.com: Thanks guys, I now use as_slice

[rust-dev] No stdout in test builds?

2014-05-26 Thread Urban Hafner
Hey everyone, still me, the Rust newbie ;) Coming from Ruby I use TDD quite heavily. For my toy rust project I've setup my Makefile in such a way that it first compiles and runs a test build before compiling the real executable. When trying to debug a failing test I tried putting println!

Re: [rust-dev] No stdout in test builds?

2014-05-26 Thread Urban Hafner
. If you pass the --nocapture option to the test binary, it will disable this behavior and println will print to the terminal by default. On Mon, May 26, 2014 at 10:21 PM, Urban Hafner cont...@urbanhafner.com wrote: Hey everyone, still me, the Rust newbie ;) Coming from Ruby I use TDD

Re: [rust-dev] Needed Small-to-Medium Projects

2014-05-19 Thread Urban Hafner
You are much more altruistic than me Aaron ;) I just started my own projecthttps://github.com/ujh/iomrascalaithat probably adds nothing to the eco system. If you don't find something to work on you could just join. I'm also a Rust newbie and so is the other dev (although he knows more about it

[rust-dev] How to compile large programs

2014-05-05 Thread Urban Hafner
Hey all, a question from a Rust newbie here. From languages like C or C++ I'm used to being able to compile each file separately into object files to speed up the compilation process. In Rust that doesn't seem to be easily possible. I tried to simulate it by compiling each module into a separate

Re: [rust-dev] How to compile large programs

2014-05-05 Thread Urban Hafner
...@gmail.com wrote: On 05/05/14 03:36 AM, Urban Hafner wrote: Hey all, a question from a Rust newbie here. From languages like C or C++ I'm used to being able to compile each file separately into object files to speed up the compilation process. In Rust that doesn't seem to be easily