« first day (878 days earlier)      last day (4062 days later) » 

uahuh haven't u listened to Hughes and Turner Project?
 
Yup, but it's probably just your deep voice.
@R.MartinhoFernandes Ahahah, awesome! :D
 
@R.MartinhoFernandes *pats head*
 
We are all NPC, if that helps
 
I'm the antagonist who impales NPCs on a shtick to prove a point to the hero.
 
2:02 PM
they should give a gold badge for getting to 100 silver badges
 
std::array<int, 2> quotePositions{-1,-1};

it is right, ok?
 
What happened when you tried it?
 
error: array must be initialized with a brace-enclosed initializer
error: too many initializers for 'std::array<int, 2u>'
but i'm already initializing it on .h file
 
user784668
std::array doesn't work? Add more braces.
 
quotePositions = {-1,-1} maybe?
 
2:04 PM
tried it too..
doesnt work
these are the examples by cppreference

    std::array<int, 3> a1{ {1,2,3} };    // double-braces required
    std::array<int, 3> a2 = {1, 2, 3}; // except after =
    std::array<std::string, 2> a3 = { {std::string("a"), "b"} };
 
user142019
> C++
 
@rogcg, paste the entire code
 
@rogcg That last one looks 'off' somehow?
 
@MartinJames IDK.. is it some problem with g++, AFAIK std::array is only available in c++11
am I right or not?
 
Don't know :(
 
2:09 PM
WTFF!!! I had to to it with double braces.. I dont get why.. but it worked.
as seen on the example
 
std::array<int, 3> test{ { 1, 2, 3 } };
std::cout << test.at(2); // Outputs 3 as expected.
 
yes
 
@CatPlusPlus 56.04!
 
Although the standard library is with C++11 support.
 
wait! std:: cou << test.at(2); is the same as std::cout << test[2]; right?
 
2:11 PM
GOOD MORNING PEOPLE
 
GOOD MAWNING <3
 
@DomagojPandža some libraries are not available..
 
@CGuy .at does bounds checking. Otherwise yes.
 
@LightnessRacesinOrbit okay, thanks
 
2:12 PM
Which means you get an exception rather than an explosion.
 
user142019
I suck at C++.
 
user142019
Not that I'm very good at C++ either.
 
user1357851
Cat princess & turtle prince: youtube.com/watch?v=e4RsYTjWZdo you would understand after you have watched this: youtube.com/watch?v=kFP6kzZJGOs
 
user1357851
this turtle is one apex predator :x
 
user142019
-6
Q: Is it another bug in gcc?

user1807991Just look at this simple code.. #include <iostream> using namespace std; void fun(const int *p) { int *q = (int *)p; int tmp = 6; memcpy(q, &tmp, 4); } int main() { int foo = 5; const int *p = &foo; cout << foo << endl; fun(p); cout &l...

 
user142019
2:17 PM
Bad question. Downvote into oblivion.
 
His previous one had 20 upvotes
No that's 30 upvotes and 10 (now 11) downvotes
Geez
And for once that actually identified a bug, apparently
 
Like, woah.
 
Greetings, Zoidberg.
 
I'm hungry, dammit.
 
@BoltClock Woah, why the downvotes... WTF
 
user142019
2:19 PM
@user190929 lol also hi.
 
user142019
-1
A: Is it another bug in gcc?

user1807991I think this is because of C. As a good lang , it should not behave like this..

 
user142019
LOL
 
user142019
Doesn't even answer the question.
 
"As a good language, it shouldn't behave like this. Bad C, Bad C!"
 
user142019
For as far as there is a question at all.
 
user1357851
2:22 PM
linux/unix is written in C, just because you suck doesn't make C bad >_<
 
is it another bug in gcc??
is it another another bug in gcc??
is it another another another bug in gcc??
is it another another another another bug in gcc??
is it another another another another another bug in gcc??
is it another another another another another another bug in gcc??
 
As if Linux is a standard for quality.
Learn your logical fallacies, people.
 
enum flags thingy { flag_a, flag_b, flag_c, };
auto y = thingy::(flag_a | flag_b | flag_c); // I wouldn't mind this
 
@DomagojPandža I laughed so hard at that answer...
 
Does anybody know of statistics for ALL OS's? (Say, the irregular ones as well)
 
