« first day (209 days earlier)      last day (4738 days later) » 
00:00 - 16:0016:00 - 00:00

12:49 AM
is it just me, or is FDIS really a work-in-progress that just won't be finished?
for example: capturing an array with a lambda expression really captures the array, but the only prose I can find that says that is the prose that says how the closure's members are initialized (i.e. it says an array member is initialized in increasing subscript order)
IMO, this must rely on compiler magic to work, it can't be implemented as a simple closure class - or I don't see how a reference-to-array would work
 
Why wouldn't storing a reference to the array work? int (&somearray)[5] is a valid declaration
(assuming the array is allocated statically)
 
hmm..
> 5.1.2/15: It is unspecified whether additional unnamed non-static data members are declared in the closure type for entities captured by reference
and 5.1.2/16:
> If a lambda-expression m2 captures an entity and that entity is captured by an immediately enclosing lambdaexpression m1, then m2’s capture is transformed as follows:
— if m1 captures the entity by copy, m2 captures the corresponding non-static data member of m1’s closure
type;
— if m1 captures the entity by reference, m2 captures the same entity captured by m1
m2 captures the same entity captured by m1
not the reference that results in the capture by m1
so the reference that would result in the capture by m1 isn't really a real reference, as subsequently capturing it by value in an enclosed lambda expression doesn't capture that reference - as it would for a non-enclosed lambda - but captures the same entity...
 
1:09 AM
My reading of that implies "by reference" at the end of the sentence
I don't think it's saying if m1 captures by reference that m2 will then capture by copy
 
@RonaldLandheerCieslak it is a work in progress, but the only changes after FDIS are supposed to be editorial (e.g. typos) rather than changes in semantics
 
@ildjarn I don't see the implied "by reference", but let's test it to see what the GCC folks read
 
@RonaldLandheerCieslak: for example, I'm not sure how missing information is supposed to be resolved
 
@ildjarn looks like the folks that made GCC agree with you: ideone.com/v8Wsr
@FredNurk that's one of the things I was thinking about with my initial comment
 
yeah, after my last remark here, I realized you were involved in that linked thread :P
 
1:20 AM
personally, I didn't interpret the "same entity" bit as "by reference"...
 
i want to write a matrix.. how can i write here
 
I'm trying to simplify this enough to explain it to n00bs, for my C++ for the self-taught podcast, but I find the standard ... lacking
 
IS THERE ANY GOOD WEBSITE WHERE I CAN WRITE ALL MATHS EQS
 
@RonaldLandheerCieslak: ideone.com/wJvTA does this help?
 
@Miss no shouting, please
 
1:23 AM
@ronaldlandheerciesiak: why.. i think you looks upset or tired
so thats'y u want me that i do't shoot anything
anyways ok
 
incidentally, I'd write that last paste as ideone.com/8A9dg with ranged-for support
 
@Miss I am definitely tired, but using all-caps is just not polite
 
@Ronald: Just ignore her, it's what I've done
 
i think i should go out from here..
 
@FredNurk looks like ideone doesn't like that code
 
1:26 AM
ok thanks for you all friends...:)
 
@Miss did you have a look at the links for matrices we gave you yesterday?
 
@RonaldLandheerCieslak ideone's gcc doesn't support ranged-for yet
 
@FredNurk I noticed :-)
anyways, I don't want to let my example get too far off what's in the project's code (which is a for-each and which is C++03 code)
so I'll leave the ranged for for another installment
 
ranged-for is a terrible thing
but we've been here more than once
 
@RonaldLandheerCieslak: ideone.com/1stxo
 
1:29 AM
@FredNurk that does confirm that it takes the same object, once it's evaluated
 
@DeadMG only because the stdlib's iterator concept is fundamentally flawed
 
@FredNurk remember: I'm trying to explain this to newbies
 
I'll agree that it could be improved upon
but it's not a big enough problem to merit a new language feature
 
I've already covered copy, and I've already discussed iterators a bit, but I don't want to mix it all up in a single snippet of code (yet)
 
@DeadMG which thing is "it"?
 
1:31 AM
the iterator problem
 
