« first day (1133 days earlier)      last day (3832 days later) » 

8:01 AM
no.
 
I was referring telkitty since shes watched bits of it
 
@Borgleader yeah older brother?
 
morning
 
meowing
 
@User17 yes
 
8:16 AM
I just saw a hedgehog giving birth.
 
painful
 
you have a pet hedgehog or is there one living in the neighbourhood?
 
No I saw it on YouTube.
 
8:18 AM
...
 
You babies.
 
you really should find yourself a wife and start having babies because you seem to be obsessed with them
 
no thanks
I'm pretty sure that having a baby would be detrimental to my non-baby-producing anatomy.
 
morning babies.
 
JBL
Good morning.
 
8:29 AM
I have to group data by name and then by day, but I don't know how the heck I'm then supposed to for each day, get the sum of all values of that day.
I've got:
var byName = data.GroupBy(x => x.name);
var byDay =  byName.GroupBy(x => x.GroupBy(v => v.timestamp.Day));
 
er mah gerd bin!
 
you're going to bin my messages?
 
immediately.
I am the Binmaster after all.
must bin all the messages.
 
just go chat in the bin
then you won't need to bin anything
 
haha
 
8:31 AM
@TonyTheLion Sum of what values?
Make an SSCCCCCEEEE
I never know how many letters are in there so have some spare
 
heheh
 
SSCCE
 
super-soaking crowd controlling criminal comprehending crushing enterprise edition example
 
JBL
> enterprise
Flee !
 
Xeo
Ohey, Cat seems to have re-equiped "Proper Grammar" and "Proper Spelling".
and with that discovery, off to work
 
8:37 AM
Okay, I've made a SSCCE
 
If you want a sum for each day, why do you group by name?
 
because there's different names and each name will have values over several days
 
user1804599
Beh, uncapitalised public member names.
 
whatever, don't care
 
data.GroupBy(x => x.Name, x => x.GroupBy(y => y.Timestamp, y => y.Sum(z => z.Value))) or something like that
Probably better in LINQ
 
8:41 AM
hmmm
 
How would you do it in C++?
Seems easy to implement with a for-loop.
But algorithms are better.
 
user1804599
If you implement it with a for loop, you are still implementing an algorithm.
 
C++ doesn't have GroupBy
 
@rightfold But Sean said no for loops.
@CatPlusPlus Yeah, it's impossible to implement this logic in C++.
^ The lack of tone is a bit weird.
I should work on that.
 
It's not impossible.
 
8:45 AM
I know :)
I was secretly joking.
Partition could be used to group.
 
user1804599
Hmm.
 
But I don't immediately see a way getting a list of sums of each group.
accumulate perhaps
 
user1804599
Oh, per group. :V
 
Grouped by day.
Maybe with a day-iterator which has sub-iterators.
 
Hm.. LINQ
Might be a good search for crappy C++ libraries.
 
8:48 AM
partition_point seems useful
 
user1804599
lol.
 
what's so funny?
 
it's typically make_unique(Args&&... args) etc
it feels empty with only a single parameter, almost useless I'd say.
 
@StackedCrooked :effort:
 
8:51 AM
ah
never used it
 
user1804599
IntrinsicTypedArrayBasedArraySpecializationImplementation
 
cppquiz has gotten a lot harder
 
IntrinsicTypedArrayBasedArraySpecializationMutableSingletonFactoryBaseImplement‌​ation
 
@StackedCrooked Hm.
#include <iostream>
int main() {
    std::cout << 1["ABC"];
}
this was 2/3 on their difficulty scale lol
 
lolz
"B"
 
9:00 AM
Yep.
 
wait
wasn't there this gaurantee that &(*(ptr)) never dereferences ptr?
 
not that I know of
 
Xeo
C has it explicitly, IIRC. C++ may have implicitly.
 
The tend to get the question wrong because there's is too much information to keep track of in my head.
 
lol
#include <iostream>

int main()
{
    int a = 0;
    decltype((a)) b = a;
    b++;
    std::cout << a << b;
}
 
9:02 AM
@nightcracker operator* on user-defined class might have side effects. I don't know what the compiler is supposed to do.
@Rapptz That's a nice one.
 
I guess. It's 11.
 
@StackedCrooked ptr is POD
huh, I'd say 01
 
Xeo
decltype((a)) == int&
 
@nightcracker It's a bit of a trick question.
 
decltype((a)) is a reference
 