user1357851
2:23 PM
@DomagojPandža most stock exchanges sit on linux/unix
 
@user190929 yes. ALL OS's are OSs
 
@Zoidberg I'm going to let that sit around for a while before I delete it
 
user142019
:)
 
@Telkitty Just because someone is good doesn't make C good.
 
Well I failed my driving test :(
 
2:24 PM
Oh, that's sad.
How many pedestrians did you run over?
 
@TonyTheLion What? How?
 
@TonyTheLion What threw?
 
user1357851
@R.MartinhoFernandes yes, sharp tools aren't made for newbs and idiots
 
Damn you, English, you have too many words for "peão".
 
@R.MartinhoFernandes I didn't run over any peons, I was so nervous in the first five minutes that I completely screwed up my bay park
 
2:25 PM
@thecoshman I am very confused. I mean to say, in the general way fo statistics, (say, Windows vs Mac), ware there statistics which include, say, ChromeOS?
 
@Zoidberg much better title
 
I threw fucking_nervous_wreck_exception();
 
user1357851
I didn't say C is good, but it is very useful in the hand of right people
 
@Telkitty Professionals don't use sharp tools without protection.
 
and it was uncaught :P
 
2:25 PM
Only reckless rednecks do.
That might be a pleonasm.,
 
@Telkitty Yeah, just like an assault rifle is also useful.
 
@Telkitty You mean, it is useful in the hands of those that know nothing else?
 
@R.MartinhoFernandes Just like PHP, then.
Although, to be fair, C does have its uses in embedded.
 
@EtiennedeMartel It's the "nothing else" argument again, though.
What's that called? Argument from vacuum?
 
@Telkitty You could push nails in the wall with a rock easily. And do a good job. But you're still a retard for not using a hammer.
 
2:27 PM
You would like to use C++ on platform that lacks a decent C++ implementation but has a good C one?
Because that kinda makes you a masochist.
 
user142019
@Telkitty C is certainly useful. There are just better alternatives.
 
There's "know nothing else" and there's "you don't have any other option besides hanging yourself".
 
@EtiennedeMartel That's irrelevant ot C being good or not.
 
@BoltClock Can he accept that answer if it has negative votes? ^^
 
Telkitty said useful, not good.
 
2:28 PM
Not at the start.
 
@AndreiTita Yes, but like any self answer he won't be able to do it until 2 days later
 
user142019
Wooden shovels are also useful, but iron shovels are better.
 
I was refering to what was being said right now.
 
user142019
In Minecraft. ^^
 
@user190929 stop just saying 'statistics' you are making no sense at all
 
2:29 PM
And 2 days is a lot of time for a moderator flag to go unhandled
 
user1357851
@EtiennedeMartel that's why assault rifle exists, isn't it - because they are useful for some people. Of course nuns would say otherwise.
 
@Zoidberg and electric drills even better :P
 
The only answer that you cannot mark as accepted is a locked or deleted answer
 
@Telkitty Unless you're talking about those nuns in Hitman: Absolution.
 
user1357851
@R.MartinhoFernandes let me know when you find other some popular OS gets written in C++ Java or C# ... better still, PHP! (yes I know you are all PHP lovers).
 
2:30 PM
@Zoidberg shovels are for pussies that can't punch that motherfucking sand down...
 
@Telkitty Lemme know when you find other some popular OS that was not written before the nineties.
 
assembly FTW!
 
@R.MartinhoFernandes Win. Telkitty forfeits.
 
Oh look he deleted his own answer
 
@Telkitty Isn't Windows written in C++?
 
user1357851
2:31 PM
@EtiennedeMartel assembly I thought
 
IOW, your examples are from an entirely different world.
 
@Telkitty lol, no.
 
@EtiennedeMartel Pretty sure it's not.
 
@R.MartinhoFernandes Even the Microsoft brand of C++ that is strangely similar to C?
 
@EtiennedeMartel Windows has some assembly language (~1%), and quite a bit of C. The only part (I know of) that's written in C++ is the graphics/windowing pieces. I believe they use the C++ compiler for most of it though, so I wouldn't be surprised if the C part isn't quite "pure" C any more.
 
user1357851
2:34 PM
If C was so bad for OS, it would have been substituted like C++ has substituted by Java and C# in many places. The reason it has not been because there is nothing better to start with
 
@Telkitty You may have realised that there aren't many new OSes being written.
 
@JerryCoffin Yes, you satisfy the low-level hardware interface with assembly, the bootloader stages and then move off to C. Using C++ is a bit tricky because you can't satisfy it fully at lower levels due to exceptions requiring a runtime. And then when you're sufficiently high-level, like with graphics and windowing, you can move to C++.
 
user1357851
Window phone is now pushing C++ in their development tools.
 
But I think the reason they were written in C is just the popularity of C at that time.
 
@DomagojPandža You can just not throw exceptions. You are not using the standard library anyway, so you can control that quite well.
 
2:36 PM
@R.MartinhoFernandes Yes, yes. That's true. That's how my hobby OS works.
 
user1357851
@R.MartinhoFernandes I am sure if Microsoft or Sun could find a better solution, they have already done so.
 
@Telkitty I think you're taking quite a lot for granted there. Technical suitability to the task is only one of many factors that goes into choosing a language. In a lot of cases, it's not even a particularly major factor either.
 
@Telkitty Also code-inertia. If there's a load of complex drivers etc. that work well because of decades of experience/bugfix, there would be little point in rewriting them.
 
@Telkitty They put a lot more effort in user-level code than in writing any new OS from scratch (which, again, anyone with a set of eyes and ears may have noticed has not happened in a long time).
 
user1357851
@JerryCoffin I am not trying to make C sound like a dream language, I merely said C has its place.
 
2:37 PM
had its place.*
Past tense.
 
@Telkitty Yes, writing OSes in 1991, and maintaining them in 2013.
5
 
@Telkitty The real question is what qualifies as "better"? Just for example, Sun wrote a complete OS in Java, and Microsoft one in C#. That doesn't mean they're well suited to the job -- only that Sun had an agenda that involved Java, and Microsoft one that involved C#.
 
The fact that we still use X or Y legacy code is not a good indicator of quality of the language used to write said code.
 
user1357851
@DomagojPandža what language would you use to supercede C in OS then, sherlock?
 
@R.MartinhoFernandes Yes, exactly.
 
2:40 PM
@Telkitty C++. Doesn't require a Sherlock.
 
I am sure you can find tons of legacy PHP or Java code still in use today.
(Just to pick the two examples most people here will agree with)
 
@R.MartinhoFernandes Yes and no. The fact that it was successful enough to become "legacy" that we still use, may indicate a little about the language compared to other choices available at the time (but only a little, and only in its time-frame).
 
user1357851
@JerryCoffin how did those OS go?
 
@Telkitty I can guess :)
 
