« first day (391 days earlier)      last day (4557 days later) » 

12:07 AM
C:\dev\code\projects\stuff>uac net start
uac.exe is now running: C:\Windows\system32\cmd.exe /D /C C:\Windows\system32\net.EXE "start" & pause
Still creates new console, but meh. I think that's unworkaroundable.
 
Xeo
@Cat: What's the problem?
 
How does one edit room description?
 
From room info page.
@Xeo There's no way to elevate console app without it detaching from non-elevated console.
Or, I don't see it.
 
Xeo
Elevate in the sense of elevated rights?
 
12:22 AM
Elevate via UAC.
 
@CatPlusPlus Thanks
 
Xeo
I hate the UAC. First thing after installing a fresh win is disabling it :D
 
Sometimes I'm very tempted to make a universal List of Typical Problems and Questions and Idioms for each programming language (e.g. see the comments under this question). For example, every PHP question would be about nesting arrays.
 
Xeo
@KerrekSB C++: Most vexing parse.
 
A typical C# question might be about using Unicode ina widget.
 
12:25 AM
Nesting arrays?
(PHP doesn't have arrays, let's start with that. :P)
 
C and C++: What is the result of ++i + i ++i. Though I'm least convinced about The Typical C++ Example
 
Meh, it's not a typical problem. It's an academic question.
 
I'm also looking for typical ways questions are phrased. Can't put my finger on it yet, but I have a strong feeling that there's a pattern.
@CatPlusPlus How do you mean??
 
@CatPlusPlus What are you talking about? PHP does have arrays.
 
Besides, we have .
 
12:26 AM
$a = Array();
 
It's not an array. They call it an array, but it's a mapping that emulates array semantics.
 
@CatPlusPlus Are you talking about PHP assoc arrays, I will believe it for that.
 
Typical MySQL question: "I have a query $sql = 'SELECT name FROM table WHERE id=$foo["bar"]'..."
@CatPlusPlus Well, the language itself calls them "arrays". They're not the same as C arrays of course.
 
Goodnight.
 
I'm not following Java too much, but the "Typical Idiom" must be "declare it Object and cast everything at runtime."
@LewsTherin </>
@CatPlusPlus Wait, there's no php-faq?
 
12:36 AM
@KerrekSB Array is a well-defined term. What PHP calls arrays is not arrays.
@KerrekSB That's not really a MySQL question, is it. :P
Also, what about nesting arrays is typical for PHP?
 
12:53 AM
@CatPlusPlus Yes, that was the point :-)
@CatPlusPlus I don't know, but it seems to be an incredibly popular design pattern. Almost every other PHP question is about manipulating deeply nested arrays in one way or another, or about serializing and deserializing arrays.
 
1:30 AM
 
1:42 AM
When is the last time you saw one of your aunts or uncles?
 
