« first day (642 days earlier)      last day (4305 days later) » 

4:01 PM
@Drise you marked an answer before I got back online :( oh well.
@FredOverflow pft, it's a comment
 
What are the chances that I can install an Windows XP64 VM with a key from Windows 7's XP Mode?
 
@MooingDuck are you psyduck again, or is the image just cached on this computer?
 
@Ell registers basically live in a completely 100% different "address space", that isn't in virtual memory anywhere. There's also only 32 of them, and so it can use "custom 5 bit pointers". It's completely unrelated to long jumps.
@keith.layne I was only slowduck for like half an hour O.o
 
@MooingDuck I could change it. And if you supplied an answer, I would upvote it anyway. Probably aslo ask that everyone here do the same.
 
@Drise only if you think my answer is better than his. I don't think so, but you should try to be objective. Don't change accepted answer merely because you know me.
 
4:05 PM
0
Q: How to make something multithreaded in C++?

IAmBatmanIs there a straightforward way to make something multithreaded in C++, or is it always specific to the way the code is built itself? That is to say, I can't just flip a switch and "make the program multithread"?

NARQ.
 
@Drise I've always though "aslo" would be a cool word. Just needs a meaning now.
 
user784668
@MooingDuck :iabbr aslo also
 
@MooingDuck serial upvoter?
 
@keith.layne someone has gotten to the "answers" tab of my profile and is upvoting them one at a time
@keith.layne but they know to only do 3 a day so they don't get caught by the automated system.
 
@MooingDuck I know what it is...but you might have found a candidate
I just added some example code; can this question please be unclosed? — IAmBatman 2 mins ago
 
4:10 PM
@keith.layne I know several candidates. Drise.... uh... there was another guy who said he looked at my old answers...
 
@MooingDuck Well, I'm going to disagree with you for the same reason I did yesterday. first should be a dumb container. It doesn't need to know how to read anything, just hold information, and spit it back out when asked. I still upvoted, as it it a reasonable solution, however, his answer remains the best, because it doesn't require vast changes to what you already started with.
 
@MooingDuck hey...
 
@keith.layne Use the reply button!
 
@Drise oh, well, also easy
 
@Drise no.
 
4:11 PM
@MooingDuck Yours truly. It's my way of saying "thank you".
@keith.layne It's difficult to follow your conversations..
 
@Drise fixed, no longer a member
 
I'm like the Sherlock Holmes of SO
 
@keith.layne WTH does that mean?
 
@JimNorton means he's proud of being confusing and overlooking the fact that Sherlock was helpful
 
@MooingDuck :-)
 
4:14 PM
nothing, I just solved a mystery
 
@R.MartinhoFernandes Ha... the stream implementation was CPU bound.
 
@keith.layne You could have just asked me! I would have told you 42, silly.
 
@MooingDuck Also, just a suggestion, readFile should be readObject, or readIntoObject. Adds more clarity, imho. Similar to what ecatmur posted.
 
@JimNorton I already knew that one :)
 
@keith.layne Mr.Anubis I think
 
4:16 PM
@keith.layne :-)
 
that guy? really?
 
@Drise how goes it?
 
@JimNorton Better. Much better.
 
oh wait, I was confused for a second. I like Mr. Anubis, haven't seen him for a while.
 
@Drise Hey that's good to hear!
 
4:17 PM
1
Q: Access function pointers outside of the instance

