Guys, I'm not sure if this is what you are looking for, but I have been writing small (self-contained) examples in Rust - mostly to help me understand the language concepts. Still in very early stages, but I will be contributing more over the next few weeks. https://github.com/smadhueagle/rustlings Madhu
> Date: Thu, 6 Jun 2013 22:11:45 -0700 > From: [email protected] > To: [email protected] > CC: [email protected] > Subject: Re: [rust-dev] Suggestions for small Rust programs for use in a > tutorial? > > Jeaye, > > >>Tim, > > Not entirely sure if these are what you want, but bjz's glfw-rs repo > has some basic examples of using glfw-rs that may serve as a basic > example of Rust, too. > > See these: > https://github.com/bjz/glfw-rs/blob/master/examples/cursor.rs > https://github.com/bjz/glfw-rs/blob/master/examples/window.rs > https://github.com/bjz/glfw-rs/blob/master/examples/gl-struct.rs > > Along with the rest here: > https://github.com/bjz/glfw-rs/tree/master/examples<<< > > Thanks for the suggestion! So far I'm not sure if these illustrate the > main concepts I'm trying to get across, but they look great as > potential additional extended examples. > > On Thu, Jun 6, 2013 at 9:52 PM, Daniel Micay <[email protected]> wrote: > > The Map trait is a bit ugly because it's sorely in need of default > > methods to reduce the burden on implementations. > > > > I think the Iterator trait in the `std::iterator` module is a great > > example, because it's a simple trait and it's easy to demonstrate > > implementations and adaptors for it. It's also a nice way of showing > > off the lifetime system because with owned containers you can't > > invalidate the iterators. I don't think there are many other languages > > able to represent something like statically freezable mutable > > containers. > > This is a great suggestion as well. I don't know why iterators didn't > occur to me as a potential example; they almost stand alongside traits > and borrowed pointers as major attractions on a tour of Rust. > > Cheers, > Tim > > -- > Tim Chevalier * http://catamorphism.org/ * Often in error, never in doubt > "Not a riot, it's a rebellion." -- Boots Riley > "Attention Bros and Trolls: When I call out your spew, I'm not angry, > I'm defiant." -- Reg Braithwaite > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