2:14 AM
@StackedCrooked last christmas (or actually new year). i am probably one of the poorest men in Norway. but Christmas holiday involves visiting relatives etc., so I had mostly only "nice" clothes. then at the end, dropping by my 90+ years old aunt on my way to the airport, she remarked on people trying to make a good impression. she used to be pretty sharp, and generally she would lighten up when i visited, but not this time. :-(
one earlier incidence was some years ago. my aunt Irene was dying from cancer during the Christmas holiday (as my father and my uncle did some years earlier than that again). it was a taxing experience, and in the family we had some severe disagreements over her medication (i very much disagreed with reducing it in order to let some new-age pyramid stuff have a chance to work). in the new year i interviewed with Tandberg, an the HR guy (I think) asked if I'd had a nice holiday.
Hm, I noticed that someone had "voted up" the third comment for the answer below. How can people be that stupid? How?
7
A: C++:How to pass reference-to-function into another function?

Alf P. Steinbach#include <iostream> using namespace std; void doCall( void (&f)(int) ) { f( 42 ); } void foo( int x ) { cout << "The answer might be " << x << "." << endl; } int main() { doCall( foo ); } Cheers & hth.,

 
cpx
2:42 AM
hm wonder why T::& is not allowed.
 
@cpx could you give an example of the usage you're thinking of?
 
cpx
    struct T { int f() { return 42;} };
    int main() { int (T::&p)() = &T::f; }
 
Can't you write
int main() { int (&T::p)() = &T::f; }
?
 
cpx
yes
 
2:59 AM
argh, jets in BF3 are so annoying
 
@cpx sorry, i can't find any way to express member references. possibly they don't exist.
0
Q: Norwegian keyboard keys don't work with Ubuntu in VirtualBox

Alf P. SteinbachI just installed VirtualBox (from Oracle) in Windows 7, and created a virtual machine with latest Ubuntu. Here in Firefox I can use the left Ctrl key, while the right one doesn't have any effect. However, I can't use the AltGr key (also known as Right Alt) to produce e.g. curly braces like {} (I...

 
3:55 AM
guys, if there're any OpenCV Ninjas pls hav a luk at my post at stackoverflow.com/questions/8084461/… :)
strugglin with this for like 2/3 days :S
 
4:09 AM
make the variables local
oh my
@coder9 don't use the windows API CreateThread. at the minimum you need to keep the runtime library informed, using its thread creation function. possibly OpenCV has its own thread creation function that additionally keeps OpenCV informed; if so use that.
 
What about using "
Thread* newThread = new Thread(new ThreadStart(0, Test::Work));" ?
 
Dunno. Where did you get the Thread class from?
 
threads in VC++ are so confusing :(
 
Are you really targeting .NET?
 
no. im working visual c++
the above code sample works fine
 
4:22 AM
Then I think you're doing something wrong, like testing it in a .NET project.
 
so what are the things u think that I should luk at?
 
beginthreadex might work or not, depending on the OpenCV threading requirements
I would also look at the OpenCV docs to check if there is explicit threading support.
Since you have the library installed you also have the docs available locally, as a PDF file.
By the way, I think it is reasonable to write "u" to save typing, but writing "luk" just gives bad impression. Always write "l00k".
 
ok @AlfPSteinbach thanks a lot. i will hav a l00k hehe :)
 
 
2 hours later…
6:15 AM
It's Friday Again!!!
Wish I could change the caption.
 
6:35 AM
You mean, you encountered miss Friday from Heinlein's novel: a beautiful artificial person working as an assassin and living through the final stages of corporate shenanigans leading to WWIV?
room topic changed to Lounge<C++>: Well it's Friday again. U know, that beautiful assassin. [c++] [c++11] [c++-faq]
 
7:19 AM
today is 11.11.11 here! have u got it already?
 
7:53 AM
Do Americans realise that tomorrow is 11/11/11 and not 11/11/11?
2
 
8:24 AM
0
Q: How to get the opposite value of a bool variable in C++

Terry LiYifengTo me, a bool variable indicates either true or false. Some bool variable was defined and initialized to a value unknown to us. I just want to get the opposite value of it. How should I do it in C++?

how the devil did that get two upvotes
 
user457812
Two stupid people thought this question was useful?
 
user457812
I personally think karlphillip's answer is the best.
 
@Nil - it would be good if it came with a disclaimer and was showing all of the "creative" ways you could do it
 
user457812
I would hope nobody looks at his answer and thinks it's genuinely good.
 
as it stands it looks like he's advocating if (bVal == true) { }
given the question I suspect the superfluous use of the ternary operator may be lost on it's target audience
 
user457812
8:32 AM
I wouldn't really be concerned about that.
 
user457812
If they get it, fine, if not, they've got bigger problems than not getting a joke.
 
I was trying to work out: if the type is bool is ~ guaranteed to be the same as !? (clearly it can't be for char unless CHAR_BIT == 1
 
0
A: How to get the opposite value of a bool variable in C++

Alf P. SteinbachYou can choose whether you want to write !, or not, or some mixture. However, still as of version 10.0 Visual C++ does not have the reserved word not built-in. So for Visual C++, if you want to use not you have to include the [iso646.h] header, which is a header from the standard C library, gua...

 
(I'm adding std::not1 into mine :) )
 
user457812
Is bool considered an integral or enumeration type?
 
8:39 AM
(maybe)
 
user457812
Yep, integral types. Well, they "behave as integral types."
 
@awoodland ~ isn't available for bool, so you'd get an integral promotion. Then the end result would not be the same as ! once converted back to bool. So no.
 
user457812
What he said.
 
who said an enumeration isn't integral?
 
@LucDanton - that would match my observation in a quick test about ~
 
user457812
8:42 AM
I'm just going off what the standard said. ~'s operand has to be an integral or enumeration type.
 
user457812
Well, an old working draft of the standard, so I'm running off outdated stuff.
 
Hello
 
I'm basing my 'reasoning' on the fact that not even arithmetic operations are available on types smaller than int.
 
@LucDanton l00king at the standard an enumeration participates in integral conversions and is very integral-like but isn't formally itself an integral type. for ops on small types consider ++x.
 
hi
 
8:51 AM
I added std::not_equal_to<bool>()(true,value); and std::count(&value, &value+1, false); to mine :)
 
@coder9 Thanks for replying,How are you?
 
9:10 AM
I think my answer (now more complete) shows how to answer a question in a good way, without the jokes! :-)
1
A: How to get the opposite value of a bool variable in C++

Alf P. SteinbachOPERATORS for logical Not You can choose whether you want to write !, or not, or some mixture. However, still as of version 10.0 Visual C++ does not have the reserved word not built-in. So for Visual C++, if you want to use not you have to include the [iso646.h] header, which is a header from ...

 
@AlfPSteinbach x = ((condition) != x); That is made shit right there man
 
@thecoshman what does that mean?
@thecoshman if you are referring to the US patent on that XOR technique, I think that it has expired
 
made shit? dam typos! mad shit is what I meant.
That is a really obfuscated way of doing that... I want to find an excuse to use it :D
 
^ Anyone read this? Gets good reviews, but it seems overly basic. It explains binary and octal number systems for example.
 
9:28 AM
I've not read it but my default would be to recommend:
 
@StackedCrooked I don't think it's intended to be a programming textbook, so calling it "basic" probably misses the mark a bit
I think it sounds interesting enough, but not because I expect to learn much programming from it
 
Yeah, seems to be more like a documentary about how computers work.
With a little more detail than usual.
 
yeah
oh man, I need to define a type where operator! can be overloaded to mean something like "emphasis"
Maybe I should define a markup language as a C++ DSL
!! could mark up a line of text as bold
 
Ruby does this.
 
It does?
 
sbi
9:35 AM
I have a rep of 55,555 right now on SO. :D
 
numbers.sort returns a sorted copy, numbers.sort! sorts the collection itself
ok, not emphasis
 
yeah, I want it to mean the same thing as a ! does in text, more or less ;)
 
Try to find a function name that has the more or less the same meaning but that sounds more dramatic.
 
I was thinking of making something like markdown, but embedded in C++
should be doable, with sufficient use of expression templates and macros and other evilness
 
sbi
9:55 AM
Where you can put the const on a pointer should probably be an FAQ. What do you think?
 
user457812
10:10 AM
Well, if it gets asked frequently, it should probably be one, yeah
 
10:20 AM
@sbi cool , on 11/11/11 you arrived at rep 55555 :)
 