C is just a legacy thing, like Martinho said. OSs now can use it to maintain 20 year old crap, but the "code inertia" will hit a wall someday.
 
Xeo
2:41 PM
@JerryCoffin Yeah, C was better than the alternatives back then
 
@Telkitty At least in the case of Microsoft, it was only intended a research project. They already have an OS to sell.
 
And a new OS will rise, a clean one. Written in a modern language, ready to advance beyond.
 
Dunno about Sun.
@DomagojPandža cough
 
@DomagojPandža Love your optimism
 
Xeo
@DomagojPandža I don't think so. Maybe if we let go of our current systems and enter the quantum period, but otherwise...
 
2:42 PM
@Telkitty The fact that you have to ask tends to indicate that they weren't terribly successful, doesn't it? Seriously, Sun's was intended for real use, and was pretty much a flop. Microsoft's was done by MS Research, and successful enough as a research project -- but not to the point that they seem to have any ambition toward rewriting Windows in C#.
 
As long as Adobe/Oracle don't write it.
 
@Xeo Whatever that means, right?
 
@R.MartinhoFernandes COBOL was sooo good.
 
user1357851
@JerryCoffin and you do not think there is a reason behind it?
 
Xeo
@R.MartinhoFernandes :3
 
2:43 PM
I agree, I used someday quite loosely. But I'm an optimist, always. It would cost a great deal to write one and even more to sell it to people who'd rather use shit they are used to rather than gold they're not.
 
@EtiennedeMartel I was hoping no one would say it.
 
@R.MartinhoFernandes You know me.
 
Xeo
What I mean is, for a new OS to have any hope of being adopted, it needs to be for a new system.
 
