« first day (777 days earlier)      last day (4157 days later) » 

thanks, johan
 
Hello unfriend
 
my question http://stackoverflow.com/questions/13539752/redirect-function close. How can reopen this. help
If you have option then reopen it
 
zzz... -1 for drive by linking
 
8:04 AM
Rappts that's not a good reason I think, but the question is terrible
 
A lot of people here -1 for drive by linking.
 
If it is a C++ question link I don't mind but spamming a php question here is completely wrong
 
Not to mention no one here even likes PHP..
 
Anyway. terrible question
 
@webduos, I wouldn't reopen your question even if I could, if you don't say what error you have and how you got your error
 
8:06 AM
lol who star'd that?
 
And yes. Now I consider it drive by, cause he didn't even stay to comment.
 
Bro, I want to repen this Because. The permission of asking question is disable for me
 
@webduos.com, just write some good answers and it will come to you
 
I considered it drive by because it's his second message here.
 
what's up with your name and posting php here?
 
8:10 AM
well, I need to get some sleep
good night guys
 
good morning
 
Why does everyone do Object const& obj.. I'm like the only one that does const Object& obj :(
 
no that's common
 
You should read everything posted here.
The former is a lot more common in this chat room than the latter ._.
 
@Rapptz I to the same ;)
 
8:13 AM
At first I thought it meant something else and I was using const wrong my entire life until I googled it.
 
I think it's more a fashion thing
 
T const* ptr const
Easier to tell what's const
At least that's the rationale, I don't use it
 
I actually like it better, but I think I always write const first
 
I find it easier for editing when all the modifiers are in the same spot.
Also for reviewing come to think of it.
 
Stop starring crap tia
Especially that the link leads to a fucking PHP question
 
8:24 AM
Seriously I still don't know who starred it.
Why do people in the php tag have websites as their name?
webduos.com, webnetmobile.com
 
Report them for spam
 
loool
 
Sorry, brain fart. What's the best way to get the size of a C-style array declared e.g. int arr[] = { 1, 2, 3 };?
There's std::extent if you have the type of it, but then decltype is ugly.
 
8:34 AM
sizeof(arr)/sizeof(int) ?
or sizeof(arr)/sizeof(arr[0])?
 
or use a vector or std::array
 
@Potatoswatter You're thinking of sizeof arr / sizeof *arr.
 
@LucDanton That's also ugly :(
 
Your mom is ugly.
 
lol my standards are just high
 
8:35 AM
;D
 
std::end( arr ) - std::begin( arr ) is nice but there's no need to name arr twice
 
It's also not a constant expression. And wrong way around.
Boost.Range has boost::size(arr). Just as easy to roll out your own.
 
template <typename T, size_t N> size_t count(T (&arr[N])) { return N; }
 
@LucDanton It's allowed to be a constant expression, for a global object. The standard should be updated to require that.
 
You can add constexpr to that
 
8:37 AM
@CatPlusPlus Yeah. Thanks…
 
Or maybe (&arr)[N], I don't remember
Shitty syntax.
 
@CatPlusPlus Yes, that way. Other way would be an array of references.
 
@Potatoswatter 'global'?
 
wow sizeof(arr)/sizeof(*arr) was ugly to you but not that templated solution?
impressive
 
sizeof fails silently with decayed arrays
 
8:40 AM
@LucDanton If the address is a constant expression.
 
It's wrong and never use it.
 
Oh, I see. Global!
 
@Rapptz The template solution doesn't require you to name the argument twice.
 
Yuck globals.
 
9:02 AM
@Rapptz I also do const T&.
 
Xeo
Aw, I just noticed that @Mysticial's lambda question doesn't count as
 
10:05 AM
4,000 questions tagged c++11
 
so
registration is up for the Bristol meeting
and isocpp appears to have gone down
 
10:23 AM
ooh, registration is free
that's a pleasant surprise
the ACCU conference wanted £800 to attend
 
10:37 AM
mawning
I got up with a sore neck this morning
sucks
 
my deepest sympathies, sir lion
 
I'm crazy and I'm going to write an app that bundles entire PostgreSQL
Fuck SQlite.
 
what do you mean "bundles"?
 
Well, that exactly. There's an app, and it has pgsql.
 
10:48 AM
oh right
 
i got up after a 5 hours only night with somnifer, and I'm not in the haze... uh ?
 
11:05 AM
hi
I am having a program which prints lines in a file
 
gratz
 