sbi
@nil But does it get asked frequently? Also, we made some questions FAQ entries not because they are asked frequently, but because they should be asked frequently.
@MrAnubis Oh, right, I hadn't even noticed!
 
user457812
I have no idea, I don't wanna check >_>
 
10:34 AM
hi
What exactly happens when a pointer is dereferenced? I don't think I've asked this before
 
@LewsTherin inspect the assembly code :-)
how to do that in easiest way depends on your toolchain
 
@AlfPSteinbach I can't read assembly.
 
what're you using?
oh ok, forget it, i can't explain things
 
@AlfPSteinbach I'm not using anything. I'm just wondering how *0xf44blah4 works.
@AlfPSteinbach I thought you were a teacher? :O
 
i meant, which c++ toolchain? like, g++? or visual c++? or, god forbid, Borland?
 
10:46 AM
Visual C++
I have g++ though. But can't use it much
 
@LewsTherin - pointer deference basically results in code being produced that uses indirect addressing for whatever the next thing is
e.g. p->a + p->b
 
OK. I have a program for you:
#include <iostream>
using namespace std;

int main()
{
    char    s[] = "Good!";
    char*   p = s;

    *p = 'F';
    cout << s << endl;
}
 
would produce code that has the add instruction, but has a variant of it that looks at the two addresses in two registers
 
in visual studio, place a breakpoint on *p = 'F'; statement
 
(or loads the contents at the value of p + some offset to find a and b into two registers and then calls add)
 
10:48 AM
use F5 to run with debugging, to the breakpoint
then right-click and "go to assembly" (or whatever the menu choice is)
 
I'm on Ubuntu, so I should probably use g++
I don't feel like restarting
 
g++ -S
will output a file that ends in .s
 
