« first day (455 days earlier)      last day (4498 days later) » 

1:00 AM
@StackedCrooked Maybe tomorrow.
 
Haha. No worries.
 
@MooingDuck: Still a bit much considering iterators are typically passed by value
 
@StackedCrooked FWIW I deadlocked when starting with ./Release/Linux/x86_64/bin/TetrisTest --gtest_repeat=100 --gtest_also_run_disabled_tests
 
Off to bed :)
 
1:01 AM
@Grizzly a bit :(
 
@MooingDuck Oh, what's in the 16 bytes that a debug build adds?
 
@RMartinhoFernandes just extra space since some iterators are larger in debug.
@Xeo stupid diamond inheritance with virtual pointers at every level.
 
Is there a good way to port anonymous unions to standard C\++?
 
What's standard C\++?
 
Your favourite language! :-)
I need it in C, but a C++ answer would suffice.
 
1:07 AM
Haskell?
 
@KerrekSB I think you have to name it, otherwise, not for C
@KerrekSB there might be some crazy boost-mojo that can fake it
 
@MooingDuck AUs are equally invalid in C and in C++
 
@KerrekSB right, but C++ can fake a lot of stuff
 
Minimal example:
struct element
{
    union
    {
         int foo;
         int bar;
     };
};
Take element e;, then my code must be able to say e.foo and e.bar.
@MooingDuck I'm listening :-)
 
union element {
    int foo;
    int bar;
};
You need a more complex example :P
 
1:10 AM
@RMartinhoFernandes Wait, I have multiple such unions inside element.
Like e.foo3 and e.bar3 are the same, but e.bar8 is a separate thing.
 
Are the union members of the same type?
 
@KerrekSB inheritance? ideone.com/nvs25
 
struct element {
    union {
        COUNT a;
        COUNT b;
        COUNT c;
    };
    union {
        BYTE d;
        BYTE e;
    };
};
I think that's moderately representative
 
@KerrekSB inherit from the unions
 
That's legal?
Wow.
 
1:12 AM
COUNT and BYTE are both integral I assume
 
@RMartinhoFernandes I dunno, worth a try
 
@MooingDuck Very neat! Now the C answer please, as I actually have C :-S
 
@MooingDuck GCC doesn't like it.
 
@MooingDuck Wait, you don't know if that's valid?
 
@RMartinhoFernandes nope, not legal ideone.com/xVuWE
 
1:14 AM
In C++ you can hack something with reference members. Not a pretty sight.
 
error: base type ‘foo’ fails to be a struct or class type
@RMartinhoFernandes Yes, that just occurred to me -- make an outer-scope reference initialized to a union member.
 
Btw, anonymous unions are legal C++11.
 
@RMartinhoFernandes Srsly?
What about C11?
 
Lemme check.
 
@KerrekSB I thought anonymous structs were illegal but unions were legal
 
1:15 AM
@KerrekSB §9.5p5
 
@RMartinhoFernandes For those without a copy of the standard in their brain?
 
C11 allows them too.
 
Or proof-by-gcc: it compiles with -std=c1x
/me changes project settings
 
Problem fixed by changing compiler settings :-S
 
1:19 AM
@KerrekSB to C++?
 
To C11.
-std=c1x is C11.
 
@RMartinhoFernandes Good stuff. I hope GCC4.7 fixes the names of those options.
Wait, now I get a new warning:
 
@KerrekSB It adds -std=c++11. Not sure about C11 though, that's pretty recent.
 
warning: type of bit-field ‘started’ is a GCC extension [-pedantic]
 
Ugh, what?
 
1:22 AM
Wait, I need to open the culprit file. Give me a minute.
Hm, it's just a plain bitfield.
BOOLEAN started : 1
 
@KerrekSB Yep, supports both -std=c11 and -std=iso9899:2011.
 
@RMartinhoFernandes Are they the same?
 
@KerrekSB What's BOOLEAN?
@KerrekSB Yes.
 
Is there also a gnu11?
@RMartinhoFernandes No idea, something integral for sure.
@RMartinhoFernandes It's an enum { FALSE = 0, TRUE }; actually.
 
