I haven't seen this in the documentation.
A taste of Rust
11–20 of 93 posts
Re: A taste of Rust
#12I'm a big fan of rust (hence my username), and would like to know if there have been any non-trivial benchmarks of Rust's compilation time, and the performance of compiled executable. Last I checked Rust took about 40 minutes to compile itself on my laptop. Is it still the case? (I haven't touched Rust for a month or so.) Also, is anyone using Rust in non-toy projects? (Except Mozilla's own servo.)
> Also, is anyone using Rust in non-toy projects? Since it's not production ready yet: no
Q^3, which can render Quake 3 maps and will eventually be its own game: https://github.com/Jeaye/q3
Servo, an experimental web browser being written by Mozilla: https://github.com/mozilla/servo
Re: A taste of Rust
#13Earlier quoted context omitted.
> Also, is anyone using Rust in non-toy projects? Since it's not production ready yet: no
You should double-check what kind of projects are being worked on before saying that it isn't being used for non-toy projects :) I can list at least two off the top of my head: Q^3, which can render Quake 3 maps and will eventually be its own game: https://github.com/Jeaye/q3 Servo, an experimental web browser being written by Mozilla: https://github.com/mozilla/servo
Re: A taste of Rust
#14I know there are various pointer type prefixes in Rust (@foo, ~foo, &foo, *foo), 'foo for lifetimes and $foo for macro arguments, but WTH is +foo? https://github.com/mozilla/rust/blob/master/src/librustc/mid... I haven't seen this in the documentation.
Modes were supposed to give hints to the compiler whether or not to implicitly copy or move a value into a function, but it was buggy and confusing. So we replaced it with always moving for unique types, and always copying for reference counted types.
Re: A taste of Rust
#15I know there are various pointer type prefixes in Rust (@foo, ~foo, &foo, *foo), 'foo for lifetimes and $foo for macro arguments, but WTH is +foo? https://github.com/mozilla/rust/blob/master/src/librustc/mid... I haven't seen this in the documentation.
In addition to the +foo forms, there were also others: -foo, &&foo, ++foo, perhaps more. Be glad that they're gone. :)
Re: A taste of Rust
#16I know there are various pointer type prefixes in Rust (@foo, ~foo, &foo, *foo), 'foo for lifetimes and $foo for macro arguments, but WTH is +foo? https://github.com/mozilla/rust/blob/master/src/librustc/mid... I haven't seen this in the documentation.
(Also, the master branch is not the one to be looking at for the latest changes at the moment: patches are merged into 'incoming', and master hasn't been updated for more than a month.)
Re: A taste of Rust
#17The article doesn't specify what exactly, is permitted by an unsafe vs. safe function. The Rust reference indicates the additional operations permitted by unsafe functions are: 1. Dereferencing a raw pointer. 2. Casting a raw pointer to a safe pointer type. 3. Calling an unsafe function. I was expecting something more along the lines of Safe Haskell ( http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/safe-... )…
unsafe(no-bounds-checks) {
...
}
or: unsafe(raw-pointers) {
...
}
Right now the problem is that once you drop into an unsafe block, everything that is unsafe becomes allowed. Obviously this is bad for correctness and bad for readability.Re: A taste of Rust
#18It might be childish but I just can't force myself to swallow the ugly curly braces and semicolons. Some compromises had to be made, e.g. the lack of tailcalls is a regrettable but nonetheless well justified decision. But why didn't they include a standard indentation style in the language specification itself and get rid of the cruft? They have one for Servo anyway, which is the raison d'etre of the whole language,…
you \
to \
write \
so \
many \
backslashes.
They are not the ultimate solution for block definition and line breaking. You must be very used to them, and that's why you find the lack of it irritating, but that's another story.
Disclaimer: I code python every day of my life nowadays, I'm not a python hater.
Re: A taste of Rust
#19It might be childish but I just can't force myself to swallow the ugly curly braces and semicolons. Some compromises had to be made, e.g. the lack of tailcalls is a regrettable but nonetheless well justified decision. But why didn't they include a standard indentation style in the language specification itself and get rid of the cruft? They have one for Servo anyway, which is the raison d'etre of the whole language,…
Re: A taste of Rust
#20Earlier quoted context omitted.
You should double-check what kind of projects are being worked on before saying that it isn't being used for non-toy projects :) I can list at least two off the top of my head: Q^3, which can render Quake 3 maps and will eventually be its own game: https://github.com/Jeaye/q3 Servo, an experimental web browser being written by Mozilla: https://github.com/mozilla/servo
For me, a non-toy project is a project that runs in production, where I can build my business on.
That said, rust has been written in rust, and every commit is tested against our test suite on Linux, OS X, BSD, and Windows. So while the language itself may be changing, any code you write in it at a given point in time should work. It'll just take some (small) effort to keep that code in sync with the compiler.
So if you are able to handle that risk, we'd love to have you try it out. It'd really help us find the warts in the language/stdlib before we lock in 1.0.