g++ -S -masm=intel
you want to avoid the silly AT&T syntax, which is backwards, verbose and full of percent signs, hence the -masm=intel option. hopefully works also in Ubuntu.
then in the produced .s file, use editor to search for "main"
 
I learnt the AT&T, thought it was reasonable. Oh well.
 
10:51 AM
heh, everything backwards: ubuntu instead of windows, at&t instead of intel
how can i get ubuntu to understand my norwegian standard PC keyboard?
 
lol, don't ask me. :)
I have the .s file. Gibberish to me
 
it's pretty silly: the bundled word processor can't let me switch input methods so i can't type curly braces or square brackets in that word processor
do you find "main"?
 
@AlfPSteinbach Yeah
@AlfPSteinbach I just started with Linux, so can't help I'm afraid
 
so, speaking of asm, how the heck can you crash on a push instruction? esp contains a valid address, so...
 
@jalf Ah, come on!
 
10:54 AM
@LewsTherin what? I'm trying to debug a crash here, and it makes no sense!
 
@jalf - what sort of crash?
segfault?
 
yeah
 
sigbus?
 
well, access violation since it's on Windows
 
@jalf Oh right, doesn't matter apparently
 
10:55 AM
but the difference is the same :)
 
sure it's not a stack overflow?
 
well, there's no recursion on the stack, so seems unlikely. And the memory around the stack pointer is mapped to the process, as far as I can see from the crash dump
 
Do you guys want me to post the assembly code?
 
@LewsTherin for what? What were you doing again? :D
 
@Lews: sorry for disappearing
	mov	eax, DWORD PTR [esp+16]
	mov	BYTE PTR [eax], 70
 
10:58 AM
@jalf The generated assembly code of @Alf's code. I want to know what happens one dereferences an addr
 
@jalf - and not constructing some massive instance on the stack? I don't know how to query the size of the stack on Windows
 
@LewsTherin as in, what it looks like in asm when a pointer is dereferenced?
 
the two instructions you see above are generated from *p = 'F';
F is the sixth character in the alphabet, so it has ASCII code 64+6 = 70
this makes it easy to find it in the assembly listing :-)
 
@jalf Know what actually happens, I don't care about the asm code. I assumed that was Alf's way of explaining what was happening lol
@AlfPSteinbach Let me see if I can find it
 
the first instruction loads register eax with the address of the start of the array
 
11:00 AM
and <TYPE> PTR [x] means "access the sizeof(TYPE) bytes located at address x"
so that's basically a pointer dereference
 
Yes, but how does it access that memory location. Oops, I should probably have asked it that way :)
 
the second instruction stores byte value 70 in the memory location that has the address given by the eax register
 
in the second line, it dereferences a char pointer (BYTE PTR), in order to write 70 to that byte
 
@LewsTherin - the effect of dereferencing a pointer totally depends on the instruction set - you can't understand what happening without an instruction set really.
 
in assembly, dereferencing is indicated by the square brackets
 
11:02 AM
in the first line, it reads a DWORD-sized variable from the address at esp+16, and stores the result in eax
 
without them, 70 would have been stored into register eax instead of into memory location pointed to by eax
 
afk, lunch
 
I have to a lecture. Still confused.
Be back soon
 
11:34 AM
@LewsTherin char x = *p corresponds to mov x, BYTE PTR [p], and *p = x` becomes mov BYTE PTR [p], x`
 