DriseI have a class as outlined below: class InputReader { public: typedef void (*handler)(std::string, int); static void errorHandler(std::string error, int severity); //Supplies a default error handler static void warningHandler(std::string error, int severity); //Supplies a default warnin...

 
@Drise So I assume your code for work is much more stable and correct now?
 
now that's something for you guys :D
 
@MooingDuck Well, I liked it being readObject, since you then use overloaded functions instead of explicitly function1 function etc.
 
@Nils heh no
 
@Nils seems unrealistic, where's the mobile/tablet in the toilet panel?
 
4:18 PM
@JimNorton Working on finishing v1, but yes.
 
@ecatmur good call
 
@Nils Thats What I call Healthy Habits !
 
@Drise yeah, didn't consider upscaling
 
@Nils Add the toilet and the date together, and add about 2 more toilets, and you have my typical day.
 
@Drise Last night I went to a "welcome to grad school" event with my fiance and we went to a nice dinner. The first half the day was right though.
 
4:20 PM
- A comic Book store retailer ? We call that job , "The Widowmaker" ....
 
@Drise: I have a strong feeling that you would benefit from reading some C++ book. Anyways, I've added some example for you. — Vlad Lazarenko 16 hours ago
I'm fairly offended that he feels I need a C++ book.
 
everybody should "read some book"
 
I was almost tempted to remove his answer as marked and downvote him for that.
 
Nah, his answer is good, and you did ask for a code example after he'd explained the idea fairly well
 
@Drise still a good answer. And pair is pretty straightforward
 
4:23 PM
@Drise what's using pair JIT?
 
@MooingDuck That's why I didn't cave to my temptations.
 
template<class A, class B>
struct pair{
     A first;
     B second;
}; //done
 
@rubenvb file >> std::make_pair(t, obj);
 
@MooingDuck needs a name :)
 
@Drise wth is that supposed to do?
 
4:23 PM
@Drise To be honest, "I can't for the life of me get it working." does give the idea he expressed.
 
Hey I used a pair yesterday during my "Learn C++" adventure.
 
@R.MartinhoFernandes I tried about 10 or more combinations of make_pair and pair, and could not get it working.
 
And learned how ridiculous g++ error messages are.
 
@Drise ah, make_pair makes a pair that copies those objects. Then you are reading into it and the temporary gets destroyed
 
@JimNorton Tell me about it.
 
4:24 PM
@rubenvb he means he's creating a pair just-in-time, aka temporary
 
all template error messages are dense
 
@JimNorton Hehe, that was just the tip of the iceberg.
 
@JimNorton GCC 4.7 is a lot better IMHO. But yeah, sucky.
 
@Drise that is an odd part of pair, what you want is file >> std::tie(t, obj);
@Drise also that's not what JIT means
 
or just make a pair in a second statement.
 
4:25 PM
@MooingDuck That doesn't work, does it?
 
I would suggest you read a C++ book too, after this.
 
@MooingDuck I just did std::pair<first, InputReader*>(t, obj)
 
@Drise make_pair does copies. tie does references.
 
I wish they'd add some syntactic sugar to C++ for tuples
 
@MooingDuck Fuck.
 
4:26 PM
@Drise that's more straightforward and I prefer that
 
@JimNorton Make sure you have a recent version, as they improved quite a bit since 4.5 (I don't know which one you're using).
Still crappy, so don't get the wrong hopes.
 
@MooingDuck Is std::tie 03 or 11?
 
user784668
@Drise 11. Everything cool is 11.
 
@Fanael There's the problem constraints.
 
@Drise oh hey. tie returns a tuple, not a pair. Oops. (C++11)
 
4:27 PM
@R.MartinhoFernandes At work I'm using 4.4.6 :-( And I can't really upgrade.
 
@MooingDuck Even worse 0_0
 
@Drise pft, a tuple with two elements is basically a pair
 
@JimNorton 4.5.2
 
I did notice a dramatic improvement in error messages from 4.6 to 4.7. I was impressed.
 
user784668
4:27 PM
@JimNorton Do you have read-write access to a directory with about 100MB free space? If so, you can upgrade.
 
@JimNorton You can always upgrade. For yourself.
 
in c++11 it is a pair, or rather, the other way around. If I'm not mistaken.
 
@MooingDuck But there's no operator>> for tuples anyway.
 
@keith.layne When competition is breathing down your neck, you want to play catch-up.
 
