« first day (656 days earlier)      last day (4306 days later) » 

3:00 PM
@Drise So let me try this thing and see if I can put you unconscious by forcing you to read aloud a way too long sentence because according to you text needs commas to indicate pause so you know when to breathe otherwise you would never stop to breathe.
 
It's like really shitty branch pause prediction. FTFY
 
OH GOD I ALMOST SUFFOCATED.
 
@R.MartinhoFernandes Not near long enough, imo
 
@TonyTheLion Exactly.
 
@R.MartinhoFernandes Yea, that's atrocious. I want to kill myself.
 
3:00 PM
Just aim for the bucket.
 
@R.MartinhoFernandes ah good
 
@TonyTheLion But most of time you're reading and reach a comma, you actually pause. <- Try it on that sentence.
 
Hmm. Anyone familiar with Win32 job objects?
 
A bit.
 
@R.MartinhoFernandes yes, that works there :)
 
3:07 PM
@R.MartinhoFernandes But if you've got a list of items separated by commas, you're hardly likely to breathe on each item, otherwise you'd end up hyperventilating; testing, testing, one, two, three.
 
0
A: Some pointer clarification

Rajesh Kumar Sahooprintf("%d",i-j); return 0; both i and j are pointer to an integer.So they follow pointer arithematics. As per pointer mathematics pointer to an integer always shift sizeof(int).I think you use gcc compiler where sizeof int is 4.So 60-40=20 but as unit is 4 so out put is 5. but if you use tu...

Please downvote.
 
setting up a datacenter must suck
can you imagine having to unpack all that?
and install it?
 
That's easy. Pay someone to do it.
 
urgh, meta
 
If you're setting up a datacenter, you have people to do that.
 
And if they don't want to, shoot their families.
 
oh god, that's maffia talk right there
 
@TonyTheLion no kiddin'!
 
3:12 PM
No, it's just my standard solution applied to this particular context.
 
It's "mafia", comrade.
 
And if you have a problem with the mafia, shoot them.
 
@R.MartinhoFernandes And their families!
(Did I get that right?)
 
Pretty straightforward.
 
3:14 PM
No, you didn't.
If it's the mafia, their families are the mafia as well.
Shooting the mafia members and their families would be redundant and a waste of bullets.
 
Hi guys
 
TIL robot has a strange interest in killing people :(
 
@TonyTheLion It's the one thing he's not allowed to do. So naturally :)
 
@TonyTheLion No, I have no interest in that. I have interest in solving problems.
Jul 26 at 21:30, by R. Martinho Fernandes
@Insilico There are few problems that can't be solved by finding the right people and shooting them.
 
oh
but shooting people is generally not considered to be an acceptable solution
 
3:20 PM
By whom?
Find them and shoot them. Problem solved.
 
yea, but then you can go shooting forever
recursive shooting :P
@R.MartinhoFernandes just check the law of your country
 
-2
Q: Good C++ book that is not only about Hello World

Koen Possible Duplicate: The Definitive C++ Book Guide and List I already know the basic and I keep finding books/tutorials about that stupid Hello World.

This is gold.
 
anyways, I don't know why I want to discuss this morbid subject
@Drise someone else posted the same question 5 mins ago
and deleted it?
 
It's Flexo. But he removed it.
 
@TonyTheLion Oh, I didn't know it was a... sensitive subject? It's just a joke.
 
3:23 PM
meh
 
If it annoys you I shall refrain from throwing it around.
 
oh snap
The difference between a cat and a comma: a cat has claws at the end of its paws, and a comma is a pause at the end of a clause. — MetaEd 31 mins ago
3
 
AFAIK I have no real desire to kill anyone.
 
@TonyTheLion Woah. You're no longer plonking me? Thanks, I suppose.
 
Are destructors guaranteed to get called even if an application crashes ?
 
3:24 PM
@Drise Yes, I unplonked you. Thought you deserved a second chance :)
 
@Mahesh Define "crashes".
 
@Mahesh I deleted it because I was just trying to make sure it got closed (correctly) as a dupe, not as NC
 
enum wrong { first = 1, next, one_more };Konrad Rudolph 56 secs ago
 
crash is too generic of a term. What's the error?
 
If you mean "crash as a result of undefined behaviour", then no, because by definition there are no guarantees.
 
3:25 PM
> By the standard, the first element of an enum always has 0 as value
 
@TonyTheLion Thanks. I've learned a lot about the room since you plonked me. You got off easy since you didn't have to deal with my training.
 
