« first day (129 days earlier)      last day (4823 days later) » 

7:57 AM
@sbi it was possible to solve a rubiks cube?
I solved mine with a hammer
 
8:19 AM
Wtf is TGOM?
 
@AlfPSteinbach lol :)
 
9:07 AM
struct Foo {};
void Bar(Foo&);
...
Foo f;
Bar(f); // happy
Bar(Foo()); // happy on msvc. not happy on gcc
Is that expected to fail? constructing a temporary Foo and passing it to a non const reference to Foo ?
 
sbi
@ChrisBecke It's a bug in VC (that they call a feature) which allows binding of temporaries to non-const references.
 
I don't think you pass temporaries to non const references, that's a problem rvalue refs are supposed to solve
from my understanding
 
9:25 AM
so, if someone uses a MFC CArray, they *should* declare it:
CArray<Foo,const Foo&> FooArray;
otherwise
FooArray arr;
arr.Add( Foo() ); // can't work
 
9:37 AM
people still use MFC?
 
seems so
 
sbi
10:11 AM
@Thomas, @Tony: Makes you wonder about the coincidence of the correlation between that and the very same people despising C++...
 
@sbi yea, cause MFC isn't the nicest framework to be using
years ago I started learning C++ through MFC.... what a bad decision that was
 
0
A: Setting up a FAQ for the C++ tag

KissakiWhat does an FAQ do different from another (good) question asking that question? It also has the answers to it. And the current system, including reputation, which is not for making FAQs but questions and answers, does not work that well for it. Another problem is moderation. Who decides what an...

 
10:49 AM
the silence....
 
:)
LNK2005 errors driving me nuts
I've removed so many includes and none seem to resolve the problem
any suggestions?
 
What is LNK2005 in plain english for someone that does not use VS?
(I am one of those vi+make weirdos)
 
error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in Resolve Server.lib(ResolverReply.obj)
I've used vi, nothing wrong with it
 
Are you linking the same library twice?
 
10:54 AM
how would I find that out?
I've been trying to remove all possible double includes, however none resolve the issue
 
To try and determine what might be wrong, I would start by locating that particular definition, and see whether it is in a header or not
Multiple definitions are errors that indicate that the compiler has generated a "strong" (g++ terminology, non inlined) symbol in more than one translation unit
 
could this be the issue then:
 
That means that either the function is not inline and is in a header, or that you are manually defining it multiple times.
 
inline bool operator==(const remote_endpoint& lhs, const remote_endpoint& rhs)
{
	return lhs.port == rhs.port && lhs.ip_address == rhs.ip_address && lhs.timestamp == rhs.timestamp;
};
is defined in a header
 
The problem is not with that one, but with std::_Lockit::_Lockit(int)... which is weird...
 
10:58 AM
yea because that is not in code I have written
 
That is defined in one of the libs (from the error message: ResolveServer.lib), and probably in a different one
 
oh I hate errors that point to something not written by me
 
the error message should point you to the location
 
it doesn't that is the problem
so I have to guess
 
It does not mention any other lib or object file?
 
10:59 AM
no
just that
 
What is the line just above the one you copied?
 
struct remote_endpoint
{
	unsigned short port;
	std::string ip_address;
	boost::posix_time::ptime timestamp;


};
 
No, before the LNK2005
the error line
 
Linking...
this is the whole lot:
Linking...
libcpmtd.lib(xmutex.obj) : error LNK2005: "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ) already defined in Resolve Server.lib(ResolverReply.obj)
libcpmtd.lib(xmutex.obj) : error LNK2005: "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@std@@QAEXXZ) already defined in Resolve Server.lib(ResolverReply.obj)
libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in Resolve Server.lib(ResolverReply.obj)
 
There you have it: the symbol is defined both in libcpmtd.lib and "Resolve Server.lib"
So you have an issue in that both libraries cannot be linked together
You will have to look up how to solve that in the docs for the libs
(or if for your purposes one is a subset of the other, just remove it from the link line)
 
11:05 AM
well I can only look at the one's that I've written i guess
libcpmtd.lib is not mine
 
Are you linking libcpmtd.lib statically into ResolveServer.lib?
 
@David - not quite true. .libs can have duplicate symbols.
 
yes
 
as long as the same translation units are not referenced youre usually fine
 
I am not really familiar with the VS linker
 
