« first day (267 days earlier)      last day (4674 days later) » 

8:49 AM
That's not unfortunate, that's awesome.
 
Xeo
9:05 AM
I'm voting to rename Singletons to Simpletons. Who's with me?
2
 
they're separate concepts. A simpleton is the user of a singleton
3
 
Failpletons.
 
sbi
9:20 AM
@jalf Actually, that's wrong. (I starred it nevertheless, though.) I also liked the concept once, and I object to the idea that I was a simpleton back then.
 
Yeah, I know, but it sounded good, which is what matters ;)
 
sbi
@jalf I just realized this would also paint Alexandrescu as a simpleton. Ouch.
 
Hello
 
sbi
This one's pretty good, especially considering its age. I'm contemplating giving this precedence over @jalf's when pointing out that Singletons are shit. :)
@Chris Hi. I hadn't seen a Chris here in a while. :)
 
Hello :)
How are you
 
Xeo
9:32 AM
mornin' @sbi
 
Guys how to assign some value to int* in assembler ?
 
sbi
@Xeo Don't count on this morning. It's cloudy here. The sun, however, shines on the other side of the island (apparently, it always does on some side here, you'll just have to find it), so I'll be offline Real Soon Now(R) to go swimming in some nice little cove. :)
 
With... mov, like everything else.
 
Xeo
heh
Real Soon Now, yeah? :P
 
sbi
@Chris I never do. If I did, I knew it's just writing an address into an address.
 
Question is, why.
 
i'm new to assembler
 
sbi
@Xeo Yeah. (It's 11:30am here, mind you, and we've just finished breakfast.) Anyway, I gotta go to the Sunday market first, buying me some books. I got a week to go, and I had to resort to Crime (literature), because I ran out of books days ago.
 
@Chris What exactly are you trying to do?
 
I need to find value on the stack with ESP with some value( for example 666 ) and then change its value into for example 1337.
i know that i need to loop like this
for(x=0;x<100;x+=4)
//check if [ESP+x]==666
and if yes, then change it's value to 1337
 
9:41 AM
Traversing the memory and randomly changing bytes into something else is rarely a good idea.
4
 
That's last... weiredest task i've received to complete( to get accepted into camp, lol ): )
YAY, moving value to esi gave result :)
 
10:18 AM
@sbi I just love the comments there.
> don’t even build a factory – use an Inversion of Control container to do Dependency Injection, and let the container be the glue-code for you. If there’s intialization, then use a container that has a lifecycle system that allows you to make an “init()” method which is called by the container.
 
@CatPlusPlus There's no problem so simple that it can't be solved in absurdly contrived and verbose ways requiring hundreds of lines of boilerplate code
3
 
And few megabytes of XML for good measure.
 
IoC containers always make my skin itch. Wish I was better able to put words to why I dislike them so much.
 
can sumbody here help me with a javascript and dom issue?
 
Xeo
Do we look like the Javascript chatroom?
 
10:30 AM
no but i tried in js chatroom but canget the solution so if anybody here is willing to help
 
@lovesh did you try on SO?
The Q&A website is there for questions and answers. The chat is there for chatting.
There's no rule against asking your question here, but questions about Javascript might get better answers on SO than the C++ chat
 
ya i did post a question last night and its about that ques can u please look at the ques here
 
Also use jQuery.
 
@lovesh as far as I can see, you already got an answer to that question, which solved your problem. Why don't you accept it?
Then you asked some more questions in the comments. Why don't you ask those as new, separate, questions, so people will see them and can answer them?
 
please look at the text in blockquote at the bottom of the ques
i thougth the other questions were kinda related to it so i didnt ask a separate ques
 
10:35 AM
Well, many questions are related, but if you ask 14 questions in one, then people won't notice the last 13 of them
Ask one question for each question you want answered
 
ok
but for this did u see where i am going wrong
 
Nope, no clue, I'm not an expert on the HTML DOM
 
thanks for the advice though
 
but if you make it easy for people to find your questions (by giving them meaningful titles, and not rolling a dozen different questions into one), then those who can answer will find the question and hopefully answer it :)
 
