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,
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
On 10 Apr 2014, at 07:53, Kevin Ballard ke...@sb.org wrote:
On Apr 9, 2014, at 9:50 PM, Tommi Tissari rusty.ga...@icloud.com wrote:
On 10 Apr 2014, at 00:22, Kevin Ballard ke...@sb.org wrote:
FWIW, my point about range is it relies on One being the number 1, rather
than being
.
On 10 Apr 2014, at 09:27, Kevin Ballard ke...@sb.org wrote:
On Apr 9, 2014, at 11:25 PM, Tommi Tissari rusty.ga...@icloud.com wrote:
On 10 Apr 2014, at 07:55, Corey Richardson co...@octayn.net wrote:
range doesn't return a forward iterator. RangeA also implements
DoubleEndedIterator
:
On Apr 7, 2014, at 1:02 AM, Tommi Tissari rusty.ga...@icloud.com wrote:
On 07 Apr 2014, at 08:44, Nicholas Radford nikradf...@googlemail.com
wrote:
I think the original question was, why does the zero trait require the add
trait.
If that was the original question, then my answer would
On 09 Apr 2014, at 20:46, Kevin Ballard ke...@sb.org wrote:
For reference, the Zero trait lives in std::num, which should be a good
indication that this is a property of numeric types.
Am I not supposed to use std::num::Zero for defining things like zero vector or
zero matrix? Those are
On 09 Apr 2014, at 20:46, Kevin Ballard ke...@sb.org wrote:
Why? Zero is the additive identity.
Zero is _an_ additive identity for numbers, but not for vectors or matrices.
use std::slice::Items;
use std::iter::RandomAccessIterator;
use std::num::Zero;
Items is a RandomAccessIterator, but a
On 10 Apr 2014, at 00:22, Kevin Ballard ke...@sb.org wrote:
FWIW, my point about range is it relies on One being the number 1, rather
than being the multiplicative identity. AFAIK there's nothing special about 1
in a ring outside of its status as a multiplicative identity. Certainly it's
I just realized that this 'Invalid' trait is also a prime example of why traits
must be able to specify their items as private. Obviously that 'invalid' static
method / constant should not be part of the public interface. Heck, the sole
reason for the existence of the type could be that it
On 07 Apr 2014, at 08:44, Nicholas Radford nikradf...@googlemail.com wrote:
I think the original question was, why does the zero trait require the add
trait.
If that was the original question, then my answer would be that std::num::Zero
requires the Add trait because of the way it is
On 04 Apr 2014, at 12:30, Vadim Chugunov vadi...@gmail.com wrote:
Regarding the original idea: Why use a whole bit, when you only need one
value out of all possible type's values? For example, for floats, one of
the NaNs could be used for this purpose without any issues with overflow as
Compiling with that flag would figuratively speaking wrap everything inside an
unsafe block and then omit vector bounds checking. The flag wouldn't be allowed
for library builds.
What I find a bit totalitarian about this situation is that the language forces
a decision which the programmer
danielmi...@gmail.com wrote:
On 27/03/14 09:02 PM, Tommi Tissari wrote:
Compiling with that flag would figuratively speaking wrap everything inside
an unsafe block and then omit vector bounds checking. The flag wouldn't be
allowed for library builds.
What I find a bit totalitarian about
is memory safe (although it's opt-in) and it has this
noboundscheck flag. So I don't see what the problem is.
On 28 Mar 2014, at 03:17, Daniel Micay danielmi...@gmail.com wrote:
On 27/03/14 09:02 PM, Tommi Tissari wrote:
the language forces a decision which the programmer should
On 28 Mar 2014, at 03:41, Jeffery Olson olson.jeff...@gmail.com wrote:
forces a decision which the programmer should be allowed to make for
himself. A bit like someone dictating my hair style.
Yes. Rust is just like hair salon that forbids you from setting your own hair
on fire.
rust have this flag too.
On 28 Mar 2014, at 04:26, Daniel Micay danielmi...@gmail.com wrote:
On 27/03/14 10:04 PM, Tommi Tissari wrote:
Opting in case by case is not the same thing as having a compiler flag which
you can toggle without modifying the source.
A case-by-case basis
On 15 Nov 2013, at 20:58, Niko Matsakis n...@alum.mit.edu wrote:
On Thu, Nov 14, 2013 at 09:05:40PM +0200, Tommi wrote:
In other words, no autoderef or other transformation takes place. We
just look for a matching trait. Instead we just pass the values in by
reference. The reason for
17 matches
Mail list logo