Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:Problems in C++ (Score 1) 386

by Jamu (#48861387) Attached to: Is D an Underrated Programming Language?

Dude, don't use square brackets with STL arrays and vectors, just to make your code more readable. The [] operator skips bounds checking, which is the main reason for using these classes in the first place. At() is the proper methodology to use in pretty much every case, unless you are so confident in your bounds that its worth the trivial speed increase in access time.

Bjarne Stroustrup's solution:

template<typename>
class Vec : public std::vector<T>; {
public:
using vector<T>::vector

T& operator[](int i)
{ return vector<T>::at(i); }

const T& operator[](int i) const
{ return vector<T>::at(i); }
};

Page 97 of The C++ Programming Language.

Comment: Re:How about someone who groks the math, comment? (Score 4, Informative) 197

by Jamu (#48635159) Attached to: Quantum Physics Just Got Less Complicated

A quantum state of position can be written as a superposition of a momentum states; the position is certain and the momentum is uncertain.

A quantum state of momentum can be written as a superposition of position states; the momentum is certain and the position is uncertain.

That's the duality and the extremes of the uncertainty principle. The mathematics can also show more generally, that the uncertainty in position and momentum is always more that a certain value (Planck's constant).

These things follow directly from the axioms of Quantum theory, Hilbert spaces and any two non-commutative operators. So I really don't see how Quantum Physics "just got less complicated". It's the same as it's always been. Although I've not read the paper yet, maybe that makes more sense.

Comment: Re: Advertisement? (Score 1) 115

by Jamu (#48571927) Attached to: FreeNAS 9.3 Released

I tried both FreeNAS and NAS4Free for a home server, and they were both good for what they aim to do. The problem I had was when I wanted to run something other than a NAS on the same box, such as tvheadend. I consequently tried OpenMediaVault as this is based on linux. In the end, I concluded that these only work if you're running your box purely as NAS. After a look at virtualisation using docker, and concluding that this was overkill, if not a bad idea, I went with Ubuntu Server and webmin. The storage is using BTRFS. I could have used ZFS, but BTRFS seemed a better choice, for what I wanted, at the time.

Note that if you want proper NAS, you'll probably want to avoid everything I've done at home. :)

Comment: Re:All the Kindles are on sale... (Score 1) 43

by Jamu (#48476039) Attached to: Apple and Amazon Launch Black Friday Price War
I have a Nook. This has a passive screen. Great for reading in bed before going to sleep or in direct sunlight. It doesn't shine a light into your eyes keeping you awake. I believe the Kindle Paperwhite does have a light, but I guess you could switch that off. I'd probably just get the Kindle if I didn't already have the Nook. I can't see any advantage with the Kindle Fire over my Nexus 7 though.

There are new messages.

Working...