10:51 AM
Hi people!
 
11:04 AM
Hello!
Oh God please help me stay awake. @_@
 
Xeo
Coffee?
 
Coffee is for lesser beings.
 
Staying awake is overrated.
13123 rep!
 
Not anymore.
Ha.
 
Xeo
Wow. Nearly a hundred new questions tagged C++ since yesterday evening
 
11:10 AM
Wow.
 
Xeo
Was 77767 the last time I looked
77859 now
 
I'm not going to ask this on SO because I feel like I don't understand the term deeply enough, but is C++ considered to be duck-typed? It feels like a strongly-typed language, but surely templates will accept anything just as long as it "swims and quacks like a duck..."
 
Xeo
No
True duck typing, as in the python sense, is something else
 
Hey, which is the best editor/IDE for C++? I use Code::Blocks. Exists something better?
 
Xeo
It partly has to do with reflection
@unNaturhal Visual Studio on Windows
imho, anyways
 
11:14 AM
@unNaturhal That's mostly personal taste.
@Xeo I find VS2010's property pages to be pretty clunky.
 
Xeo
@Maxpm: Consider a function taking a base class pointer (or reference). In Python, you could totally call a child-class-only method on it so long the object indeed was a child-class type.
 
Yeah, templates are kind of duck-typed.
 
Xeo
In C++, you need to make-do with dynamic_cast
 
@Xeo Oh, that's interesting. Practically, though, I don't see the point.
 
Xeo
@CatPlusPlus Compile-time ducktyping
 
11:15 AM
Surely, the person writing the function knows that Foo() isn't part of the base class's API.
 
In that template <typename T> void foo() { T x; x.foo; } is not an error, until T has no foo member.
 
Why would the function accept a base class pointer? Even if it works, it hurts code legibility.
 
Xeo
Interesting article on the topic: gmannickg.com/?p=47
 
Or default ctor, but you know what I mean.
@Xeo Duck typing doesn't have to be runtime to be duck typing.
 
Xeo
@CatPlusPlus Yeah, but since the term "duck typing" originates from python (afaik), you could say "true ducktyping" is "runtime ducktyping". imho, anyways, as always.
 
11:18 AM
Practically, what benefits does "true" duck typing (i.e., taking it further than C++ templates) give you?
 
Xeo
Read the article by Gman
 
So, Xeo, in what possible way is the question you mentioned a duplicate of mine. It asks how to get the last element of the string. In my question i provided 2 possible ways of doing it. My question is quite different, don't you agree?
 
Dynamic typing is tasty and wonderful.
And duck-typing saves typing.
(The duck types, while you go watch a film.)
 
lool
 
Eh. It feels kind of bloated to me, like every object is carrying the weight of something that shouldn't really be used.
 
Xeo
11:29 AM
@ArmenTsirunyan Well, it also asks why there is no string::back in a round about way, and the answer mentions that it was probably overlooked.
 
sbi
11:42 AM
@CatPlusPlus Actually I hadn't read them. Did so now (and stopped considering pointing out the article to poor lost souls believing Singletons to solve problems).
 