@EtiennedeMartel Can we have negative stars?
 
SO Chat needs black holes.
 
2:44 PM
@DomagojPandža Yup -- and in its time, it'll become ugly old legacy code too (just like Windows NT was once a clean new system with only minimal legacy constraints -- and likewise OS X, etc.)
 
@Telkitty Also "Java sucks" does not mean "C is good". Just to throw some logic into the frying pan.
 
@JerryCoffin The cycle of life! :D
 
You cannot make omelettes without logic.
 
@R.MartinhoFernandes And to make an apple pie, you must first invent the Universe.
 
@R.MartinhoFernandes I could go for an omelette right now.
 
2:45 PM
Is C++ programmer synonymous with opinionated, or is that true for any programmer?
 
@Telkitty, everything just sucks here.
 
It's probably true for any human being.
 
i have a server question, can I ask here?
 
@user190929 Any programmer with a set of (metaphorical, I mean, there are women as well) balls.
 
@R.MartinhoFernandes Probably? :D
 
2:45 PM
@David19801 NO
 
[no-helpdesk]
 
is there a linux command to show how much bandwith is used per hour by my server?
 
@David19801, server fault is better suited for that question.
 
@David19801 Why ask that in a C++ chatroom?
 
2:46 PM
You have trouble reading English, don't you?
 
@David19801 why do you ask if you can ask, if you ignore the answer and ask anyways?
 
Your server will lie - ask your router
 
this was the busiest room...so i just though
i have no router, its in a server farm...
 
Yes, Linux authors were really considering future web servers and how they log bandwidth over time. And then they implemented a routine to detect web servers and tap into them. In the past, for the future.
 
@David19801 You just thought that the people in the busiest room weren't busy enough to answer a completely off-topic question. Makes perfect sense.
 
2:47 PM
its a chat room...how busy can you be?
 
I feel like you can, on Windows, log all traffic, but I doubt that is practical.
 
@David19801 You have just entered a minefield - back up carefully..
 
@David19801 The busiest.
 
Xeo
room topic changed to Lounge<C++>: We're a busy room. To busy for you. Go away. [c++] [c++11] [c++-faq] [no-helpdesk]
 
so you go to Walmart to buy a car - just because more people go to Walmart than to the car shop?
 
2:48 PM
@Xeo Too busy to write decent English too.
 
Xeo
@R.MartinhoFernandes I think so
 
well if i had a question about a car i go to a car forum, yeah
 
@TonyTheLion (Drop the "Go away", please)
 
Xeo
Main brain is mud right now
 
room topic changed to Lounge<C++>: We're a busy room. Too busy for you. Go away. [c++] [c++11] [c++-faq] [no-helpdesk]
 
2:48 PM
this is a computer forum...
so
 
I don't know what you are busy doing, in that case. I am free, but alas, I don't have the answer.
 
this is a C++ chat room
 
A computer forum?
 
Xeo
@David19801 This is not a forum.
 
2:49 PM
@David19801 That is a server question and answer site. The perfect place to find an answer to a server question.
 
room topic changed to Lounge<C++>: We're a busy room. Too busy for you. [c++] [c++11] [c++-faq] [no-helpdesk]
 
*programming Q&A website.
 
I would argue that SE is not a forum, and this specifically is a chat room.
 
No, this is our own private plane of oblivion.
 
but its close to a forum
lots of people just chatting about things
 
2:49 PM
@R.MartinhoFernandes that would be TOO easy ;)
 
Xeo
No it's not
 
@David19801 please read the rules or go away. We don't care
 
@David19801, really. no.
 
@David19801 Stop wasting your time (and more importantly, ours), and go ask your question in the right place.
 
Chatting is not quite the same as forum, I think.
 
2:50 PM
really, so what were you guys talking about that is so important?
 
@David19801 Not servers.
 
anything else but servers
 
Xeo
To me right now, everything is more important than your question.
 
Now you're getting the 'troll' tag as well.
 
We were discussing the temporal prime directive.
 
2:50 PM
so just wasting time really...weren't you
 
He has a point
 
yes
 
No one cares.
 
TPD?
 
but that doesn't mean we want you to waste our time as well
 
2:51 PM
Exactly.
 
So many new guys telling new guys to F off.
 
We're perfectly fine wasting our time ourselves.
 
