Re: [rust-dev] Rustaceans - Rust User Groups

2015-08-11 Thread Sean McArthur
I'd be wary of some of the lists, such as rust-core, rust-bugs, rust-announce, etc, that some may think are official. On Tue, Aug 11, 2015 at 1:38 PM Simon Flynn simon.fl...@financejobs.co wrote: On Tue, Aug 11, 2015 at 10:11:10PM +0200, Simon Sapin wrote: On 11/08/15 16:12, Simon Flynn

Re: [rust-dev] Rustaceans - Rust User Groups

2015-08-11 Thread Sean McArthur
Yes I know. Even just adding `Unofficial' in the description of those lists would help prevent confusion, I think. The 'official' rust-core is https://internals.rust-lang.org On Tue, Aug 11, 2015 at 4:42 PM Simon Flynn simon.fl...@financejobs.co wrote: Mozilla having semi-closed their rust-dev

Re: [rust-dev] Rust Research Project Query

2014-10-08 Thread Sean McArthur
A project I'd love to see (either separate, or eventually baked into the test harness), is test coverage data. Something like how Go's cover[1] works, by adding counters to the source code, seems simplest. I've thought about this, and it could either be a CLI tool, like `rustc --cover --test`, or

Re: [rust-dev] Many-to-many channels

2014-10-04 Thread Sean McArthur
On Sat, Oct 4, 2014 at 1:27 PM, Evan G eg1...@gmail.com wrote: Couldn't you just implement that with a loop and a match statement? Wouldn't that just make the process burn cpu, instead of being able to allow other threads to work? ___ Rust-dev

Re: [rust-dev] std::rand::Rng

2014-09-17 Thread Sean McArthur
On Wed, Sep 17, 2014 at 2:26 PM, Evan Davis cptr...@gmail.com wrote: The problem is that you're trying to use a trait as a type. That shouldn't be a problem. You can use a `mut Trait`, and you'll get dynamic dispatch. ___ Rust-dev mailing list

Re: [rust-dev] FFI: how to deal with different platforms

2014-09-08 Thread Sean McArthur
You can use define the CSIZE a couple times in your file, with conditional compilation: http://doc.rust-lang.org/rust.html#conditional-compilation On Sun, Sep 7, 2014 at 6:03 PM, Fox, Michael michael@caviumnetworks.com wrote: How can FFI work across platforms unless you compile against

Re: [rust-dev] Place for discussions

2014-08-01 Thread Sean McArthur
I went into my account settings for the Rust Discourse, and fiddled with the email notifications such that I get emails for all topics, and replying to the emails works just as with a mailing list. I quite like the HTML emails that are sent also, as it makes code and links and such much easier to

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

2014-07-25 Thread Sean McArthur
On Fri, Jul 25, 2014 at 1:45 PM, Gregor Cramer rema...@gmx.net wrote: How you are doing this? I'm in fact a newbie in Rust, and it's interesting that this can be done. std::num::pow() is a good example, I think. Suppose I already have a program which is using std::num::pow() with a self

Re: [rust-dev] A few random questions

2014-05-28 Thread Sean McArthur
On Wed, May 28, 2014 at 5:38 PM, Oleg Eterevsky o...@eterevsky.com wrote: 3. It seems like almost any string operation requires as_slice(). Can't various string methods be also implemented for String? When writing functions for others to use, you don't want to require them to have a String,

Re: [rust-dev] Array of heap allocated strings for opts_present?

2014-05-26 Thread Sean McArthur
Considering many options would be single characters, it'd seem nice to also be able to pass a slice of chars. It doesn't look like char implements Str. getopts could define a new trait, Text or something, for all 3... On Mon, May 26, 2014 at 2:56 PM, Kevin Ballard ke...@sb.org wrote: I think

Re: [rust-dev] Cryptography Library

2014-05-05 Thread Sean McArthur
There's rust-crypto[1], which has quite a few implementations already. The issue isn't so much that Rust needs crypto code, is that it needs auditing of the code that exists. [1] https://github.com/DaGenix/rust-crypto___ Rust-dev mailing list

Re: [rust-dev] Is it possible to implement extension methods on existing traits?

2014-04-05 Thread Sean McArthur
I can't say why the immutable argument error is happening, but there's another error in that function. You're using a `Writer`, but Writer doesn't have `write_my_string`, only `MySerialization` does. I'd write that like this: fn save_toT: MySerialization(self, writer: mut T) - io::IoResult() {

Re: [rust-dev] Refactor json.rs

2014-03-23 Thread Sean McArthur
How is it different from having the generic on the trait itself? On Mar 22, 2014 10:44 AM, comex com...@gmail.com wrote: On Sat, Mar 22, 2014 at 10:24 AM, Edward Wang edward.yu.w...@gmail.com wrote: But of course, it is very uncivilized :) Any suggestion on how to refactor this piece of

[rust-dev] RFC: Importing/exporting macros

2014-02-25 Thread Sean McArthur
Rust now has the ability to import macros from other crates, hurray! However, I'd like to propose adjusting the current way of using them to be more like importing/exporting other symbols of a crate. 1) It's more consistent, makes it easier to find where macros came from. 2) Current usage brings

Re: [rust-dev] Chaining Results and Options

2014-02-10 Thread Sean McArthur
This could be handled by a macro. opt_method!(tmp, method) On Mon, Feb 10, 2014 at 12:04 PM, Ziad Hatahet hata...@gmail.com wrote: Isn't this proposal a subset of having `do` syntax like Haskell does? I thought that was being blocked on HKTs. -- Ziad On Mon, Feb 10, 2014 at 4:40 AM,

Re: [rust-dev] user input

2014-02-08 Thread Sean McArthur
let in = readln!() ? macro_rules! readln( () = ({ let mut stdin = ::std::io::BufferedReader::new(::std::io::stdin()); stdin.read_line().unwrap() }) ) On Sat, Feb 8, 2014 at 4:48 PM, Huon Wilson dbau...@gmail.com wrote: There is read_line:

Re: [rust-dev] Deprecating rustpkg

2014-02-01 Thread Sean McArthur
On Fri, Jan 31, 2014 at 1:05 PM, Tony Arcieri basc...@gmail.com wrote: IMO, a system that respects semantic versioning, allows you to constrain the dependency to a particular *major* version without requiring pinning to a *specific* version. I would call anything that requires pinning to a

[rust-dev] Moving libcrypto back into rust repo?

2014-01-29 Thread Sean McArthur
Considering the effort to break up libextra into multiple crates in #8784[1], could rust-crypto[2] be moved back into rust as libcrypto? Some comments on the issue deviated about whether crypto should written *in* Rust, or just be bindings. As a user, I don't care how they are implemented, as

Re: [rust-dev] let mut - var

2014-01-29 Thread Sean McArthur
Part of the nice thing about `let mut` is that it requires you to opt-in to mutability, making it a conscious choice. Having `let` and `var` would make Rust be like ES6: we all look at `let` and say why bother. For Rust, I imagine many would get into the habit of using `var` over `let` because