@RonaldLandheerCieslak: my last paste was to show a[0] doesn't modify g's copy of the array, calling std::copy was just incidental
 
@DeadMG real ranges would be a nice feature to have though
 
iterators are way too verbose and much too often used in pairs, so a range concept would be better for almost all of those situations
however, given auto and lambdas, it's not that big a problem in C++0x
 
s/almost //
 
and introducing a new language feature is a far from trivial problem
 
1:32 AM
it's only a problem if you like clear, concise code, but if you don't, you're already using Java
 
ranges could be introduced as a library
no need for a real language feature
Alexandrescu made such a proposal, IIRC
 
@RonaldLandheerCieslak and there's boost.range
 
more like, it's a problem because C++ is a huge, complex language, and introducing language features is a non-trivial task for all concerned
 
anyways, the two snippets (Fred's and mine) do show when the lambda expression's closure is made
which is good
 
to save a couple dozen characters once, I feel that the costs significantly outweigh the minute benefits
 
1:35 AM
@DeadMG what an elegant way to set up a strawman and dismiss the entire issue
 
gotta go - good night :-)
 
I'm not sure what you mean about a strawman
 
A straw man is a component of an argument and is an informal fallacy based on misrepresentation of an opponent's position. To "attack a straw man" is to create the illusion of having refuted a proposition by substituting it with a superficially similar yet unequivalent proposition (the "straw man"), and refuting it, without ever having actually refuted the original position. Origin The origins of the term are unclear; one common (folk) etymology given is that it originated with men who stood outside courthouses with a straw in their shoe in order to indicate their willingness to be a ...
 
yes, I know that
I was more thinking that you should demonstrate exactly what in what I said was such a construct
 
you took offense the last time I pointed such out to you; I don't see this being more productive than that, if you can't see it already
 
1:39 AM
pretty sure that the last time we conversed, it was you who ended up using ad hominems, but perhaps that's just my faulty memory
 
it wasn't an ad hominem, but I saw then that clarifying that wasn't worthwhile
so whatever, shrug
 
@ronaldlandheerciesiak: yes
i need math editor
where i do edit or write eqs and post link here
 
1:56 AM
I don't entirely see how you intend on clarifying the statement that I talk out of my ass into a form that makes it not an ad hominem
 
I quoted you to show your attitude, then remarked on that attitude
I did not dismiss your argument based on an attack on you, which is what an ad hominem is
 
you quoted an entirely acceptable way of phrasing a sentence
 
 
1 hour later…
3:04 AM
hello
 
cpx
3:18 AM
hi
 
hi
 
hows it going
 
not fine and good..:(..boring
 
heh i know what u mean
just chillin, pretty bored
 
 
4 hours later…
7:29 AM
morning all on this friday the 13th
 
that's right, it is that notorious day
I'd forgotten
 
me too, till someone reminded me
ugh
 
Xeo
good yawn morning
 
lol yawh
 
cpx
I was thinking it like may the 13th but i knew i was missing something lol
 
7:38 AM
lulz
 
8:00 AM
I have a char[1024] which is filled up, however not always completely, and now I need a way to add a zero termination char at the end of the actual string, without knowing how long it is? Is there a way to do that?
 
@TonyTheTiger Well, no
add the zero termination when you do know how much it was filled up because after that it's too late
 
so is there a way to know? strlen perhaps?
 
@TonyTheTiger strlen isn't magic; it looks for a '\0'
 
@LucDanton yea so that ain't gonna work then, to find out where the actual string ends to add a zero terminator
 
buffer[strlen(buffer)] = '\0'; is probably the true badge of a cargo cult programmer
5
 
8:04 AM
@LucDanton meaning?
 
@TonyTheTiger that code is a no-op, or worse, UB
strlen returns the index of the first null char
 
@FredNurk ouch
 
Considering code as esoteric magic formulas which can be massaged into doing your bidding en.wikipedia.org/wiki/Cargo_cult_programming
 
so there's no way to get where the actual string ends and the junk starts to add a zero terminator?
 
there is a way: don't forget where the string ends
but once you forget, given a buffer like "abcdefghi", how are you supposed to know I intended to end after "abc"?
 
8:07 AM
yea but the string comes in from a socket and I don't know how long it will be, and neither does the client seem to think about null terminators
:(
 
network IO functions must tell you how much they read for exactly that reason
 
@TonyTheTiger Asio will give you the length when the handler is called
 
@LucDanton sure, forgot about that, oops
 
9:00 AM
Niel is back ?
oh yeah he is. hey Neil!
 
hi all friends..:)
 
9:16 AM
is there an easy way to append all contents from a std::map to another std::map?
 
@Miss is that your name Miss?
 
@TonyTheTiger map1.insert(map2.begin(), map2.end());
 
cpx
@TonyTheTiger Hmm mapX.insert(mapY.begin(), mapY.end()); ?
 
yep just what I was thinking
 
9:27 AM
@TonyTheTiger Wasn't Terminator 2 the first THX certified movie?
 
@FredOverflow yes it was indeed, I think :P
 
Great movie! Not as dark as the first one, though.
I used to record the Terminator movies on VCR everytime they aired.
 
What does that mean?
 
lol
in some WoW language
 
cpx
9:30 AM
Apparently, korean lol
 
@TonyTheTiger I must say I like the cinema version better than the ultimate edition. I just can't get used to smiling terminators:
 
9:51 AM
hmm
 
hmmm
@StackedCrooked long time no see, how have you been?
 
@TonyTheTiger hi
I'm good, but for some reason didn't go on the chat a lot.
 
@StackedCrooked yea I noticed
 
Haven't been on SO much either, still haven't passed the 5K :)
 