hola :)
learning assembly and python at same time is good idea? ( i hope that brainOverflow won't happen :)
 
Learning is a good idea. If you feel you actually learn anything by trying to do both, then yes, it's a good idea
I would take it one thing at a time, but I don't know how you learn, and what you find manageable or useful
 
@jalf I've downloaded video lectures of both , now viewing both and practicing little :)
 
12:07 PM
morning all
anyone bought Skyrim?
 
Eh, I'll consider buying it when I get a hint that Bethesda has learned basic game design
Oblivion was a joke
 
12:55 PM
oh lol
 
1:08 PM
-1
A: C variable definitions. What is the reason for underscorer in C variable name definiton?

AMDmi3No global reason. Mainly matter of personal preference and coding style. For example, someone may define local (or global) variables like that.

 
@jalf But dragons!
 
@CatPlusPlus plenty of games have dragons
I had a book about dragons when I was little. I could simply re-read that
actually, I think it was only about a dragon. And some kid.
 
insert generic mother-in-law reference here
 
but still!
your mother-in-law is a dragon?
 
1:19 PM
actually not she's quite nice but I thought everyone had this view of mother in laws as dragons
perhaps that's a british-ism
 
1:41 PM
Hey
 
sbi
@awoodland It's at least European, I think.
@AlfPSteinbach I can only shake my head about your using namespace std; in there. It's actually longer to type than had you typed std:: twice, it is unnecessary and bad, potentially even evil, and you used it for teaching, where it does most harm.
 
sbi
2:01 PM
Beneficial: An average domestic argument will burn over 500 calories. (Ladies - you knew this already, didn't you?)
:)
 
@sbi lol
 
sbi
@TonyTheLion (Note the name of the twitter account!)
 
yea I saw
 
@sbi - I tend to explicitly write the full namespace of things unless I deliberately want Koenig lookup to happen, which sort of makes the cases where Koenig lookup is deliberate self-documenting too
 
sbi
@awoodland Yep, sounds sane to me.
 
2:13 PM
To this day I'm still confused when ADL happens and when it doesn't :(
 
@TonyTheLion - I think the answer to that is basically "anywhere you have a function call involving one or more non-primitive types and it's not explicitly written"
 
sbi
@TonyTheLion Actually, it's quite simple: It always happens when UDT arguments are involved.
 
Hey guys
 
@sbi UDT?
 
I'm a bit scared, I'm called for an interview next week
 
sbi
2:19 PM
@TonyTheLion "User-defined types." Basically everything not built not the language (including types defined in the std lib).
 
and it will contain problem solving
 
@sbi - which includes things in std:: though
 
Have you guys encountered that?
 
@ManofOneWay honestly, having done quite a few interview now, don't worry
 
@ManofOneWay - I ask my tutorial groups 1 per week usually
 
2:20 PM
what, problem solving? Isn't that what programmers do?
well, except those who do OOP masturbation instead
2
 
what's the worst thing that can happen? That you don't know the answer, well if you at least give it a try and show them that you're trying, that's the best thing you can do
 
Yeah I guess it will be allright =)
 
@jalf - interview questions are generally silly problems though
 
@jalf lol
 
So the company is Oracle, and it will be in the compiler division for Java, so the language they are using is C++
Do you think they will ask me to solve problems in C++ mainly then? Or is it usually more theoretical?
 
2:22 PM
@ManofOneWay - I'd expect both
 
@awoodland oh, we're talking about those crazy "problems", like "how do I figure out how many pizzas were bought in seattle last month?"
 
it really depends, hard to say
 
I'm not sure I'd consider that problem solving
 
@jalf - a mix, of those and sensible ones
 
Stupid dictionary switcher doesn't work properly, arrrgh.
Firefox squiggles all my posts, because it's always set to the wrong language.
 
2:22 PM
I once went to a company for a job as embedded developer, I thought they were gonna ask me crazy asm questions and some hard algorithms, turns out they asked me fairly basic C++ things
haha
 
Is there a section at stackoverflow or stackexchange where you can solve problems that others have encountered during interviews?
 
@ManofOneWay - there's an "interview questions" tag, but its existence is slightly controversial IIRC
 
project euler is good for solving problems
 
If they ask you a "silly" question like "how many piano tuners in the world" the key thing they're looking for is a sensible, reasoned answer, even if your estimates of global piano ownership are way off I doubt it'd be a killer
once you know that the silly ones are reasonably easy usually and then the programming ones are just a question of applying sensible programming techniques
 
@awoodland if they ask you a question like that, be very very cautious about the job offer
2
If they waste your time on nonsense in the interview, will they also waste your time once you work for them?
 
sbi
2:30 PM
@ManofOneWay ISTR having once read that the Java runtime is horrible C, compiled with a C++ compiler. ICBWT.
 
@jalf - google are famous for them and I'd always thought of google as a good employer
 
@awoodland Are they? I thought it was Microsoft
and they stopped using them because it was stupid
 
@sbi haha =) Maybe I will ask then! =)
 
anyway, I'm not saying "don't take the job", just "be wary"
 
2:34 PM
Hopefully it will be allright
Thanks guys!
 
sbi
Except for my first application I have always interviewed from the position of already having a job quite safe, so I have taken to the POV that I am interviewing them as much as they interview me. And I have turned down offers because I didn't like what I heard. (Notably a "C++ test" that tested my skills in "C with classes". But other things, too, like a mumbled response to a question about their overtime policy, raise a red flag for me now.)
 