now I want to print only those lines which are having some text like "this"
 
strstr
 
I tried this
if(strstr("this",fgets ( line, sizeof line, file )))
{
fputs ( line, stdout ); /* write the line */
}
and
 
It's wrong.
 
11:09 AM
if(strstr(fgets ( line, sizeof line, file ),"this"))
{
fputs ( line, stdout ); /* write the line */
}
 
That's not any different.
Read the docs and think a little.
 
so @CatPlusPlus what is to be corrected
 
Two things are wrong.
 
ok
and First is......
waiting......
does line size matters ?
char line [ 128 ];
 
Just a question: someone says it can write this `void func(void *data) {
// conversion from MyClass* -> void* is implicit
MyClass *c = static_cast<MyClass*>(data);
...
}` where as I say it is impossible since there is not relation between the `void*` and the `MyClass*` type... and it violates much of what I thought about casts
 
11:13 AM
@CatPlusPlus I hope you are wrking on my problem :/
 
It's best to avoid void* if it's not absolutely necessary.
 
no but there the static cast cannot match, I'm saying it can't compile
 
@TomW I hope you got it ;D
 
I can't see anything wrong with it, but I've never heard of either strstr or fgets until just now
I don't know C/C++
 
static_cast from void* to T* is fine.
 
11:16 AM
Since now I was thinking C# = C + (C++)
:D
 
> A prvalue of type “pointer to cv1 void” can be converted to a prvalue of type “pointer to cv2 T,” where T is an object type and cv2 is the same cv-qualification as, or greater cv-qualification than, cv1. The null pointer value is converted to the null pointer value of the destination type. A value of type pointer to object converted to “pointer to cv void” and back, possibly with different cv-qualification, shall have its original value.
 
...No.
 
At least I think so, standard is a bitch to read.
 
cv stands for ?
 
const/volatile
 
11:18 AM
wow, it's a hole in the static_cast<> which I had alwayst thought totally secure
 
Yeah, it's fine, lvalues can be converted to prvalues so that applies.
void* is inherently type-unsafe.
 
i'm ill at ease with rvalue and left value, I understand more the word temporary
 
not all rvalues are temporary
 
46
Q: When to use reinterpret_cast?

HeretoLearnI am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also. reint...

will this help with casting?
 
There's nothing wrong with casting.
 
Xeo
11:23 AM
@CatPlusPlus Lvalues can't be converted to prvalues, only to xvalues, IIRC
 
in the answer, I see, "For casting to and from void*, static_cast should be preferred"
 
> A glvalue (3.10) of a non-function, non-array type T can be converted to a prvalue.
 
Xeo
huh
 
Xeo
Oh wait, lvalue-to-rvalue conversion?
 
11:25 AM
Yap. We're talking about static_cast.
 
;D
 
okay... in fact when dealing with void* static_cast doesn't do any compile time check, whereas it does for other types
 
@CatPlusPlus I have also tried if(strstr("this",fgets ( line, sizeof line, file )) != NULL )
 
the very nature of void* is that it is not statically typed
 
11:28 AM
static_cast doesn't do compile time checks for downcasting either.
 
@DextOr my only idea is that line isn't declared const. But in that case I'd have expected the code not to compile.
 
Because it's impossible.
 
yep, but I thought static_cast would forbid cast between void* and a MyClass
 
@DextOr Oh quit bitching. In case you hadn't noticed, nobody here gives a shit about your C.
 
And I think @Cat Plus Plus is ignoring you
 
11:29 AM
@CatPlusPlus yep but it doesnet compile if tyes are unrelated, of if an uppercast is needed
 
Start reading docs and thinking instead of guessing and randomly changing that line, maybe.
 
Xeo
> Otherwise, if the next three characters are <:: and the subsequent character is neither : nor >, the < is treated as a preprocessor token by itself and not as the first character of the alternative token <:.
 
My brain read strstr = Straßestraße
 
Every type is related to void*.
 
Xeo
Woah, template<> struct foo<::some_name>{}; is actually valid C++11
@R.MartinhoFernandes lol
 
11:30 AM
> A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
 
@Xeo Why wouldn't it be valid C++03?
 
@CatPlusPlus oh, that's the point where I mistook completely, yes
 
@DeadMG Digraph.
 
Xeo
@DeadMG Digraph <:
 
ok then @DeadMG keep your shit with you :D
 
11:30 AM
@Xeo You mean, absent a primary template for foo?
 
oh yeah
 
