« first day (366 days earlier)      last day (4565 days later) » 

9:00 AM
Training for when it's going to snow?
 
lo
l
 
cpx
@cHao I have also found the rule in The C Programming Language 2Ed 5.12 Complicated Declarations.
I never opened the book, i thought it was old lol
 
lol
it is....it's just been updated :)
 
@FredOverflow Drawing a blank on how to effectively make your two different array types react differently beyond simple type incompatibility. Also, it's 4am.
Once I researched auto_ptr, shared_ptr, and unique_ptr casting: hostilefork.com/2009/07/10/smart-pointer-casting-study ...
ONCE.
 
9:16 AM
Smart pointer casting shouldn't happen very often.
 
it should certainly happen more often than raw pointer casting
 
Tonight is the Austin C++ meetup. It's been around for 6 years, basically just a monthly laid back meeting of programmers who reserve some tables at a bar and drink and yak after work.
I'm trying to create a geekier spin-off of presentations and such, where people don't really socialize but are more technical. So I'll be pitching that ancillary meetup.
 
OWWW TERRIBLE MACRO
use inline function!
 
@DeadMG if reaction to me, it's too late for me to bother to figure out if what you're saying works or not. I'll assume probably right, but it's easier if you paste substitute "I'm sure it works code".
 
Why not make your whole code out of macros? It would still work.
 
9:24 AM
Yawn.
Read my answer to this question: stackoverflow.com/questions/7784200/…
If you guys think you know something, learn how to teach. It's one thing to know a lot, and it's another to downvote and be a naysayer. Some people are kids, some speak English as a second language. And some do a lot more than just program. Solve, don't belittle.
 
Chances your message actually reaches a downvoter: 0%.
 
"Oh my god, a macro" is crap talk. "Hey, here's why this is better"...and writing the code...is real talk.
No I mean conversationally, I was downvoted a couple of times here.
 
There's no downvotes here. Also you can't expect to say things and not get reactions. That's how discussion works.
 
I'll admit to having learned C before C++. I freely confess to recently figuring a bunch of nuances out to iostreams that I didn't know, because really... nothing I worked with dealt with file I/O. Especially not text file IO.
But anyway, some things can't be done with inline functions. Look at my answer here: stackoverflow.com/questions/7522949/…
 
If you don't want to hear things you don't want to hear, it's easier to not listen to them than to try to talk down people. What are you expecting anyway?
 
9:29 AM
Who am I talking down?
 
I don't know because instead of actively replying to anyone in particular you're passively aggressively addressing 'downvoters and naysayers'.
What are you expecting anyway and trying to achieve with that bottle in the sea?
 
insertion operator in ostream is virtual?
 
Perhaps a hundred million castaways looking for a home.
If you're going to cite "Message(s) in a Bottle", yes.
Anyway, my only point is; I try fairly hard to share and improve on things, and I'd appreciate it if the people who know enough to teach me a thing or two would take at least a shred of the care I take with 1 rep kids to say "hm, this might make it better"
 
@HostileFork was reply to my question?
 
Stop talking to nobody in particular. Confront & address people. Use @ to ping people.
How are 'the people who know enough to teach me' supposed to know who they are? How does anyone know what you know?
 
9:33 AM
@LucDanton insertion operator in ostream is virtual?
 
@DeadMG: Hello, please read the long and earnest response I wrote to a 1 rep guy who seems pretty earnest to learn more about programming, and consider taking some fractional amount of the care I took in trying to share what I know (be it small or large) with him in informing me.
@LucDanton: If you read any amount of code I write, or answers I write, you would know that a comment like "Why not make your whole code out of macros? It would still work." is an inappropriate and uninformative remark, and you made that remark after a chat in which I'd provided hyperlinks showing (I would hope) that I'm not an idiot. If you were making a joke, suffix it with something like :-) and if I don't get your joke I'll ask you about it.
 
@HostileFork That question was rhetorical and meant to point out the logical flaw in your reasoning.
It does not, in and of itself, address whether using a macro is desirable or not.
 
Well, I suppose my "thesis" which I would actually not address to any specific individual, is this:
We are on the brink of some really interesting transitions, a totally different world from where I grew up learning programming (and I imagine totally different for several in the room as well)
I did not have a resource like stackoverflow, I had some random books that I could get my hands on, and many of those books were written with more of the agenda to sell books than to truly inform young kids how games were written.
Thus I was given books about BASIC and puzzling over why I couldn't achieve the effects of games coming on disks that were manufactured on drives with capabilities besides the one I was using (hence why I couldn't copy the games) and I didn't know there were cross-compilers and that these programs were not being written on the machine I was using.
So I'm quite empathetic to the n00bs, who might be young kids, in other countries, who visit this site. And to my mind, they're more important to the future than the lot of the self-important bitter aging programmers who are quick to dismiss or cut down those who don't know what they know.
I know it's tempting to treat this site mechanically, to let one's own momentary concerns eclipse any of that. But the thing is I know anyone who can fathom C++ must be smarter, bigger, better than that.
My blog is an afterthought in my life, it's got a fixed width...I haven't bothered to get involved in fixing it...but I'm enthusiastic about the prospects of what Wikipedia and StackOverflow are doing in the spirit of changing things. I'm not here to harass anyone, and if I share my work I expect the kind of courtesy I would show anyone who shared their work with me.
And you guys are smart enough to do better. The end.
 
