Re: [rust-dev] Introducing wxRust

2013-10-06 Thread Martin DeMello
After thinking about it some more, I realised that bindgen works perfectly for generating the low-level C layer, and that the custom codegen can then just handle the OOP layer on top of it. I did a quick hack here, and after a few signature changes it all just worked: https://github.com/martindeme

[rust-dev] clone and template

2013-10-06 Thread Rémi Fontan
Hi, I have just moved some of my code from 0.6 to rust 0.8 and was surprisingly not too difficult, great! however I noticed while converting copy to clone that I have to use a lot of explicit calls to ".clone()" in my templated code. In non templated code, the compiler is apparently more forgivin

Re: [rust-dev] clone and template

2013-10-06 Thread Daniel Micay
On Sun, Oct 6, 2013 at 5:09 AM, Rémi Fontan wrote: > Hi, > > I have just moved some of my code from 0.6 to rust 0.8 and was > surprisingly not too difficult, great! > > however I noticed while converting copy to clone that I have to use a lot > of explicit calls to ".clone()" in my templated code

[rust-dev] How to write a rustpkg package script (pkg.rs)

2013-10-06 Thread Cadence Marseille
Hello, To fix issue #1 of rust-pcre, I am working on a package script that will automatically determine the proper link_args to use and build the rust-pcre wrapper using those link args. For a while I was encountering the following error: ta

[rust-dev] Bug report HOWTO

2013-10-06 Thread Tim Chevalier
Hi all-- I thought it was worth it to write up a wiki page with guidelines for submitting Rust bugs: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-RUST-bug-report Please edit and improve! Cheers, Tim -- Tim Chevalier * http://catamorphism.org/ * Often in error, never in doubt "Being que

[rust-dev] Creating a generic assert_equal function

2013-10-06 Thread Michael Williamson
Hello, As an exercise, I was trying to create a generic assert_equal function. I came up with this: #[cfg(test)] mod tests { #[test] fn incorrect_output() { let output = ~"Hello"; assert_equal("Hi", output); } fn assert_equal(expected: &T, actual: &T) { a

Re: [rust-dev] Creating a generic assert_equal function

2013-10-06 Thread Patrick Walton
On 10/6/13 12:03 PM, Michael Williamson wrote: Hello, As an exercise, I was trying to create a generic assert_equal function. I came up with this: &str is not &T, because we don't have dynamically sized types yet. This should be fixed before 1.0. Patrick ___

Re: [rust-dev] Introducing wxRust

2013-10-06 Thread KENZ gelsoft
Martin, Yes. bindgen should be able to be used for wxc wrapping. Rust-ish OOP layer is a separate work. Recently I have very few time to try that. So your hack is very helpful! I'll take a closer look of that when I can work on this again. Thanks! 2013/10/6 Martin DeMello : > After thinking about

Re: [rust-dev] Bug report HOWTO

2013-10-06 Thread Alex Crichton
I think this is a fantastic idea. We may even want to entertain the idea of moving the mentioned URL on an ICE to this page instead. It looks like github also throws up a banner about "guidelines for contributing" which point to CONTRIBUTING.md, so perhaps it should also be included in that file so

Re: [rust-dev] Bug report HOWTO

2013-10-06 Thread Steve Klabnik
Yup, if we put this in CONTRIBUTING, it'll show up when making a new issue. Not like anyone reads them, but increasing the chances for no cost seems good. ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

[rust-dev] This (and Last) Week in Rust

2013-10-06 Thread Corey Richardson
Last week, content from http://cmr.github.io/blog/2013/09/30/this-week-in-rust/ -- Welcome to another issue of *This Week in Rust*! This week saw the release of 0.8, the removal of `@fn`, and a bunch of other changes. The tutorial has been updated significantly, surrounding pointers and boxes, so

Re: [rust-dev] Assistance with compiling rust on OSX

2013-10-06 Thread Eric Sampson
Just to close the loop on this issue, I did some Googling and was able to determine that the problem was a result of gyp not playing nice when only the Xcode Command Line Tools are installed rather than the entire Xcode environment. Here is the gyp issue in question: https://code.google.com/p/gyp/

Re: [rust-dev] Assistance with compiling rust on OSX

2013-10-06 Thread Eric Sampson
Oh yeah, in order to remove an error message I was getting when trying to compile using only the Xcode Command Line Tools, I also had to stub out xcrun as described in this link: http://sector7g.be/posts/mountain-lion-dealing-with-xcrun On Sun, Oct 6, 2013 at 9:28 PM, Eric Sampson wrote: > Just