11:07 AM
the VS Linker has crappy ways to tell you what's wrong
that's for sure
 
my guess is that the symbol has been pulled into the ResolveServer.lib, and then it is being identified as redefined when the libcpmtd.lib is linked together (does the VS linker remember what libs were statically linked into another lib?)
 
std::_Mutex is a msvc extension to the stl apparently?
 
probably, that or a c++0x detail
the identifier is reserved for implementation use
 
_X is a implementation extension
so its a msvc thing.
 
but the issue is that the constructor is linked in the binary twice, it would be the same whether the object is an extension, part of the standard or any other thing
isn't it?
 
11:11 AM
libcpmtd decomposes to lib, c, p, mtd.
so its the library thats imported with pre-instantiated stl classes. vector<char> as std::string etc
 
I use boost::mutex in that library, maybe the conflict is related to that?
since it complains about std::_Mutex
 
boost might use std::_Mutex internally in the VS version
 
I can only presume then that you are using ResolveServer.lib in a project with substantially different c++ settings to the exe project?
 
Will the linker be that smart? That is, does it track that the symbol in Resolver...lib was compiled with different setting? Would it not complain equally if it was linked in twice being the exact same thing?
 
@ChrisBecke I wish they were different, but they aren't
it used to work you know
and I did not change any settings
 
11:14 AM
Can you change so that you link dynamically instead of statically?
 
I only added a std::stringstream in one part of the code
but then I have to change for all my libs?
 
:) you only added std::stringstream and everything that the implementer of stringstream decided to add with it... it might use mutexes internally to avoid race conditions with multiple threads calling st << "Hi"
 
possibly yes
that really sucks
"If you are going through hell....keep going." - Winston Churchill
I think that's applicable in my case... hahah
 
Well
a few thoughts come to mind
1. Try adding libcpmtd.lib to the "ignore default libraries" setting
clearly something is causing the msvc stl implementation to be declared in place and trying to pull in the dll at the same time is going to cause shite.
thats a good point
how did you add the boost lib to ResolveServer?
and or, how are you adding libcpmtd.lib to whatever projects its in?
 
set the global options "include files" directory to point to the boost dir
I'm not adding libcpmtd.lib explicitly....
It's prob used by something else indirectly
 
11:25 AM
Well, std::_Mutex is *supposed to be in libcpmtd.lib
Its not supposed to be in ResolverReply.coo
.cpp
It should be defined in VC100\Include\yvals.h as
class _CRTIMP2_PURE _Mutex { ...
 
sbi
 
Where _CRTIMP2_PURE can be "__declspec(dllimport)" or "" depending on wether a dll or static runtime is selected.
 
sbi
@Tony This usually happens if you link together DLLs/EXEs compiled with different settings (MTd etc.)
 
@sbi I wish that my settings were the problem
however they all the same....
 
11:35 AM
@Tony Did you not have to add some boost library to the linker command line?
That should probably read: project settings...
 
 
1 hour later…
12:39 PM
I fixed it :)
it was indeed a project setting which I was unaware that had not been set right
 
Just out of curiosity, what project setting?
 
Resolver Reply was set to "Single Threaded Debug" for some odd reason
It should be MTd ie Multi-Threaded Debug
 
sbi
1:04 PM
@Tony Which is what I was hinting at. I don't think I've ever seen a different course for this error message...
 
@sbi yes you were right indeed, I was convinced that all my settings were correct, but careful review proved me wrong.
 
sbi
@Tony Do you know the technique where you mark several projects at the same time and then look at their settings? Anything that's not the same between these will be left blank. If "Runtime Library" in "Code Generation" is blank when you do that, you know you are in trouble.
 
@sbi thanks good tip!
 
@sbi oh I didn't know that, thx for letting me in on that!
 
sbi
1:20 PM
@Alf, @Tony: Oh, I was sure you'd all be telling me that everybody knows this... Well, since this isn't the case, just to make sure: You do know that you can switch between projects while in the projects settings dialog, don't you? (Just click on any project in the solution explorer, or even mark several of them.)
 
@sbi no I did not know that either, thx! very useful :)
 
1:41 PM
@Tony what dev studio are you using that still has single threaded rt options?
 
vs2003
 
ahoy! Who here knows their way around optical flow in openCV?
 
not me
I'd love to learn :)
 
