« first day (29 days earlier)      last day (4920 days later) » 
00:00 - 21:0021:00 - 00:00

9:33 PM
interesting question:
1
Q: Is this dubious use of a non-prototype function declaration valid?

R..Is this valid C (C99) code? int f(); int g(int x) { if (x<0) return f(x); else return f(x,x); } Obviously the program has undefined behavior if g is ever called with a negative argument and f is not a function that takes a single int argument, or if g is ever called with a non-negat...

 
sbi
@Johannes Can you go back to this message of mine and have a look at what I linked to there?
 
ohhhh
if one would be a retard, one would answer to that guy "only op new and op delete can be overloaded as statics" xD
at least static member functions haha. never tried to define a static free operator function. :)
 
sbi
@Johannes Have you also seen the other two dupes needing votes that I linked to in the messages following that one?
 
this badly needs a ##c++-so xD
 
sbi
???
 
9:39 PM
IRC is so much better xD
 
sbi
Why, how?
 
because it's less bloated and easier to access =) tho this chat has the benefit of being tightly integrated into SO
if someone makes an IRC-to-SO and SO-to-IRC bot it would very good. maybe i will do after finishing my bachelor thesis
haha
 
@JohannesSchaublitb That is an interesting question.
@JohannesSchaublitb What is your thesis on?
 
making a runtime library and code generator for a scripting/query language
can't talk much about it since it's sadly top secret xD
i should start writing the text part though. i only have time until 15. december xD tho i'm nearly finished with the code
 
Awesome. Sounds like fun.
 
9:52 PM
yeah it is :) i wrote the frontend before.
 
@JohannesSchaublitb You didn't write a single line of text in you have to be done in one month? Good luck :)
 
@FredOverflow My last semester as an undergrad I wrote 36 pages for three papers in two days. :-D
 
sbi
10:07 PM
LOL:
Sid Meier, Hunt Valley, Maryland
15.2k 2 22 79
10
A: IRC access for the chat?

Greg HewgillAs Andy E's head mentioned, I've started to create an IRC interface for the SO chat. The current state of the code is on Github: http://github.com/ghewgill/soirc It's all ugly, nascent, fragile code right now but I expect that will improve in time.

 
Sid Meier is only 25 years old? :)
 
@sbi He's... interesting, yes.
 
sbi
BTW, thanks for doing some cleaning up, guys! stackoverflow.com/questions/4164892/operator-overload-why-const is still open, though.
 
@sbi i already voted on that
 
sbi
@Fred I guessed so, since you appeared on the list of closers for the other one. :)
 
10:09 PM
Is there any logical reason why the unary * operator is prefix instead of postfix?
 
@FredOverflow yes -.- i'm a bit lazy. i should really start very soon. and i need to work 3 days a week until end of this month.
 
@sbi You reminded me of the voiceover in Mortal Kombat there... FINISH HIM!
 
sbi
@James Haha!
Speaking of janitorial tasks:
 
@JamesMcNellis I want babalities and friendship on SO!
 
sbi
1 hour ago, by Roger Pate
well, account deletion apparently takes a few days
 
10:11 PM
@FredOverflow You mean like *p instead of p*?
 
sbi
1 hour ago, by sbi
@RogerPate O boy. We'll all hate you when you leave us!
 
@JamesMcNellis yes
 
@sbi Wait, what?
 
sbi
@Fred Because K&R considered it a nicer syntax 40 years ago?
 
@RogerPate is pulling a Neil Butterworth?
 
10:12 PM
that's not logical
 
sbi
@James Yes, he's leaving.
 
<sadface/>
 
@sbi If Roger leaves, I see no more sense in this world. Wait, who is this guy?
 
what???? Roger is leaving???????
 
sbi
(Look to the two starred items on the right.)
 
10:13 PM
@FredOverflow Order of operations would be interesting with a postfix unary *.
 
If he wants to leave he wants to leave. I don't think we can change his mind, and if we can, he wasn't serious about it.
 
I mean, would you use p[0]*? How would it interact with &? Would that also be postfix?
 
@JamesMcNellis C declarator syntax wouldn't be so confusing to newbies
 
sbi
@Fred I think postfix ++ is the only postfix in C and C++.
 
@sbi This is madness.
 
10:14 PM
@sbi No, array indexing is postfix. And function application.
 
sbi
@Fred No, array indexing is infix. One of the brackets is between the operands. So is function call. :)
 
@JamesMcNellis Why not? What's wrong with a&?
 
sbi
@Tony Sadly, yes.
 
something is wrong with SO in my opinion if all the experts seem to dash
 
@FredOverflow int* f(); then int x = f()*?
 
10:16 PM
what's his frustration?
 
@sbi Section 5.2 clearly lists array indexing as postfix, sorry ;)
 
sbi
@Fred I'll file a bugreport! :)
 
Once all the experts leave we'll be left with noobs like me answering questions. We really don't want that.
 
@JamesMcNellis No, int f()* :)
 
10:18 PM
@FredOverflow That's as confusing as the "return a pointer or reference to an array" syntax. Moreso because returning pointers is more common.
 
@JamesMcNellis its not just that, but guys like Roger were great to have around... They are an inspiration to the rest of us mere mortals
 
i keep prefering alias templates
 
sbi
@Tony He did a lot of janitorial work, and seemed to be online 24/7. Felt like fighting windmills. Kept pointing me at stupid users disregarding his advice, screaming abuse at him.
 
@FredOverflow Anyway, I was more asking about the call syntax.
 