9:04 AM
@Xeo I figured
@Xeo after Rapptz told it's 11
 
@nightcracker Then why did you say 01?
Ah.
 
because I'm honest
I just told what I would've said
 
btw, quiz is here cppquiz.org
 
user1804599
@Rapptz is that a side-effect of (a) being an expression, or is it special double-parenthesis syntax?
 
former
 
user1804599
9:06 AM
Good.
 
first UB one to pop up.
#include <iostream>
#include <limits>

int main()
{
    int i = std::numeric_limits<int>::max();
    std::cout << ++i << std::endl;
}
 
Would it still be UB if i++ was used?
 
ok
challenge
what does this print?
std::cout << (&((int*)(-010))[101]);
 
@StackedCrooked the printing would be 2147483647 or whatever but increment after printing is UB.
 
@nightcracker Index 101 is out-of-range.
 
9:11 AM
@StackedCrooked nope
 
why not?
 
@StackedCrooked &
 
@nightcracker it's UB.
 
@Abyx why?
 
you can't cast an arbitrary int to a pointer
 
9:13 AM
@Abyx sure can
@Abyx dereferencing it is UB
 
lol
 
Xeo
It's stupid either way and nobody relies on the &*ptr == ptr shit
 
#include <iostream>

using namespace std;

class A {
public:
    A() { cout << "a"; }
    ~A() { cout << "A"; }
};

int i = 1;

int main()
{
label:
    A a;
    if(i--) goto label;
}
this one's weird
 
Xeo
aAaA
 
no that one is just downright evil
 
9:14 AM
@Xeo yeah
 
I think UB, jumping before constructor
 
@nightcracker think of it as a switch/case construction
 
but it's a weird usage of labels.
 
It's the same as: do { switch (1) case 1: A a; } while (i--);
 
then again, all these questions are pretty weird
 
9:15 AM
@nightcracker [101] is a way of dereferencing it.
 
'mernin..
 
@R.MartinhoFernandes No, because you take the address.
 
@nightcracker Nope, that one is totally well-defined.
@nightcracker The address of what? Of whatever undefined behaviour you get?
 
Xeo
2 mins ago, by Xeo
It's stupid either way and nobody relies on the &*ptr == ptr shit
 