can anyone tell my overloaded insertion operator is not working? ideone.com/9GTvz
 
@MrAnubis I fear the operator won't be found without ADL.
 
9:47 AM
@MrAnubis I'm afraid I don't happen to have a compiler that does auto handy, but you can generally find a broader audience by posting your code as a question than in the chat room.
 
ok so i tried doing this :
namespace std{
std::ostream& operator << (std::ostream& z, std::pair<int, char>& d)
{
    z<<" "<<d.first<<" "<<d.second;
    return z;
}
}
 
Although it would help diagnose if you pasted the actual error in there.
 
@LucDanton you could see the error in ideone.com/9GTvz
 
@MrAnubis Yeah but there are other, unrelated errors (like no range-for support in GCC 4.5).
In any case you're using an std::istream (std::cin) with an std::ostream_iterator. Typo?
 
@LucDanton yes thanks
@LucDanton now you can see the error : ideone.com/QmZHp
 
9:58 AM
I think that error is due to a faulty implementation. On my version of GCC the actual error is related to not finding an operator<<.
Make operator<< take a reference to a const pair and it works.
(Well, it compiles and runs at least.)
 
@LucDanton so true , it's working now
@LucDanton how adding const is helping in this situation please?
 
Introducing an operator<< overload in namespace std like you did is not allowed though.
@MrAnubis The std::ostream_iterator<T> will pass a const-qualified object to operator<<, so it needs to be const correct, too.
 
can anyone tell me how to include the type library of an activex control installed in the system in our project and call the functions from the project.
 
@LucDanton i always forget about this :(, thanks again
 
Not using your namespace std hack does mean running into name resolution issue though.
So it's lose-lose.
 
10:05 AM
STL errors are so non-understandable :(
 
10:18 AM
Ohai
 
10:58 AM
hai
 
How to understand a women : First volume
 
11:24 AM
@TonyTheLion you got the job?
 
11:35 AM
Hello everyone :)
 
11:46 AM
@user411102 nope
 
11:59 AM
@user411102 He's a noob. You can see because he still has hair.
 
12:12 PM
What would the bitwise operation be to remove a specific flag from a bitfield?
Bitfield &= ~Flag?
Yes, that's it.
Now, would you describe it as a terminal or a console? My non-programmer friends unanimously agree on 'terminal.'
 
12:54 PM
@Maxpm Isn't terminal hardware and console software?
 
@Pubby8 That's what I thought, too, but my friends think just the opposite.
It should be noted that many of these friends don't really know what a floppy disk is...
 
i use "console" on windows, and "terminal" on linux
 
This might be a good question for Super User.
 
mostly because when i say "terminal", i think about things like vt100, ansi, escape sequences and such as that
linux cares about that stuff; windows doesn't
@Pubby8 "console" can be hardware as well
 
There also might be some confusion with video game consoles.
Where does command line fit into the equation?
 
1:02 PM
that's what you type in to run a program. :)
 
@cHao On Linux it's a terminal emulator
 
@Pubby8 helping to make my point :) either one can be hardware or software. if that's the distinction you wanna make, it's useless
the difference, to me, is that in linux, a shell window / VT / whatever actually acts like an old-fashioned terminal and is controlled by certain sequences of chars and such. in windows, a console is generally a lot dumber, and you have to call api functions to do anything more than teletype-style output
 
1:28 PM
I call it black window with blinky stuff.
Or MS-DOS.
That's what everyone does, right?
 
lol
half the time i catch myself calling it a "dos box" or a "shell window" :)
 
 
1 hour later…
2:46 PM
The next time someone asks me what it is, I'll just rejoinder, "Shut up or I'll hack your AOL account."
 
lol
 
83
Q: What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?

LazerI think these terms almost refer to the same thing, when used loosely: terminal shell tty console What exactly do each of these terms refer to?

 
...
 
3:04 PM
it is a command line. How it implements is irrelevant
 
3:21 PM
oh hi
 
3:45 PM
template <typename T1, typename T2>
void combine(T1, T2);
class Mixer {
    friend void combine<>(int&, int&);
};
If the name isn't qualified (in other words, it doesn't contain a double colon), it never refers to a template instance -> how and why?
 
sure, I magically inferred the context
 
@DeadMG can you explain how so?
 