@KonradRudolph hehe, nice one.
 
@Drise hahah :) I let the masters train you :) @R.MartinhoFernandes, @CatPlusPlus, etc...
 
I was just contacted by a person with a Nokia email address concerning my toolchain and Qt :D
He did have a problem though :(
 
3:27 PM
So now I'll be building Qt for the next 3 hours :s
 
@R.MartinhoFernandes Thanks.
 
@rubenvb Luckily it's not a manual process.
 
My worst nightmare is yet to come, driving test :(
I'm no big fan of driving
 
@R.MartinhoFernandes hehe, indeed. configure && make.
 
@TonyTheLion Wait, you don't drive? By the way, it's not terrible.
 
3:28 PM
Does Qt takes so long to build or your machine is slow ? Just curious.
 
@TonyTheLion once you master the physical skill it's just a matter of applying rules :)
 
@TonyTheLion Join the club!
 
@Drise nope. Mainly due to my physical condition.
 
@Mahesh it's a monster to build. And GCC isn't as fast on Windows as on Linux.
 
@Drise By the way, it is!
@rubenvb You mean GCC isn't as slow on Linux as on Windows ;)
 
3:29 PM
@R.MartinhoFernandes I didn't find it to be. But of course, there is probably some statistic telling me I'm wrong and was a unique case.
 
@R.MartinhoFernandes OK, Clang is faster, still, GCC ain't bad.
 
Hopefully I should be able to get my driving license this time, without too much hassle
 
There was one file in LLVM MSVC2010 took about 15 minutes to compile.
 
@TonyTheLion do you have someone to take you out for practice?
 
3:30 PM
> Happy Birthday RICH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!‌​!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
so I'm gonna have to take lessons until I can do it
 
Someone just posted to my facebook wall. This is why I want to delete my facebook.
 
wow, and I thought I was socially awkward?
or even close to becoming a Hermit.
I've been accused of being a Hermit
not sure if that's a good thing :(
 
I also got this one:
> WELP LOOK AT THIS ASSHOLE THINKING HE CAN BIRFDAY AND STUFF

Happy Berfday Drise.
 
so it's your bday then?
 
3:32 PM
Yea.
And this one is from my uncle:
 
Happy Birthday :)
 
> Happy Birthday Itch, Best wishes!!!
Like wtf?
 
Itch?
 
@TonyTheLion Fuck if I know.
 
3:32 PM
Happy existing for an arbitrary number of rotations of a giant rock around a even more giant ball of fiery gas.
4
 
@Tocs To be very pedantic, a year is described by 365*24*60*60 times one second defined by the frequency of emitted radiation of some Cs electron transition, minus corrections for leap years/seconds to account for the differences in rotation of the giant rock around an even more giant ball of fiery gas. So ... it's not as arbitrary as you make it sound.
 
That's still arbitrary no?
 
In the grand scheme of things it's arbitrary. Once you leave the point where earth's gravity ceases to be significant it's totally irrelevant. That's a tiny % of even the known universe.
 
It's arbitrary because he chose to celebrate whole calendar years.
 
3:41 PM
Warning: sarcasm detectors break on entry.
 
You say "To be very pedantic" and expect me to assume sarcasm? Humans are hopeless.
 
> Today, I put on pants. How have you exceeded expectations lately?
lol
 
Anyone know an eta on GCC 4.6.4?
Would be nice to synchronize my first multilib and official Clang builds with.
 
I should finish that blog post I've been not-writing for a week.
 
http://www.drdobbs.com/cpp/c-primer-5th-edition-part-3-smart-pointe/240004805
Dr. Dobb's Blogs
C++ Primer 5th Edition, Part 3: Smart Pointers Make It Harder To Teach How To Write Copy Constructors

1343903880
2
 
3:45 PM
@rubenvb I think that one failed to cross the international punchline
 
@R.MartinhoFernandes Been meaning to ask you (too lazy to look): are you using a barebone Jekyll install for your blog or are you using something like Octopress / Jekyll-Bootstrap?
 
@KonradRudolph It's whatever GitHub runs.
Hmm, Feeds failed miserably at that onebox.
 
so seeing some of you are on this chat and at work, do you actually get anything done at work if you're on here?
 
@TonyTheLion I fail miserably. I go as far as to not enter here when I have real work to do.
 
@TonyTheLion At the moment, no. But that’s not due to the chat, it’s due to an utter lack of ideas of how to implement something with a minimum of effort
 
3:48 PM
@rubenvb normally, that's what I do. If I have real work to do, I try not to come here
@KonradRudolph I know that feeling.
 
@TonyTheLion I'm sick, so I'm not at work today.
 
@R.MartinhoFernandes ah, that's fairly easy then
 
I did do some work today though.
And my coworkers broke the build. Bastards.
 
Oh wait. I can upload the toolchains in a different directory completely. Awesomeness.
 
@TonyTheLion In bursts, yes.
 
3:50 PM
I think I'm not going to be able to come here at my new job, the screen of my work computer will likely be in the visible viewing area of my direct superior.
@EtiennedeMartel bursts of 2 mins?
 
ok that’s it, going home
 
Just discovered that the reason my builds are still failing is that I broken another component that my new code depends on.
oh, and that's because for some reason that component doesn't have mail upstream committers. Jenkins is just too configurable. Oh well.
 
and a MinGW-w64 update
joy!
 
@TonyTheLion Somewhat.
 
lol
There's a couple that live in my house, and they never EVER agree on anything. It brings free entertainment for me, listening to their disagreements. :)
 
3:58 PM
You're mean.
 
lol, it's funny though. They know I laugh at their "arguments"
 
@Tocs In an arbitrary system of rotating rocks and gases. In an arbitrary system of rotating systems of rotating rocks and gases.
 
Sorry, I had that written, then a coworker came in to wish me happy birthday.
 
4:02 PM
@Feeds So what do you think Koenig is going to identify as a sensible use of the copy constructor?
 
@TonyTheLion I use this to keep me entertained and laughing while at work.
 
I get work done at work when work has work for me to work on.
 
aha, the Qt guy was using a 4.5.4 toolchain.
 
makes sense @SamDeHaan
 
4:04 PM
Which isn't very often, so lots of time for chat.
 
oh wow
 
@SamDeHaan I also usually let SO fall under the category of "I'm learning better C++". Since I'm an intern and all, I can still learn things, and get paid to do it.
 
@Drise Oh, definitely. Some people here kill time when there is no work sitting on reddit, or otherwise. StackOverflow I can claim as expanding my knowledge. I'm not an intern (any more), but I am pretty fresh still.
 
@Drise in a rapidly accelerating expanding system of rotating rocks and gases.
 
I'm expanding my knowledge, of how to procrastinate better :P
 
4:08 PM
@rubenvb In a bunch of stuff!
 
@R.MartinhoFernandes that, my friend, is unknown.
 
@rubenvb expanding systems of arbitrary systems of rotating systems of rotating rocks and gases.
 
mind-boggling.
Time for Lasagna
 
24
Q: Is it possible to read infinity or NaN values using input streams?

DriseI have some input to be read by a input filestream (for example): -365.269511 -0.356123 -Inf 0.000000 When I use std::ifstream mystream; to read from the file to some double d1 = -1, d2 = -1, d3 = -1, d4 = -1; (assume mystream has already been opened and the file is valid), mystream >&...

 
Garfield
 
4:10 PM
Still need 1 more.
@TonyTheLion Lol. I remember that..
 
@rubenvb I'm sure stuff has been proved to exist :P
 
what stuff?
 
Thanks! Time for my first badges.
 
4:12 PM
@R.MartinhoFernandes Physics can't prove a damn thing.
 
the word "stuff" should be banned, it's way too generic, describes nothing and everything at the same time.
not Higgs Boson
I hope
 
@TonyTheLion You can't ban stuff just because you don't like it!
 
@TonyTheLion that describes components of universe pretty accurately, i'd say
 
@R.MartinhoFernandes I can! :P
 
Everyone likes stuff.
 
4:15 PM
Your mum likes stuff
 
Damn arena cycling is booooring.
 
@rubenvb Lol, arena cycling.
 
@Drise or whatever its proper name is...
 
This is lol May be offensive to some! Don't say I didn't warn you!
 
4:19 PM
USA butthurt?
 
Btw, thanks Tony for my first Good Question badge.
 
@KonradRudolph It's Octopress.
 
@yurikilochek is this video actually about std::move and containers?
Hi btw
 
4:33 PM
@JohanLundberg he's a famous comedian, so it's doubtful
 
@JohanLundberg no, its about Stuff
@JohanLundberg which we were discussing
 
out of sheer curiosity, can you query an sqlite database more then once at one time?
 
Yes. btw
http://stackoverflow.com/questions/5102027/can-sqlite-support-multiple-user
 
@JohanLundberg so say i have mutliple cursor objects (using python sqlite3) like: curs1=database.cursor();curs2=database.cursor(). I can use them both at the same time to make queries? or would one have to wait till another finishes?
(im executing queries using .execute("query in here"))
 
4:54 PM
0
A: is this use of references incorrect?

FredOverflowI would suggest replacing the for loop. I don't trust for loops. Too many places for bugs to creep in. std::vector<A>& v = Get(); x.insert(x.end(), v.begin(), v.end());

I call the "evaluations" that decltype and sizeof perform "e-type-uations" :) — FredOverflow 8 secs ago
 
