[rust-dev] Rust .so that looks like a C .so

2014-04-24 Thread Henri Sivonen
program use multiple such libraries so that their Rust runtime bits don't conflict? Is there a tool for generating .h files for C-callable Rust functions and their argument data types? -- Henri Sivonen hsivo...@hsivonen.fi https://hsivonen.fi/ ___ Rust

Re: [rust-dev] Proposed API for character encodings

2013-09-20 Thread Henri Sivonen
would be confusing. -- Henri Sivonen hsivo...@hsivonen.fi http://hsivonen.iki.fi/ ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] String encode/decode

2013-04-17 Thread Henri Sivonen
on libICU ICU's label handling and converters aren't Encoding Standard-compliant. For Servo, we should do the right thing straight away and implement the Encoding Standard. Having another set of converters seems like an opportunity for people to use the wrong (as in Web-incompatible) thing. -- Henri

[rust-dev] Questions about vectors

2012-11-07 Thread Henri Sivonen
pointers? -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/ ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] Using char literals with non-char match

2012-10-24 Thread Henri Sivonen
On Tue, Oct 23, 2012 at 6:10 PM, Patrick Walton pwal...@mozilla.com wrote: Something like 'x'u8 perhaps? That would suit my use case. -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/ ___ Rust-dev mailing list Rust-dev@mozilla.org https

Re: [rust-dev] Looping again but incrementing the loop counter first

2012-10-24 Thread Henri Sivonen
this pattern occur less.) (Aside: Now that Rust has both loop { } and loop;, talking about the “loop statement” would be ambiguous.) -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/ ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org

Re: [rust-dev] Using char literals with non-char match

2012-10-23 Thread Henri Sivonen
On Mon, Oct 22, 2012 at 7:08 PM, Graydon Hoare gray...@mozilla.com wrote: On 22/10/2012 6:52 AM, Henri Sivonen wrote: I can make the translator generate integer literals as the patterns for the arms of the match. However, I think the generated Rust code would be nicer for humans to read

[rust-dev] Object orientation without polymorphism

2012-10-23 Thread Henri Sivonen
when there is no need for inheritance? Basically, is there a guide for migrating away from classes? -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi/ ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] Object orientation without polymorphism

2012-10-23 Thread Henri Sivonen
On Tue, Oct 23, 2012 at 3:20 PM, Lucian Branescu lucian.brane...@gmail.com wrote: I think it's possible to implement methods on a struct directly, without a trait in between. This does not compile: struct Foo { x: i32, y: i32, fn bar() { }, } -- Henri Sivonen hsivo...@iki.fi http

Re: [rust-dev] Object orientation without polymorphism

2012-10-23 Thread Henri Sivonen
On Tue, Oct 23, 2012 at 3:24 PM, Tim Taubert ttaub...@mozilla.com wrote: struct Storage { ... } impl Storage { fn listen() { ... } } Thanks. Is there a way to scope constants under the namespace of a struct? -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi

[rust-dev] Looping again but incrementing the loop counter first

2012-10-23 Thread Henri Sivonen
the equivalent of C/Java/JS for loop in Rust without having to repeat the update expression before each |loop;| statement (as one would have to when reformulating the loops as a Rust |while| loop)? -- Henri Sivonen hsivo...@iki.fi http://hsivonen.iki.fi

Re: [rust-dev] Fall-through in alt, breakcontinue by label

2012-10-10 Thread Henri Sivonen
. The exercise was successful: The result still passes the test suite. (I did this Java to Java to be able to check the result with the test suite. I intend to use the Java to Java transformation as a preprocessing step for the translation to Rust.) -- Henri Sivonen hsivo...@iki.fi http

[rust-dev] Fall-through in alt, breakcontinue by label

2012-04-10 Thread Henri Sivonen
that compiles to efficient machine code? The use case I have is targeting Rust with the translator that currently targets C++ and generates the HTML parser in Gecko. (It uses goto hidden behind macros to emulate break and continue by label in C++.) -- Henri Sivonen hsivo...@iki.fi http