« first day (1056 days earlier)      last day (3897 days later) » 

8:00 PM
Back to working with concepts I guess.
 
Hopefully STL will talk a bit slower
cause he spoke too fast yesterday
 
SAM
cool music
 
@TonyTheLion 30% lightspeed man
@TonyTheLion 2 days ago* :D
 
ah man, I've lost track of the days
maybe I'll take a nap
I'm soooooooooooooooooooooooooo tired
 
@MooingDuck Sorta. Yknow how insertion sort goes through each item and for each item compares it to the previous one, and will swap them down "recursively" until its in the right position? Well hsort is that idea but where theres a gap between the elements being compared.
So single pass for the "cursor" going from beginning to end, but theres some backtracking involved to swap the items into the right position
 
8:02 PM
@Borgleader I don't understand why there would be backtracking
 
@TonyTheLion NOOOOOOOOOOOO. B-but STL's talk. :'(
 
omg
It's starting.
 
GN started.
 
Xeo
Is it the Rest SDK thing now?
meeeh
 
a change in schedule! :o
 
8:04 PM
4th time.. wow
 
ohhhh Panel
 
> And of course, STL.
 
eh, not STL now
 
FUCK YEAH
 
not STL
 
8:05 PM
boo!
 
fuck REST
 
SAM
STL @ 1:30
 
I don't care
 
@TonyTheLion this :3
 
user1804599
> I was a serious nerd until I discovered girls and cars.
 
8:06 PM
Videos are rated as STL and non-STL.
 
user1804599
Dat example.
 
@StackedCrooked You mean "normal speed" and "30% lightspeed".
 
@not-rightfold Where's that from?
 
That's equivalent.
 
@StackedCrooked :D
 
user1804599
8:07 PM
@TonyTheLion Oxford Dictionary under "nerd".
 
user1804599
Maybe we should all go discover girls and cars.
 
I've already discovered cars
 
That thing's "How To" guides use wide chars. Meh.
 
Girls, I have merely explored
 
Well take the special case of hsort where the is no gap (so it becomes insertion sort basically) if I have:
Cursor at index 0: 3, 2, 1 (nothing to do) --> Cursor at index 1 (swap) -> 2, 3, 1 --> Cursor at index 2 (swap) --> 2, 1, 3. If I don't keep backtracking, this is not sorted.
 
@StackedCrooked haahhaahah
 
@TonyTheLion First used in 1950s US of unknown origin
That's strange.
 
SAM
Isn't there too much Microsoft going on in GN this year?
 
Its a MS event, what do you expect?
 
8:10 PM
@SAM It's hosted by Microsoft...
 
@SAM MS is funding the event.
 
SAM
ya but as compared to last year
 
hmm...to have two FocusLost/Gained events, or a FocusChanged event, or both?
 
depends
on your requirements
 
my requirements are 'whatever'
 
user1804599
8:11 PM
Arg this download is taking eons.
 
@not-rightfold what download
 
SAM
The Lord has arrived.
 
YAAAY
 
user1804599
@melak47 Gentoo ISO.
 
Xeo
@melak47 Both!
Man, if only the await / resumable function talk didn't have such an unbearable speaker. :(
 
8:13 PM
@not-rightfold Simple, don't download Gentoo
 
I almost clapped for Stroustrup.
 
yay the talks I actually wanted to watch
 
@Borgleader of course it's not sorted, that's only one pass. Subsequent passes would finish the sort.
 
Xeo
Alright, order time - what should I order?
 
Xeo
8:14 PM
Didn't you want to get rid of that image?
You're doing a bad job, if yes.
 
I know, I was doing it on purpose
 
user1804599
@Xeo kapsalon.
 
@MooingDuck I'll have to check the lecture notes again, but they seemed to be backtracking on every invocation of hSort.
 
@not-rightfold what?
 
@Borgleader that would make the sort O(n^3)...
 
user1804599
8:15 PM
@TonyTheLion are you illiterate?
 
why would you suggest "kapsalon"
I mean, it makes no sense
 
user1804599
Because it's delicious.
 
I don't think I have the same definition as you
 
user1804599
Me neither.
 
"kapsalon" to me means a barber
 
Xeo
8:16 PM
lol
 
user1804599
To me it means a bowl with fries, döner kebab, molten cheese and salad.
 
There was a 7cm of snow in the James Bay region, in Quebec, yesterday.
 
oh right
 
It's surprisingly early.
 
8:17 PM
@EtiennedeMartel There was sun here yesterday
 
user1804599
Tony what was the ISBN? Google doesn't help.
 
@not-rightfold You douchebag!! I made that up.
 
what is std::system_error for? How does one properly use it? I can't find an explanation anywhere
 
hahahahah, that is hilarious
 
@MooingDuck According to the slides, with the sequence 3x+1 (1, 4, 13, 40, ...) the worst-case number of compares is O(N^(3/2))
 
user1804599
8:18 PM
@MooingDuck For system errors!
 
user1804599
I always use it when I use an API that uses errno. :V
 
@Borgleader yes, if each of those passes is O(N). But your code has each of those passes as O(N^2)
@not-rightfold no, I mean, WTF is error_condition for?
 
user1804599
Ask it on Stack Overflow!
 
9
Q: error code vs error condition

LesswireI don't quite get why do we need to make a distinction between error code (std::error_code) and an error condition(std::error_condition), aren't they the same thing? What are the advantages of an error condition vs error code?

 
@MooingDuck Well I checked the examples in the slides and my successive applications of hSort give exactly what they're supposed to and looking at the code they gave us, it seems they do backtrack as well =/
 
Xeo
8:21 PM
gah, all these .then calls are mixed up! Sometimes, he keeps the returned task<T>, sometimes he doesn't... :/
 
@TonyTheLion actually, I understood that one was platform independant, but the question is, how does one properly use error_codes and error_conditions?
 
no clue
 
me neither
 
Xeo
I guess their task<T>::~task() dtor detaches implicitly.
 
@Borgleader can I see the full shellsort code you have?
@Borgleader that looks nothing even remotely like how I'd imagine, nor does it look even remotely like any other implementation I've seen nor can find now
 
Xeo
8:24 PM
Why is there always shared_ptr all over the place with async stuff. :(
 
@Xeo Asio? I wonder why too. I wanted to ask that a long time ago but I thought that's just how it was done.
 
@Borgleader also, why is it called hsort? Usually hsort is a heap sort...
 
As for the name, I just used the one from the lecture slides
 
STL's on in 3 minutes.
 
I wrote an HTTP client once. In PHP. Those were dark times...
2
 
SAM
8:28 PM
@Tuntuni yay!
 
Awesome, managed pointers in C++ talk.
 
Xeo
@Tuntuni Finally!
 
What's STL's talk about?
 
@Rapptz <random>
 
rand() and its badness
 
Xeo
8:31 PM
Did anyone here watch Andrei's talk?
 
Hahah, they started applauding.
They probably just want him to finish and see STL. :D
 
SAM
ya...
 
@Xeo The tuple one?
 
Xeo
ya
 
@Xeo He was hungover and it was full of typos.
 
8:32 PM
I came in too late so I didn't bother.
 
Xeo
I was wondering what STL's complain was - there was atleast one, according to a tweet. :)
And if it's about about using std::index_sequence, my online question would be redundant :(
or if he already mentioned why he didn't use it
 
Damn, I thought that someone will be able to ask the "Have you tried Clang?" question.
He destroyed my hopes by mentioning it :(
 
@Griwes LOL
 
Xeo
@Griwes haha
 
There were no indices, he used the basic <N - 1> trick
 
Xeo
8:34 PM
It's a running gag, eh
 
That should be asked instead of "Have you tried anything?" on SO. :D
Or "What have you tried?"
 
Xeo
@Rapptz I know that he used that, I saw the slides in the corner of my eye
But I didn't listen, and maybe he mentioned them and why he didn't use it
 
He was talking about how much wine he drank the previous day
 
@Xeo index or integer?
 
Xeo
lol
@Tuntuni there are both
 
8:35 PM
@Xeo google gives me nothing on cppreference
 
Xeo
template<std::size_t... Ints>
using index_sequence = std::integer_sequence<std::size_t, Ints...>;
 
@Xeo :o
Gentlemen, we're going to be traveling at 30% lightspeed real soon. Brace yourselves.
He's on the stage! WOOO!
 
Xeo
yay, STL time!
 
SAM
STL !!!!!!
 
Xeo
8:36 PM
@FredOverflow, you there? :>
 
@MooingDuck Oh, oops I forgot to test against empty sequence. I see why that would fail.
 
LOL
 
Xeo
STL ♥
10
 
rand() »it’s not even deprecated, which is kinda sad«
 
@Xeo forever
 
8:37 PM
@Borgleader yeah, but that's just an obvious corner case so I don't hold it against you
 
> This code is terrible.
 
SAM
lol
 
@Xeo Is it me or he's going at 35% lightspeed this time?
 
Xeo
hehe
 
Oh no I'm missing it.
 
8:39 PM
@Borgleader ahahahha
 
I was watching Bjarne harp on Java again.
 
Man, that joke will never get old. :D
 
how does he say srand
 
And the thing with LLVM.
 
Xeo
He has a hard time holding back. Imagine his pain when he's recording videos for C9!
@TonyTheLion "srand"
 
8:39 PM
@TonyTheLion He means "shit rand".
 
s rand
 
@TonyTheLion ss-rand
0
Q: Implementing a iterator based shell sort

sircodesalotMy shell sort looks like this: template<class T> void shellSort(T *begin, T *end) { int shell = 1; while (shell < (begin - end) / 3) shell = shell * 3 + 1; while (shell > 0) { for (auto index = shell; index < end; index++) { for (auto insertion = index; insertion >...

Hehehe....
 
@Xeo Yeah but I find it really cool. I think it just shows how much he enjoys it.
 
Okay, STL is great.
 
Xeo
Of course he is, d'uh.
 
8:41 PM
Of course. :D
 
Greater than he was before.
 
He was always the same amount of great. You just didn't realize it. :D
 
SAM
@chris Link ?
 
@SAM The live stream.
 
Oh he's bashing a stackoverflow answer rofl
 
8:42 PM
hahah
 
> I actually checked Bing and it returned the right result.
lol
 
Ha, they're bashing SO.
 
lol
 
Downvotes
 
Or rather, highlighting the shitty answers.
 
SAM
8:43 PM
haha
 
@Mysticial You mean, THE STL.
 
:11655993 It requires rand iterator. By bug, do you mean it doesnt compile or crashes?
 
I feel that that answer will get some downvotes today.
:D
 
@Borgleader nevermind, I misread your code
 
dat pun
 
8:44 PM
4
A: How do I scale down numbers from rand()?

Justin Niessnerint rawRand = rand() % 101; See (for more details): rand - C++ Reference Others have also pointed out that this is not going to give you the best distribution of random numbers possible. If that kind of thing is important in your code, you would have to do: int rawRand = (rand() * 1.0 / RAND...

3 downvotes in 2 min. already.
 
downvoted
 
@Mysticial Hahahahahahaa
 
I'm saving this video and forcing everyone who uses rand() % x to watch it.
 
someone comment "Downvote if STL sent you here" :p
 
LOLOL
 
8:45 PM
@Mysticial Should we tell him
 
See STL's GoingNative 2013 talk on rand(). — Tony The Lion 9 secs ago
 
@Borgleader Yes, tell him.
 
user1804599
@Mysticial lol
 
@Borgleader oh wait, I see it! It's a shell based on a insertion sort rather than a bubble sort :/ No wonder it didn't make any sense
 
SAM
OMG
 
8:46 PM
@melak47 I did it.
 
> Triple Treachery
 
0 votes.
 
Good one.
 
Lol
 
someone leave a comment on the Channel9 video page
 
8:46 PM
@Konrad's answer is correct.
 
Let's call this the STL effect.
2
 
> Now you have 2.000001 problems.
 
hahaha
 
in my comment
 
8:47 PM
LOL that's hilarious.
 
> and some that I can't pronounce
:D
 
He's so awesome and unlike the other talkers he's actually really funny.
 
Dang, have to go for a while.
Hope it still saves the stream.
Unlike freaking Youtube.
 
Does std::random_device for MSVC actually have entropy?
 
8:52 PM
So who's going to be the first to write a proper c++11 answer for this? xD
 
@Borgleader lol
 
I've answered it for C++11 before.
17
A: Restrict random number generation to a range

RapptzUse std::uniform_int_distribution from <random>. Example: #include <random> #include <iostream> int main() { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<int> dis(1, 1000); std::cout << dis(gen) << '\n'; } The <random> header includes a lot of...

 
There's one under the other question too.
6
A: How do I scale down numbers from rand()?

BlastfurnaceIf you are using C++ and are concerned about good distribution you can use the TR1 random extensions. #include <random> std::random_device rseed; std::mt19937 rgen(rseed()); // mersenne_twister std::uniform_int_distribution<int> idist(0,100); // [0,100] std::cout << idist(rgen) << std::endl;

 
it's equidistributed in 63 dimensions.... what the bloody fuck
 
@Borgleader LOL my thought exactly
hyperplanes and shit
 
8:53 PM
@Borgleader my reaction exactly
@Tuntuni that doesn't mean anything to me
 
Wow, std::random_device actually has entropy for VC
 
Someone posted the SO link in the comments on Channel9 and said "answer is now in the negative"
 
I wonder if someone will mention that to STL.
:D
 
Xeo
Why does everyone take away the Clang joke :(
 
@Borgleader hehe
 
8:55 PM
They are shielding from it now.
 
@TonyTheLion :p
 
> and any implementer who does that is a bad implementer and should feel bad
 
> Is a bad implementer and should feel bad.
 
dat meme
 
JBL
Lol
 
8:56 PM
@Tuntuni PWNED
 
@Borgleader DAMN! :D
 
user1804599
libc++ reads sizeof(unsigned) bytes from /dev/urandom by default and interprets the bytes as an unsigned.
 
user1804599
At least, last time I checked.
 
lol the meme on that slide
 
Ahahaha
 
8:57 PM
Damn you, I had to go back a bit and I am behind :F
 
Xeo
> Standard Says So™
 
hahaha
 
Meh, who cares if you miss it. I'll rewatch it at least 2 times anyway.
 
user1804599
How about bool?
 
@Tuntuni Not "miss", you are spoiling! :D
 
8:59 PM
Does his talk end in 1 minute? :'(
 

« first day (1056 days earlier)      last day (3897 days later) »