Love it.
 
I wish the ideone text editor didn't suck so much, couldn't they steal Google's script editing widget?
 
Edit on vim, yank it and paste it on ideone.
 
so much work.
 
If you use Firefox, It's All Text! does that for you.
 
5:03 PM
oh fancy
With macros..

if I have #define foo(arg) where I pass (<stuff inside parentheses>) can I get foo to output just <stuff inside parentheses>?
 
#arg
 
Doesn't that make whatever arg is into a string?
 
yes
Are you asking how to print a string?
 
No like
 
Oh, you want to get rid of enclosing parenthesis? Why?
Can you give us an example?
 
5:08 PM
#define foo(arg) arg
?
 
I expect min(5, 7) to return 5. What exactly do you expect foo(x + y) to return/print/whatever? Please give us an example.
 
@yurikilochek that works fine, as long as it doesn't contain a comma
 
if I have foo((one, two)) foo would print one, two
or rather expand to
 
I don't think that's possible.
 
bummer
 
5:10 PM
Why do you think you need this?
 
@FredOverflow it might be actually, lemme play around
 
x.c:2:9: error: macro "foo" passed 2 arguments, but takes just 1
 
I was taking a look at stackoverflow.com/questions/11729168/… and if I can do that I can solve it
 
MYDEFINE(type,name,args)