T̨̛̟̰͖͇̈̿̓̔͌̈́ͧ̾͐͌͜͠͝ȟ̫̲̹͉͓̟̥͓̫ͥ͂͊ͦ̈̎̉̒̓͒͆̀̕͡͡e̾ͪ̐̏́̽͗̽ͫ̓ͤ͏̸̤̜͇̺͙̺͘͟͠ ̔͋̄̓ͤ҉̫̠̱͙̪̲͙͖̯͍ş̯̰̦̭̜̥̺̘̭͙̜͎̠̯̟͉̝͈̽̐ͣ̑ͬ́̓̽͑́̏̾͗ͪͧ̀͘͘͜ȋ̡̛͈̙̺̎ͦͮͣ̓͑̂́͌ͤ̐̈́͑͗͂̚͞͠‌​͇̙͎̬̹̼̩̯͔̞̻͎n̸̮̭̹͇͇̄̊ͮ̏̐̓͗ͧ̾͛ͪ̋̆̊̈̃͟͞ģ̡̼͚̩̩̦͎͕̪̹̬̬̃̀ͯ̑̒ͥ̚l̸̷͓̳̥̭̞̾̀̋͐͐̅͂̓̇͐̒͠ͅe̍‌​̫̠͉̣͉͍̏͊̃ͥ̆̀͌ͯ͊͂̊ͧ̾̈̕͘͜͠ͅt̢̨̫̺͎͔̗̮̳̘͇̪̎ͩͧ͆̍ͮ̉ͦ͗ͮ̑̌ͩͧ̈͟͟͠o̷̹̗̲̱͉͖͍ͫ̑̉̇̄͑̾̑͆͗̋̽ͪ͋̂͡‌​̫̤̱̺͚͍ͅņ̢̘͇͉̘͍ͧͭͬs͍̼͚̝̰͆ͧͦ̇̄͡͡.̷̢̺̞͉̠̻͎͕̙̭̤̖̯͖́̌ͦ͋̿̃ͤ̓ͥ̈͂̀͝.̷̛̼̹ͫ̈͆ͯͩ͛̋͌̇̆͊̌̇̂̔̚‌​̫̳̻͍͎̭̱̝̖ͅ.̡͚͇̗̤̩͚̓̈́͊̇̒͂̒ͥͣͦͮ̂ͯͫͤ́͠
 
getInstance cannot hold.
 
Xeo
12:11 PM
Dammit, I really need to learn japanese some time...
 
@Xeo: I hate to break this to you
but the language that originated duck typing is utterly irrelevant and it has no more opinion than anyone else
 
sbi
@Xeo How about Dumbleton as the new name for Singleton?
 
12:27 PM
@sbi: Simpleton
 
sbi
@DeadMG I was replying to this.
 
oic
 
 
1 hour later…
1:50 PM
Hi, what's up?
We're at "singletons are bad" again. I see.
I'm in italics?
 
I don't see you in italics
 
I hope the "With great power comes great responsibility" mantra does not apply here :)
My name.
 
Yes, your name is in italics
probably because you have like a million points or something
 
Who wants to try to answer my question here? :)
1
Q: Longest substring that occurs at least twice: C++ question

Armen TsirunyanThe title is horrible, I know, but until I know the answer to my question, I can't think of a better one. If you can, please edit. I was solving (for fun) a very easy problem on one of OnlineJudge sites. The problem is this: Input: a single string containing lowercase latin letters. The le...

 
Meh, online judges.
 
2:05 PM
This is a pure C++ question :)
 
Meh, cats.
 
Not algorithm
 
You did the ritual dancing wrong.
 
PC LOAD GOAT.
 
Did you use an athame to kill the goat?
Was the goat a virgin?
You wore a white or a black hood?
Are you sure it was midnight? Does Daylight Savings Time influence witchcraft?
 
2:18 PM
@MartinhoFernandes OMG I never thought of that!
 
Witchcraft — works only at 0000 Zulu.
 
So, given that half the globe can't do it under moonlight, it only works in the other half?
 
Yeah. That's why we can't have nice things.
 
Like magical virgin goat blood.
Ugh, what kind of perv would want that?
 
I want magical virgin goat blood.
They say it's tasty
 
2:30 PM
And magical.
 
@ArmenTsirunyan Who are "they"? The pervs?
 
@MartinhoFernandes No, the magical goats xD
 
If the sacrificed goats are saying things, you're doing it wrong.
 
They're magical - D'oh!
 
Are muslim vampires afraid of crucifixes?
 
2:36 PM
Vampires aren't religious I think.
 
Vimpares are.
 
But muslims can be turned, can't they?
 
turned, around their axis?
 
By π/2.
 
Pi looks awful in this font.
 
2:40 PM
Images of muslim vampires LOL
 
@CatPlusPlus Was that Russian p?
 
Looking at this photo, I doubt that muslim vampires are afraid of crucifixes
 
@ArmenTsirunyan No, pi.
Well, I don't know Russian, so maybe. Dunno.
 
2:48 PM
@CatPlusPlus П п is Russian p
 
