Re: [rust-dev] Anyone in SF have an Oculus Rift?

2014-05-10 Thread Matthew McPherrin
Yes, I can bring a Rift to any Rust events. On Sat, May 10, 2014 at 7:06 PM, Erick Tryzelaar wrote: > Hello all, > > colin Sheratt has offered to demo his rust binding for the Oculus Rift > (https://github.com/csherratt/vr-rs) at the yet-to-be-announced Gaming > meetup in June (http://www.meetup.

[rust-dev] Anyone in SF have an Oculus Rift?

2014-05-10 Thread Erick Tryzelaar
Hello all, colin Sheratt has offered to demo his rust binding for the Oculus Rift ( https://github.com/csherratt/vr-rs) at the yet-to-be-announced Gaming meetup in June (http://www.meetup.com/Rust-Bay-Area/events/17672/) but unfortunately he is not local to the Bay Area. Would any Bay Area Ocu

Re: [rust-dev] Reminder: 5/10 SF Rust Meetup right now!

2014-05-10 Thread Erick Tryzelaar
Hello all, I just wanted to remind everyone of the testing sprint happening right now until 6pm PDT at the Mozilla headquarters. If you would like to participate remotely, we'll be hanging out on the #rust-test-sprint on irc.mozilla.org. There will also be the etherpad https://etherpad.mozilla.org

Re: [rust-dev] 3 ways to do, which is the best one in terms of Rust "philosophy" ?

2014-05-10 Thread Vladimir Matveev
Christophe, Indeed, the idiomatic way is to use Result enum [1]. Note that you are not limited to IoResult, you can use any custom error type, for example, Result. The documentation (a link to which is below) is very nice, it contains a lot of examples and use patterns. So, your constructor metho

[rust-dev] 3 ways to do, which is the best one in terms of Rust "philosophy" ?

2014-05-10 Thread Christophe Pedretti
Hi all, thanks to Vladimir and Valerii for their previous detailed answer to my email, now i have a more general question. My Connection struct has a "new" method with open a connection to a database. This connection can fails. Three possiblities : 1/ "new" returns an IoResult. The connection mu

Re: [rust-dev] *c_char and *c_uchar

2014-05-10 Thread Vladimir Matveev
Hi! First of all, if you are writing custom bindings to sqlite not only to learn Rust, I'd suggest using already existing bindings [1]. That way you probably won't have to deal with low-level C integration stuff. However, if you want to learn how to write C bindings, you should probably start wit

Re: [rust-dev] *c_char and *c_uchar

2014-05-10 Thread Valerii Hiora
Hi Christophe, > i can not use : > let ppDb : **mut () = RawPtr::null(); > unsafe { res=sqlite3_open(filename.as_ptr(), ppDb); > because as_ptr() returns an *u8 and c_char is a i8, so i have to use > extern { fn sqlite3_open(filename: *c_uchar, ppDb : **mut ()) -> > c_int; } as_ptr() is a bad i

[rust-dev] *c_char and *c_uchar

2014-05-10 Thread Christophe Pedretti
Hi all, i am writing a wrapper to an SQLite database. If i use : extern { fn sqlite3_open(filename: *c_char, ppDb : **mut ()) -> c_int; } i can not use : let ppDb : **mut () = RawPtr::null(); unsafe { res=sqlite3_open(filename.as_ptr(), ppDb); because as_ptr() returns an *u8 and c_char is a i8, s