user784668
@R.MartinhoFernandes Write one.
 
4:28 PM
@Fanael Yeah, I can install a second copy of gcc I suppose.
 
@R.MartinhoFernandes he's overloading it himself, it's fine
@keith.layne That's a very confusing and potentially misleading sentance
 
Just do std::pair<bla,bla2> temp; thingie >> temp; /*work with temp */
 
sorry, did you know what I meant?
 
std::istream & operator >> (std::istream & file,
std::pair<first, InputReader *> & obj)
 
@keith.layne no...
 
4:30 PM
@Fanael I won't, because I can't bother to make it generic enough (should it just extract two values and stick them in? Or read values in parentheses separated by commas?).
 
@MooingDuck now that there is std::tuple<...>, isn't std::pair defined in terms of it?
 
std::pair<first, InputReader *> t(first(), &obj);
if (file >> t)
obj.mesh.push_back(t.first);
 
@Fanael it'd be better to make a generic one for all containers
 
user784668
@R.MartinhoFernandes Let the user choose.
 
@keith.layne They support the same interface, and there are conversions, that's all.
@Fanael "I can't bother to"
 
4:30 PM
@keith.layne no, I don't think so
 
my bad, thanks.
 
@R.MartinhoFernandes does tuple<A,B> have a first member?
 
has anybody done some c++ AMP here?
 
@MooingDuck No, but std::get works on pairs.
And arrays.
 
@R.MartinhoFernandes alright
 
4:31 PM
And std::tuple_cat on GCC only supports tuples. For no fucking reason.
 
@R.MartinhoFernandes oh, didn't know that. fascinating
 
user784668
@R.MartinhoFernandes std::tuple_cat? A cat made from tuples?
2
 
I would love to get my hands on Schiuldt C++ Complete Reference 5th Edition
 
@Fanael concatenation?
 
@LeandroArielPezzente you're in the danger zone
 
4:32 PM
@Drise that's a very weird operator>> usage. Why are you not default-constructing the pair?
 
@Drise Isn't first a member of InputReader? And so, should that line be std::pair<first, InputReader *> t(obj.{first_member_name_goes_here}, &obj);
 
@LeandroArielPezzente Is that sarcasm?
 
@rubenvb he needs a certain value in the second member
 
2
Q: Access function pointers outside of the instance

