Re: [rust-dev] std::num::pow() is inadequate / language concepts

2014-07-24 Thread Tommy M. McGuire
the standard library classified and marked appropriately > for 1.0. > > > [1]: http://doc.rust-lang.org/master/rust.html#stability How would that solve the general problem? What would the stability of pow() be if Gregor had not brought up the issue now? -- Tommy M.

[rust-dev] Pointer to trait method?

2014-02-14 Thread Tommy M. McGuire
ful, too. -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] Something odd I just noticed with mut and pattern matching

2014-01-16 Thread Tommy M. McGuire
le") } works, while let mut file = File::open_mode(&Path::new("test"), Truncate, Write); match file { Some(mut f) => f.write_str( "hello" ), None => fail!("not a file") } results in a "variable does not need to be mutable&quo

Re: [rust-dev] Borrow lifetime assignment changed?

2013-07-07 Thread Tommy M. McGuire
nd of the block? That is the effect of naming them, right? (I always thought C++'s rule was more of a stunt or joke than a useful rule---it's apparently harder to get right than I thought it was, it's hard to explain to people, and it does nothing useful for me, programming-wise.) -

Re: [rust-dev] Weird performance regression in 0.7?

2013-07-06 Thread Tommy M. McGuire
On 07/06/2013 10:59 AM, Björn Steinbrink wrote: > On 2013.07.06 17:52:00 +0200, Björn Steinbrink wrote: >> Hi, >> >> On 2013.07.06 10:37:49 -0500, Tommy M. McGuire wrote: >>> Previous runs took approximately 6 seconds, but the 0.7 build is 1) >>> taking about

[rust-dev] Weird performance regression in 0.7?

2013-07-06 Thread Tommy M. McGuire
-mmap, which was just recently run with a post-incoming-change build of the master branch. (5 seconds vs. 11 seconds.) Any ideas what is going on? https://github.com/tmmcguire/rust-toys/blob/master/anagrams-hashmap.rs https://github.com/tmmcguire/rust-toys/blob/master/anagrams-hashmap-mmap.rs -- To

Re: [rust-dev] Borrow lifetime assignment changed?

2013-07-06 Thread Tommy M. McGuire
ary vector, which doesn't seem to live long enough for the iterator. If I give the temporary a name, everything works as expected. -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] RFC: conventions for default arguments

2013-05-30 Thread Tommy M. McGuire
On 05/30/2013 10:44 AM, Patrick Walton wrote: > You can add additional bounds to type arguments for a subset of the > methods. Use a different impl block: Cool! I didn't realize that. -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailin

Re: [rust-dev] RFC: conventions for default arguments

2013-05-30 Thread Tommy M. McGuire
o > > Thoughts? I like the idea of the closure, but (as a relative newcomer), how would the Zero trait be specified? Wouldn't it require all HashMap's V's implement Zero? -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] Question about lifetimes in type parameters

2013-05-30 Thread Tommy M. McGuire
On 05/30/2013 05:09 AM, Niko Matsakis wrote: > On Wed, May 29, 2013 at 04:55:31PM -0500, Tommy M. McGuire wrote: >> The problem is that I want to use a completely unrelated vector as the >> argument to find() instead of an alias for part of the buffer or a pair >> of in

Re: [rust-dev] Question about lifetimes in type parameters

2013-05-29 Thread Tommy M. McGuire
On 05/29/2013 04:55 AM, Niko Matsakis wrote: > On Tue, May 28, 2013 at 01:48:55PM -0500, Tommy M. McGuire wrote: >> The problem I am running into is that the type of the LinearMap's find() >> method (Yes, this is 0.6.) is: >> >> fn find(&self, k: &&

[rust-dev] Question about lifetimes in type parameters

2013-05-28 Thread Tommy M. McGuire
to a borrowed pointer to a vector with the same lifetime as the buffer. That argument is kind of difficult to provide. What am I doing wrong? Is there a better way? -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

[rust-dev] Difference between "mod foo" and "extern mod foo"?

2013-04-06 Thread Tommy M. McGuire
arch, called a function from another module, combinations::each_combination, also imported with "mod". Following the move, main calls misc::search, which calls combinations::each_combination, and combinations was imported into misc via "mod" in addition

Re: [rust-dev] library editing

2013-02-28 Thread Tommy M. McGuire
eric pieces like the C++ library or a "batteries included" approach like Python? I assume Rust will need a Big Bag o' Random Libraries, like Hackage or CPAN; do you have any ideas on what the dividing line between pointing at that and accepting something into the distribution

[rust-dev] Faster vec::each_permutation implementation, again

2013-02-08 Thread Tommy M. McGuire
) [1] https://github.com/tmmcguire/rust-toys/blob/master/combinations.rs [2] https://mail.mozilla.org/pipermail/rust-dev/2013-January/002857.html -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] First program?

2013-02-06 Thread Tommy M. McGuire
Thanks for your comments! On 02/03/2013 10:54 AM, Tim Chevalier wrote: > On Sat, Feb 2, 2013 at 12:49 PM, Tommy M. McGuire wrote: >> https://github.com/tmmcguire/rust-toys/blob/master/mk_anadict.rs >> >> For inspiration (and because I have no actual creativity of my own), I

[rust-dev] First program?

2013-02-02 Thread Tommy M. McGuire
@[] quite a bit. Should there be any special preferences for ~[]? Thanks in advance for any comments on correctness, style, idiom. -- Tommy M. McGuire mcgu...@crsr.net ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev