« first day (475 days earlier)      last day (4466 days later) » 

user142019
9:00 PM
Nevermind about Boost.Test I asked a question on SO.
 
I like it when people think their compiler has a bug.
 
All examples (that apply to my needs) test positive and negative seperately, I guess that's what I'll have to do
@Maxpm I found one, and one I consider a bug, even though it's technically conforming.
 
@Maxpm Compilers do have bugs. They're software, so they have bugs by definition.
 
@WTP was that resolved yet?
 
@Maxpm Hey! But I actually had a good reason to think that was a bug... :)
 
9:01 PM
How much longer till the next talk, btw
 
@Maxpm Are you saying that my code might be wrong? How dare you!
 
@MichaelMyers Forgive me, for I have blasphemed.
 
user142019
@sehe nope
 
Actually, over the past 4 years, 5/6 compiler bugs that I've found really DID turn out to be bugs.
 
@Mysticial Wow. What were they?
 
9:02 PM
I was 5/5 before asking that question.
@Maxpm Yep
Confirmed by the MSVC developers...
 
> Q: What were they? A: Yep
 
@sehe 13m
 
@WTP check the file encoding (charset and character encodings)? file and iconv can be helpful there. Also see whether your console supports utf-8 (perhaps just pipe the error to a file and view it with a capable editor)
 
Wasn't there a compiler bug that caused code to not compile if comments were not present?
 
@Maxpm I've had that with intellisense, but not the compiler
 
9:04 PM
there was a Haskell talk about a compiler bug that deleted your code (entire file) if it wasn't correct...
 
@WTP also, to disable funky localized errors/warnings, you could do LANG=C; export LANG (assuming a *NIX style environment)
 
IntelliSense sucks balls.
 
Here's the most notorious bug I've found in MSVC. (VS2008 shows it, they fixed it for VS2010)
 
user142019
@sehe the terminal does support UTF-8. I'll try piping it to a file.
 
Visual Studio 2008
WIN32 Release
Full Optimization
No Inlining


void foo(ym_uW mode){
int index = 0;
while (10000 < 10010 - index){
index++;

printf("in: ");

if (2 <= mode)
printf("2");

printf("\n");
}
}


int main(){
foo(2);
system("pause");
foo(0);
}




When compiled as "Release", the output is:

in:
in:
in:
in:
in:
in:
in:
in:
in:
in:
Press any key to continue . . .
 
9:05 PM
@kfmfe04 Oh God.
 
formatting fail
brb
 
still fail...
 
@RMartinhoFernandes I still didn't get the link
 
the usual 4-space markdown didn't work
 
I am wondering if this question is fit for re-opening, it has been edited.
 
9:06 PM
time to check newbie hints...
 
@MrAnubis Oh, I don't the talks are up yet (we watched live), but when they are, they will be on the link in the tagline.
@Mysticial Missed one line?
 
lemme try again
nope
 
@RMartinhoFernandes aaah, I'll wait :)
 
Andrei's talk is starting in ~8 minutes.
 
9:08 PM
@CatPlusPlus link ?
 
In the topic.
 
void foo(unsigned mode){
    int index = 0;
    while (10000 < 10010 - index){
        index++;

        printf("in: ");

        if (2 <= mode)
            printf("2");

        printf("\n");
    }
}


int main(){
    foo(2);
    system("pause");
    foo(0);
};
 
@CatPlusPlus Thanks
 
@CatPlusPlus nice pillow - I want one!
 
there we go:)
 
9:08 PM
@MrAnubis In the tagline, and there's a link to a stream pinned, if you don't have Silverlight.
 
VS2008 miscompiles that under full optimization
 
user142019
@sehe Piping stderr to a file gave the same results. Will try with LANG=C
 
Java 7 broke for loops. You can hardly do worse than that.
 
Dumb question
 
user142019
@sehe that doesn't work either. ):
 
9:09 PM
@WTP 'didn't work' - what do expect would happen?
CLANG obviously only alters localized error texts.
 
user142019
Oh wait a sec…
 
@WTP The piping was supposed to give you more insight in the actual data that gets the garbled display.
 
Localized error texts on programming tools are eeeevil.
 
Apparently this also gets mis-compiled on VS2008:
void foo(int mode){
    if (2 <= mode)
        printf("Passed\n");
}
int main(){
    foo(2);
    foo(0);
}
 
@RMartinhoFernandes it's playing music xD
 