lame, trying to use this algorithm by luces and kenade (or something like that) and it is meant to basically tell you the speed at which every pixel has moved form one frame to the next. it sort of works for me, but I have horendus amounts of noise making it more or less useless to me
 
1:57 PM
@thecoshman apply a median filtering? or a bit of blur
 
what do you mean by median filtering?
even on a when their is no motion, it is still giving me huge amounts of noise. and areas that are in motion, are not reporting uniform motion
 
In signal processing, it is often desirable to be able to perform some kind of noise reduction on an image or signal. The median filter is a nonlinear digital filtering technique, often used to remove noise. Such noise reduction is a typical pre-processing step to improve the results of later processing (for example, edge detection on an image). Median filtering is very widely used in digital image processing because under certain conditions, it preserves edges while removing noise (but see discussion below). Algorithm description The main idea of the median filter is to run through the...
 
2:10 PM
@alf Can you post the link to the site where you discuss size_t vs. ptrdiff_t again, please? Was that the same site that discussed the C array templates, or was that another one? If it was another one, please post that link also ;) Thanks.
 
I think "C array templates" that would the support functions in that posting?
Since AFAIK the triad was first identified by Dietmar Kuehl we could call them the cool functions :-)
 
Ah, Size was a typedef. I thought maybe something like that were possible:
template <typename T, typename Size, Size N>
Size size(T (&arr)[N])
{
    return N;
}
But the compiler says could not deduce template argument for 'Size'.
 
i think that's a question for @johannes
i mean how to do what you want to do
the error is simple, how to do it with a Size deduced from argument is not simple
 
2:27 PM
hey guys
who here is the Standard bible?
 
sbi
@DeadMG stdlitb.
@FredOverflow I thought array sizes are always std::size_t?
 
@sbi Probably yes, but I'm not sure :) Also, I'd like to include as little header files as possible :)
0
Q: Should I include stddef.h or cstddef?

FredOverflowWhen I want to use size_t in C++, should I include <stddef.h> or <cstddef>? I have heard several people saying that <cstddef> was a bad idea, and it should be deprecated. Why is that?

Nobody in favor of stddef.h yet? Come on, people :)
 
@FredOverflow, neither the return value nor the type of the array index is deductible (see14.8.2.4/2, the array type includes just the element type and the size)
 
sbi
@FredOverflow Not me.
@FredOverflow I had an idea:
template <typename T, typename Size, Size N>
Size size(T (&arr)[N], Size n = sizeof(arr))
{
    return n;
}

int main()
{
    int array[10];
    std::cout << size(array)  < '\n';
    return 0;
}
However, neither como nor VC like this.
"ComeauTest.c", line 4: error: a parameter is not allowed
  Size size(T (&arr)[N], Size n = sizeof(arr))
                                         ^
Not sure what to make of this error. Too bad.
 
2:57 PM
how to allocate memory to int (*p)[constant][constant];
 
@abhinav, use a typedef. I don't even want to know if something else is possible :-)
 
@Aprogrammer : making use of typedef doesnt make sense
pls help
 
typedef int matrix[42][36]; matrix* p = new matrix;
 
@AProgrammer wasn't it typedef int[42][36] matrix?
 
@BlackBear, would you write int[42][36] matrix; do define an object?
 
3:06 PM
@AProgrammer i've never used typedefs before, I don't get why yours is correct
 
@BlackBear, basically you write the definition of an object of the wanted type, put typedef before and you have the definition of an alias of the type.
 
@AProgrammer got it.. i guess..
 
@sbi what were you trying to achieve here?
 
@sbi, 8.3.6/9 Consequently, parameters of a function call shall not be used in default argument expressions, even if they are not evaluated.
 
@sbi sizeof always gives you a std::size_t anyway, so no need to deduce if that's what you want
 
3:14 PM
size of arrays can be gathered as:
template <typename T, int N>
int size_array( T (&)[N] ) { return N; }

template <typename T, int N>
char (&static_size_array_impl( T (&)[N] ))[N];
#define ARRAY_SIZE( x ) sizeof( static_size_array_impl(x) )
 
@DavidRodríguezdribeas, working around that the type of the size of an array is not deductible by adding an additional parameters. (But I don't know the interest of deducing a constant type...)
 
@DavidRodríguezdribeas constexpr :)
 