@StackedCrooked oh gosh, I'm almost at 7k
:)
 
9:59 AM
@TonyTheTiger Nice :)
 
 
1 hour later…
11:13 AM
smiling terminator is hilarious
 
Als
11:55 AM
Hit the Rep Cap for the day :(
 
12:17 PM
hi
@reno: operatorp[] is used for indicating the arrays elements right?
right?
 
sbi
@Als Cong-rats and other rodents!
 
12:36 PM
Viet-Cong rats?
 
@ronaldlandheercieslak: if i say A(int n)
where A() is the class constructor then that mean we A(int n) ... type integer is converting to type class A..
right?
 
hey all, I am kind of puzzled reading stuff related to enums for classes,
 
why did she ask me that o_______________________________O
 
basically what would be the best way to streamline a better design for enum make it a member or put that in a header in a namespace?
 
@UmutTabak It depends on your use case and whether you're okay with the enumerators "leaking" into your namespace
 
@reno: i am a girl.. so i use my name as Miss...
 
yeah, it basically depends on what you're gonna use it for
 
for instance things like std::ios_base::in are in a class and do not pollute the std namespace
 
@Luc: what does that mean enumerators "leaking" into your namespace? A rephrase is needed
 
12:51 PM
@Umut: You don't want an enumerator in your namespace if it's only used by one class
 
@Luc, then I need that as a enumerator in the class
 
@UmutTabak Glad to help then
 
@Miss that is like an unnamed variable
 
@Luc: but is that the case
 
@reno: ahh yes
 
12:53 PM
@UmutTabak Do you want an example where an enum is declared at namespace scope?
 
i am from giirl class.. and they mostly called Miss...
 
whatever happened to the famous tina ?
 
she became Miss
 
@Luc: if I would like to use an enum like this in my public interface, how can I call it in main to streamline the development , such as
typedef enum dof_type{ structural=0, fluid, electromagnetics } dof_type;
 
well, you certainly don't need the typedefs and stuff there
 
12:54 PM
@DeadMG, then what?
 
@Miss are you tina?
 
enum dof_type { ... }; is fine
the other stuff hasn't been needed since C
 
@Dead
so how to use that in main as a new type
 
just as you did before
dof_type var;
ahem
whatever_scope::dof_type var;
 
hyy my study sex is not going good...:(
 
12:57 PM
I afraid to ask what that is
 
@UmutTabak If you're worried about the explicit qualification you could place the enum into an inner namespace and the user could bring the names into scope with a using directive (or worse)
 
class dof {
    //...
public:
    enum dof_type { ... };
    dof_type type();
    void type(dof_type);
}
int main() {
    dof d;
    dof::dof_type dtype = ...;
    d.type(dtype);
}
 
With that approach the namespace cannot share its name with the class
 
the costs of explicit qualification are miniscule compared to the benefits
 
that is signal processing...
 
12:58 PM
(I was referring to myself)
 
foo::dof_type a = foo::dof_type::structural;
compile error
 
foo::structural
 
@Miss how is that even close to signal processing
 
which compiler, and what error?
 
g++ ‘foo::dof_type’ is not a class or namespace
 
12:59 PM
that's because enums are not full scopes in C++03
and their members are accessed through the enclosing scope
so you have to do foo::structural
 
hmm fine thanks for the tip
 
VC++ extends this, and C++0x Standardises it
 
@reno: i have to leave now.. gtg see ya
 
to?
 
so that you're right and they are full scopes
 
1:01 PM
foo::structural? right
 
i.e., foo::dof_type::structural instead of foo::structural
 
ok I was thinking that why foo::dof_type::structural was not right
 
well, basically, it should be
 
@Miss okay but I mean .. can you explain whats "study sex".
 
but C++ inherits this particular stupid from C, like many others, and basically didn't get around to fixing it
that's why source-compatibility is such a bad idea :(
 
1:03 PM
study sex ==> every time study study and study......:P
 
conclusion : are enum types searched in the class scope when they are in the class scope not their own scope ?
 
yes
 
I mean not one level down
thx
 
basically, the names are placed into the surrounding scope, not their own individual scope
 
there you have it gentlemen. study sex has nothing to do with sex. :(
 
1:04 PM
hey, if you want to study sex, go out and find a partner :P
2
 
thanks for the explanations
 
hehe its same as c++ sex...lol
see ya .. :)
 
when you mention c++ and sex, std comes to my mind ... wait what
 
lol
 
lol
I don't like variadic functions
only trouble
ugh
 
1:42 PM
@TonyTheTiger There probably are in C++ only for C compatibility. Even if they are sometimes (ab?)used in TMP.
 
yeah, TMP has some valid uses of them
but actually using them is pretty craptastic
2
 
@DeadMG I agree with that statement wholeheartedly :)
 
rlc
@DeadMG ooh, new word for the dictionary: "craptastic" :-)
 