this sentence has entirely no meaning
2
 
sbi
@TonyTheLion "This" referring to what?
 
Some object.
 
2:54 PM
lol
@sbi this of course
 
sbi
@CatPlusPlus "Some object" sentence has entirely no meaning? That doesn't seem too plausible.
@TonyTheLion I'm confused now.
 
lol, I was trying to confuse you, it worked :P
 
3:16 PM
guys what is the right syntax to add a templated funciton to a templated class?
 
template<typename T> class foo { template<typename U> void bar() {} };
 
there's no special syntax for it as long as it's all done inline. If you want to define the function outside the class, it starts getting a bit hairy
 
ah ok, I have tonys part but I wanted to do it the way jah said.
 
that's trickier
 
well, don't
 
3:19 PM
i am gonna do it inline for now then
 
@TonyTheLion's way is better :)
 
I added a bucket printer to the container pretty printer. Now you can print individual buckets of hash containers with ease.
 
Als
3:34 PM
uhm..What have I missed?
Okay I am ignored..
 
You've missed being ignored.
:P
 
Als
Yes and got ample of it now :D
 
hiya
 
Als
Hello @user245823
 
i had a quick question...
i have a static lib that i created and shared with some third party.
 
3:45 PM
so
 
Als
@user245823: Go on and leave a Q, Someone who can/is willing to will answer you.If not even better ask it on SO main.
 
but they seem to now want to use dlls. however since i did not take that into consideration what minimal change can i do to accommodate them? i have just 2 apis exposed really....so do i just put a wrapper around them __declspec(dllexport) and recompile
 
Als
I need to take off for now. Bye folks.
 
or would i actually need to covert my static lib now into a dll. i would like to avoid that if possible and just use my static lib that has these 2 methods exposed so that their dll can pick it up.
 
You can do it without modifying the code, by using module definition file.
 
3:47 PM
@user245823 converting to a dll from static lib is not much difficult. yes you need to export the functions to a library. But take care of name mangling. You can use .def file for this
hi Cat++
 
hmmm
name mangling? is it easy to use a .def to do this? i have never done this sorry.
 
@user245823 yes its very easy you just need to tell what name should the functions go when you do it. Can also use the extern C
@CatPlusPlus any lightweight open src lib for P2P using public STUN/tracker?
 
the project is in c++ using vs2008. so i can go to my static lib. open up the code add __declspec(dllexport) to the two functions in the .cpp and .h ?
would that be sufficient?
 
@abhinav How should I know.
If you're modifying headers, you need dllimport/dllexport depending on whether DLL is built or used.
 
i guess the question really once i make the changes to my static lib. how would i compile run it. would i need to create a dummy dll that will then import those dlls for testing? but for my static line exporting in the .h/.cpp file would be sufficient
so there would be two parts. 1. had export functionality to the static lib so a dll can import those functions. 2 create a test dll that will import those functions and test if it works? am i correct/
had=add*
 
4:01 PM
4
Q: Need a better close reason for inappropriate format questions

XaadeNaRQ sounds ridiculous to an outsider when applied to a question that's not in appropriate format, such as What does this snippet mean in Linux C? Two questions there, but the NaRQ description makes us literally sound inept to explain ourselves. "Difficult to tell... cannot be reasonably answer...

He just isn't getting it
Help?
 
When I have an associative container with unique keys of type double...
... do I expect NaN to be a key that never matches itself?
Example:
  double d = std::acos(5);
  std::cout << "d = " << d << ", d == d: " << (d == d) << std::equal_to<double>()(d, d) << std::endl;

  std::unordered_map<double, int> dm;
  dm[d] = 2;
  dm[d] = 5;
  dm[d] = 7;
  std::cout << "dm[NaN] = " << dm[d] << ", dm = " << dm << std::endl;
There's no way to get at the map elements now by key!
 
@sbi Clearly that's the only way.
 
@sbi No, Jon almost answered under haacked's profile, and haacked gave him back the laptop and told him to login to his own account. Jon almost let it slip because everyone would know it's Jon anyway.
 
4:10 PM
@KerrekSB That is interesting! So the only way is to provide a comparison predicate that checks for NaN and equality
 
You didn't know NaN is not equal to itself?
Though I think it's only quiet NaNs, whereas signalling ones would raise floating point exception.
 