DriseI have a class as outlined below: class InputReader { public: typedef void (*handler)(std::string, int); static void errorHandler(std::string error, int severity); //Supplies a default error handler static void warningHandler(std::string error, int severity); //Supplies a default warnin...

I don't know how to answer your question.
 
@Prætorian he's about to overwrite the first member, it doesn't matter what he assigns it
 
4:33 PM
How many times are you going to link your question here?
 
@MooingDuck Then why doesn't he construct the pair after a non-pair extraction? If the extraction only extracts one thing, why the pair?
 
@Prætorian Yes, but infact I messed up and it should be a vector of firsts
 
@rubenvb properly extracting the first member requires the second member to be set. That's the whole reason for his question and for using pair
 
@MooingDuck In that case, why pass it in at all. Just assign the new first value to InputReader.firstObj
 
@MooingDuck I'd say don't use operator>>.
 
4:35 PM
@Prætorian properly extracting the first member requires the second member to be set. That's the whole reason for his question and for using pair
@rubenvb that's what my answer to his question says
 
Guess I need to read the question again
 
@R.MartinhoFernandes Actually , believe it or not , its NOT sarcasm.
@keith.layne I am a noob , and actually , I dont see why Schildt is a bad author.
 
@rubenvb but I answered 1 hour after he used the other answer and accepted :(
 
Then why on Earth are we discussing this?
 
@LeandroArielPezzente just say no. Get a good book off the list...where's that link?
 
4:36 PM
@LeandroArielPezzente It's been beaten to death, but he's a bad author because he is often factually wrong.
 
Because we can't do so on Mars?
 
@MooingDuck I used the other answer because it required minimal changes to the 15 overloads I had already prepared.
 
problem -> question -> answer(s) -> peace.
 
@rubenvb because drise posted his code here for some reason
 
1343
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
4:37 PM
thank you, linkbot.
 
@R.MartinhoFernandes Didnt knew that , but thanks for clarifying.
 
@Nils Why is he holding the mouse? Is that a 'deadman switch'? Also, with his left hand? Or were all the letters originally in mirror script?
 
@Drise only slightly less changes than mine would require
 
@MooingDuck Because Drise has high amounts of respect for the knowledge usually shared in this room.
 
Hi
 
4:38 PM
@sehe one you cant never be curious enough.
 
I want to ask an off topic question
 
@MooingDuck Plus overloads look fancy and whatnot.
 
@techno Nothing here is ever on topic.
 
i have a website with limited bandwidth
 
4:38 PM
@LeandroArielPezzente Just search this chat for the name. Bull Schildt! is an expletive for a reason
 
Oh lord, here we go.
 
@Drise sorry, I didn't follow the replies back far enough :( You were answering a question at the time
 
"and whatnot"
 
42!
 
are there free hosting providers which provide direct links
 
4:39 PM
@Drise that is true, but the question is, does that make it a good thing?
 
@LeandroArielPezzente I hardly ever touch the mouse. Allthough I live at the PC 24h
 
@techno aren't they all?
 
@techno what does that mean?
 
it's a tautology
 
@techno How large is your site and how much traffic does it have?
 
4:40 PM
direct link = not having to click on the "download" button.
 
@Flexo He means: can I point my domain name to their host. Don't go there. This will end in more tears
 
@techno There was a 000host.net or something I used as a download server for Valve games once.
 
@rubenvb really?
@rubenvb you were right
@Flexo I was wrong.
Still ending in tears, though
 
and blood
 
@techno - what is it you want to host? If I think it's cool and legal and free I might consider hosting it
 
4:41 PM
Did you guys know Windows XP64 SP2 (==SP3 for regular Windows XP) still has IE6 installed?
 
@JimNorton it not a large site,it is a software website
i want to host the setup file
 
@techno Put it on Amazon S3. Amazingly cheap
 
@techno I have a decent VPS running Linux that I'd let you host your site on... free of charge. Comes with cPanel.. which makes it nice to use.
 
Just use github/sourceforge
 
4:42 PM
unless it's not open source.
In that case, shame on you.
 
I hate cpanel
 
@rubenvb Create an empty project and put the stuff as custom Downloads :P
 
@keith.layne Y U NOT LIKE cPanel?
 
(No idea if that's against TOS or whatnot)
 
@R.MartinhoFernandes yeah, ok. Sure. But still. Open up your damn sw.
 
4:43 PM
@JimNorton Because it sucks, obviously
 
@JimNorton what is your webaddress
@sehe Free
 
@JimNorton It's awful and completely unnecessary.
 
@JimNorton my web host uses it, an I can't do all I'd like to do with it. Not that I do anything with it. But they capriciously "upgrade" software in a breaking fashion with no warning. But I guess I get what I pay for.
 
@techno Well I have several websites on the server now. But one of them is dailysnapshots.org
 
@sehe Woahhh ... You have just impacted in my entire childhood ... Until today I actually thougth this guy was a respected author.
 
4:45 PM
Make a DropBox account and put it on the Public folder.
 
what, no dropbox referral link :)
 
@R.MartinhoFernandes direct links are forbidden since the megaupload scam.
 
@R.MartinhoFernandes I tried it but Dropbox banned my public links
 
@rubenvb Oh. When was that?
 
First Megaupload , then Library.Nu .... the world is turning into darkness
 
4:47 PM
@CatPlusPlus It's not really intended to be super useful to us geeks. It's more for the non-techy person to manage a web hosting account... for that I think it does quite well.
 
Wait, I'm hosting my C++ standard build on DropBox. Does that mean the link is broken now?
 
Shared web hosts are awful, too, so yeah, it fits.
 
@R.MartinhoFernandes wait, I think it was only new accounts that wouldn't get them.
Lemme check
 
@R.MartinhoFernandes yes
 
@LeandroArielPezzente He's not. But he has a lot of "satisfied customers", because his writing style is good, it seems.
 
4:47 PM
error 420
 
Old accounts still have Public.
 
error 460
 
For new accounts just use "Share".
 
@techno Nope, it still works.
 
they have banned me
 
4:48 PM
Dropbox disables public links only for stuff that generates too much traffic.
 
i had uploaded the file day before yesterday
 
@techno if you've been banned you probably didn't upload your own software.
 
...
 
@techno Try sdf.org it's free and a great service.
 
@rubenvb i own the copyright
 
4:50 PM
@techno then why did they ban you?
 
@R.MartinhoFernandes What about Rober Lafore or Charles Petzold ? I am kinda curious now.
*Robert
 
@LeandroArielPezzente Ah, don't know those. Well, I've read some articles by Petzold before, and he seemed decent. But don't know any books by him.
 
Did anyone saw this movie: imdb.com/title/tt0361862
 
user784668
We need a C++ book written by litb and the robot.
 
Petzold wrote a few fairly solid books on programming on Windows.
 
4:52 PM
Petzold's well known for his Programming Windows books, never seen any C++ books by him
 
litb will just fill it with quizzes.
 
@rubenvb i don't know i contacted them no reply
 
What about something like Vexille or Appleseed?
 
Please give me some suggestions
 
@techno Free hosting? Try sdf.org As I said before.
 
@Fanael I'm not writing a book. I barely have time to write a blog. And by barely I mean not at all.
 
it looks like dinosaur age site
 
I'm sleeping four hours a day and I really want to fix that.
2
 
@techno The service is quite good though.
I used it for a number of years, never had a problem.
 
user784668
@R.MartinhoFernandes Get a faster CPU and more memory. Or optimize your code. Or do whatever a robot can do to be faster.
 
4:55 PM
@Fanael Robot is busy.
 
Is it just me and me being primarily an ObjC guy or are C++'s constructors actually utterly unflexible and broken when it comes to inheritance or just simple wrapping convenience constructors?

Take this ObjC-ish C++ code for example:
C++11 finally introduced something to sort of deal with this called constructor delegation. Yay! Yet in my experience 90% of the time it is absolutely useless, as it basically (almost) only covers the cases where one would probably could have done well with simple plain default values in the first place. Or am I just missing something crutial here? Please enlighten me. (I know about "Hyperrect::init(…)" but it's butt-ugly, if you ask me.)
 
dafuq, a wall of C++ code???
 
Why do you make my eyes bleed?!
 
My screen! It's all gone!
 
@Regexident You lost me at being primarily an ObjC guy
 
4:57 PM
bin it!
2
 
@Regexident What's the problem, really.
If you're using broken primitives like raw arrays then don't be surprised you get ugly code.
 
user784668
@rubenvb oct it!
 
Oh snap! Getting the popcorn ready!
 
@Regexident just you
 
At least there is "C++ Programming Language" by Bjarne Stroustrup book , you cant miss with that...
 
4:58 PM
1 message moved to bin
 
@JimNorton Aren't you glad it isn't you this time lol.
 
ok please post a wall of code on ideone.com and paste the link here
 
@Drise Yes! It will never be me again.. I've learned how to handle this room now. :-)
 
C++ is terrible, but at least it's better than Obj-C.
2
 
I wonder if there's a fourth edition already ...
 
user784668
4:59 PM
@CatPlusPlus C++ better? Does not compute.
 
@JimNorton I think you mean filter. I don't even think the cat can handle this room.
 

« first day (642 days earlier)      last day (4305 days later) »