@KerrekSB Yes.
 
1:24 AM
@RMartinhoFernandes Ahh, GCC. So cutting edge. So full of blood from all the cut edges.
 
@KerrekSB Maybe you can't have bitfields made out of enums?
 
@RMartinhoFernandes You're asking me?? Where's your brain-interface-query-power?
I changed it to char and get the same warning,...
... as well as an overflow warning somewhere else in the code :-S
 
Xeo
I thought bitfields need to be unsigned?
So, make it unsigned started : 1
 
@Xeo Interesting. Now the overflow is gone, but the warning is still there.
 
> A bit-field shall have integral or enumeration type
 
1:27 AM
SO question?
 
Seems allowed.
 
Xeo
@KerrekSB Err, whole struct please?
 
OK, it compiles in a small example...
@Xeo yep, one sec
 
Oh, wait, it's different for C.
> A bit-field shall have a type that is a qualified or unqualified version of _Bool, signed int, unsigned int, or some other implementation-defined type. It is implementation-defined whether atomic types are permitted.
 
1:29 AM
No enums, no chars allowed.
 
Xeo
@RMartinhoFernandes Well, since he has C11, he should just use _Bool
 
Ah, unsigned int works.
 
Xeo
or rather typedef _Bool bool;
 
@Xeo But you see, we must also support MSVC6
 
Xeo
1:30 AM
@KerrekSB I told you to do unsigned started : 1
 
So unsigned int it is.
 
Xeo
Just unsigned should suffice
 
@Xeo Didn't I mishear that as unsigned char? Yes I did!
It was less typing, since I already had the char
 
Xeo
Err, right...
 
OK, why did I not see this warning in C99?
 
Xeo
1:31 AM
... anybody got the C99 spec handy? Mr Robot? (mindy in that case)
 
@KerrekSB Same thing.
Blame GCC.
The only difference is just the lack of mention of atomic types.
 
@RMartinhoFernandes Nope, it was just drowned out under the "anonymous union" warnings :-)
 
lol
Also, you guys can write code with the specs open all the time?
 
Xeo
I have the C++ spec open most of the time
And yes, I can code just fine
I just leave it in the background and tab there as needed
 
@RMartinhoFernandes What's the question?
 
1:37 AM
Oops, I meant, without.
 
yes
I only use one implementation so the spec isn't much of a muchness to me
 
Xeo
Same
I only need it open when I play around
Which I do way too often in recent time
 
Who uses linux?
 
I use it to look up functions.
 
Xeo
@ElectroNerd does a debian vbox count?
@RMartinhoFernandes I use google for that
 
1:38 AM
Sure, just the unix environment
 
@ElectroNerd Does dual-booting count? (even if I'm in Windows mostly)
 
Sure
I'm fairly new to it
 
@RMartinhoFernandes Of course - I usually use cplusplus.com :-)
 
@Xeo I might start doing that now too, but before Google would give you cplusplus.com.
 
I'm installing MPLABX on my Fedora VBox and it is a .run file. How can I run it?
 
Xeo
1:39 AM
 
@KerrekSB Ignoring the bad stuff, that doesn't have C++11.
 
@Xeo "This section is incomplete."
 
@ElectroNerd It's probably an executable file. Did you try ./file.run?
 
Xeo
@RMartinhoFernandes Yeah, now I get both cplusplus.com and cppreference.com at the top
 
Let me try, hang on
 
Xeo
1:40 AM
@KerrekSB :|
 
@Xeo Ah, I just type c++ thingy on my address bar. I set up a shortcut to search cppreference directly.
I just keep forgetting about it.
 
Xeo
Ah, ok
I type std::thingy
 
bash: ./mplabx-ide-v1.00a-linux-installer.run: Permission denied
I'll try su
 
@Xeo Firefox doesn't like that.
 
Xeo
sudo should be sufficient (if you are in the sudoers list)
@RMartinhoFernandes What?
 
sudo ./mplabx-ide-v1.00a-linux-installer.run: command not found
 
If you ls -l file.run does it show x permissions?
 
