« first day (593 days earlier)      last day (4581 days later) » 

11:01
@Pubby Averted.
nomination for c++-faq tag — Ben Voigt 8 hours ago
What y'all think?
@RMartinhoFernandes ??
You now have 1781.
You missed your window.
Silly redcoat, that was the wrong account!
Oh god, so much fail.
er any idea why this happens folks :s 1>: fatal error LNK1169: one or more multiply defined symbols found
11:06
There are some symbols defined more than once. Could be because you're putting definitions in headers, or are linking to libraries that define the same symbol.
@RMartinhoFernandes : Thanks !
sbi
sbi
11:18
@BenVoigt: Done. (Everybody feel free to disagree with me and remove it, but please try to discuss it in the chatroom first.) — sbi 19 secs ago
5
Q: Passing smart pointers as arguments

Steve HIf I declare an object wrapped in a smart pointer: std::shared_ptr<myClass> myClassObject(new myClass()); then I wanted to pass it as an argument to a method: DoSomething(myClassObject); //the called method void DoSomething(std::shared_ptr<myClass> arg1) { arg1->someField =...

Movies are so unrealistic. This guy's using his computer to access an alien ship & not once has it asked if he wants to upgrade his Adobe.
Nobody sane uses Adobe.
@RMartinhoFernandes : Lol reminds me of Independence day ! :D
sbi
sbi
@RMartinhoFernandes Nice. If that wouldn't show up as a dumb link on the starboard, I'd start it.
22 mins ago, by Pubby
I have 1776 rep and now my account must declare independence.
11:21
Too late, it's already started.
@sbi I didnt quite get that.
sbi
sbi
Independence Day, commonly known as the Fourth of July, is a federal holiday in the United States commemorating the adoption of the Declaration of Independence on July 4, 1776, declaring independence from the Kingdom of Great Britain. Independence Day is commonly associated with fireworks, parades, barbecues, carnivals, fairs, picnics, concerts, baseball games, family reunions, and political speeches and ceremonies, in addition to various other public and private events celebrating the history, government, and traditions of the United States. Independence Day is the national day of the U...
Note the year.
@CatPlusPlus Flash?
Flash rarely asks for updates.
11:23
@sbi Ah indeed
sbi
sbi
> DO NOT CLICK THIS LINK (you will be sorry): regretsy.com/2012/05/30/my-little-yoniCharles Stross
You're mean. Why did you post that?
sbi
sbi
@RMartinhoFernandes Because I wanted to do it before you do so.
I want to avoid doing it!
11:26
does VS remove the spaces on the left side while printing output? My code is kinda acting weird.:s
@KodeSeeker ? your code is printing? Dead tree style? What do you mean?
I hope trees can't become zombies.
@sehe I meant printing onto the output and I need to google Dead tree style
@KodeSeeker It means "on paper".
11:30
In DF, everything can become zombies.
@RMartinhoFernandes Ah thanks
@sehe : No I meant on the console.
@CatPlusPlus Trees aren't creatures AFAIK.
I bet there's a mod for that.
Okay, gotta go and write that moronic test.
I so want this semester to be over already.
L'r.
11:37
@KodeSeeker what way? std::cout? printf? Did you (neglect to) use std::ios::skipws somewhere in the process?
@sehe Looking into it. I guess the problem earlier was because my file was in some form 'Unknown Scope' in VS. Rewriting the code..
Say I have a set of about a thousand one-word strings, and I have a string that is not in that set, how would I find the most similar string in that vector?
For example std::set<std::string> set{"Hello", "World"}; find_most_similar(set, "Helo"); would return "Hello".
that's non-trivial
I believe it is, but there are probably algorithms for it.
Google does it, clang does it, word processors do it.
@RadekdaknokSlupik Highly recommended reading:
11:49
Is computing the Levenshtein distance reasonable?
@RadekdaknokSlupik I think the article mentioned it, and yes it is a reasonable factor. Of course for phonetic similarity (in English) look at Donald Knuth's Soundex algorithm:
Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling. MySQL, MS SQL Server and Oracle) and is often used (incorrectly) as a synonym for "phonetic algorithm". Improvements to Soundex are the basis for many modern phonetic algorithms. History Soundex was developed by Robert C. Russell and Margaret K. Odell and patented in 1918 and 1922. A variation called American Soundex was used in the 1930s for a retrospective analysis of...
Phonetic similarity isn't what I'm looking for (I'm specifically looking for small typos), but I'll read that article by Norvig. Thanks.
@RadekdaknokSlupik In that case, I'd focus on Norvig's article. I should give you the (surprisingly simple) tools to think about it. There is a C++ implementation linked at the bottom
I'm planning to add a did you mean feature to my compiler for when an unknown identifier is encountered, so that's why I'm asking. :)
Rule of thumb: focus on the core functionality first :)
11:56
I know, but this just came into my mind.
That's why I'm planning to add.
@RadekdaknokSlupik Sorry to be butting in , dont modern IDE's already have that?
Ok, just checking
@KodeSeeker not everybody uses an IDE.
@KodeSeeker Guess how they already have it?
@RadekdaknokSlupik Ah excellent.
@sehe Of course, my good sir.
11:59
@KodeSeeker What IDE has suggestions for misspelled identifiers/keywords, out of curiosity? I use a fair share of IDEs on occasion and don't recall seeing it. clang/gcc diagnostics, however, sometimes do make suggestions (but that's not IDE)
@sehe Im a C++ noob , but I do remember Eclipse having such a feature for Java, so I assumed VS(not the express edition) would have something of the nature?
@RadekdaknokSlupik wow, whats that?
Xcode. IDE with some kick-ass features but it misses a lot of other very useful features.
12:02
@KodeSeeker Misspellings in eclipse? I worked with Java+eclipse for roughly two years (I think eclipse rocked back then) but I don't recall it doing suggestions. Of course, autocompletion works, and highlighting of syntax/semantic errors works, but that isn't quite the same as suggesting misspelled identifiers
@sehe Ah my bad . I mistook it for auto-completion.
but then code wouldnt compile on eclipse and the error would be highlighted. So I guess that pretty much does the job
Sometimes it's difficult for the human eye to spot typos, and then you think wtf why doesn't this piece of shit compile?!
@KodeSeeker To me it does.
@RadekdaknokSlupik I completely agree, especially with ADL lookups. It is rather nice that GCC will list the candidate namespaces that may offer a free function
@sehe Ah I see, well using auto-complete does have its advantages then .
But I don't need an IDE for it :)
@DeadMG checkout WideStudio
12:10
lol
er btw doesnt VS Express 2008 have autocomplete?
All decent editors and IDEs have autocompletion.
@RadekdaknokSlupik lol , I know Microsoft sucks but, I ve never worked on VS before.
That Microsoft sucks is irrelevant.
Cheers
12:14
@RadekdaknokSlupik Though the human eye can easily detect flaws in semantical logic that computers cannot.
apple y u no xcode with clang 3.1 y u only with crappy version that segfaults on initializer lists and lambdas fuck you
It would be fascinating to know what allows human beings to perform better than Turing machines
@Neil But still, sometimes it's difiicult to spot typos.
@RadekdaknokSlupik not its no
@RadekdaknokSlupik Well I didn't say Turing machines aren't better than us in some ways
12:18
Context seems to be a normal fiery Lounge<c++> discussion...
Because it says dumb.
I think it's only a matter of time before humans have a surgical procedure to insert a CPU unit inside the brain
Allows you to optionally remember anything without risk of forgetting, perform calculations with lightning fast speeds.
I got a Q about static and linker errors
@rubenvb because someone is blabbering on without concern for the rest of the room? In a emotional state, apparently.
@rubenvb We have a site for that :)
@rubenvb module-level static (global or namespace scope) is internal linkage: i.e. not visible outside TU by definition
@sehe yeah, I fear a duplicate though
And it's a MS extension
I'll search SO
12:21
Yes I can use Xcode with clang 3.1! :D
@rubenvb extern templates?
@sehe no, second one on this list: msdn.microsoft.com/en-us/library/34h23df8.aspx
Heck, here's the code: codepad.org/CsPVkic5
@RadekdaknokSlupik It would surprise me any other way. I must admit I'm slowly leaning towards giving Mac a go with their apparently nice IDE
this compiles fine on MSVC due to abovementioned extension.
On GCC and Clang it fails.
Remove the reference in the member function and it works on GCC and Clang.
Question is: why?
@rubenvb Just define it out-of-class?
12:24
yes, the question is not how to fix it, it's why the change of the function call makes a difference at all.
Heck, Ideone accepts both. Guess it's something in GCC 4.6+
class C {
	public: static const int bar;
};

