Could we add to the standard library a macro, say 'include_sized_bin', that
would be similar to std::macros::builtin::include_bin except that you'd also
give it a sized type to return (instead of a slice of u8's) and you'd get a
compile time error if the size of the file is different from the
The use of taking S: Str is for taking things like [S], where you want
to take both str and String (such as in the other post about getops()).
I wouldn't be bothered with leaving the API as-is, but I don't understand
where this guideline is coming from. Can you elaborate?
On Mon, May 26, 2014
What's the use-case for this?
-Kevin
On May 27, 2014, at 3:24 AM, Tommi rusty.ga...@icloud.com wrote:
Could we add to the standard library a macro, say 'include_sized_bin', that
would be similar to std::macros::builtin::include_bin except that you'd also
give it a sized type to return
On May 27, 2014, at 6:05 AM, Benjamin Striegel ben.strie...@gmail.com wrote:
The use of taking S: Str is for taking things like [S], where you want
to take both str and String (such as in the other post about getops()).
I wouldn't be bothered with leaving the API as-is, but I don't
I would use it for large, immutable, static lookup tables. I could use
'include_bin' and wrap any use of it in a 'std::mem::transmute', but I'd rather
not. Also, I'd appreciate the sanity check for knowing the file size matches
the size of the lookup table's type. E.g.
static lut: [[MyStruct,
Apparently include_bin!() returns a binary literal, not an actual slice. This
eventually gets treated as a [u8] during type-checking, but it's apparently
treated specially by trans.
Given this, I think creating an include_sized_bin!() would require changing
LitBinary to include an optional
As far as I understand (I'm a newbie too), it means that 'radius' is the
reference to the value in the box.
On Tue, May 27, 2014 at 10:27 AM, Tommi rusty.ga...@icloud.com wrote:
What is the meaning of this 'box ref foo' syntax found in the tutorial
over at
On 27/05/2014 18:27, Tommi wrote:
What is the meaning of this 'box ref foo' syntax found in the tutorial over at
__http://doc.rust-lang.org/tutorial.html#references
(Sorry for uglifying the link, my posts seem to get flagged as spam if they
contain links)
In short, it's:
enum Shape {
Hey All,
Writing to share my project of late, an environment for describing and
executing connected networks of processes.
I've used it to build discrete-time filters, oscillators, RF modems, and
more.
Preliminary documentation is up at
Thanks. I had failed to realize that 'ref radius' would make 'radius' a
Boxf32 value.
On 27 May 2014, at 20:29, Oleg Eterevsky o...@eterevsky.com wrote:
As far as I understand (I'm a newbie too), it means that 'radius' is the
reference to the value in the box.
On Tue, May 27, 2014 at
It actually makes radius a f32.
-Kevin
On May 27, 2014, at 10:42 AM, Tommi Tissari rusty.ga...@icloud.com wrote:
Thanks. I had failed to realize that 'ref radius' would make 'radius' a
Boxf32 value.
On 27 May 2014, at 20:29, Oleg Eterevsky o...@eterevsky.com wrote:
As far as I
What I was specifically curious about is why you seem to be against the
usage of the `Str` trait as a bound on the argument to the `captures`
method.
On Tue, May 27, 2014 at 1:01 PM, Kevin Ballard ke...@sb.org wrote:
On May 27, 2014, at 6:05 AM, Benjamin Striegel ben.strie...@gmail.com
wrote:
Is there anyone who's going to any of these events that will be passing by
Menlo Park and would be willing to give a fellow Rust developer a ride?
On Sat, May 24, 2014 at 8:03 PM, Tom Park gtomp...@gmail.com wrote:
https://air.mozilla.org/search/?q=rust+meetup
Removing meetup from that
On Mon, May 26, 2014 at 2:56 PM, Kevin Ballard ke...@sb.org wrote:
All the methods that take [String] should probably be rewritten to be
generic with S: Str and take [S] instead, which will allow taking either
a slice of Strings or a slice of str's.
I've been wanting to contribute to Rust
On May 27, 2014, at 1:55 PM, Benjamin Striegel ben.strie...@gmail.com wrote:
What I was specifically curious about is why you seem to be against the usage
of the `Str` trait as a bound on the argument to the `captures` method.
It adds unnecessary complexity, bloats the crate metadata with the
What is the meaning of this 'box ref foo' syntax found in the tutorial over at
http://doc.rust-lang.org/tutorial.html#references
In short, it's:
enum Shape { Sphere(Boxf32) }
let shape = Sphere(box 1.0f32);
let r = match shape {
Sphere(box ref radius) = *radius
};
I thought the 'box'
As with most things in Rust, in a pattern, a keyword means the
*opposite* of its normal meaning. So where `box e` in an expression
will box up the result of `e`, `box p` in a pattern will unbox `p`.
On Tue, May 27, 2014 at 9:50 AM, Tommi rusty.ga...@icloud.com wrote:
What is the meaning of this
17 matches
Mail list logo