Xeo
@RMartinhoFernandes ...
Type it in the Google search box, will ya?!
 
Google search box? What's that?
 
Xeo
Also, ctrl+K is "jump to google search box" if it wasn't being overriden by SO
 
Oh, the small boxy thing on the right?
 
Xeo
Yes
 
I'm spoiled by Chrome :(
 
Pedantry alert: is this an rvalue?
 
1:44 AM
Or rather something even more specific?
 
A prvalue to be precise.
 
Ah, that one.
 
Xeo
When I look for something (I have tabs below the address bar), I ctrl-T+<tab> my way into it
 
@KerrekSB It depends on whether it is an rvalue.
 
Xeo
@StackedCrooked no
 
1:45 AM
I'm trying to troll Oli.
 
Xeo
this is always a prvalue of cv X* type for class X.
 
@Xeo Is it never cv X * const?
 
@Xeo Oh, I see now that he is referring to the this-pointer. I thought he was talking about something unmentioned.
 
@Xeo That's too many keys. I just type o. Vimperator is awesome.
 
Xeo
@KerrekSB Err, it's a prvalue, you can't assign it anyway
 
1:46 AM
@StackedCrooked this is a keyword in C++...
@Xeo OK, but is it const?
 
Xeo
No
 
I know... pedant.
 
@KerrekSB I think he knows that :P
 
Xeo
@KerrekSB Bad troll, this can be cv-qualified. :P
 
@DeadMG But he made "the this-pointer" sound like there were tons of others, sort-of "this"-like things out there.
 
1:47 AM
@KerrekSB You can use int to store integral numbers in C++.
 
@StackedCrooked No - you can use int to declare objects that can store integral values.
 
Xeo
Also, Oli's answer is, standardese speaking, wrong. :)
@KerrekSB *declare objects
 
@KerrekSB I admit that I can't win the pedantry game.
 
Pedantry wars!
 
@Xeo Hmm... do you qualify the pointer (variable), or the pointer's type?
 
Xeo
1:48 AM
Now I just wanna standard-quote Oli's answer down to hell
@KerrekSB err... what?
 
@Xeo What did I say? :-)
@Xeo Be nice about it, though
 
Xeo
> In the body of a non-static (9.3) member function, the keyword this is a prvalue expression whose value is the address of the object for which the function is called. The type of this in a member function of a class X is X*. If the member function is declared const, the type of this is const X*, if the member function is declared volatile, the type of this is volatile X*, and if the member function is declared const volatile, the type of this is const volatile X*.
I'm too lazy to actually make that quote look nice
 
Like telling a girl that her small breasts aren't such a problem, because her thick brain is distracting enough.
 
Xeo
Note that it's always cv X*, not X* cv
@KerrekSB I like smaller breasts!
 
@KerrekSB "her small breasts aren't such a problem, because her ass is distracting enough"
 
1:50 AM
@Xeo Because you're a limp-wristed city dweller!
 
@RMartinhoFernandes That wouldn't be a back-handed double insult, though
 
I don't find girls with a huge head attractive..
 
Xeo
And Oli's answer is wrong in that the overload is not selected through the qualification of *this
 
@Xeo Wait, I must catch up and re-read
 
Xeo
1:51 AM
Rather, the qualification of *this depends on which overload is chosen
@KerrekSB And conversely, I dislike big breasts
 
@KerrekSB Treating her like a sexual object is not an insult?
 
Isn't what you say here recorded for life?
 
Xeo
So?
 
It's recorded beyond life.
 
1:56 AM
Btw, what's the relation between big breasts and cities?
 
Why do you think there is a relation?
 
@StackedCrooked @Kerrek associated @Xeo's preference for smaller breasts with city-dwellers.
 
Ah I see.
I guess German housewives are traditionally big-breasted and he wanted something else for a change.
 
"Traditionally"?
 
eh
 
1:59 AM
You mean "stereotypically"?
 
Just a guess.
 
if you have big breasts, then there won't be a big enough gap for me to rub my face in
 
@RMartinhoFernandes Traditionally sounds nicer.
 

« first day (455 days earlier)      last day (4498 days later) »