which makes us writing alias<int[N]> *f(); :)
 
10:19 PM
@JamesMcNellis But it would be uniform. I would like this syntax even better: function f()*int, but I guess I read too much Haskell code :)
 
sbi
I told him he might want to tone down a bit. I guess he felt he couldn't.
 
@FredOverflow Read too much Haskell or smoked too much something :-P (just kidding)
 
@JohannesSchaublitb Is alias some standard template?
 
so roger has left this isle
 
@sbi why did those users screaming abuse then not get penalized instead of the good guy having to leave.... it makes no sense to me
 
10:20 PM
@JamesMcNellis I don't smoke ;)
 
no it would be a template<typename T> using alias = T; :)
 
sbi
@Tony <shrug> I flagged one just half an hour ago.
 
i think i will ask them to ban my account until 15.12 xD
 
@sbi yea good.... we should encourage it I think
 
@JohannesSchaublitb What is this? New C++0x template sugar?
 
10:21 PM
perhaps he started taking it too personal
 
but then i will still have irc and usenet where i'm talking about silly standardese. so i guess that won't make me write my damn text lol
@FredOverflow yes alias templates
 
@JohannesSchaublitb where can i read about it?
 
on the gcc c++0x page :) they have a link i think
or read about it in the draft. that'sbest. somewhere in clause 14 -> template declarations
 
But do we really need this? Why not simply:
template <typename T>
struct identity
{
    typedef T type;
};

identity<int[N]>::type *f();
 
and the alias declarations itself (withotu being templated) will be somewhere in the declarations clause (i think the same where typedef is explained)
 
10:24 PM
@JohannesSchaublitb 14.5.7 apparently, will read it now
 
@Fred typedefs can't be templated. using aliases can :)
 
@JohannesSchaublitb But the surrounding struct can be templated. I mean my code works, right?
 
of course i don't understand why the committee didn't just define the syntax as template<typename T> typedef T alias;
beyond me. i seem to remember there was some weird technical reason. i have no clue anymore about the details. but it would seem so more familiar if they just use a typedef here :)
 
@JohannesSchaublitb Duh, because C++ isn't complicated enough already! ;)
 
@FredOverflow yes your template works too also in c++03
one of the good things about alias<...> is that it is not a qualified names so you can do template<typename T, int I> void f(alias<T[I]> &v); for example and still have T and I be deduced
 
10:27 PM
@JohannesSchaublitb oh cool!
BTW Is your thesis code written in C++?
 
yeah with LLVM :)
 
@JohannesSchaublitb never heard of LLVM
 
you will have, once clang takes over the world haha
 
sbi
@JohannesSchaublitb I didn't know LLVM also had a code-_writing_ frontend!?
 
what do you mean by that?
 
10:31 PM
@sbi Why haven't you changed the title of my RoT question yet? ;)
 
sbi
@JohannesSchaublitb "Is your thesis code written in C++?" "yeah with LLVM"
 
well it has several classes (IRBuilder) that allows creating LLVM IR code conveniently.
 
sbi
@FredOverflow I had to take care of kids today. Not a good precondition to do much useful stuff. Now I'm tired.
 
i'm not writing IR code simply by doing printf statements to generate IR code of course. haha
or are you joking about "thesis code" as in latex/etc?
 
sbi
@JohannesSchaublitb You didn't get it. I write my code with an editor, not with LLVM. :)
 
10:33 PM
@sbi Yeah, sometimes I forget RL is more important than SO :)
 
oh =)
i see lol
yeah i'm writing it with kile + latex :)
 
i don't think it was that funny
 
yeah i think it was of limited amusement
 
sbi
Oh well. I laughed out loud. What more could I wish for?
Anyway, I'm off to bed. See you.
 
have fun
sweet monkey dreams xD hope you won't have the developers dream tho xD
 
sbi
10:35 PM
@JohannesSchaublitb I will be alone. :(
 
have you ever dreamed of code? :)
 
dunno :) possibly
 
I'd be pretty pissed to find out after hours of debugging that it was all just a dream...
2
 
I'm usually pretty pissed to find out after hours of debugging that it was all because I did something really stupid.
 
11:07 PM
Johannes, James, Jerry and other guys who are really good at templates, could you please take a look at this: stackoverflow.com/questions/4180233/…
Thanks a lot)
 
rather than an is_convertible, you want to look for a is_callable :)
like is_callable<yourtype, int(int)>::value
 
Hm, there is a thread lists.boost.org/Archives/boost/2002/05/29597.php and I actually think that I can create a partial solution myself
Partial - like that would suit my needs only
But maybe something better exists?
 
11:28 PM
So many people post questions that are answered by "you need to use std::string not just string" Annoying.
 
one of these days i may just snap and reply "you have no buisness programming in c++"
 
it was better before Political Correctness, when one could just say RTFM. surprisingly PC has not yet forced MIT to take down their RTFM site. But perhaps that'll happen...
 
we desperately need a faq for c++. is there a compiled list of questions that need answers?
 
11:43 PM
@JohnDibling It seems an effort is underway, e.g. these questions are tagged "c++-faq"
@JohnDibling The C++ FAQ Lite is also a great resource -- including a resource of relevant questions
 
faq lite is a bit dated, and its not on SO. we need to steer people to a place on SO
 
@HardCoder1986 this appears to work just fine: ideone.com/BbpOo
without return type compatibility check. but that should be easy to add once you have boost::is_convertible in the boat
 
00:00 - 21:0021:00 - 00:00

« first day (29 days earlier)      last day (4920 days later) »