Ah. This question abuses the whole "access specifier" thing (#18)
 
9:16 AM
@nightcracker C++ does not have a rule that collapses obtaining the address and performing indirection.
Perform indirection => BANG you're dead. No address for you.
 
You are dead in standard C++ land. You might live in your native compiler village.
 
@R.MartinhoFernandes oh, I thought it did. Pretty sure C does
 
Xeo
16 mins ago, by Xeo
C has it explicitly, IIRC. C++ may have implicitly.
 
@nightcracker yep. casting is not a UB, but the result of such cast is implementation-defined.
 
um..
what's the trick behind this question?
#include <iostream>

int main () {
    for (int i=0; i<3; i++)
        std::cout << i ;
    for (int i=0; i<3; ++i)
        std::cout << i ;
}
... why is this there
 
Xeo
9:18 AM
nothing
 
it's.. so plain.
 
Xeo
Just to confuse people who think ++i or i++ makes a difference in for-loops
 
> The unary & operator yields the address of its operand. If the operand has type ‘‘type’’,
the result has type ‘‘pointer to type’’. If the operand is the result of a unary * operator,
neither that operator nor the & operator is evaluated and the result is as if both were
omitted, except that the constraints on the operators still apply and the result is not an
lvalue. Similarly, if the operand is the result of a [] operator, neither the & operator nor the unary * that is implied by the [] is evaluated and the result is as if the & operator
 
Oh noes. Don't start a war now.
 
Ah hey. Question #30 is MVP.
 
9:20 AM
FWIW, Hell++ is perfectly conformant when (int*)(-010) produces the null pointer.
Only pointers are required to roundtrip through integers.
Nothing requires integers to roundtrip through pointers.
 
one implies the other
 
No, it doesn't.
 
Xeo
@nightcracker Where's that from?
 
It's simple to show that it doesn't: make pointer -> int be a conversion that always yields positive values.
 
@Xeo c89, let me check c++11
 
Xeo
9:22 AM
Not in C++11
 
My first 3/3 hard question :D
 
Make int -> pointer be a conversion that always yields the null pointer when the argument is negative.
 
Xeo
at least not with that wording
@R.MartinhoFernandes What about T* -> intptr_t? Only yielding positive values would effectively cut the available address range in half, no?
 
@R.MartinhoFernandes this is impossible if sizeof(int) <= sizeof(void*)
 
@nightcracker Who says it is
Also, no, it is not impossible.
 
9:24 AM
@R.MartinhoFernandes math
let's say sizeof(int) == 4
 
Who says all the bits in a pointer object are part of its value?
You make way too many assumptions.
 
hurr
 
Simply consider 64-bit pointers on today's x64 machines.
It's not even an esoteric architecture!
 
go on
 
@Xeo Which is exactly what happens for usermode 32bit apps on x86.
unless you override it, of course.
 
9:28 AM
there are CPU architectures where pointers can only be divisible by four, where integers and pointers use separate hardware registers, and where the pointer registers enforce constraints such as this
 
sure there might be such architectures, x64 or x86 are not
 
Today's x64 machines only have 48 bits for addressing.
 
@nightcracker Correct me if I'm wrong, but I am pretty sure the C++ spec does not assume an x86 CPU
perhaps I missed that part
 
@jalf section 9 3/4
 
:p
 
9:30 AM
@Rapptz Question 31 was MVP too :D
 
just click very hard between section 9 and 10
 
Plus, pointers have to be aligned.
 
it'll appear
 
JBL
Oh yes, first question on the cppquizz, and it's about MVP. Obviously, I missed it.
 
@R.MartinhoFernandes explain how string addressing/individual bytes works
 
9:31 AM
@nightcracker You don't address individual bytes with pointers to ints.
 
Aw man.
I don't know about futures and stuff. :(
 
@nightcracker by having each char be stored at an address that is well-aligned for chars.
 
this might be my first wrong answer
 
they represent things that occur in the future.
 
#include <iostream>
#include <string>
#include <future>

int main()
{
        std::string x = "x";

        std::async(std::launch::async,[&x](){x = "y";});
        std::async(std::launch::async,[&x](){x = "z";});

        std::cout << x;

        return 0;
}
 
Xeo
9:33 AM
@Rapptz sequential
 
that was the first question I got
 
I randomly picked z
 
Overblown callbacks.
Callback++
 
@MohammadAliBaydoun Yeah just got to that. It's one of the more harder MVP problems.
 
I'd probably fail the cppquiz hard
 
9:37 AM
> You've answered 36 of 36 questions correctly. (Clear)
 
user1804599
> more harder
 
user1804599
That's really hard!
 
@Xeo as in that will also boil down to x="y";x="z"
 
@nightcracker What cppquiz?
 
Xeo
@thecoshman ya
 
9:37 AM
@FredOverflow GIYF
 
std::queue<void*> m_CallBack;
 
@nightcracker Like there's only one C++ quiz out there :D
 
cppquiz.org
 
@Xeo huh... did that response to your the first time, because for me it showed up as being @nightcracker
 
@User17 You cannot store a function pointer in a void*. Can you?
 
9:38 AM
also, is there a way in chat to write a '@person' without actually pinging them?
 
user1804599
@FredOverflow You cannot.
 
Xeo
Don't think so
 
@FredOverflow to be frank, I have no idea
 
@FredOverflow Depends on the implementation.
 
@nightcracker I got the first answer wrong -> ragequit :)
 
9:39 AM
@FredOverflow Not portably.
 
user1804599
@thecoshman mayhaps with some weird invisible characters. :D
 
but most implementations support it on most architectures.
 
Invisible separator is not a weird invisible character. It's a normal invisible character.
4
 
@FredOverflow legacy function pointers are void* though
 
@rightfold that would be sneaky... I wonder if putting in some unicode magic to do something flip left right the '@' would work?
 
9:40 AM
@thecoshman If you were to insert a zero-width, non-breaking space somewhere, it would probably prevent pinging.
 
... but flip it left right twice, so it is still the correct way aroud...
 
@User17 Oh gosh, stop the nonsense before it's too late.
 
8 Converting a function pointer to an object pointer type or vice versa is conditionally-supported. The meaning
of such a conversion is implementation-defined, except that if an implementation supports conversions in
both directions, converting a prvalue of one type to the other type and back, possibly with different cvqualification,
shall yield the original pointer value.
 
@JerryCoffin ¬_¬ they probably just crush it down to ascii char' set
 
@User17 What's the difference between a function pointer and a legacy function pointer?
 
9:42 AM
@FredOverflow older code
 
we should ban all the weird architectures.
 