Could someone please take a look at that question link, and tell me if RobertHarvey is right and I'm wrong, or the other way around. I don't want to be running in circles if I'm wrong.
 
At least in IEEE754.
 
sbi
Interesting. Jon Skeet has amassed 370,261 rep with 17628 answers (+ 23 questions). Marc Gravell, OTOH, got 265,616 rep with 8694 (+ 29 questions). On average, Marc got 30 rep per answer, Jon 21.
 
arent those guys maxing out the 200 point limit everyday?
 
4:16 PM
@sbi are you bored or something? What inspired you to work that out?
 
@Praetorian I should say that for unordered containers, a special predicate appears to be in order that includes checking for NaN. I'm sure that the hasher already hashes all NaNs to the same value, but it's the equality that breaks one's neck.
 
sbi
@TonyTheLion Let's say I had a hunch. And it took about 2mins to find this out.
 
Or save yourself the pain, and don't use floating point values as keys.
 
ah I see
 
@CatPlusPlus Hehe. Perhaps :-)
 
4:22 PM
@sbi Clearly Jon Skeet is losing "Me Too" votes because he has so much rep and doesn't need it anymore.
 
sbi
@Xaade I'm not sure I understand.
I have an average rep/answer ratio of a little over 38. Even if I remove the operator overloading FAQ from that, it's still about 37.5. But then, I hit the rep cap about twice a months, while Jon must do this almost daily.
Nevertheless, Jon seems to be the God of SO mainly for one reason: He answers vast amounts of questions. In his 3 years, 1 month on SO, he has answered an average of 15 questions per day. That's almost ten times as much as my average.
 
@sbi People see jon skeet answer with 400 votes, don't feel the need to vote on it anymore.
Literally what the fuck
0
A: Need a better close reason for inappropriate format questions

Robert HarveyThe close reasons are meant to cover broad categories of question problems. Were that not the case, we would have to create a close reason for every specific problem that a question can potentially have, and that doesn't scale. For example, NaRQ covers five possible problems: ambiguous vagu...

 
sbi
@Xaade Interestingly, there was a blog posting a while ago that dealt with the opposite accusation: that he's upvoted just because he's Jon Skeet. It looked at it from a mathematical angle and found no correlation between number of answers/rep and voting behavior.
 
I can see why people don't bother.
 
@KerrekSB The hasher may hash NaNs to the same value, but you might still want to handle it differently, because the hasher probably does some math, and doing math with NaNs can have bad consequences
 
4:30 PM
Doing math with NaNs yield NaNs.
 
@sbi Which means it's just a culture phenomena.
 
@sbi I daresay that different languages have a different culture of questions, and perhaps, without trying to offend anyone, C# is a language that provokes a larger number of straight-forward questions than C++...
 
People upvote when they see upvotes. It's just that Jon Skeet gets these faster because his answers are better.
 
@Praetorian I'm fairly sure the hasher would have to know about double. For instance, it'll have to hash positive and negative zero equally, and it has to know about infinity.
 
sbi
@Xaade I fail to see how this could be a conclusion from the facts I recited.
> After watching this for 2 days, here's my €0.2: This job is called moderator, so you are expected to moderate, appease, mediate. Given the reception you got here, how could you now ever do that? Even if you got the votes, how could you ever make decisions potentially opposing users, many of which feel you cheated your way to 25k and tried to game the system in so many ways?
> How could you be even a mediocre moderator, when, in the face of this shit storm here, you are obviously still thinking you'd be able to do all that? If you had even one bit of a mod in you, you had long since withdrawn.
To all you gamers out there: Have you seen skyrimvsmw3.com?
 
4:42 PM
Lol, that kid who were flagging decade old chat messages?
 
sbi
@CatPlusPlus Yup. @RMartinho has already pointed that out in a comment.
 
@sbi People seem to be displeased by his nominating himself, but is there any other way? Indeed, power should be given to those who don't seek it, but it seems like the system doesn't provide for that...
 
Also, what's that about cheating?
 
sbi
yesterday, by sbi
The problem with self-nomination is that those who would nominate themselves are rarely ever the kind that would be a service to the public to have in power. (http://stackoverflow.com/election)
 
@sbi Nicely quoted :-) (What about people who quote themselves, though?)
 
sbi
4:48 PM
@KerrekSB What am I to do? The robot seems to have taken the day off.
 

« first day (391 days earlier)      last day (4557 days later) »