Re: [rust-dev] net::tcp::TcpSocket slow?

2012-12-22 Thread Michael Neumann
Am 21.12.2012 05:17, schrieb Patrick Walton: I just profiled this. Some thoughts: On 12/20/12 9:12 PM, Brian Anderson wrote: First, stack switching. Switching between Rust and C code has bad performance due to bad branch prediction. Some workloads can spend 10% of their time stalling in the

[rust-dev] how to call closures stored in struct slots (a 0.5 question)

2012-12-22 Thread Steve Jenson
In 0.4, I had a struct that stored a fn that I later called as if it were a method. In 0.5, this has ceased. what is the new syntax for calling functions stored in slots? Here's the small code example (please excuse how naive it is): https://github.com/stevej/rustled/blob/master/lazy.rs#L28 and

Re: [rust-dev] how to call closures stored in struct slots (a 0.5 question)

2012-12-22 Thread Tim Chevalier
On Sat, Dec 22, 2012 at 10:27 AM, Steve Jenson ste...@fruitless.org wrote: In 0.4, I had a struct that stored a fn that I later called as if it were a method. In 0.5, this has ceased. what is the new syntax for calling functions stored in slots? Here's the small code example (please excuse

[rust-dev] Question about lifetime analysis (a 0.5 transition question)

2012-12-22 Thread Steve Jenson
I've converted the red-black tree I wrote to use iter::BaseIter but am now fighting with lifetime analysis with the switch to 0.5. https://github.com/stevej/rustled/blob/master/red_black_tree.rs#L91 And the error I'm getting with 0.5 is: http://pastebin.com/YK8v7EdA I've read the docs on

Re: [rust-dev] how to call closures stored in struct slots (a 0.5 question)

2012-12-22 Thread Steve Jenson
Yes, that's it! Are these migration-related questions suited for this list or should I use github issues? thanks again, steve On Sat, Dec 22, 2012 at 10:28 AM, Tim Chevalier catamorph...@gmail.comwrote: On Sat, Dec 22, 2012 at 10:27 AM, Steve Jenson ste...@fruitless.org wrote: In 0.4, I

Re: [rust-dev] how to call closures stored in struct slots (a 0.5 question)

2012-12-22 Thread Tim Chevalier
On Sat, Dec 22, 2012 at 10:32 AM, Steve Jenson ste...@fruitless.org wrote: Yes, that's it! Are these migration-related questions suited for this list or should I use github issues? github issues should generally be for situations where you're pretty sure that rustc/libraries are wrong or

Re: [rust-dev] Question about lifetime analysis (a 0.5 transition question)

2012-12-22 Thread Lucian Branescu
I think the problem is the compiler can't guarantee the managed box will survive, so it won't allow a borrowed pointer. I think there are problems in general with @ and borrowing. I've converted the red-black tree I wrote to use iter::BaseIter but am now fighting with lifetime analysis with the

Re: [rust-dev] REPL is broken in 0.5

2012-12-22 Thread Patrick Walton
On 12/21/12 11:51 PM, Patrick Walton wrote: On 12/21/12 10:42 PM, Patrick Walton wrote: On 12/21/12 10:31 PM, Patrick Walton wrote: All inputs fail with: rust: task failed at 'no mode for lval', /Users/pwalton/Source/rust/master/src/librustc/middle/liveness.rs:1573 I'll look into this;