What is the problem with just assuming that it is int or unsigned int or std::size_t? The compiler will convert to/from the appropriate type when needed
 
I don't know, I just use int as in your code example
 
@DavidRodríguezdribeas personally I've no problem with size_t.
 
3:18 PM
except that ARRAY_SIZE gives a size_t instead of int like size_array
 
C++0x n3092 5.3.3/6 The result of sizeof and sizeof... is a constant of type std::size_t.
So just go for it... at any rate I don't see where that matters --ok, I can imagine some dark metaprogramming taking decisions based on the type returned by that function, so technically it would make a difference there...
 
subtraction for differences isn't so dark
subtraction is not needed nearly as much as I'd expect, though
 
If somebody is good with Qt, please - could you look
2
Q: C++ Qt window positioning

Yippie-Kai-YayDoes Qt has something to offer for the positioning of the tooltip-like windows? (or any types of windows/widgets actually). I want to be able to update the position of the window automatically, so that it always stays on the screen (or at least fits it as much as possible). An example of the be...

Thank you :)
 
sbi
@DavidRodríguezdribeas Let the compiler find the type for Size.
@ThomasEdleson I tried to get away without including <cstdlib>, because @FredO didn't want it.
 
typedef const typename bare_referent<T>::type& type;
Does that make sense? It looks so weird :)
 
sbi
3:31 PM
@AProgrammer Ah, Ok, didn't know that.
 
template <typename T, std::size_t N>
auto array_size( T(&)[N] ) -> decltype( sizeof(int[1]) )
not tested, c++0x
 
decltype(sizeof(int)) array_size(T (&)[N])
 
you still have size_t in the template parameter, though
 
sbi
@DavidRodríguezdribeas I know both, I dislike the int, I can see @FredN's point in not wanting to have to include <cstdlib> just to declare a function (template) that uses std::size_t.
 
3:33 PM
Right Thomas, it does not depend on the argument... I was initially thinking on:

template <typename T, std::size_t N>
auto array_size( T(&a)[N] ) -> decltype( sizeof a )
 
Cloud.C Why is on line 151 the kw typename required?
 
@FredOverflow, initial const is indeed weird:) but typedef typename bare_referent<T>::type const& type is just only a little less weird.
 
@Nils because I suspect forAllIter is a macro that appends a nested type to that parameter
 
@Nils, the macro probably hides the fact that one construct a dependant name such Cloud<T>::iterator
 
@ThomasEdleson I think so, just click on it in the source..
 
3:36 PM
yes, that's exactly what it does
 
sbi
4:17 PM
Wow. My Operator Overloading FAQ has hit 1k views ("Popular Question" badge) 9hrs ago, and 2.5k views ("Notable Question") 15mins ago! It's also made me hit the rep cap today. What's happening? Is there a way I can find who has linked to it?
 
sbi
@AProgrammer Indeed! How did you find that?
 
@sbi, I follow that subreddit :)
 
sbi
@AProgrammer Ah, Ok. Thanks for pointing it out! I was quite puzzled.
 
@sbi isn't that just a blog post?
it's not like any other question I've seen yet
 
sbi
4:26 PM
@ThomasEdleson ??
 
you can get a free blog at blogger.com or other places and the formatting and intra-links would work much more nicely
@sbi I don't understand the question marks
 
sbi
@ThomasEdleson I didn't understand what your comment "isn't that just a blog post?" was directed at. What is just a blog post?
 
@ThomasEdleson, see the note at the end of the question and the referenced posting on meta.
 
48
Q: Operator overloading

sbiWhat are the basic rules and idioms for operator overloading in C++? Index of answers: The General Syntax of operator overloading in C++ The Three Basic Rules of Operator Overloading in C++ The Decision between Member and Non-member Common operators to overload Assignment Operator Input and O...

 
Xeo
eww, 23 rep short of 1k ...
hi all
 
4:30 PM
@AProgrammer what about it?
 
sbi
@ThomasEdleson I'm still not sure what you mean with your question. Since SO isn't a blog site, it's not a blog post. Does that answer your question?
 
@ThomasEdleson there is a trend to create FAQ questions so that you can point at them instead of having to answer once and again
 
SO isn't a blog site, but that looks like a blog post to me, which is why I'm confused why it's on SO
@DavidRodríguezdribeas this is the first I've seen of that
 