@thecoshman Hmm...so you think the line-drawing characters in that message are part of the ASCII character set?
 
@User17 So if I set the date of my .cpp file to like 10 years back, it will work?
 
JBL
@FredOverflow Dat hack.
 
9:43 AM
@JerryCoffin That would be a BOM. That's evil.
(Word joiner is the suggested replacement)
 
@FredOverflow No, it needs to be Legacy code -- you need to convince the compiler it's going to become firmware for a Subaru Legacy (is the name "Subaru Legacy" used outside the US?)
 
Xeo
> You finished with 10.00 out of 10.0 possible points.
 
Xeo
hehe
 
9:44 AM
@Xeo Same here!
 
I guess EA games would love to know about rsync
 
@Xeo You got one more zero than the max!
 
@User17 Well, those are... function pointers.
 
9:45 AM
@JerryCoffin that is not what I said at all. I merely suggesting that the 'does this name match any user in our DB' might be done based on an ascii character version of the message
 
7 mins ago, by FredOverflow
@User17 You cannot store a function pointer in a void*. Can you?
 
@nightcracker Wow, "Game devs discover 1980s technology".
 
@R.MartinhoFernandes IKR xD
 
s/game devs/dev archaeologists/
 
@User17 why not?
 
9:48 AM
@thecoshman That sounds like extra work, so my immediate guess is "no".
 
@Xeo Surprisingly easy :P
 
all I read was "blablabla EA GAMES blablabla WOW SUCH WOW blablabla TRANSFER MUCH blablabla ENCRYPTION COMPRESSION COMPLICATED"
 
@A.H. coz I am not sure whether it has changed in C++11 & C++14 standards
 
@DeadMG

> I was thinking about submitting the tutorials I wrote for consideration on cppreference. how exactly did you get in contact with them? all I see is some crappy wiki discussion page or is that where I'm supposed to be looking

Hi. I'm one of the admins of cppreference. If you have any questions, you can contact me at povilaskan at gmail.com or tir5c3 at yahoo.co.uk. It's true, however, that most discussions, even important ones, usually happen on the wiki discussion pages. That's not to say that other channers of communication are closed, though ;-)
 
@User17 why would they change void *
 
9:50 AM
@ptic12 boo
 
huh? the puppy wants to fix the cppreference?
 
they have a big wiki page up for tutorials.
 
I happen to have a bunch lying around being unappreciated.
not that some of them don't need some work, but it'd be a lot more than starting from scratch.
 
that's great :)
 
9:51 AM
oh my, I mixed up cppreference and cplusplus.com. how could I?
 
I think you can just go ahead and commit your tutorials to the wiki, even if without wiki-specific formatting.
Fixing formatting, errors, etc is much easier than writing content
 
@nightcracker fuck you. mark it as nsfw
 
@Abyx why? it's perfectly safe for work
@Abyx it's just pictures of the summer olympics
 
well maybe for your work
 
9:54 AM
It's not SFW.
Context does not matter for SFWness, because people taking a quick glance at your screen don't have it.
5
 
I can't find the tutorial section anymore on cppreference. Anyone know the link?
 
HAHA
 
@StackedCrooked There's one in the home page.
 
9:55 AM
"Jerry Coffin has invited you to join recycle bin."
 
lol
 
That's automatic.
Happens whenever you move some message.
Puppy is constantly inviting people to the bin.
 
@User17 Your pie is not very fat yet, Bailey is male and member fuctions will not fit in a void*
 
And some of those people ask permission to speak in the bin... Go figure.
 
Puppy>I am the bin master, join me in the bin!
 
9:57 AM
It's very annoying
I won't lie :|
 
@Rapptz Not to impugn your honesty, but I'll guess that someday you will, about something.
 
Xeo
Why is the bin in gallery mode anyways?
 
the random ping noises without an icon always confuse me because they don't show up stylistically on the tab.
 
user1804599
@Xeo to prevent people from starting conversations in it.
 
@Xeo Believe it or not, some people try to have conversations in such rooms.
 
9:58 AM
@Xeo because it's not a sandbox. it's not uhm a sand in there
 
@MartinJames you know a fat pie, when stretching its neck, could look very thin?
 
Xeo
We need first-class bin-support in SO chat, and not the hackaround we have.
 
@ptic12 Why is the cppreference search so bad?
 
Xeo
@Rapptz loaded question
 
e.g. you can't search for keyword articles
 

« first day (1133 days earlier)      last day (3832 days later) »