9:10 PM
that's the simplified version the VS send back to be that repros it
 
@MrAnubis Yeah, it's on a break right now, but Andrei will be talking in a few minutes.
I like these two: ideone.com/YClqE and ideone.com/hFuWG
 
shoot him , writing java code!!!
xD
 
Ideone doesn't show the compilation error :( It's not really a compiler error, but a JVM stacktrace because it blew up while compiling that double.
 
Those pesky doubles.
 
@Mysticial really? It's hard to imagine a bug that would cause that to fail
 
9:13 PM
@RMartinhoFernandes apparently fixed by now. What compiler/version?
 
@MooingDuck Yep! They freaked out when they confirmed it... lemme pull that email back out...
 
user142019
$ file foo.txt
foo.txt: data
$ iconv -t UTF-8 foo.txt
Running 2 test cases...
/Users/.../DatabaseTest.cpp:31: error in "@
iconv: foo.txt:2:70: cannot convert
 
@sehe It was fixed in an update to 6.
 
user142019
Ahhrrg
 
Here's the full email:
Yikes! This is a scary one… It’s a bug in the whole program range analysis.

I reduced it to:

(code removed)


Strangely, it works if you use:

if (mode >= 2)


We’ll fix this for sure.

Thanks for the report,
-- Louis
 
Xeo
9:15 PM
Continueing
 
@RMartinhoFernandes appears so (I have openjdk-6 6b22-1.10.4-0ubuntu1~11.04.2)
 
@Mysticial that's bizzare
 
Starting.
 
Oh good.
 
static if is like enable_if?
 
9:16 PM
static if is a D feature.
 
@sehe IIRC it was fixed on 14.
@TonyTheLion But on steroids.
 
Trees!
 
Here's one MSVC bug that crashed the compiler.
VS2008
#include <iostream>
#include <omp.h>
typedef struct{
    int *A;
} type1;
typedef struct{
    type1 *B;
    int p;
} type0;
inline void foo(type0 T){
}
int main(){
    type0 T;
    foo(T);
#pragma omp parallel num_threads(2)
    {
        int i = omp_get_thread_num();
        if (i == 0){
        }
        if (i == 1 || omp_get_num_threads() != 2){
        }
    }
    system("pause");
    return 0;
}
 
Code blocks go on ideone.
 
9:17 PM
Interesting example.
 
fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x6D252DC9:0x3C9E9924]', line 182)
 
> Nice touch, Andre
lol
 
:D
 
No is 0!
 
anyone here know some good site with a theme "pragma wizadry"
 
9:18 PM
Reminds me of D mixins.
 
@CatPlusPlus 0! equals 1
 
but static if is not even in the standard yet, right?
 
No.
There are two proposals in the queue, though.
 
Here's your enable_if.
 
9:19 PM
His english accent is really hard to understand for me :(
 
@MrAnubis "English" accent?
 
he's not English
 
@MooingDuck going native talk
 
Xeo
Romanian IIRC
 
he's Romanian
 
9:20 PM
Not from Rome, from Romania.
 
That would be Roman.
 
ohhhh, compiler magic
 
I had much more trouble listening to Hans Böhm
 
__obscurity.
 
Native isn't on yet, is it? My VLC stream frozen...
 
9:21 PM
lol
 
It is.
 
His talks require his book reading as perquisite? :)
 
@MrAnubis No.
 
@kfmfe04 way too cold over with you then
 
His book is about black magic. This talk is for mortals that can understand Romenglish..
 
9:22 PM
heh
 
@RMartinhoFernandes black magic meets mortals sounds lethally dangerous
 
@RMartinhoFernandes lol
 
Dadada.
 
dotdotdot? Let the fun begin
 
I agree with "unduly complicated"
 
9:25 PM
This remote.
 
That resonates with me. A culture of tricks. It is basically the problem with TMP and an oft-heard complaint about boost
 
Chat is broken!
Not anymore!
 
see there here, here here, here... (no, no we don't)
 
@MooingDuck He has a laser.
 
9:30 PM
went offline
 
@RMartinhoFernandes he probably does. I still can't see it
 
when Andre says compilation, it sounds like copulation
 
delete if
sounds funny
 
Yay, C++ has 50% of static if already!
 
why do templates always use struct instead of class ?
 
9:34 PM
Default-public > default-private.
 
@TonyTheLion Saves typing public:.
Not other reason really.
 
ah I see
 
I so don't like template <class T>.
 
I like how he starts explaining the code and then gets to static if "and you know, it's an if!"
 
Xeo
@CatPlusPlus The space in between?
 
9:35 PM
No, class.
 
typename FTW.
 
Xeo
I like class. Less typing.
 
Also, space in between.
 
Space is good.
 
@Xeo I have code completion. Typing is not an issue.
dadada
 
9:37 PM
TMP voodoo
 
user142019
Nah, typing cl return is faster than typen return.
 
@kfmfe04 Voodoo? That's quite simple.
 
this TMP stuff is mind boggling
at times
 
This is not TMP.
 
@RMartinhoFernandes hehe - simple for a Robot
 
9:37 PM
"It's an if!"
 
union trick
 
@CatPlusPlus isn't static if TMP?
 
If one of the types in the pair is empty, you only need to store the other. union is perfect.
 
meh, what is it then?
 
9:38 PM
@TonyTheLion well, there's no template, that's a hint
 
enable_if is TMP no?
 
It's just metaprogramming. No templates.
 
@TonyTheLion it's a whole new thing
@TonyTheLion yeah, that's a template (non-template-metaprogramming? NTMP?)
 
ah damnit
 
Would you call macros TMP?
 
9:39 PM
I'm an idiot :(
nope.
 
@TonyTheLion It's awesome.
 
yea I got that
T* stuff = new T();
initialized stuff
:P
 
"One slide" is a good measure of code.
 
is that new(&*b) T(x); a placement new?
 
9:43 PM
Dammit, I can't win one today.
 
ty
 
I think static if would be a nightmare for compilers. static if(sizeof(int)==4) {int a; } else {long a;} a = 7; (The fact they have no scope)
 
And how is that a nightmare?
It'll either be int a; a = 7; or long a; a = 7;.
#if SIZEOF_INT == 4
int a;
#else
long a;
#endif
a = 7;
 
"pound if"
 
Same thing, in this case.
 
9:45 PM
Template constraints = goodbye enable_if.
 
Xeo
Yeah, but it's not much different actually
 
I said that before. :.
 
Xeo
It just doesn't tamper with the signature
 
And that's good.
And looks less ugly.
 
> designed for maximum noise
 
9:47 PM
Here's enable_if.
 
is_forward_iterator
 
Xeo
Pff, trailing return type!
 
It's missing a typename!
 
what is_convertible do?
 
Xeo
What it says
 
9:49 PM
Checks whether one type is convertible to another.
 
Test if a type is convertible to another.
 
@CatPlusPlus ah, the problem only happens if instead of sizeof(int) you have sizeof(templatetype) instead. Sorry. The compiler then has to check both paths for validity. With preprocessor, it only checks one
 
No, he said before that only one branch is compiled.
 
@TonyTheLion is_convertable<A,B>::value is true_type if B is convertable to an A.
 
@MooingDuck It's good ole two-phase lookup. Only simple checks are required.
 
9:49 PM
@RMartinhoFernandes right, but it makes the first phase much harder doesn't it?
 
@MooingDuck No, it's the same.
 
oh right
 
@RMartinhoFernandes I'd have to check exactly what compilers (are supposed to) check during the first pass
 
@MooingDuck Whatever is not dependent on template parameters (i.e. never changes), and very little semantics on the rest.
 
@RMartinhoFernandes for ideone.com/KqGd7, the compiler could check almost nothing on the first pass, right? Syntax I guess.
 
9:55 PM
@MooingDuck Yes, pretty much only syntax. But some semantics: you can't return something from a void function(...). This should be an error, even if not instantiated: it's invalid irrelevant of what T is.
(MSVC probably blows this)
 
@RMartinhoFernandes yeah, it would.
 
is Concepts eventually going to make it in?
 
@kfmfe04 not that I've heard
 
Xeo
Wait for Bjarne's and Andrew's talk
 
Here's your implementation stuff.
 
10:01 PM
i++; static if(false) { increment i }
 
#define DOC static if(false)
 
@RMartinhoFernandes That must die. It should very much be parsed syntactically
 
I like the second option better.
 
@CatPlusPlus #define DOC(...) static if(false) { __VA_ARGS__ } else {} safer.
 
@RMartinhoFernandes I want it to check as much as possible functions that I don't instantiate before I ship them in production code
 
10:02 PM
You could static if on compilers.
 
@CatPlusPlus D has a version keyword that does something like that, I think.
 
I'm not sure which one I prefer.
 
DOC {
    Blah blah.
    Blah blah.
}
 
I want static_if basically.
@CatPlusPlus static if(true) {} else then.
 
if I made a fixedpoint class, do I overload std::is_arithmetic to be true or not?
 
10:03 PM
Yes, you're supposed to (specialize).
 
version (GCC)
{
// GCC-specific black magic...
}

version (Clang)
{
// Clang-specific black magic...
}
 
Mardown (previous Markdown score + 1) : 0 users that can't do multiline Markdown
 
*Flips table*
 
0
Q: What problems can appear when using G++ compiled DLL (plugin) in VC++ compiled application?

Niklas RI use and Application compiled with the Visual C++ Compiler. It can load plugins in form of a .dll. It is rather unimportant what exactly it does, fact is: This includes calling functions from the .dll that return a pointer to an object of the Applications API, etc. My question is, what probl...

 
> Time for ritual speakercide
lol @ STL calling the slide by number.
 
10:06 PM
Lol.
 
It's the one missing the typename!
 
@RMartinhoFernandes Yeah. xD
Hahahahaha.
 
> Can you go back to 18?
Yes, please shortcircuit this!
-Werror FTW.
 
-Wall -Werror.
 
*Makes warnings errors*
 
10:11 PM
Was that Bjarne falling asleep?
 
Wait, what?
 
I missed that.
Oh, so programming gurus do get hangovers.
 
@EtiennedeMartel Why do you think Bjarne was falling asleep?
 
Dunno, looked like it.
A bit.
 
Maybe he was just NOPping.
 
10:13 PM
It's a stretch.
 
@Maxpm Bjarne is not a bot. He naps.
 
@RMartinhoFernandes Have you ever seen Bjarne Stroustrup and the Terminator in the same room together? I thought not.
 
There's no question!
The end.
 
just like there is no state in the empty struct
 
10:16 PM
I'm afraid much of that talk was over my head.
 
Like what? It's if.
 
Come on, "it's an if!"
 
I need to brush up on my template trait voodoo.
 
Just running inside the compiler.
 
should std::make_unsigned<std::integeral_constant<int, 2>>::type work?
 
10:17 PM
His counterexamples.
 
@MooingDuck No. integral_constant is not a scalar type (or whatever the category is supposed to be).
 
even I understood the bits I saw
I'm the dumbest dumbass there can be when it comes to this stuff
 
static_assert( ! is_same<integral_constant<int, 2>, int>::value, "Just in case you're confusing this");
 
Xeo
Gaaaah, of course my router had to fail me...
 
You missed Bjarne falling asleep.
 
Xeo
10:19 PM
Huh?
 
(Well, everyone except the Cat did.)
 
Xeo
Great, now where did router fail me exactly..
Btw, 5:15, right next to Chandler. And he's only meditating it seems
 
@RMartinhoFernandes I wasn't. My fixed point class takes a integral_constant template parameter as the "denominator", and uses that same underlying type as the numerator, which made make_unsigned much trickier to implement than I expected. So I actually want an unsigned version of that integral_constant :/
 
Well, the point is integral_constant<int, 2> has only one value: {}. That's not a number, so unsigned makes no sense for it.
So, you want integral_constant<unsigned, 2>?
 
@RMartinhoFernandes true. I had to make it so make_unsigned only works if the template type is a integeral_constant. It's not that big a deal, since I can't imagine wanting to instantiate it with anything else
@RMartinhoFernandes only on a moral level, in reality, it was easy to fake
 
10:25 PM
5 hours ago, by Xeo
@MooingDuck https://illumeweb.smdisp.net/collector/Survey.ashx?Name=mscpp11
anyone done that survey yet?
 
@sehe yeah I did. I starred it too, but I guess it was the only one
 
worth it?
 
@sehe it's an online poll. How should I know? I just voted. It just lists all the C++11 features that MSVC11 doesn't have, and asks how bad you want each one.
 
@MooingDuck 'for profit, moonlighting' ? wtf is that
 
Xeo
@sehe Me
 
10:27 PM
@sehe I recall reading that somewhere today. Was that associated with the survey?
 
@MooingDuck payed attention much :)
the first question has that as an answer checkbox
 
Looks like they're serious about this.
 
@sehe pft, that was hours and hours ago. I barely recall lunch (1.5 hours ago)
 
@sehe It's having two jobs.
 
Start.
 
10:28 PM
@RMartinhoFernandes aha
 
Moonlighting is the practice of holding a secondary job in addition to one's main job. The word may also be used metaphorically. For example a moonlighting protein is a protein that performs more than one biological function. Moonlighting may also refer to: * Moonlighting (film), a 1982 drama film by Jerzy Skolimowski * Moonlighting (TV series), broadcast in 1985–1989 and starring Bruce Willis and Cybill Shepherd * "Moonlighting" (theme song), from the above TV series, performed by Al Jarreau * "Moonlighting" (song), a 1975 song by Leo Sayer * Moonlighting (album), the 1986 debut albu...
 
Or not.
Or yes.
 
Hmm, the C++11 standard is confusing about if I should overload is_arithmetic (and similar) for a fixedpoint class. "Types bool, char, char16_t, char32_t, wchar_t, and the signed and unsigned integer types are collectively called integral types" "There are three floating point types: float, double, and long double." "Integral and floating types are collectively called arithmetic types."
"struct is_arithmetic; T is an arithmetic type (3.9.1)"
 
@MooingDuck Check if you can specialize it.
 
@RMartinhoFernandes I'm still reading :/
 
10:33 PM
17
Q: What can and can't I specialize in the std namespace?

R. Martinho FernandesUsers are allowed to add explicit specializations to the std namespace. However, there are a few templates that I am explicitly forbidden from specializing. What templates can and can't I specialize?

> Anything in <type_traits>: "The behavior of a program that adds specializations for any of the class templates defined in this subclause is undefined unless otherwise specified."
Hmm.
I need to fix that answer. /cc @Kerrek
 
@RMartinhoFernandes gah, I even have that favoriated so I could find it when needed :/
 
@RMartinhoFernandes What's happening?
 
There's (at least) a type in <type_traits> that can be specialized.
 
Xeo
common_type?
 
@RMartinhoFernandes is_constructible?
std::was_here?
 
10:37 PM
@Xeo Exactly.
 
How is common_type even implemented?
 
Xeo
?:
 
Anyway, doesn't that fall under the general rule?
@Xeo I'm pretty sure you can't specialize the ternary conditional.
 
@KerrekSB With ?:. That's what @Xeo meant.
 
Xeo
typedef decltype(true? declval<T>() : declval<U>()) type;
 
10:40 PM
so for a fixedpoint class it appears there's nothing (useful) that I can specialize in type traits, and I can't specialize numeric_limits either? Huh. Unexpected
 
Silly is not a number.
 
Xeo
IOW, type classes?
 
@Xeo Ohh, insidious. It doesn't do any TMP magic at all!
 
Mentioned Haskell.
 
@Xeo Semantically, yes, I think it's pretty much the same.
 
10:42 PM
"C++ type system has to suck."
 
That's what I was thinking.
 
Here's someone asking for crystal ball advice. "How else am I supposed to do it?"
@CatPlusPlus Is it loose performance? That is suck.
 
Conversions.
 
Btw, new GHC has kind polymorphism. Haskell is getting to the third level.
> The semantic goes there, let's not go there (...)
 
There be semantics.
 
10:49 PM
"a coherent set of aberrations" /a single "aberration" lol
my guess, many people are skipping this talk
 
Google sucks, doesn't it?
 
Tsk tsk, 0x.
 
Holy hell, that's verbose.
 
Xeo
Bjarne mentions in his C++0x FAQ that he likes 0x more than 11 :)
 
10:52 PM
He titled the slide "C++0x concepts".
 
That's not a trope.
 
Lol 130 concepts.
 
Holy Finagle.
Great, no axiom checks. Some people thought that insanity was included.
Or, "actions", as Bjarne says.
 
I really thought it was "actions".
 
10:56 PM
I hope Tomalak isn't there, so he won't try to point out we can't 'look at the STL'
 
But the STL is right there. You can look at him.
 
Zing
 
We'll be able to look at him during the panel, though.
Meh, Internet getting cranky.
 
lol
STL's question in Andrei's talk was cool
he even kept the slide numbers
like a real geek, lol
Andrei is funny to watch.
not watching Bjarne's talk
 
I lost stream connection. :.
 
10:59 PM
:(
 

« first day (475 days earlier)      last day (4466 days later) »