while the format might be a little synthetic, the fact is that it is a Jeopardy style of question... What are the basic rules and idioms...
It's been discussed in meta (did not follow, so I cannot add much more there), and some people really like the idea
I myself tend to look for duplicates in the [c++faq] tag each so often, but I have not written any FAQ entry myself (too lazy? probably)
 
hmm, that seems like hiding the truth. anyone else asking "what are the basic rules and idioms..." would probably get closed
instead of hiding the truth, seems better to just accept that it's a blog post somehow, even if that means adding a feature to SO
 
sbi
4:38 PM
@ThomasEdleson I'm the first to admit that SO's Q&A style fits this style of explanations like a left shoe on your right foot and I'd happily embrace a new SO feature (something like the tag wikis?) to make the whole FAQ idea really fly. However, it seems very unlikely that this would happen any time soon. You can read the discussions at meta.stackoverflow.com/questions/68647. Feel free to add your thoughts to it.
 
@sbi... I am browsing that particular FAQ, in the General syntax ... (here: stackoverflow.com/questions/4421706/operator-overloading/…), I think you should add that not all operators can be implemented in both ways, in particular [], =, () IIRC must be member functions
 
Xeo
@DavidRodríguezdribeas afaik he covers that, in another part
 
sbi
13
A: Operator overloading

sbiThe Decision between Member and Non-member The binary operators = (assignment), [] (array subscription), -> (member access), the unary prefix operator * (dereferencing) and & (address-of), as well as the n-ary () (function call) operator, must always be implemented as member functions, be...

 
Xeo
there it is
 
@sbi SO is taking up enough of my time, doubt I'll be on meta
 
sbi
4:39 PM
@DavidRodríguezdribeas You're supposed to read it in the right order, you know. :)
 
@sbi: I really do think you could get a better outcome from less effort in something like blogger though
 
Xeo
Feb 18 at 17:54, by wilhelmtell
Wasting work time on stackoverflow is one thing, but wasting SO time on meta? Wow.
 
sbi
@ThomasEdleson Well, if you have a really great idea for how to do this, I doubt people would get angry at you if you spilled it here instead of there.
 
General syntax is the first in the index, and that is the third... I must admit that I am not a patient reader :)
 
sbi
@DavidRodríguezdribeas :)
 
4:42 PM
Maybe a hint at the end of the first section to the third section in the line of: some operators must be implemented as member functions, see <link to section 3>? Just for those lazy as I am :P
 
Xeo
@DavidRodríguezdribeas the questions has that as a point
 
sbi
@ThomasEdleson If I setup a blog for this, then 1) nobody would read it, 2) nobody trying to sort out a beginner's question about operator overloading on SO would find it, and 3) we couldn't close duplicates pointing to this.
Note that all this has been discussed at length in that posting on meta. I'd happily engage in another fruitful discussion about it, though, but only 1) after work, and 2) after you have read what has been discussed before.
 
@Xeo Yeah, right, defend the grumpy old man just because he has more rep... I see where you are going and that won't get you far (just kidding)
 
sbi
@DavidRodríguezdribeas Do I have more rep than you?? I didn't know that.
 
@sbi Do you think that you can actually engage in a "fruitful discussion" on that particular issue?
 
4:45 PM
@sbi posting to SO not because I want to get answers but to get people to read it is called spamming
 
Xeo
@DavidRodríguezdribeas that last sentence... searchs his music list there it is! The Offspring - You're gonna go far kid :)
 
@sbi only about twice as much, no big difference though... litb only has about twice as you, Mark Gravell twice than him, and John Skeet not even a 50% more than the him... we are almost in the same league :P
 
@sbi I can't imagine anyone asking a question that would be a duplicate
 
Darn, Jon, no H!!! Jon Skeet
 
@sbi: I'm reminded of the common debate about "FAQs"; most faq lists aren't frequently asked at all, and really are mini-articles or "blog posts"
 
sbi
4:51 PM
@DavidRodríguezdribeas I thought I did. Nothing is set in stone with this FAQ thing. When I posted that question on meta, I still had no idea how we could do this, and it wasn't really clear afterwards either. SO we set out with the goal of trying to use what we have, and see where this gets us. I still see us in that phase, and I'm not very happy with where we got with this. If anyone brought up a better idea, I'd probably be the first to lobby for it.
@ThomasEdleson All what you just said has been discussed several times. As I said, once you've read these discussions and know where I stand, I'd happily discuss any new arguments with you. But you will have to accept that I have had to answer the same arguments many times and am really tired of repeating them. Read that question, its answers, and the comments, and come back afterwards.
@DavidRodríguezdribeas I was quite baffled, but then I saw that I have given about twice as many answers as you do, so it's no surprise I have about twice your rep.
 
