« first day (709 days earlier)      last day (4233 days later) » 

Xeo
12:00 AM
Yeah, full access to the lexical scope
 
@SethCarnegie i dont know, i didnt install anything,
 
aww come on, we're supposed to be talking about developing nukes with iTunes and Kanji.
 
@MohamedAhmedNabil code::blocks doesn't have G++, it uses it
what distro do you have?
 
@SethCarnegie what is G++?
 
12:01 AM
@Mysticial Kanji also have that in the ToS, no nuke development
 
Xeo
@Seth see, you can in some way access the non-static data members... or atleast their type. :>
 
@Xeo aww what
 
room topic changed to Lounge<C++>: How to develop nuclear weapons with iTunes. [c++] [c++11] [c++-faq]
 
@Xeo I didn't know you could do that inside a class either, though you had to have declval there too
 
feel free to roll it back if it's inappropriate.
It's my first topic change.
 
12:03 AM
@Mysticial what a good first topic
 
Xeo
@SethCarnegie The wonders of being in the lexical context of a class
 
@Xeo So many things I don't know
 
@Mysticial lol.
An "inappropriate" topic in the Lounge?
 
Xeo
@SethCarnegie declval is to get values btw.
 
The only thing I've seen anyone object to ever was that Apple ad thingy.
 
Xeo
12:04 AM
@R.MartinhoFernandes Like saying the puppy is a cat or vice versa
 
@Xeo Yeah, knew that
 
@Xeo well I just learned the other day too that you can have intializer_lists as parameters to plain functions, not only in classes or templates, so there's a lot I don't know :)
 
DF kind of fun.
 
Are we totally restricted to iTunes? I can't find any U235/Pu239 for download on iTunes. Will try eBay.
 
12:08 AM
Meh I'll just wait or Apple to announce the iNuke
 
Has Live Work Space taken the place of IdeOne on SO? I've been seeing it a lot. It has GCC 4.7.1 so that's probably why
 
@MartinJames You can download silicon already. It should be possible to download other materials soon.
@SethCarnegie Yeah, that's why.
@DownloadMoreRam i dld 4gigs of ram. still dont see the difference. does it work or what/
 
@R.MartinhoFernandes Hehe... LOL
 
how is the qt creator ide (linux) as far as C++11 goes?
 
There is no good GUI library for C++
 
12:21 AM
Im still wondering, There is a huge collection of IDEs. I want one for ubuntu, that has a compiler that supports C++11, Any Help???
 
@SethCarnegie how would your ideal gui lib be
 
@Cheersandhth.-Alf WPF is pretty good
 
If possible, would anyone mind helping me with this? stackoverflow.com/questions/12557377/…
 
@user1079641 this is the C++ forum, there may be a more appropriate room to ask for help in
 
I am so sorry about it, but no one is either available in other room, or no one seems to reply.
 
12:26 AM
Hey, is it possible to read in a stream of bytes one at a time? I want to do this for a simple XOR encrpytion I was trying
 
Hence I was forced to ask here, since I need the answer kind of quickly
 
@Link what stream?
I bet example.com gets a lot of traffic
 
@user1079641 Please do not spam your question into 3 different rooms.
This is a C++ room. We know nothing about apache.
 
like say a .jpg file
so a file input stream i guess?
 
@user1079641 The place to get quick answers is stackoverflow.com.
 
12:27 AM
just the raw bytes.
 