Xeo
@sehe >_>
 
@Xeo What character is <:?
 
Xeo
I think [
 
Who knows?
Who cares?
 
11:31 AM
I don't
 
Xeo
Yreah, should be [
 
@R.MartinhoFernandes People without [ on their keyboard?
 
I'm gonna practice cast this afternoon, in 5 minutes all my certitudes are gone.
 
like casting a spell?
 
not this one skill
 
11:33 AM
fuck you Steam
why is my game unavailable?
 
@FredOverflow Sorry but no, that is no excuse. Use a decent input method/keyboard layout (no, I don't mean hardware).
 
Probably because some shitty retailer has exclusive
 
@DeadMG What game?
 
Why won't they all die already
 
@CatPlusPlus It's best to... avoid*? ;)
 
11:34 AM
No, that's terrible.
 
@R.MartinhoFernandes CSS
 
@DeadMG You have games on steam? Cool. How much do you earn?
 
He doesn't earn shit
 
@R.MartinhoFernandes Maybe the [ key is broken because of spilled coke?
 
he's got no job
@DeadMG that's a game? lol
 
11:35 AM
@TonyTheLion counter-strike source
 
Then JavaSript is also a game. Damn, a second too late.
 
@FredOverflow Spilled coke cannot break a software-mapped key.
 
anyone plays dota?
 
nubbins
 
11:35 AM
is Lina hot?
 
@billz Day of the Antacle?
 
def policy:
    return avoid*;
 
@billz Do you mean Linus?
 
fuck
 
Day of the Tentacle, also known as Maniac Mansion II: Day of the Tentacle, is a 1993 graphic adventure game developed and published by LucasArts. It is the sequel to the 1987 game Maniac Mansion. The game's plot follows Bernard Bernoulli and his friends Hoagie and Laverne as they attempt to stop the evil Purple Tentacle—a sentient, disembodied tentacle—from taking over the world. The player takes control of the three and solves puzzles while using time travel to explore different periods of history. Dave Grossman and Tim Schafer co-led the game's development, their first time in such a ...
 
11:36 AM
hmm, noobs
 
fucking awesome game
 
Okay, this is random even for the lounge
 
I wanted to play Starcraft 2 but all the decent maps are empty, and now I can't launch CSS
:(
 
@billz oi don't call us noobs
 
@billz really
 
11:37 AM
Also, fuck yeah, I'm happy today.
 
@sehe it's Saturday, what do you expect
 
Sunday
 
@DeadMG How about you get some work done, like writing a new FAQ about something interesting, instead of wasting time with computer games?
 
No thanks. We keep it SFW here
 
@R.MartinhoFernandes oh what happened?
 
11:37 AM
@TonyTheLion Nothing.
 
oh, well, good you're happy, nevertheless :)
 
well, let's talk about other games
 
Today is the first of December, let's see what surprises my Christmas calendar holds for me. Oh wait, I don't have one :(
 
oh mine doesn't hold much special either
 
Actually, something happened. My German classes got delayed.
:/
 
11:39 AM
lol
 
Not enough applicants.
 
oh that sucks
 
@R.MartinhoFernandes Then just use std::vector instead of Deutsch::Vektor ;)
 
get the ape to teach you?
 
So we're starting one week later, but since we are few, it will be more intensive.
 
11:40 AM
@JohannesSchaub-litb I remember half-pointing that out the other day when we were on the same subject. Ah. I won't search for it now. Slow head
 
Xeo
Oh yes this is a bug. §2.7/1 "Blanks, horizontal and vertical tabs, newlines, formfeeds, and comments (collectively, “white space”), as described below, are ignored except as they serve to separate tokens." — Xeo 15 mins ago
I love destroying answers with standard quotes.
 
lol
you're evil :P
 
You start your programs with int mean() too?
 
I start mine with int growl()
 
@R.MartinhoFernandes double mean(), int frequency()
 
11:41 AM
hmmm
I think I broke my Google Analytics
 
@R.MartinhoFernandes What happened to "Pünktlichkeit"
 
I've cast myself to void* today
 
apparently, absolutely nobody, ever, has visited my website for three weeks
 
@DeadMG Wait, it's not yours
 
means I'm gonna achieve nothing today :P
cause I have no type
 
11:41 AM
@DeadMG Or maybe it's working.
 
@DeadMG So you broke just one thing. A record. Don't worry, it'll happen more often
 
@CatPlusPlus Nah, cause I know I've visited it.
 
maybe that don't count?
 
@DeadMG Duh. Self-visits. Also: cache
 
nah
 
11:43 AM
I even filter my own IP's from my own site statistics I run with webalizer
And she goes nah ♪, nah, nah, nah ♫
nah, nah, nah, ♪♫ nahaaah
 
lol
how's the polar bear been lately?
 
Self-visits count.
 
using the visitor pattern?
 
besides
 
Seems today is "I'm all out of every fucking thing Saturday"
 
11:46 AM
the IIS logs indicate more activity than that
@R.MartinhoFernandes Go to shop?
 
Need to go shopping.
 
I need to go shopping too
but laziness has got the better of me
so I'll starve instead
 
I still have bread and strawberry jam.
 
natural selection is at hand
 
so you've found a place to live yet Robot ?
 
11:48 AM
@TonyTheLion me too :(
 
@R.MartinhoFernandes sounds good to me
 
Ell
Mornin' all
 
+1 this is a lesson consultant take far too long to learn (and, admittedly it is a difficult concept to follow through on during a tough economy). The value of your expertised is as much a function of the work you do as it is a function of the work you refuse. — Tim O'Brien Nov 19 at 18:19
 
@TonyTheLion It's not enough for today and tomorrow, and since tomorrow shops be closed, I still need to go shopping.
 
@DeadMG subtly referring to the need for masturbation?
 
11:48 AM
heh, Y U NO SHOP ONLINE?
 
@TonyTheLion Because I have a shop across the street.
 
@sehe no?
 
oh you're lucky
 
@DeadMG okay?
 
@sehe good?
 
11:49 AM
?????
 
@DeadMG fine?
 
fap fap fap
 
@sehe I'm glad?
 
fap, fap. "Who's there"
 
Mr. sperm
 
11:50 AM
@DeadMG I don't not fail to not doubt it?
 
Aw. Man. Who broke the room?
 
you did
 
it's not broken?!
 
Jinxed
 
11:50 AM
I can't look away for a second and you guys are already derping about fapping.
 
that was me
I mentioned fapping
strange eh?
 
@R.MartinhoFernandes It was polar bear and lion.
 
Hey that's funny, can't repost the quote since I just deleted it. The post deduplication kicks in, even though the other has been removed
 
room topic changed to Lounge<C++>: The room is f**** broken... [c++] [c++11] [c++-faq]*
 
@DeadMG I'mma gonna tell mommy!
 
11:52 AM
room topic changed to Lounge<C++>: meh [c++] [c++11] [c++-faq]
 
lolfail
 
epic fail.
 
room topic changed to Lounge<C++>: The room is le fucked. [c++] [c++11] [c++-faq]
 
Note to self: white tea is not good.
 
better?
 
11:52 AM
no
 
room topic changed to Lounge<C++>: BREAKING: markdown _not_ supported in topic line [c++] [c++11] [c++-faq]
 
room topic changed to Lounge<C++>: The Lion fails. [c++] [c++11] [c++-faq]
 
Now it is broken
 
I win!
 
fucking hell people
can't you just pick a self-deprecating tagline and leave it
 
11:53 AM
@TonyTheLion You're just a slow poke
 
How about making the room topic const? And not const_casting it afterward? :)
 
@DeadMG Told you the room was broken.
 
@sehe that's not new
It's Caturday, what do you expect??!
all the Cats are broken!
 
@FredOverflow It's okay, just make it const static and put it in the readonly data page. Get a nice protection error on bad use of const_cast
 
set the readonly flag
 
11:55 AM
The weep only fag
Doing the feed only rag
 
the reap only fag
oh wait
 
room topic changed to Lounge<C++>: The Robot is awesome [c++] [c++11] [c++-faq] [const]
 
weed only tag
 
I'm not the insect
 
@R.MartinhoFernandes Needs more constexpr
 
11:55 AM
lol
we should make a lol song
 
?
 
English, please.
 
This post never occurred
 
Ssshht. Don't tell anyone
 
11:56 AM
@TonyTheLion printf("%x\n", 257);
 
I think I won't code anything today, and instead will spend the day playing games.
 
I'm having the same thought
 
Or maybe take a siesta.
 
I just got up
I don't need a siesta
 
Siesta would require warmth, IMO
 
11:59 AM
I just got awoken by a cramp in my calf.
 
And it is absent, must be the same in Berlin I guess?
 
it's fucking freezing here
 

« first day (777 days earlier)      last day (4157 days later) »