that they keep coming up should maybe indicate something
 
5:08 PM
@ThomasEdleson :) sometimes they are not the most frequently asked but what should be most frequently asked. My take is that there is some value, I guess I position myself a little closer to litb in there. In the couple of answers he has in the c++-faq he searched for an existing question and then provided answers --rather than pulling a question out of thin air. On the other hand, having a synthetic question helps as it allows you to bind more content that is related together
 
@sbi that meta post is about adding "c++-faq" to existing questions, not about posting special "faq-style" new questions
meh, I can't believe I've spent even this long on this already; I don't care and won't be using that resource, I just thought you could get much better results as I outlined
 
The SO common guides do allow for synthetic questions as long as "you play Jeopardy" (literally it says so), so I guess it is only a combination
 
@DavidRodríguezdribeas definitely, FAQs are usually very good learning resources, but the Q/A format is often used rhetorically only, and I didn't think that fit SO
 
In the first block: It’s also perfectly fine to ask and answer your own question, as long as you pretend you’re on Jeopardy: phrase it in the form of a question.
 
yeah, I had been aware of that
 
5:15 PM
I am not saying that I support it... I used to like the homework tag, and there has been a couple other decisions that I don't fully agree, but the rules are there
 
sbi
@ThomasEdleson I'm sure, though, that everything you have said so far has been addressed under this question. (Which is why I said you will have to read all answers, comments, etc. in order to find these discussions.) ICBWT, in which case I would certainly explain to you why I consider it a good idea despite those arguments.
5
A: Is [homework] an exception?

sbiI have been teaching a programming language (C++) for years. The last thing I needed when looking at the students' homework (a time-consuming procedure anyway) was to spend time on searching the whole web for the place one of them copied their homework from. Of course it's often obvious when they...

 
I should clarify what I mean by "didn't fit SO": presenting a "real" or "true" problem and then answering it seems significantly different from finding some content you want to publish and nominally forming a "question" under which to publish it
@sbi if you expect me to read that godzilla thread there in order to participate in this chat here, well, I'll just have to leave
 
sbi
5:45 PM
@ThomasEdleson Yep. I agree. Yet, I suppose none of those who wrote such a thing did it without some real question triggering it.
 
And I guess that the usual guards are still in place: if the question is not considered valid or the answers are not good, there is the possibility of voting up/down or voting to close
Then again, I think that the Community Wiki flag would be good for this things (that is another decision I regret, I do believe in CW), as it would be clearer that it is meant to be improved by anyone
That is, if I find that there is something that can be added to one of the answers (rather than writing a new answer) I feel at unease just editing other's content... while the CW is an invitation for that
 
sbi
@ThomasEdleson Well, I'm really sorry, but that's a common problem when you come late to any discussion: Most of the arguments you can think of first have already been beaten to death, and either you get yourself acquainted with the current state of the discussion, or you will have to live with the fact that the others wearily wave aside whatever you repeat of what's been discussed before.
 