I did post there too, no answer yet. :(
 
@Link more info like what class/library are you using
 
Here all you get for posting off-topic stuff is annoyed people.
 
standard C++, i have no idea what i need though
no boost no nothing
 
@user1079641 It's been only been 17 minutes... Give it at least a few days. Then throw a bounty on it.
 
get
 
No, I'm saying use it
 
oh
okay
thanks
 
Make sure you open the file in binary mode.
 
Xeo
Actually, = default is only going to work for you if the combined moved-from state of all sub-objects meets the invariant of the containing type, and that has no inherent relationship to whether the sub-objects are "resource-managing types." Usually, that will be the case when the containing type is default-constructible, but even then maybe not. It's easy to come up with counter-examples. — Dave Abrahams Sep 18 at 15:32
Comments on the comment thread from there?
@R.MartinhoFernandes Wait, isn't basically every message here off-topic?
No wait, the whole room is off-topic, so off-topic stuff is actually on-topic and C++ is off-topic...
 
12:38 AM
C++ is included in the off-topic stuff so it's actually on-topic indirectly
 
@Mysticial that's the problem. I need the answer quickly, can't wait for days.
 
@user1079641 Well... Stack Overflow is not for getting answers in emergency situations.
 
Xeo
@user1079641 And we're not your code monkeys on entirely unrelated topics
 
Because quite frankly nobody cares. Not a single person who answers gets paid to answer your question. Therefore, there's no guarantee or commitment involved.
 
Xeo
Also, what kind of bs reasoning is that.. "No one else answered me, so I was forced to bother yet another room on a totally unrelated topic with it"
 
12:45 AM
Wow you guys are extreme
I needed help hence I asked.
My bad, will make sure I never ask for help to you guys again
 
@user1079641 You asking help isn't the problem. Your "YOU MUST HELP ME NOW" attitude on a volunteer-driven website is the problem.
 
"You must help me now" isn't my attitude, sure I asked for it, but if that was my attitude,I would keep bothering you guys
 
6 mins ago, by user1079641
@Mysticial that's the problem. I need the answer quickly, can't wait for days.
 
When you guys said "we can't help because this is C++" I stopped asking
and only replied if someone else said something to me.
 
You've dumped at least 8 questions in this room. Each and every single time, you were either ignored or scolded. Did you ever get the message?
 
12:48 AM
@Insilico That's not really a gimme attitude, just a statement of fact as to why he's actively seeking an answer from whomever he can
at least I take it that way
 
@SethCarnegie Sure. But it shows no consideration of potential answerers.
It's like asking complete strangers (which is effectively what everyone is on Stack Overflow) for immediate help with your CS homework. It's just not appropriate.
 
This is not my homework
 
@user1079641 That was just an example.
 
@user1079641 sorry, you're just asking people who's expertise is not in that area, your time is better spent looking elsewhere
 
Xeo
I just learned that std::string x("hi"); std::string::iterator b = x.begin(); std::string y = x; std::string::iterator e = x.end(); will cause UB in C++03 if you use b
 
1:07 AM
@Xeo So copying from a source string to a destination string invalidates all iterators to the source string?
 
Xeo
No, calling .end() or .begin() actually does, on non-const objects :)
Since C++03 allowed COW, it might split a shared buffer and all interators are then invalidated
 
@Xeo Ah, okay.
Does C++11 allow for COW strings?
 
Xeo
No
 
Okay. Because that UB is confusing as hell
Do any of the common std::string implementations actually use COW?
As far as I know VC++'s std::string doesn't (but does use SSO)
 
Xeo
@Insilico GCC does
Even in C++11 mode
Since they don't want to break ABI for every compiler version where they still change the stdlib
 
1:15 AM
@Xeo Ah, okay.
 
Xeo
They're planning on transitioning the whole library at once when they consider it "completely C++11" and will take the ABI breakage then
 
@Xeo But it's not "completely C++11" until they make their string implementation non-COW. lol
 
Xeo
@Insilico They have an experimental implementation that will replace the current COW one
I think it was under extension/vstring or something
 
hey, can you do XOR without a key?
 
1:20 AM
okay, fine, does it matter the size of the key though?
 
it should be the same size if you want each bit of the key to matter as well as each bit of the input
 
okay, i'll jsut set mine to j
 
1:38 AM
0
Q: C++ ostream referencing

rizeWhy does line 4 in the following print a memory address instead of the original string printed by line 2, and how do I correct this? Many thanks. std::stringstream os (std::stringstream::in | std::stringstream::out); std::cout << result->studentId; os << result->studentId; std:...

Actually curious about this as well. Wouldn't it make sense for stringstreams to have an overload for << which would essentially act like: std::cout << ss.str() << std::endl; ?
 
@Borgleader It kind of would, except for the fact that (up through C++03) a stream contained an operator void *, that was used when you did something like while (stream >> whatever), and evaluated whether the void * was a null pointer or not.
 
Hello.
 
@Rapptz Hi.
 
How are you guys
 
1:47 AM
@Rapptz Old, fat, and ugly. How 'bout you?
 
I hope I don't consider myself none of those.
 
Young, slim, and handsome.
:P
 
Young, slim, and in-between.
 
@Rapptz If you don't consider yourself none of them, then you must consider yourself at least one of them. Which one?
 
Good catch. Ugly I guess.
 
2:18 AM
http://stackoverflow.com/questions/12558068/should-function-local-variables-always-be-returned-with-stdmove
Is NRVO the same thing as RVO?
 