u
uh
the point was that I have absolutely no idea wtf you're talking about
you posted some code and a quote, which don't appear to be linked at all, with no source for either, explanation of what they are, or how they go together
then you ask us for an explanation?
 
it is said in context of friend function template
 
I have to go anyway ;p
 
3:53 PM
lol, okay:)
@RMartinhoFernandes can you plz answer my question?
@ManishGill you just won
 
hmm?
 
@ManishGill was just random post , templates made me craz-z-z-y!
 
lol
eh, does stackoverflow has an IRC server?
 
@ManishGill why would you look for IRC server , when you have good interface here?
you want to sue SO for this?
 
I'd rather use IRC than this
 
4:03 PM
^
 
or jabber
 
more convenient really
this is good, but still
 
or anything really other than yet another tab in a web browser
 
euu....
@awoodland lamia unSukh-tur!!
 
4:04 PM
@awoodland some random words :D
 
my default assumption for words I don't know is that they're probably insulting me. that's the second biggest reason why I should never work at the UN
 
I prefer something with edits. Like this.
 
@awoodland no , i wasn't even thinking to do that :( , just bored here
 
I like edits, but browser tabs are slow on this laptop. there's a notable lag when I type here that I don't get for an IRC client or XMPP client
 
and you don't even need any IRC client software to be installed , which i hate double clicking :D
@ManishGill you went up?
 
4:10 PM
well you could have the best of both worlds without much trouble, i.e. multiple interfaces to the same service
 
Mr.Anubis: I what?
<_<
 
@ManishGill those emoticons are hard to understand for me , does that mean staring?
 
that is me, staring sideways in an awkward way.
 
(emoticons are heavily cultural and hence surprisingly non-universal - there's a few interesting papers on it somewhere)
 
yeah, these are much influenced from Japanese Animes and Manga iirc
 
4:16 PM
┐('~`;)┌
 
\(0_0)/
 
キタワァ*・゜゚・*:.。..。.:*・゜(n‘∀‘)η゚・*:.。. .。.:*・゜゚・* !!!!!
Girlish version of "It's here"
better i write "It's here" rather than big emoticon
 
I love "abbreviations" that are longer than what they abbreviate!
 
hm... you might need lens to see above emoticons 0_o
 
4:57 PM
0
Q: Why can't we have non-const class-level static variables?

MehrdadWhy does the Visual C++ compiler refuse to compile this code? I obviously know that the error is: Error C2864: Singleton<T>::p: Only static const integral data members can be initialized within a class but why? (i.e. is there a technical reason why it is not allowed?) Is this com...

room topic changed to Lounge<C++>: Days without Singleton incidence: 0 [c++] [c++11] [c++-faq]
 
Who never heard of the cached_output_of_f_singleton? And the cached_output_of_g_singleton. And the cached_output_of_h_singleton.
 
:)
Maybe you can make a Factory that produces these Singletons dynamically?
 
5:27 PM
Hey @Luc, can you tell me what this is for: #define ANNEX_EXPAND( expr ) std::initializer_list<int> { ( (expr), void(), 0 )... }? For testing or something?
 
5:54 PM
Oh hai nubcakes
 
6:25 PM
Hi.
 
may be it'll intrest you
 
That's from Syfy? Ugh.
I thought GPS already compensated for relativity.
 
It does.
This was more about the Earths rotation and such
 
For some reason, I'm less convinced by that silly article than from all the hype about "proof of extra dimensions" and such.
 
They're probably right, though.
 
6:37 PM
Well, it has "Syfy" all over the top of the page. That significantly decreases my level of confidence. But at least they linked to the sources.
It also seems like a very basic flaw, which contradicts the very thorough month long analysis that was claimed by the original researchers.
 
6:51 PM
This doesn't make any sense, does it?
 
Ell
hi guys
i read that
and couldn't get my head around it :O
 
object oriented software construction by bertrand deserves my dear $30?
 
@MrAnubis It's a classic.
If I had bought, I would own it.
 
so should i click on pay or not?
 
But I only rented it, and then I had to give it back.
Are you only buying one book? What other books do you have to choose from?
 
7:00 PM
i have only $30 at this time , i am thinking to learn OOP at core , that's why thinking to buy it
@FredOverflow only one , i don't know which other books are good to learn OOP
 
What C++ books do you have?
 
Effective c++ and effective STL and other one from which i had started learning c++ :)
 
Which one is that?
 
@FredOverflow Object Oriented Programming In Turbo C++ by Robert Lafore , i don't read it anymore or i should say i ate it completely :)
I also have some good C++ ebooks :)
 
You eat books?
 
7:09 PM
@RMartinhoFernandes nah lol , by that i mean i read it from page to page
so @FredOverflow should i buy that?
 
I think you should get a good tutorial book on C++ first. Like C++ Primer or Accelerated C++ or Programming: Principles and Practice.
 