Yes, but those look as intended.
 
Different codepoint, π is pi.
 
Try copy-pasting what Cat posted someplace with a decent font.
 
It's like e (Latin) vs е (Cyrillic).
Entirely different character, even if using same glyph.
Someone's been lazy with this font.
 
М vs. M is hard to distinguish, but м vs. m is obvious :)
 
2:51 PM
π.
 
@CatPlusPlus Now, THAT's pi
 
How did you do that?
 
It's the same character, only with different font.
Backtick'd.
Unicode be hard.
I think е always looks like e.
 
But they're not the same, just so you can do 'e' == 'е' and get false.
 
Worse. This program fails to compile:
int main() {int a = 10; ++а;} :)
 
2:55 PM
Wow, you guys did indeed type different chars.
If it was me, I'd just type the same and let everyone believe I didn't.
 
We're serious about our characters.
 
Hmm, interesting question:
1
Q: Can Windows-Malware harm a Linux-Computer when it's executed with wine?

mooseI am a (Ubuntu) Linux user. Sometimes, I have to use wine for executing Windows-Executables. I would like to know if Windows malware (virus, trojan, worm, ...), so malware which was not intendet to do harm when beeing executed with wine on Linux, can do harm to my Linux system. I use a standard...

 
3:13 PM
Same with Linux software, really. Everything you run under your own account has access to your files, that doesn't depend on the OS.
I overuse that word.
 
There's more to security than accessing/compromising files though; that second answer is nice.
 
"But it's open-source! I can compile everything myself, I'm safe!" Except I don't review every single line of code I compile.
 
Malware usually either targets personal data, or other computers.
 
Haloa xD
 
Hi.
room topic changed to Lounge<C++>: We don't murder anyone here. We consider it polite to do that kind of thing outside. Like smoking.
I had to do that. There was a period missing at the end.
 
3:27 PM
Yeah, missing periods are not good.
 
Unless that's what you want.
 
Crazy idea.
 
What do you think about "Thinking C++ by Bruce Eckel"?
 
It's on the list, so it should be good.
 
oof, I think my code compiles for the first time in a couple of weeks. That's scary, now I have to find out how much of it no longer works :D
 
3:35 PM
lol
 
Scary indeed.
> He is not returning an Object*. He is returning a reference, as advertised. In this case it is the NULL reference. – David Hammen 20 mins ago
Amazing.
 
but at least I got rid of some really old crufty code which was just a pain to understand (and never mind trying to extend it)
 
Can anybody with Android experience help me out with a little problem I'm having? Android room is locked for now and I don't think it's a big enough problem to post a question
 
@MartinhoFernandes Good thing it wasn't NULL object, eh.
 
3:40 PM
Why does everyone think it's okay to come ask questions about every language other than C++ here?
 
It is pretty much C++
 
They envy us.
 
@lespommes no problem is too small for a question
 
Whatever, I learned C++, Javas close enough
 
there's absolutely no rule on SO about how "big" a question has to be before it's a valid question :)
 
3:41 PM
We're the most awesome room in here.
 
Java is not close enough.
 
Xeo
@lespommes Can I laugh at that sentence?
 
@lespommes oof, that's not the best thing to say when asking C++ programmers for help ;) The two languages (when used correctly) really don't have much in common
 
You always can laugh at sentences.
I know I do.
 
They don't laugh back.
 
3:42 PM
however
the chat is not a question answer
 
haha god guys I'm just joking
 
if you have a question, ask a question, that's what stackoverflow is for
 
Xeo
@DeadMG It is
 
so anyway, if you want to ask a question, ask it. :)
 
sheesh, didn't know the crowd here was so elitist
 
3:42 PM
@lespommes we're not elitist, just pedantic ;)
 
Wait, what?
 
Xeo
"What where you doing today?" "Uuuh... hanging in the SO chatroom?"
 
If we were elitist, we'd lock the room down, too.
 
@lespomme: It's the C++ chat. What are you expecting if you're asking questions about languages that are not C++?
especially questions that should just go on the main site
the chat is for chatting not Q&A
 