Xeo
@Borgleader RVO: return some_type(...);, NRVO: some_type x(...); return x;
 
Yeah except N stands for Named. It's the same concept though.
 
Oh I see. I had only heard of the first variant (from Effective C++)
 
Xeo
@Borgleader That's a dupe btw
Trying to find the duped question is kinda tough, though...
 
Xeo
2:29 AM
Aye
 
guess I'll flag.
because I can't close vote :(
 
Xeo
I also had this, but the title is unfortunate, although the answer is the same
 
0
Q: hash map and vector is slow

user1683302I have a large data set that i want to process ( 120 million record) my program currently using google dense hash but still it takes 29 hours to finsh and uses 8.5 gig of ram from my 64GiG server. Please any suggestion? i'm new to c++, if i want to replace the vector with something that is faste...

New to C++ but he's processing 120 million records from a database? what.....
 
Xeo
@Borgleader Some people need to learn their scale. I kinda doubt he got 120million records
 
It's to alleviate the first thought of someone. If the answer is simple, he can pretend he's new and didn't know any better.
 
2:33 AM
@Borgleader I think he's trolling. He's new to C++ and has this massive database of some sort to work with?
 
How is that trolling..?
 
Oh, you already said that :)
 
Xeo
Off to sleep now, need to get up in 5h... ugh
 
night
 
The thing that mostly got me skeptical is... he's using TR1. If you're new to C++ you probably wouldn't know what tr1 is
 
2:35 AM
Like I said.. he probably isn't new. He just doesn't want people to think he's a complete dumb ass for not knowing something simple.
 
The code's certainly written like he's new to C++. Almost the entire program's within main
 
Worst case is.. he probably copied code somewhere.
 
Oh I've seen that before on a forum. The guy "wrote" 200 lines of code, but had a compilation error that was so obvious that if he'd been the author he wouldn't be asking for help on it. So we called him out and suddenly "i wrote the code" became "i got it from another forum".
 
He's using .at() that's probably why it's so slow.
 
Is there a TR1 for C++11 yet?
 
2:39 AM
Don't think so. At least not yet.
 
Told him he should profile his code. Sadly I don't even know how to do that myself (never created code that was slow enough that it needed profiling in the first place)
-.-;
 
@Rapptz any idea how Herb's "PCL" is coming?
 
Nope.
 
@SethCarnegie Won't it be called TR2?
 
@Prætorian why not TR1?
 
2:42 AM
I think we're gonna get filesystem as part of it
 
I thought it would be called TR1
 
Cause it'd be confusing? I don't know
10
Q: Status & Contents of TR2 W.R.T. C++ Specification

John DiblingReference Link: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2849.pdf I am trying to gather information about TR2 and how it relates to the upcoming C++ Standard, if it does at all. Here are my questions so far. If I've missed any important questions, please answer those as well. ...

 
My biggest wishes are for real unicode support, a GUI library, and networking
@Prætorian That paper is written in 2009 no? I think they were considering a TR2 for C++03 or something
 
TR2 was 2005, according to Wikipedia at least.
 
I didn't know C++03 had a TR2, what was in it?
 
2:45 AM
Guess it was just a proposal that never got much anywhere
 
That's too bad, there's some good stuff in there
 
> The committee intends to create a second technical report (called TR2) now that standardization of C++11 is complete. Library proposals which were not ready in time for C++11 will be put into TR2 or further technical reports.
 
So they are planning on numbering it serially
 
Ah, I thought it would be C++03.TR1, C++03.TR2, C++11.TR1, etc
 
Me too.
I can see how it would be confusing though.
 
2:49 AM
Unicode strings are already proposed aren't they?
Yeah it would be a little confusing
C++ will probably never get a standard GUI library though
 
3:20 AM
@Prætorian Yes -- TRs are basically written in parallel to standards. Even though (in this case) it's intended as a semi-official addition to the standard (most of which will probably be included in the next actual standard) that's not necessarily the case. I think it's also a reaction to the amount of confusion created by the fact that there were/are two different things called TR1.
 
@JerryCoffin There are 2 things called TR1?
 