used like MYDEFINE(string,foo,(int a, float b)) but I need to extract the "int a, float b" portion
 
5:12 PM
 
@Tocs why not MYDEFINE(string,foo,int a, float b)? You know there's always one return type and one name, so the number of arguments is deducable.
 
@Tocs Well, you could make a proposal to the C++ standard committee to improve the preprocessor capabilities, but that would be kind of a long-term solution ;)
 
@MooingDuck because it looks less like function syntax
@FredOverflow lol
 
@Tocs how about MYTEMPLATE<std::string(*)(int a, float b)> foo;?
 
@Tocs that's doable, but you'd need variadic macros
 
5:15 PM
@ecatmur I already have a macro #define ITERATE_LIST(macro,...) where it runs macro on each element of the list
 
#define MYDEFINE(ret,name,signature) \
    stuff ... \
    MACRO2(signature)
 
@Tocs I think the question doesn't make sense, it's not clear what the OP wants
 
@ecatmur but signature's value is something like "(int a, float b)" where it needs to be "int a, float b"
 
@Tocs no, the signature is ret(*)(int, float)
 
5:16 PM
@R.MartinhoFernandes like a boss thanks
 
does MSVC's unresolved external symbol imply that there are no multiply defined symbols? no, silly question
 
#define foo(x,y) x+y
#define bar(q,z) l / foo z
bar(l,(n,m))


l / n+m
 
@MooingDuck It means you declared something but forgot to define it.
 
@Tocs anyway that should help/
 
I didn't know you could invoke macros with a space between the name and the parens
Now the whole problem seems trivial
 
5:19 PM
I think that's legit.
 
@ecatmur it works
 
@Tocs you can put whitespace virtually anywhere except in the middle of an token/identifier. *cannot put a newline in a preprocessor command
 
#define func_macro(X) X //This works
#define func_macro (X) X //This does not
 
Or special tokens.
++
 
@Tocs OK, you can give me some of that sweet, sweet bounty <jk>
 
5:23 PM
oh shoot I forgot about the last line of the generated code
hmm no commas to abuse
 
@Tocs it does work, only they are not the same.
 
@Radek well the second one makes func_macro expand to (X) X and not a functional macro I thought
 
I know.
But it works. It doesn’t give an error. It might if you use it, though.
 
0
Q: How to get function signature via preprocessor define writen before it?