Alright nevermind then, thanks
good lord...haha
 
Xeo
3:43 PM
You know, by the time it would take you to convince ask if you could ask your question, you could either: Just friggin ask the question in here, or ask it on SO proper
Damn, he's already gone.
 
too bad he left, he seemed like such a nice person
 
@lespommes shrug suit yourself. Like I said before, if you want to ask a question here, go ahead. There's absolutely no rule against it
 
Xeo
Good job everyone
/highfive
 
@lespommes We're not elitist. We just can't be bothered talking to all the little people!
2
 
I regret nothing.
(Except having boneitis.)
 
3:45 PM
What's boneitis?
 
I still don't understand why people come here to ask questions in the first place. I mean, it took me long enough to even discover the chat. Is it the first result when you google "where can I ask programming questions?" or soemthing?
 
Xeo
No, but SO is: google.de/…
 
@MartinhoFernandes A funny name for a horrible disease.
 
@Xeo And funnily, it's a Programmers question.
 
3:47 PM
It's on SO, because it's old.
 
Xeo
@MartinhoFernandes Not for me at least
 
@CatPlusPlus Contains bone-popping and bone-crackings sounds!
 
@Xeo yeah, but how do people who presumably know about SO even think to try the C++ chat of all things before asking on the site proper?
 
Xeo
Ah, that's what you meant
 
also, my code fails at the very first unit test now :/
 
Xeo
3:48 PM
You have unit tests?
 
@jalf Comment it out, and replace with TODO.
 
@Xeo not as many as I'd like, but yeah
 
Xeo
I envy you.
 
I don't even have sourc econtrol
 
:|
 
3:49 PM
I have SVN. :(
 
because you're working on those weird university computers where nothing can be sanely installed?
 
@DeadMG ಠ_ಠ
 
@CatPlusPlus Piece of crap, but better than no source control.
 
no, because my code has no value aside from what I learned from it, and I don't need SVN to learn lessons :)
 
You don't need SVN for anything.
Not even to work with other people's SVN repos.
 
3:50 PM
SVN teaches you to use better system.
 
SVN is still better than CVS, which in turn is better than Visual SourceSafe
 
Everything is better than VSS.
 
And CVS.
 
they use pvcs at my workplace. That's worse than anything else I've ever seen
 
VSS is a big contestant against no source control for the title of worst of all.
VSS actively destroys your source code.
 
3:52 PM
Some people think that putting the code on an network share is the same as using source control.
 
@DeadMG I dunno, today I was writing a throw-away toy program for the heck of it and I just threw down a hg init just in case. Particularly because that code is not memorable I want history on it so that when I come back later I know what I wrote/changed.
3
 
@StackedCrooked Or DropBox.
 
Xeo
Oooooh, I know those.
Poor guys. :)
 
it's not that the code isn't memorable
it's that it isn't valuable
 
My toy program sure isn't.
 
3:53 PM
Dropbox has history, though.
 
@DeadMG if you're learning from it, it's valuable
 
yeah
but once the lesson has been learned, then the code loses value
my biggest project is only like 2k lines and I want to scrap most of those lines as it is
 
@CatPlusPlus But lacks atomic commits.
And the fact that everything gets synced as soon as you save is bound to wreak havoc.
Everyone gets your "let's just commit this line here so I can see what happens" edits.
 
@Martinho: Even the Spanish Inquisition?
 
given the ease of setting up a dvcs, I really don't get why anyone would even consider using dropbox or a network share (or no source control for that matter)
 
3:57 PM
you could use dropbox + rsync :)
 
back when svn was the popular option, it kinda made sense. Setting up a svn server is/was a pain
but when you're able to take the server out of the equation, the overhead of setting up a repository is just so low
 
You don't need to set up an SVN server, though, it works with file://.
 
@CatPlusPlus yes, but you still need a server to store your repository. Even if you don't use svn-serve
 
Dammit. I meant "let's just comment this line here so I can see what happens".
 
svnadmin create foo; svn co file:///foo foo-wc
 

« first day (267 days earlier)      last day (4674 days later) »