@SethCarnegie i heard (from some mvp's) that it sucks performance-wise?
@JerryCoffin huh, i only know of the library technical report 1?
 
@JerryCoffin I just read the transcript that leads up to your starred message. I think it's the most hilarious thing I've read in this room!
 
3:39 AM
@Prætorian Yes -- there's the library technical report and a performance technical report.
 
@JerryCoffin > The <hardware> interface for C++
Sounds interesting
 
@Cheersandhth.-Alf Performance is actually pretty decent -- most of what sucks is the result (e.g., for quite a while, font smoothing was done quite poorly, and it's still doesn't work as well as GDI.
 
no cleartype?
 
@Cheersandhth.-Alf Originally none. Now they do something, but it's apparently a bit different. In particular, it seems to work only for static display, but as soon as you scroll, it quits working at all, then when you stop, after a short pause it'll turn from ugly to semi-acceptable. Even statically, it doesn't seem as finely tuned as Cleartype -- a bit like stepping back to, say, Windows 2K or so.
@Prætorian Yeah -- that was...surreal.
 
ouch. thanks for the heads up!
 
3:54 AM
0
A: How can I check a certain type is already defined in C compiler?

Ravindra bagalejust read basics & terminology of C language

^^ lol
 
If I knew he was using MSVC, I'd just answer Press F7 XD
 
wtf? it got upvoted?
 
Can you upvote your own answer?
 
@Borgleader nope
There was one time, where a laggy misclick made me try to downvote my own answer. It didn't go through.
 
Then I have no clue, maybe someone thought it was funny and gave him +1
-1
Q: How to invoke two visual studio projects repeatedly in a loop

Abhinav BatraI have two visual studio projects. I want to do something like for(int i=0;i<10;i++) { Run_Project1(i) // Pass i as argument to project 1. Run_Project2(i) // do something with results } How can I possibly do this?

Why would you even...
A .bat file should do it but... why?
 
best question i have ever saw ..lolZ
-5
Q: Error Insert to database SQL Server

oyiymMy partner is developing using php codeigniter. She has succeeded in retrieving the ip address and browser platform of the user, but when she's trying to save/insert it into database, it's not being inserted. Maybe this is too complicated, but I'll show my code or give the errors if needed.

 
user406009
5:05 AM
It is considered bad style when you add spacing but accidentally switch the bracing style?
 
user406009
Like for example this question: stackoverflow.com/questions/12559007/…
 
user406009
    My astyle default changes the bracing for

    void foo() {
       // blah
    }

   to

    void foo()
    {
      // blah
    }
 
Well, if you add spacing it gets objectively better. The braces are subjective. I'd say go for it, even though I'm usually careful to maintain the existing style to avoid any annoyances.
@EthanSteinberg Oh, that's not something to do manually.
@EthanSteinberg Sure, go for it.
Or tune astyle? (I have no idea how easy that is)
 
user406009
I don't want to maintain two separate versions of the configuration. But I guess I probably should if I want to easily fix spacing for poorly written questions.
 
5:19 AM
off to government place to obtain passport
man, getting up at 6am is so not my style
 
@DeadMG Have fun.
:P
 
Is it open already?
 
@DeadMG Btw, what the numbers next to the links in your tutorials page?
 
@R.MartinhoFernandes Word counts.
 
5:22 AM
@StackedCrooked No, but 3hour 30 minute train trip.
 
Ow.
WTF, how far is that?
 
3 hours for getting the passport?
 
dunno, but it's across a fair leg of the country
@StackedCrooked Oh, I'm sorry, I think you misinterpreted me. It's 3 hours 30 to get there. At least 4 hours there, and then at least 2 hours 30 to get back.
 
For me a 3 and half hour train trip would mean going to the capital.
 
@R.MartinhoFernandes Portugal's geographical layout makes placing train lines a lot simpler.
 
5:23 AM
@DeadMG Ouch, no day for you.
 
@R.MartinhoFernandes Naw, arranged for my sister to nip down briefly (she's much closer)
time to go
 
Have fun.
:P
 
I pretty much need to fly to get to anywhere interesting.
 
Going through Belgium?
 
5:28 AM
I he going Linz Austria? Or am I totally confused?
 
@StackedCrooked He's not going to Austria to get the passport.
That makes no sense.
Without a passport he can't leave the country.
So it follows that to get the passport, he must be travelling within his country.
 
But a 3 hour train trip for getting a passport doesn't make sense either.
I got mine from local city hall.
10 min walk.
 
@StackedCrooked How long did you wait for the passport?
 
So the puppy is X years old and he's never left the country? Or is it just an expired passport?
 
@R.MartinhoFernandes Week or so.
 
5:30 AM
@StackedCrooked I believe he needs it fast. As in, right now.
 
I can't imagine anyone (especially in Europe) to have not at least went next door at least once.
 
I've only been to Greece.
Well, and Spain and Italy, if airports count.
 
@Mysticial Chinese people live next door in my aparment building but I never visited them.
 
@StackedCrooked lol
 
I have no idea who lives next door.
 
5:34 AM
dammit, someone upvoted something and immediately unupvoted...
 
How do you learn a foreign language? I learned French and English mostly by osmosis; I have no idea how one would learn a new language methodically. Any tips?
 
@R.MartinhoFernandes You go the country and force yourself to stay for a few years.
 
@Mysticial That's osmosis.
 
One of my cousins learned Japanese and English that way.
oh
I don't think I can dump myself in Japan (or even China) alone without knowing the language.
And yet my cousin did it twice...
 
English helps.
 
5:39 AM
Indeed it does.
But I can't even imagine how my cousin (native in Mandarin), when to Japan after just 3 months of Japanese. Stayed there for 7 years. Then went to New York knowing no English.
 
Maybe he was naive :)
 
I dunno. She stayed in the states for about 5 years before moving back to Beijing.
And dragged her boyfriend (whom she met in the states) back to Beijing.
 
Heh, poor guy :D
 
Yeah, seriously. He's Caucasian and doesn't speak much Mandarin.
Yay! I got my upvote back. (not even sure if it's the same person... lol)
 
Hi.
 
5:45 AM
Hi.
 
sup
 
late night work
 
Sounds fun.
I’m in the train; boring as fuck.
 
@daknøk Train commute is useful for reading.
 
I am reading your chat messages.
But it’s more useful for writing software.
 
6:24 AM
^ "Dumb Texas police man kills double amputee in wheelchair"
 
Police officers in Portugal are required to fire a warning shot before opening fire on a citizen.
 
I think in at least some cases, the shooting is understandable because at the time the police doesn't have enough information to decide otherwise. But when they shoot an amputee in a wheelchair, or when they pepper-spray a dog to calm it down, then they must be retards and should not be on the force. As I see it.
I think those in society who are permitted to use force, should be of at least normal intelligence, having demonstrated sound reasoning ability.
 
hello, quick question: is graph (A, B)(A, C)(B, C) cyclic ?
 
why don't you check that
 
6:33 AM
@mirt Try one of the math.stackexchange.com chatrooms. Most of us don't know a thing about math.
 
@mirt sorry, are you by any chance a blind person?
 
@Cheersandhth.-Alf you mean i interrupt your conversation about c++?
 
well, while we're at it (news)
^ Drug's don't work, doctors don't know, because only positive tests are published
@mirt i mean, if you were blind, that could explain difficulty seeing if graph is cyclic
 
@Cheersandhth.-Alf hm, i just wanted to find out if boost::graph is blind
cause it don't see any cycles
 
you have to define what you mean first. is it a directed graph or not. if it is, then draw it with arrows. if not, draw it with lines. now check
In mathematics, a directed graph or digraph is a graph, or set of nodes connected by edges, where the edges have a direction associated with them. In formal terms a digraph is a pair G=(V,A) (sometimes G=(V,E)) of: * a set V, whose elements are called vertices or nodes, * a set A of ordered pairs of vertices, called arcs, directed edges, or arrows (and sometimes simply edges with the corresponding set named E instead of A). It differs from an ordinary or undirected graph, in that the latter is defined in terms of unordered pairs of vertices, which are usually called edges. Sometimes a d...
 
> Among voters who shop at Wal-Mart on a weekly basis, Romney’s lead is within the poll’s 3.4% margin of error
lol
 
I shop at Wal-Mart on a weekly basis.
 
i think i got it
actually not
 
@TonyTheLion Wait. What. They have that kind of stats.
What.
 
can anybody explain why it give 'false' ? ideone.com/MbvUI
 
6:50 AM
Seems so
@Mysticial so you gonna vote for Romney? :P
 
@TonyTheLion yeah right...
 
I grew up in one of the most liberal districts in the whole country.
I've actually never voted. Never bothered to register.
Nor do I actually intend to vote in this coming up election either.
My state of residence is almost certain to go blue anyways, so my vote isn't gonna matter.
Jerry, on the other hand, needs to vote. Because Colorado is a swing state. :)
 
> I'm off on vacation Re: linear search vs. quicksort?
Happy vacation, James :)
 

« first day (709 days earlier)      last day (4233 days later) »