Turbo C++? ouch. Can you say "C-with-Classes"
 
@FredOverflow most of the things in those books i already know i think (read many articles on internet which gave good insight)
@DeadMG when i had bought that book at that time i even didn't know about SO or any friend to prefer me some good book
@FredOverflow you saved my $30 (they are like 1500 Rupees here) :) , i decided not to buy it for some time more :)
 
It's a great book, but it's more "theoretical/ivory tower" than "practical/real world" IIRC.
 
vim related: tagbar looks cool.
 
7:21 PM
@FredOverflow so what book you will prefer to learn real world OOP? or should i just keep practicing and will automatically get it
 
Honestly, I don't know if there is a good OO book.
 
Just do what feels right.
 
Sex won't teach you object oriented programming.
 
Coincidentally, object oriented programming won't teach you sex, either.
 
hmmm.. why did sex come in to all this?
 
7:27 PM
4 mins ago, by Cat Plus Plus
Just do what feels right.
 
@CatPlusPlus sex is something to be learnt? 0_o
 
Hm, should I watch Dexter or go to bed early?
 
Hell if I know.
 
@FredOverflow Dexter :) Didi
 
@MrAnubis Yes. We have an instinct for OO, but sex is completely alien to us, initially.
 
7:29 PM
5621 files, 1423483 lines (53584 kB) scanned in 212.9 seconds (251 kB/s)
284202 tags added to tag file
284202 tags sorted in 106.82 seconds

2011-10-17  21:26       750 637 174 tags
 
@FredOverflow to learn that i need GF first which i don't have lol
 
@MrAnubis Then work on that. The less you think about it, the easier it is.
 
Story of my life.
 
"Not thinking about it" can be a real problem for us computer scientists, I know ;)
 
Yay, that 700MB tags file doesn't kill vim.
 
7:31 PM
Not think about it? Wtf is this? Like saying "don't drink if thirsty"
 
i am ok with pr0n rather than chasing a girl :D
 
Oh, I have a good one:
 
@CatPlusPlus vim is rock solid baby!
 
Why don't Haskell programmers take medicine? Because of the side effects!
 
Tagbar is cool.
 
7:33 PM
> error: default argument for parameter of type 'detail::indices<>' has type 'detail::cons_end<detail::indices<0u, 1u, 2u>, 3u>::type {aka detail::indices<0u, 1u, 2u, 3u>}'
WTF is GCC trying to tell me here?
Oh, I need coffee. The types don't match.
Arrrgh, why are lambdas monomorphic?
 
I'm building some crazy new idea for this whole chat thing
That actually has client server client relationship
 
my company is looking for a new worker. if you want to take a look..
 
> Do programmers have quiet working conditions?
They fail at this?
 
7:48 PM
yep it's not quiet :)
 
I'm imagining cages with shrieking monkeys.
 
replace the monkeys with funny coworkers and it nearly fits your picture
lol
 
Seems like a decent place to work though.
 
"gute Englischkenntnisse" - anyone else find that a little ironic?
 
No company uses SO Careers in Portugal.
 
7:53 PM
Goede kennis van Engels vereist.
 
@RMartinhoFernandes Arbitrary expansion of variadic template parameter pack.
 
Leider ist mein Deutsch nicht sehr gut :)
 
@LucDanton To evaluate expr for its side-effects?
 
Neither is mine. That was Dutch btw.
 
@RMartinhoFernandes Yes. (Ordering is guaranteed.)
 
7:55 PM
@StackedCrooked: ja dat had ik wel in de gaten dacht ik zo :)
 
WTB money
 
Assuming template<typename... T> void foo(T&&... t); then in the body I can do ANNEX_EXPAND( ++t ); to increment all arguments.
 
Ah you speak Dutch as well.
Little did i know.
 
@DeadMG How will you pay for it?
 
using lambdas you can also write arbitrary statements initializer_list<int>{ []->int{ __VA_ARGS__; return 0; }() ... };
 
7:56 PM
The void() in the macro is to suppress any invocation of an overloaded operator comma.
 
Uni will pay for it, and the govt
 
C++, Dutch, Greek. It's all the same to me :) (weehoo)
 
however GCC does not yet support expansion where the element is a lambda
because it gets confused when it is at the lamdba body and there are still unexpanded packs
 
Monomorphic lambdas suck.
And now I'll have dinner. I'll be back.
 
7:59 PM
0
Q: I'm using boost::spirit to write a parser lexer

Taylor BioniksI'm using boost::spirit to write a parser, lexer here is what i want to do. i want to put functions and classes into data structures with the variables they use. so i want to know what would be the best way to do this. and what parts of boost::spirit would be best to use for this? the language...

 
lol parser lexer
 

« first day (366 days earlier)      last day (4565 days later) »