@Reno Aww..... Our little @Miss is growing up.... sniffle
 
2:29 PM
Geez man.... HTML tag is full of a bunch of self-righteous jerks. Hell if I ever post in there again.
It's the freaking HTML tag.... not the CSS tag. The OP even said he didn't prefer to use CSS....
 
@Xaade HTML tag? is this a website? or literally a HTML tag....
 
-3
A: problem with showing tables in html

XaadeOne way is to create an invisible table (by using 0 border width) to contain the other two tables.

 
No, I guess he means
 
@Xaade I wouldn't bother answering questions in that tag
 
Why
Is this a known deal, or does this guy have sockpuppets
 
2:34 PM
@Xaade he's just an idiot, ignore him
idiots do exist
fyi
 
You should have known that suggesting tables for layout would be seen as one of noobness, stupidity or trolling.
 
yea but what if you don't like DIV tags
lol
 
Maybe he's pissed because the OP is all but ignoring him....
 
2:51 PM
@Xaade didn't prefer probably means don't know.
 
Yep, the OP actually admitted not knowing CSS in one of the comments.
 
Als
@sbi: Thanks Grumps :P
Hola!
 
I'm tired of getting around sites that still use table inside table inside table.
 
Als
Hey @Raze addicted eh
 
Ah well....
Next time I get asked a C++ question... I'll teach em how to do it with macros.... just to keep the spirit going.
 
Als
2:56 PM
What pissed you off @Xaade
 
Nothing pissed me off.
 
@Als I was pretty determined not to log in to SO today, but after a hard day of work... sigh you lose all control.
 
I just felt it unnecessary to neg bomb something. One vote is enough for me to get the idea.
Don't mention tables in the HTML tag.... got it.
 
sbi
@Xaade If you use macros in a C++ question, and it's not the single one way to do whatever was asked for, we'll downvote your answer. :)
 
Don't mention HTML in the HTML tag..... got it.
 
