[rust-dev] rustdoc_ng status: all items extracted

2013-08-04 Thread Corey Richardson
Hi all, I'm very excited to announce that rustdoc_ng now extracts and jsonifies crates completely in their entirety. Yay! Jordi has been doing some awesome work with the frontend, even adding a search. See http://seld.be/rustdoc/master/index.html, for its current state. There's still a bunch of w

Re: [rust-dev] Proposal for clarifying the iterator protocol

2013-08-04 Thread Kevin Ballard
You could certainly design a non-blocking IO iterator that way. My example of a non-blocking IO iterator wasn't meant to illustrate something I'd actually recommend you do (since the iterator protocol isn't really a great fit for this), but rather show the flexibility of the approach. That said

Re: [rust-dev] Proposal for clarifying the iterator protocol

2013-08-04 Thread Jason Fager
Not confused, I understand your point about for loops not caring about what happens with additional 'next' calls. But as a user of an iterator, I have the expectation that a for loop exhausts the elements available from an iterator unless I return early or break. Designing an iterator that intent

Re: [rust-dev] Proposal for clarifying the iterator protocol

2013-08-04 Thread Kevin Ballard
I suspect you're confused about something. The for loop doesn't care in the slightest what an iterator does after it's returned None. All 3 approaches work equally well as far as the for loop is concerned. And I'm not sure what you mean by "design Iterators that would take advantage of the und

Re: [rust-dev] Proposal for clarifying the iterator protocol

2013-08-04 Thread Jason Fager
Of course. I think I'm reacting more to the possible use cases you described for option 3 than the actual meaning of it. It seems like a really bad idea to design iterators that would take advantage of the undefined behavior, not least b/c it's unexpected and not supported by the most pervasive c

Re: [rust-dev] Proposal for clarifying the iterator protocol

2013-08-04 Thread Kevin Ballard
The new for loop works with all 3 of these. Your output shows that it queried .next() twice, and got a single Some(1) result back. Once it gets None, it never calls .next() again, whereas the 3 behaviors stated previously are exclusively concerned with what happens if you call .next() again afte

Re: [rust-dev] Proposal for clarifying the iterator protocol

2013-08-04 Thread Jason Fager
The new for loop already assumes #2, right? let x = [1,2,3]; let mut it = x.iter().peek_(|x| printfln!(*x)).scan(true, |st, &x| { if *st { *st = false; Some(x) } else { None } }); for i in it { printfln!("from for loop: %?", i); } Which produces: &1 from for loop: 1 &2 On Sun, Aug 4, 20

Re: [rust-dev] Java versus .NET style for acronyms in type names

2013-08-04 Thread Chris Morgan
There seems to be a basic assumption of ASCII identifiers. Hey, this ain't the eighties! Let's have us an XᴍʟHᴛᴛᴘRequest. Absolutely clear with no scope for misunderstanding in either direction: Gᴄ; Rᴄ; Aʀᴄ; SimpleHᴛᴛᴘServer. Monospace font support is a little poor, but I'm sure they'll fix that

[rust-dev] Zurich/CH Meetup

2013-08-04 Thread Jordi Boggiano
Heya, I know this is a long shot given I don't see many EU people on IRC, but would there be anyone around Zurich or in Switzerland at all that wants to gather up for a small Rust meetup (or we can just go have a beer)? Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi __

Re: [rust-dev] Help with a trivial TCP client example needed

2013-08-04 Thread Chris Morgan
Your example looked like it should be correct, but I'm not going to figure out why it's not working, because extra::net no longer exists in the Rust development head. Here is an example using the new runtime TCP library, which is currently in std::rt::io::net. Whether it compiles on Rust 0.7 or n