'member for 2 years, 3 months' - not insect puppet.
 
Xeo
@MartinJames long-term plan
 
2:51 PM
but you might as well be helpful, otherwise you're just a blog of useless meat...
 
Then that's what we want to be.
 
It's not enough for us to succeed, we want others to fail.
 
@David19801 seriously, now you're pissing me off
 
2:52 PM
There's me being helpful.
 
Giving you directions to the perfect place for your question.
 
ok ill be quiet, continue your fascinating chat
 
@MartinJames, one month older, newfag
 
Xeo
@R.MartinhoFernandes You want to be meat?
 
2:52 PM
This might help, not sure: superuser.com/questions/294448/…
 
R.martino - im asking there
 
@Xeo I just had to check - it just sorta disappears until your guard is down, then strikes...
 
room topic changed to Lounge<C++>: A blog of useless meat. [c++] [c++11] [c++-faq] [no-helpdesk]
 
@David19801 Define what's wasting time. I would argue that the time you're doing what you enjoy is what's not wasted, and the rest is just the necessary evil to let you do what you want at least some of the time. So, trying to get us to do what we don't want is trying to waste our time (and sine we probably won't do it, it's probably also wasting your own time as well).
 
enough with crap, please go to Stack Overflow
 
Xeo
2:53 PM
WERE ARE OUR FRIGGIN LASER TURRETS?! :|
 
@David19801 Well, @R.MartinhoFernandes is not made of meat.
 
fat?
 
@R.MartinhoFernandes Thank you for sharing this.
 
I love that story.
 
2:53 PM
@David19801 He's a robot.
 
hm... what the fuck "blog" means here?
 
Xeo
@R.MartinhoFernandes I know that one.
 
@Abyx No idea.
 
I had a blog about meat.
 
Why is this room usually full?
Moreso than others, I mean.
 
2:54 PM
Because we love each other.
 
Because people come here to ask server questions. Oh wait.
 
Ahahah
 
@user190929 Because we do interesting things instead of answering stupid questions about stupid servers.
 
Also, we're cool.
Too cool for server questions.
 
lies
 
2:55 PM
@user190929 Honestly I don't know. I would venture that it is because we are not boring, but I might be biased.
 
We all hate C++, but we all love bashing server-side scripts.
 
Soon, people will come here and demand we write their history essays for them.
 
@David19801 ...oh, and yes, we tell a lot of lies. Keeps life interesting.
 
Hm, should we add him to the Ministry of Shame?
 
@user190929 Because if you have to ask "Is X good enough?", here you'll get the NO that you really need.
 
2:55 PM
ooo a ritual!
come on guys...get back to work
 
@EtiennedeMartel If we did, we would have to add lots of people there. Let's keep some standards on the MiniFame, shall we?
 
@David19801 Why don't you do the same?
 
That last point might have a bit of merit, actually.
 
Where's that fish?
 
2:56 PM
<*(((plonk(((><
5
 
@R.MartinhoFernandes You had to call that MiniFame, don't you?
 
@EtiennedeMartel I don't know C++, get lost C++ newbie
 
@EtiennedeMartel ISTR that was your idea.
 
@R.MartinhoFernandes Really?
 
2:57 PM
I honestly can't remember.
 
Dec 17 '12 at 20:05, by Etienne de Martel
Should be MiniFame.
 
Oh, right.
Now I remember.
 
guys about my question
the answer is
 
Xeo
Get out
 
use if top
 
2:59 PM
No shit.
I knew that.
 
well why didnt you tell me?!
 
Or at least I know now.
Hahahahahahahaha
 
Be obnoxious => get ostracised.
 
AHAHAHAHH
 
That's how it works here.
 
2:59 PM
there is evil here...
 
0
Q: isstringstream not to tokenize a text between quotes

rogcgI'm using isstringstream to break the tokens of a string. let's say I have a string like this: print "this is a test" it breaks it into 5 tokens: print | "this | is | a | test" where it should be 2: print | "this is a test" is there a good way to fix it? I tried doing it manually...

 
Xeo
Yeah, and the name is David
 
user1182183
Lol why couldn't I find THIS before, SO CLEAR EXPLAINATION and easy for idiots to understand.
 
Obvious troll is obvious.
 

« first day (878 days earlier)      last day (4062 days later) »