const int C::bar = 2;
again: yes, I know how to fix it. the question is why changing the function parameter to pass by value makes it work.
@rubenvb Mmm. Might be a bug. AFAIK inclass initialization of static members is only allowed in c++11 so it being accepted is an extension anyways
@rubenvb Well, the reference requires an address. Addresses are calculated and 'fixed-up' (relocation records?) by the linker.
@sehe but there is no address for an undefined static, right?
@rubenvb Well, it is defined. Only, it is defined in a non-standard way.
12:28
the fixup is happening at compile time.
@rubenvb I understand that. Relocation records might not be the best wording for that
hmm, I kind of get what you're trying to say
Compiler voodoo.
fair enough.
@rubenvb So yes, this might be happening. In fact, it might be a regression, perhaps even introduced by implementation of c++11 style in-class (nonstatic) member initializers (you know, the new fangled replacement of initializer-list style). Just guessing. I'd simply move the definition out of the class and not worry about it myself
thanks
:)
12:31
@rubenvb What is that voodoo that you do so awfully?
I'm so confused, I come in and it looks like people are talking about C++
Happens everyday
@SamDeHaan I'm confused too. When does anyone ever talk about C++ here?
It's a risk you take when you come into the room
12:33
@sehe But it's such a small risk, I thought I was safe.
@Neil There is even C++ in the flags
@rubenvb I went blind after reading the first line of code.
finally It worked. Folks any idea as to what an 'Unknown Scope ' is in VS?
Me too. Looks like C written in assembly.
@KodeSeeker Don't know, but it sounds bad.
12:35
@KodeSeeker an undefined namespace or class?
@Neil yeah and by bad , I could say unpredictable weird output bad.
@rubenvb I bet if you wrote down the code on a piece of paper and threw holy water on it, it would catch fire.
3
@Neil "holy water"... I've always thought that was good marketing.
@KodeSeeker What did you do to get an unknown scope?
@KodeSeeker social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/… The_Postman seems to have it licked.
12:36
@rubenvb Good marketing for people who sell holy water I suppose.
@rubenvb No idea, it says 'Unknown scope' , in the dropdown, right near the top of my cpp file
So, it is an intellisense problem only, and probably caused by duplicate/conflicting references
@KodeSeeker That's just the IDE being stupid I'd say.
@Neil well , I used Ctrl+N instead of clicking on Source->New file->bleh.
@rubenvb I guess that it is.
Does Skydrive work well with a webdav or whatever mount? Is it slow or quick enough like a dropbox style thing?
12:39
@KodeSeeker Sounds like it's treating it like a resource file rather than source code, and VS doesn't know how to treat it.
@Neil I guess so.
This pear is good.
In other news, good morning everyone.
Its been so long since I eat a pear. Sigh.
This banana is good. Also, good morning.
The pear I'm eating is paid for by my employer. Free fruits are great.
12:40
:D
Problem with Microsoft's mentality is that they assume one would actually want to create a .cpp file that isn't used as source. I would argue that .cpp is a source file, and if you don't like it, you shouldn't be touching the buttons on that particular machine anyhow.
Is using system("pause") an unhealthy habit?
does anyone here know excel vba
@KodeSeeker Yes.
It ain't even portable!
KodeSeeke: I use cin.get() instead
12:44
Use a decent terminal emulator instead.
Hi
@RadekdaknokSlupik well just to see the output, as I learn thats all
40 secs ago, by Radek 'daknok' Slupik
Use a decent terminal emulator instead.
@KodeSeeker Just put a breakpoint at the end of the program
@JohnSmith shh i don't want the others to know
12:45
@RadekdaknokSlupik okay
@JohnSmith Breakpoint?
lol visual basic for applications
@JohnSmith interesting
@kbok yeah I thought that too
breakpoint better
sbi
sbi
@KodeSeeker I suppose you're using VS?
12:47
@sbi obsolument
sbi
sbi
Doing the @Cat's job here.
Please don't say that you use dev-c++. Please.
@kbok DevC++ is an IDE. VC++ is a compiler.
@kbok I don't use dev-c++
George W Bush named The Very Hungry Caterpillar as his favourite childhood book. It was published when he was in his 20s
12:48
lol Dev-C++.
@sbi Yes VC++
@sbi damn you ¬_¬
@thecoshman Favourites change. I have a new favourite childrens book too
I guess thats the same lol.
@sehe I was talking to the system() guy
12:49
@thecoshman Always a friendly word
@sehe you are not in your childhood when 20 years old
@kbok No, you were talking to the room
@thecoshman George Bush, hungry and cat in the same sentence? That can only mean one thing!
I just tried out the Blogger platform and I have to say, their blogging interface is impressive
12:50
@RadekdaknokSlupik He likes pussy, so what?
He's hungry, just like @ScottW.
it allows very powerful customisations (up to and including custom CSS) but still remains very easy to use. Only gripe: (apparently) no Markdown support
And he should learn to photoshop
@KonradRudolph Yes, however putting code on it is quite impractical.
@kbok You mean because it lacks syntax highlighting? Probably right
sbi
sbi
12:51
@KodeSeeker Thought so. (It seems 60% of the VS-using C++ newbies do this. :-/) Here's what you do instead: If you want to debug your program, then put a breakpoint at the end of main() instead. If you do not want to debug, then do not debug, but use Debug/Start Without Debugger (Ctrl+F5 for me ,rather than F5). The latter will leave the console window open until you hit the Any key.
and it probably also doesn’t onebox gists, eh?
@sbi Ah excellent. Thanks for that!
@sbi I still can't find that any key
@sbi Buuuuu my keyboard didn't come with an Any key.
@KonradRudolph Yep, also you have to go to HTML mode if you don't want the formatting to be trashed
12:52
@kbok Yes, I’d never use anything else …
@KonradRudolph You can prolly embed gists using the embed scripts?
@sehe No idea, I haven’t tried whether scripting works but I find client-side scripts to include content fundamentally wrong
@sehe @DeadMG What?
@Neil See, another thing that can be solved with a bucket of holy water
@JohnSmith What what?
in Room for sehe and John Smith, 8 mins ago, by sehe
@JohnSmith were you going to ask a question on that? Or just evil curiosity?
XD oh sorry
I am just trying to find a way to cut a row properly
in VBA
12:56
@sehe 'holly water'? oh, you mean 'water'
for some reason it isn't working right when i try it
@KonradRudolph I don't know. It's probably just a regular link to get the content and a script to render it 'pretty'? That's common practice. JS beautifiers will usually be downloaded from a CDN (for good reason) anyway.
Nice.
Try something else?
@sehe Beautifier, yes. Content? No.
I mean: you try "what"?
sbi
sbi
@thecoshman Bubbja has at least one child, IIRC. Since I have kids, I have new favorite children's books, too. That started when I was way past my 20s, and still goes on. So my current favorite childhood book (series) is written by an author who has written most of them after I turned twenty.
12:59
Does anyone knows of a tool like killall only for windows ?

« first day (593 days earlier)      last day (4581 days later) »