Als
2:58 PM
@Xaade: We got it :)
 
sbi
@Xaade You can always delete your answer. You will even get your rep back.
 
Als
@Raze: hmm ...sigh...happy about the weekend though
 
I think I still have a net gain though.... of like 1.
 
And the Peer Pressure badge.
 
Oh a badge....
Hmm....
 
sbi
2:58 PM
@Xaade Yeah, of course, nothing pisses you off! That's why you posted this:
 
1 rep.... or a badge....
 
sbi
29 mins ago, by Xaade
Geez man.... HTML tag is full of a bunch of self-righteous jerks. Hell if I ever post in there again.
 
Als
Oh well I got 2 of those today :D
 
@sbi That's not pissed off.... that's just telling the truth.
 
sbi
@MartinhoFernandes Badges are overrated.
 
3:00 PM
Pissed off..... well..... pissed off is me leveling 15 blocks just from shouting.
 
@sbi What isn't these days?
 
@Als all I did today was configure a couple of machines, but not the one which I originally planned I would configure today, attend a couple of meetings, and sit and look at perfmon logs.
 
Als
@Raze: Hmm...I had to review a certain code against standard specification...And pretty much wears me out....Im gonna go out later for some good time though :)
 
sbi
@Xaade Here's one thing you should learn: If someone believes ad-hominem attacks are "just telling the truth", then that someone is said to be pissed off.
@MartinhoFernandes Kids?
 
... or a jerk.
(oops, that was a continuation of the "... pissed off" sentence, not the "kids" one.)
 
3:02 PM
@Als and a program half-java half-c++ with cygwin scripts and cmd script sprinkled in, with some poorly written functions that are 500 odd lines, not easy to manage.
 
Als
@Raze.....pity!
 
sbi
@MartinhoFernandes Yeah, I've meant to comment on that, but then thought better of it. :)
 
Als
@Xaade: calm down.....Life teaches all and everything :)
 
@Xaade, I have seen developers use 'captchas' that go "What is 2+3?" I laughed my arse out seeing that one.
on a webpage.
 
sbi
@Raze That's actually pretty good (if the question is in a picture).
Much better than those random letters that are really hard-to-read even for humans.
 
3:06 PM
@Als I'm not mad.
 
@sbi its not a picture! it took me about a minute to write a javascript line that solved it.
 
Als
hmm.....
 
@Raze depends on what the 'set' of captchas is
 
I sent the script to them, and explained why it wasn't a good idea, but they didn't seem to care, or respond.
 
Well, I've seen one that was just "Check this if you're human".
 
3:07 PM
@Xaade how could it be Ok?
 
@Raze Maybe that's the point. They are bots... and they don't know how to fool humans.
 
sbi
@Raze Chack out this one: stackoverflow.com/q/4683117/140719
 
@Raze Well, random enough set, and your program can't anticipate everything.... even if it were all text.
 
@Xaade the program will solve the problem, like a calculator.
 
@Raze Do you really think I meant randomizing the math problem....
 
sbi
3:11 PM
Note that you need to weigh the work put into a CAPTCHA (or some alternative mechanism) against the number (and seriousness) of attempts to break into your site with bots. If you have a simple blog, read by about a dozen people, and just need to block the occasional comment spamming bot, then that's very different from preventing bots from creating accounts at google mail.
 
@Xaade I mean if its a set of math problems, it can be solved.
 
Coding Horror's captcha for comments used to be "orange". Just that in a picture, no fancy distortions or anything. I don't remember seeing any spammy comments there.
 
Why don't they just put a picture of an orange.
 
The truth is, some of the sites who do that, don't need a captcha at all. One has to enter a credit card, and gets charged.
 
I guess then someone would use google's "like images" routine, and tag images with words, then attempt using those words.
But you could put a blue orange
 
3:15 PM
@Raze "Hey, those damn spam bots kept sending us money! We need a CAPTCHA!"
 
Hah!
 
Ugh, spam bots. Our forums were flooded by them, only stopped when we switched from reCAPTCHA to KeyCaptcha.
 
hi
 
I have a deep hatred for this crap.
 