... and it is the very problem that a FAQ want to address :-)
(at least here you have access to that discussion. It is even more frustrating when it doesn't exist anymore elsewhere than in the mind of those who participated.)
 
sbi
@DavidRodríguezdribeas I can see this. However, on the other side, just about everybody who knows enough to be able to really contribute by editing will have the rep to actually do so, CW or not. (In fact, I consider it unfortunate that @Prasoon's Sequence Point FAQ was accidentally made CW. 99.999% of all <3k rep users absolutely should not fiddle with this. It being CW just gives the wrong impression.)
@AProgrammer Indeed, it is. And there's a solution, too: Read the existing discussion to get yourself acquainted with the existing arguments.
 
3 hours ago, by Alf P. Steinbach
i think that's a question for @johannes
that's impossible :(
 
5:59 PM
@sbi does it give the wrong impresion? I always though that CW meant that you were happy with others editing for good, not just writing absurd things in. Again, I think I already stated that I have some kind of disregard for reputation as a measure of knowledge-quality of answers
 
@sbi What is ICBWT? When I googled it, on of the top results was a question you answered, using it. Perhaps we should add all your acronyms to the newbie hints.
 
was I out of my mind here?
-1
A: What is a socket, physically?

TonyMy 2 cents worth: A socket is basically consistent of a source IP, source Port, destination IP and destination Port. (Physically, it really isn't anything, this is a software based concept) This way the operating system can tell which Application (through it's port number) needs to receive the p...

or was this downvote justified?
 
@Tony I don't really agree with that definition of a socket, I cannot produce a better one, but the 4-tuple is a connection rather than a socket... is it not?
and physically a socket is where you plug your toaster :P
BTW, I find the question as bogus, you are right in that when talking about networks, a socket is not physically anything
 
sbi
@PigBen I Could Be Wrong, Though. Sorry, I've been in Usenet for many years, and it's hard to shed that habit...
@DavidRodríguezdribeas Well, SO's goal was to quantify reputation, and despite all the problems this inevitably has, SO has, to some extend, succeeded in doing so. There is a certain correlation between the rep points some SO user has and his knowledge.
 
6:17 PM
Can I just remind you of who has >3k rep, bad manners and you avoid answering? :P
 
sbi
I have argued that they shouldn't, on the grounds that those users put a lot of effort into them, long before I ever thought of making an FAQ, but I'm actually not adverse to requiring FAQ entries to be CW. However, now that I have written one myself and got quite a lot of rep through it, I'd rather nit lobby for making them FAQ. That would seem very lowly.
@DavidRodríguezdribeas I said "correlation" for a reason.
Just like marks in school it's got its deficits, but all considered there's a pretty good chance that relying on them lets you make the right decision.
 
There are some users in the chat that I would not mind editing my answers and have < 3k rep, and yet I would really like some >3k users not to do it... I accept reputation as the lesser evil --at least there is some sense of control and responsibility, but reject reputation as a measure of respectability
again, rep not being the issue here, I was thinking on CW as intending a "license to edit" rather than the reputation effect it has (editing by all, not providing rep for the effort put into it)
As a matter of fact, the very first day that I entered this chat was because of a FAQ entry, I was going to add a comment to FredO and then decided to look in that new chat feature to see if I found him and could discuss it more openly
I would have changed a couple of sentences in the FAQ, but sensed that the question not being CW (not that you can mark them as such now) was not open for editions (other than typos and the like)
 
@DavidRodríguezdribeas IIRC from CCNA that is how it is defined
 
6:33 PM
New idea for my amusement park "Undefined Behavior Land": a "Padding Zoo"!
 
6:44 PM
I am trying to figure out whether you are referring to "Cisco Certified Network Associate" or "Canadian Community Newspapers Association", but I think I will go for the "Council on Certification of Nurse Anesthetists", that or ask what the * CCNA stands for
I better assume "Council on Certification of Nurse Anesthetics", that's a better image to keep in my mind
 
what is TGOM?
 
The Grapefruits Opt to Murder
 
sbi
Anyone know of a better room description?
 
Undefined behavior land :)
 
sbi
room topic changed to Lounge<C++>: Undefined Behavior Land (ha! I can edit this audit message!)
 
6:53 PM
Great. Now when I post a message I don't know whether it will actually be posted, or will get dropped, or maybe truncated, or it might cause my browser to crash or a black hole to be created.
 
Anyone here reads Spanish?
 
@JamesMcNellis, don't forget the nasal daemons, they are really annoying.
 
hey
something wrong with my previous room message?
 
@DavidRodríguezdribeas Un pocito. Por k?
 
@PigBen As a pig, I suppose you are probably an expert on "por k"
 
6:59 PM
nomnom
 
Sí, es verdad.
 
I just read a nice sentence (for an acronym) a couple of days ago (Feb 14th):
Tengo Entendido Que Uruguay Importa Exclusivamente Ranas Orientales.
 
I understand that Uraguay only imports oriental frogs?
 
man
 
7:01 PM
I like it.
 
object-orientation in PHP sucks
 
Right, it is a love message that someone sent somebody else...
For the non Spanish public, the initials spell "I love you"
But the sentence is exactly that: "My understanding is that Uruguay imports only oriental frogs"
 
actually, I think this is flat out ridiculous
to manually serialize object-orientated code
 
@DeadMG... uhm... as in C++?
 
ignore me, I'm bitching
@David: C++ isn't explicitly designed to communicate between machines
 
7:10 PM
@DeadMG This is a good thing: remember what happened in Battlestar Galactica to all the ships that had networked systems.
 
sbi
@DeadMG It was good. For a while.
20 hours ago, by sbi
@FredOverflow So did I, but it was getting old. Let's stick to the fine tradition of changing the tagline at least once or twice a months. (I love traditions. It comes with age, I guess.)
 
@James: But then, there are no Cylons, so
@sbi: Traditions are horrific things that should be ripped out wherever possible and burned to the ground, to the immediate celebration of all
 
@JamesMcNellis ohshi­– that's why skynet is secretly pushing everyone to adopt erlang
 
@DeadMG and then we can make that celebration a tradition in itself
 
@DeadMG Not yet.
 
 
1 hour later…
8:24 PM
@DeadMG No, I liked it :(
 
Who here isn't dead?
 
Dead is not currently here, if you ask me... He was a while ago
 
8:47 PM
lol :)
 
Xeo
Oh great. I just found a "Let's play" series of Sonic & Knuckles on the Sega Megadrive...
 
9:05 PM
is latin-1 a subset of unicode? can I write a quick-n-dirty standalone conversion function from either that, or windows-1252 with a small translation table, into utf-8 to complete this answer?
1
A: How to UTF-8 encode a character/string

Fred NurkTo understand what needs to be done, you have to first understand a bit of background. Different encodings use different values for the "same" character. Latin-1, for example, says "é" is a single byte with value E9 (hex), while UTF-8 says "é" is the two byte sequence C3 A9, and yet UTF-16 says...

 
 
1 hour later…
10:07 PM
argh
why is it so many libraries offer functionality I want in C++, but they all use Singletons?
 
because Singleton is an attractive anti-pattern
 
I should shoot whoever put it in that C++ textbook
 
just like setting thread affinity "fixes" multiprocessor bugs
 
lol
gonna go home and see daiiissyyy
 
sbi
10:41 PM
@FredNurk Speaking of anti-patterns: "If I were king I’d just start beheading people for writing factories that make factories. It’d collectively save us billions of dollars. And every time you make a singleton, God kills a start-up, two if you think you’ve made it thread-safe." Landon Dyer
2
 
@DeadMG This is why I am still not sure about singletons. I just don't think any class can really make a proper justification for it. it is handy sure, but just pass around a pointer to your instance if you only want one instance.
 
@thecoshman: You lose way too much control using a Singleton
like, it must be constructed from some args to begin with and that kind of bs, whereas I might want different constructor arguments
even constructs like the heap aren't true singletons
 
@DeadMG When ever I read another tut on them, I always think... hmm yer, maybe I will do... wait, what If I decide I do want more then one. screw it!
 
exactly
 
Something like a physics engine. At face value, sure singleton, your never going to want more then one instance of that... but what do you really GAIN from it, and more importantly, what happens when I want to have two different physic set ups at once... like some sort of freak anti-gravity zone or something (ok bad example)
 
10:44 PM
@sbi nice
@thecoshman a class can never make a justification about being a singleton for itself
but a user of a class can decide they want a shared instance for some part of the code
 
surely some sort of wrapper class... so the actually functional class is 'normal' but you have like... and singleton version of your class.
 
sbi
A singleton is just a barely disguised global variable. The cure for singletons is the same as for global variables: instead of accessing the object freely whenever you feel like it, pass it around as a parameter to those functions which need it.
3
 
historically, those are called global variables, but for thread-safe delayed initialization, etc., you can use a free function today
 
sbi
Oh, they have a batch for that: stackoverflow.com/badges/998/outspoken. nice!
 
@sbi It is also the method that makes most sense to me. If a draw class needs a graphics class to call draw functions on, pass it a pointer to it!
 
10:47 PM
@sbi yeah, I just got that; must be new
have I correctly understood "check" here? stackoverflow.com/questions/5084209/…
 
11:17 PM
also, I hate PHP
 
sbi
11:58 PM
It's about time a new day starts. I'm ~150 above my rep cap.
 
VJo
@sbi I agree. Also asking people to write unit tests. Trying to unit test a class using a singleton can be a real challenge :P
 

« first day (129 days earlier)      last day (4823 days later) »