« first day (2177 days earlier)      last day (2774 days later) » 

11:01 PM
 
JPEG IS SADNESS
7
 
What's wrong with random shuffle?
 
Its deprecated?
I think Alistair goes over that in his talk
 
std::random_shuffle? It uses unspecified PRNG with an unspecified way of seeding it. 'Nuff zaid.
 
11:12 PM
@milleniumbug it uses rand() basically no?
 
That's one of possible implementations
 
@CaptainGiraffe I think Walter goes over it in his talk on <random>.
 
(which means you can't even rely on it using an already badly specified function)
 
@Borgleader As originally specified, it was both required to do so and prohibited from doing so.
 
(This is also a really good talk by the way.)
@JerryCoffin lolwat?
 
11:15 PM
@Borgleader Proof that vector graphics is always superior stackoverflow-sehe.s3.amazonaws.com/…
 
I find this an inappropriate attention to a minute detail unless you are shuffling a billion dollar website with std::random_shuffle
 
;_;
 
Of course not. The default should be specified.
 
> The random number generator is implementation-defined, but the function std::rand is often used.
 
@sehe I dont know why you felt compelled to prove this to me, the imag wasn't my doing, and I never claimed otherwise. I just thought it was interesting.
 
11:16 PM
as cppreference says
 
@Borgleader You clearly didn't look
 
Unless you're on a ten year old MS box rand() is at least 31 bits.
 
It was all fuzzy, I figured it was a FF bug
 
@Griwes Its own specification at least sort of assumed it would, but part of the specification on the library in general said nothing else would call rand.
 
@Borgleader lol. Whoosh went the FF bug
 
11:17 PM
oh wow :D
 
@CaptainGiraffe rand() is completely irrelevant here
 
@JerryCoffin Is that because rand() was specified to always be deterministic?
 
One might say it's... random
 
@milleniumbug Was the algorithm off?
 
@Griwes Probably.
 
11:19 PM
2 mins ago, by milleniumbug
> The random number generator is implementation-defined, but the function std::rand is often used.
> implementation-defined
IOW it doesn't have to be rand()
 
That's a problem for a portable standard library
 
@milleniumbug So of course gcc went with the xkcd rand.
 
Hell++ re-implemented it
 
I wonder if return 4; is really a legitimate implementation of rand()
 
@CaptainGiraffe Anyhoops, if you can't appreciate the detail that goes into pseudo-random number generation, well, have fun
@Puppy it is
 
11:22 PM
@milleniumbug On the contrary. I do.
 
@milleniumbug That's not actually correct though. Implementation defined would mean each implementation was required to document what it did. That's not required here. It's simply unspecified.
 
 /usr/include/boost/multiprecision/cpp_int.hpp:193:4: error: right operand of shift expression '(1u << 63u)' is >= than the precision of the left operand [-fpermissive]
     BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1));
     ^
WHAT IS GOING ON
 
@CaptainGiraffe "I just wanted a random integer" talk will be quite fun, judging from the slides
 
Like, this clearly is wrong, but... what the hell. is going on.
 
@milleniumbug Oh wow. Someone went out of their way to make that quote illegible:
yesterday, by rightfold
user image
@Griwes That's undocumented implementation details. Just report it...
 
Welcome to C++. And static analysis. And test suites. :(
 
I guess I should just drop Boost 1.60.0 then if it contains important things like this not even compiling when you just include them... sigh
 
@CaptainGiraffe When it comes to things like these, I'm avoiding all the "implementation-defined" stuff. std::default_random_engine is also a mistake.
 
hmm
C# lends itself surprisingly poorly to React
 
@Puppy you farted?
 
11:28 PM
I find myself really wishing for e.g. intersection types
 
?
 
it's a TypeScript feature that allows you to jam multiple types together to produce one type that has all the properties of all the constituents
 
@milleniumbug If you have a point with your randomness, be it cryptographical or otherwise you are well aware of these deficiencies.
 
@Puppy so... like automagic type erasure?
 
no
the final type is a strong static type as per usual
it just has lots of properties
 
11:30 PM
Like combining type traits?
 
@Puppy And how would conversions be specified? 1-way?
 
I<A, B> a = whatever; // a is both A and B
 
structural typing ;p
 
@milleniumbug Isn't that union type, as opposed to intersection type...
 
er
maybe
 
11:32 PM
would an union type be A or B?
 
done. Filed to another room
 
I'd blame C for that
 
I should print out my old .vimrc make it burn and post it on facebook.
 
gotta say that the TS syntax of X | Y and X & Y doesn't really leave any room for ambiguity as to what's going on
 
X & Y is naturally union, X | Y would be intersection. X ^ Y for the symmetrical difference (that'd be awesome)
 
11:34 PM
ok
 
Uh...
 
union types, then
intersection is handy-ish but nowhere near as valuable
another useful thing TS can do is return classes from functions
 
@CaptainGiraffe ...and then someone calls std::random_shuffle from multiple threads
 
And your program starts ♬ doing the random shuffle ♪
@SwiftOnSecurity Hopefully, a shadowban of @realDonaldTrump incoming...
Someone doesn't know what the idea of a shadow ban is
 
hm
I've been receiving an unusual amount of passive rep lately (for me anyway)
 
11:49 PM
@milleniumbug everyday im (random) shuffling
2
 
one or two upvotes per week
 
people have finally realized what gems you bestowed upon them, and repented from their erring ways
@jaggedSpire This is to put it in perspective. Whatever you did in june/start of september is vastly more significant
 
@sehe such an adorably tiny increase
 
That's what she said [when you announced the promotion]
 
@sehe those were my aggregate type and lambda decay answers I do believe
@sehe ouch
 

« first day (2177 days earlier)      last day (2774 days later) »