myWallJSONSo I want to create a define to parse function signature and using Boost Preprocessor create something like this: MY_DEFINE std::string fun(int t, float b) { or at least: MY_DEFINE(std::string)(fun)(int t, float b) { that would generate: class fun_in { int t; float b; } class fun_...

 
Hey thats the one I'm working on
 
5:27 PM
I think he should 'just' use templates...
Why would he need something like that?
 
4774591 he doesn't, since the code there makes no sense.
 
I don't know why he needs it, he just needs it apparently
 
More likely he needs something else
 
@Tocs the fun_in class is completely unusable. It's impossible to read or write to either member.
 
A slight redesign and a template function
@Mooning, exactly my comment
 
5:29 PM
@JohanLundberg There's only one N in my name
 
@MooingDuck it's a glance of the problem, he's showing us the tail of the elephant
Those classes are probably more complex
 
;)
sorry
 
but for the sake of the question he dumbed it down
 
@Tocs I think he dumbed it down too far, and when he tries to scale it back up, he's going to have more problems.
 
180 questions no answers.
confuses me
 
5:31 PM
@JohanLundberg "leech"
 
@MooingDuck probably the case, but he doesn't seem to be responding to the comments so it would be better to give him the solution to the dumbed down version and then he'll stumble on his way back up but he might gain some direction from it
+ there's bounty
 
9
Q: [language-lawyer]... Seriously?

Robert Harveylanguage-lawyer For questions about the intricacies of formal or authoritative specifications of programming languages and environments. Typical questions concern gaps between "what will usually work in practice" and "what the spec actually guarantees", but problems with understanding...

4
 
Never liked it either.
 
If I knew how to expand a function taking std::tuple to call a non template function
g(get<0>(arg),get<1>(arg),get<2>... <N-1>) I would give an answer using that. Any ideas?
 
5:35 PM
Indices trick!
 
I have an ITERATE_LIST_I(macro, ...) which calls macro with (index, element_of_list)
 
^But that looks nicer
 
so my brother is coming over to visit me in the UK, but a free bed isn't good enough for Mr. He wants to reside in one of the most expensive hotels in the area. Meh
 
foo(a b) expanding to just b hmm..
 
5:37 PM
@R.MartinhoFernandes cool! Thank you (again). Will have a go at that later.
 
I'm no where as good with macro's as I thought I was when I started trying to answer this shenanigan
 
It's not something to be ashamed of.
 
http://stackoverflow.com/a/11782770/1554020
need more opinions
 
:)) Oh come on. Your first sentence is "There is no such things as shallow/deep copy in c++."
 
@yurikilochek your answer is wrong, there is shallow/deep copy of pointers in C++
 
5:41 PM
@yurikilochek Well, I downvoted you just for dumping the link here.
 
Someone seems to be fishing for downvotes...
 
@DeadMG am I surprised?
 
o shi...
 
@TonyTheLion no
 
5:42 PM
I'm not sure I disagree.
In C++ there are only copies.
 
The tribe has spoken, you're voted off the island. But atleast you escape the smoke monster
 
@R.MartinhoFernandes You even bothered to read the answer? I didn't.
 
@DeadMG I had read it before it was posted here.
 
facepalm.jpg
He's the robot, he's read the entire internet before it was hip!
 
I'll leave it anyway. To forever be reminded of my ignorance or something :D
 
5:44 PM
lol
 
@R.MartinhoFernandes there still exists the concepts of deep copies and shallow copies though.
@yurikilochek T* p2 = new T(*p1); is a deep copy of a pointer IMO
 
@yurikilochek You get a shiny "Peer Pressure" badge if you delete it.
 
@MooingDuck Meh, I'm not willing to disagree with either side.
That's why I didn't downvote.
 
@Dave isn't that like a "badge of shame"?
 
Badgers are badgers!
 
5:49 PM
unless they're honey badgers
 
Ell
hey guys
 
lets look at it this way:
ypu can not shallow-copy a value, can you? only a pointer
 
plonked you
 
Can I make foo(token1 token2) output only token2 ?
 
@yurikilochek If by value you mean "object", then I think it would depend on the semantics of that object's copy constructor. value_ptr deep copies, shared_ptr shallow copies.
@Tocs not that I can figure out
 
5:56 PM
@MooingDuck my battleship is sunk then, which probably means I should do actual work now
 
“With a macro, can I …?” “— No.”
 
@MooingDuck true
 
@MooingDuck Or you can say: value_ptr copies, shared_ptr doesn't copy (which is how I usually phrase it).
 
@RadekSlupik With a macro, can I make completely unreadable spaghetti code that's realistically pure garbage?
 
@Tocs I think so. You may want to have a look at Boost.PP.
 
5:58 PM
@MooingDuck if you consider opbject referenced by them a part of them
 

« first day (656 days earlier)      last day (4306 days later) »