@sbi: Yeah, I'm starting to have serious problems reading the captchas given by some websites
 
3:24 PM
That's why there's a refresh button.
 
they use the same image generation algorithms, the next image isn't always better
 
@DeadMG yeah, me too, @Xaade, refresh gives a harder one. Problem is even more with captchas that have adjacent characters kissing each other.
 
@Raze Adjacent characters used to only kiss in romance comedies.
Now they got A all up in B's business.
 
So, we're back to talking about sex?
 
sbi
@MartinhoFernandes Since some guy on meta complained about us using the word "sex" in the room's tag line, the subject seems to come up at least once a day. I can't help but suspect a correlation.
 
3:29 PM
cuz we is rebels innit
 
My workplace should strike a deal with Apple, that says their workplace filter encourages employees to buy smartphones.
 
by the way, I wanted to ask something
is it just me, or did Fred Nurk very suddenly become rather unpleasant?
 
@DeadMG Sorry about that.
 
he seems to deeply hate me ever since I suggested that Unix programmers prefer C over C++ in my personal experience
 
@DeadMG they used to say C++ is slow. Do they still prefer C?
 
3:39 PM
in my personal experience, Unix programmers seem to have an inexplicable and irrational dislike of C++
 
rlc
@Raze most tools, most of the kernels, etc. are written in C and most of the scripting languages used are procedural in nature, so the whole idea of having a language that allows object-oriented programming (as well as a bunch of other programming styles) is repulsive to some
I haven't heard the argument that C++ is slower as often as before, but that myth is still there as well
and there's the compatibility issue: from one compiler to another, C compilers are almost always compatible with each other while C++ compilers are viewed as less so
oh, and "Windows is written in C++"
 
@rlc some of the people who told me about it knew C++ well enough. And some aspects of it is true. Using cin, cout is sometimes slower than using cprintf and cscanf.
 
@rlc It isn't. WinAPI is C.
 
rlc
@MartinhoFernandes that's not the point
 
WinAPI is C compatible
 
rlc
3:43 PM
hence the quotes
 
it's not written in C++, per se
I mean
 
@RonaldLandheerCieslak That's weird, I was under the impression that there are a small number of C ABIs; do you mean source level compatibility?
 
they can expose a C-compat interface from C++ all they like
 
@rlc , isn't quite so. There are C++ wrappers over all the C APIs and dlls exposed.
 
rlc
look at the quotes, please
they're not there for nothing
 
3:44 PM
@RonaldLandheerCieslak Seems like you should have used <sarcasm> quotes instead.
 
rlc
@MartinhoFernandes too late for that now - can't edit anymore
 
@rlc oh, sorry. :) didn't figure out you were talking Windows vs Linux :)
must be due to my hunger.
 
rlc
@LucDanton no: sometimes a library needs to be recompiled because the name mangling changed between versions
not really an issue IMO, but it's on the heap of arguments against C++
 
@RonaldLandheerCieslak I actually misread you!
 
rlc
IIRC, Torvalds has a real issue with C++ programmers - shuns them from the kernel
> C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C.
 
3:48 PM
and Windows uses pascal calling convention still right?
 
no, __stdcall
not that I can see at all what calling convention has to do with anything
I mean, language zealotry, I can understand, maybe
ut calling convention?
 
rlc
Torvalds again:
> I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really would prefer to piss off, so that he doesn't come and screw up any project I'm involved with.
 
@rlc: old news. like, fossilized old.
 
rlc
I know, but funny (and to the point in this particular discussion) nontheless
it's a symptom of an anti-C++ rash that Torvalds seems to suffer from more than most others
 
@DeadMG which is a variant of pascal convention. It has nothing to do with anything except history.
 
3:53 PM
I was under the impression that there had been water under the bridge by now though
 
rlc
the quotes from Torvalds are four years old, but they aren't stale: variants on this theme are still uttered every day
 
sbi
Dec 12 '10 at 21:40, by sbi
@wilhelmtell See, when Linus disses something. I stop listening. He dissed something I know very well, and got it all wrong, although nicely (if polemic) said.
 
00:00 - 16:0016:00 - 00:00

« first day (209 days earlier)      last day (4738 days later) »