« first day (664 days earlier)      last day (4285 days later) » 

12:03 AM
std::int_fast64_t:64; std::int_fast64_t:64; std::int_fast64_t:64; std::int_fast32_t:32;
that's ugly, but could be worse, I guess.
 
@KeithLayne is it worth it just to have it be anonymous?
 
Too late to turn back!!!
Thanks for your help, man. Time to put the kids to bed, have a good night.
ooh, have to watch out for alignment though.
Now I'm really going.
 
Wanted to type "inclined". Accidentally typed "include".
 
 
3 hours later…
3:03 AM
Putting a couple of songs together: "hello....hello...hello...Is there anybody out there? Just nod if you can hear me. Is there anyone at home?"
 
Hello there... anyone got any advice for writing tests for c++ code? Unit testing frameworks etc etc
 
3:23 AM
@jozefg I heard this was not too bad.
 
@EtiennedeMartel read header only and smiled a lot
 
@jozefg I'd generally avoid CPPunit, and look at Google Test, Boost Test, and (especially) Catch, which Ettiene has already beaten me to linking.
 
cool ill check thsoe out
 
Kinect Debugging --- Any ideas?
Won't run under the VS2012 toolchain
Will run with 2010 compilation
Same exact code and build settings; just different toolchain
 
@JerryCoffin That's a weird way to spell my name.
 
3:32 AM
@EtiennedeMartel Oops -- sorry. One of these days I'm going to work on learning how to read (though at my age, chances of success seem minimal).
 
I even tried recording my issue since Visual Studio 2012's crash analysis feature couldn't even generate a useful log! So I tried making a video
Guess what happens?
Screen recorder crashes!
I'm starting to wonder how reliable Windows 8 is going to be!
Any idea why it's working fine in one toolchain but not another?
 
4:34 AM
> By 1920 all of the nation's major cities had competing electric companies, each with its own sets of poles and wires.
@IDWMaster Camtasia?
 
5:05 AM
Howdy.
 
Morning
 
I think I ran out of food again.
 
You don't have anything to eat for breakfast you mean?
 
I'm eating sandwiches with cheese and I'm making coffee.
 
Sour milk with cereals is the best breakfast ;)
 
5:12 AM
@ManofOneWay Breakfast, lunch, dinner, whatever. All I have left is a bunch of cookies. I am waiting for the local shops to open to go buy some emergency supplies before I go to work.
 
Do you work as a C++ developer?
 
How come?
 
@R.MartinhoFernandes Cookies have sugar -- one of the four major food groups (Bacon, sugar, caffeine, and alcohol).
 
If I may ask :)
 
5:14 AM
@StackedCrooked How come what? Why is it surprising?
 
It is to me.
 
It's not easy to find a nice C++ job around here.
 
That's true. I guess most places have a bad codebase that is very unpleasant to work in.
 
And there aren't many places that do anything resembling C++ to start with.
 
You don't live near a big city?
On an unrelated note, I heard that Lisboa is one of the awesomest places in Europe.
 
5:18 AM
I live on the outskirts of a city with <200k habitants.
 
@StackedCrooked How do you define "big" and "near"? Given the size of Portugal, nothing is terribly distant from Lisbon.
 
@JerryCoffin lol
 
@JerryCoffin Big enough to find work as a C++ developer.
@JerryCoffin You know, I live in Belgium. So our idea of "big" is slightly different from yours :D
 
Is siesta a common practice at the workplace in Portugal? Or has it died out?
 
5:21 AM
I think that's a Spanish thing.
I never heard of anyone doing that here.
 
Yeah, I just read that it's not a known thing in Portugal at all.
 
@StackedCrooked Maybe of "distant", but probably not so much of "big city" -- offhand I don't know their exact populations, but Brussels seems in the same general range of size as my nearest "big city" (Denver). (...and Paris is undoubtedly bigger -- not sure if you think of that as distant or not though).
 
According to wikipedia, Braga has more inhabitants than the city of Brussels.
 
That's your city?
 
5:24 AM
@R.MartinhoFernandes I was thinking more of the metropolitan area -- I'm not sure of the exact political boundaries of Brussels, but what I think of as "Brussels" seems like it's probably a couple million people or so. (Edit: Google says 1.8 million).
 
@R.MartinhoFernandes How different it looks from Ghent.
Btw, anyone know how to get a clean url to Google image search?
 
Hmm, that doesn't work.
Well, the important piece of the query string is tbm=isch.
 
@R.MartinhoFernandes Actually, a Google image search on Braga gives a very different impression than that image.
Looks fancy and touristy actually.
 
@StackedCrooked Because it shows the tourism stuffs.
That picture was above taken from here: virtourist.com/europe/braga/imatges/010.jpg
 
How far is a ride to the nearest beach?
 
5:32 AM
Dunno, perhaps half an hour.
 
I guess you don't often go there :P
Looking at the "Panoramio" stream I can't help but think it's a nice place.
Does this chat support strikethrough text?
 
Lol, I can't find the old newbie hints anymore.
 
^ That looks sad.
 
5:42 AM
:)
 
Google has self-driving cars. I wonder if is legal to test your self-driving car on the public road.
 
5:57 AM
@StackedCrooked I believe they've done so -- but with a human in the driver's seat, ready to take over at a moment's notice.
 
6:19 AM
Hello world, do i get my +50 rep back when my bounty-question doesnt get answered?
 
Nah, but it's just 50..
 
50 rep on bounties is nothing: askubuntu.com/users/235/…
 
@R.MartinhoFernandes To be fair, he did get a fair amount back from the upvotes to those questions....
Oh shit! He offered them on other people's questions!
Good guy Jorge
 
6:35 AM
@LuchianGrigore He already offered more than he has.
 
Is there any JSON like Notation that can handle references to other node ?
 
someone likes supporting the community.
 
6:47 AM
Can I make a circular reference in boost ptree ?
 
I want to know how to run this c++ program to convert PDF to HTML
 
What have you tried?
 
@LuchianGrigore its not that hard thing of guys in this room I think
ya m trying from yestrdy
 
6:54 AM
good luck with that
 
It comes with a README that explains it.
 
I doubt anyone's going to download that and build it...
 
Am a web developer Don;t know any thing about c++
 
It comes prebuilt.
 
How it works
??
any body to help ?
tell me how to run from cmd
 
6:57 AM
It says so in the README.
Seriously.
I never heard of that thing before you mentioned it.
 
where is README in this downloaded folder ???????
 
What did you download? The source?
 
@R.MartinhoFernandes this thing "Download pdftohtml-0.40a.tar.gz (498.9 kB)" on sourceforge.net/projects/pdftohtml/files/windows%20binary
 
Download the win32 prebuilt binaries.
 
@R.MartinhoFernandes you mean "pdftohtml-0.39-win32.tar.gz"
 
7:01 AM
Yes.
 
ok done then
ok ok .... :P @R.MartinhoFernandes thx I try
 
7:19 AM
@R.MartinhoFernandes its working fine !!!! there is an error shown after conversion see in image below :/
 
I wouldn't know. I never used that before.
 
This day is awful
ly awesome.
 
ok plz tell me where to put gswin32c in extracted folder
?
 
plz dont use plz use please plz
 
:P
poliz
:Z
@R.MartinhoFernandes I used this command in image to start conversion :)
 
7:25 AM
I have no idea! I never used that.
 
Ok @R.MartinhoFernandes thx for HEL:P
 
@R.MartinhoFernandes you there?
 
Well, he is right that an array of pointers ends up using more space. I don't see what's the problem.
 
7:34 AM
@R.MartinhoFernandes What? So std::vector<double*> x(10) would be larger than std::vector<double> y(10)?
 
@LuchianGrigore yes.
Unless the pointers are all null pointers.
And assuming you allocate the doubles with new.
 
@LuchianGrigore Unless the pointers are invalid or all point to the same object, yes.
 
No, now I see the confusion
 
The allocation blocks need headers.
Those headers are bigger than the fucking double itself.
 
I was thinking of pointers to objects that already exist
 
7:37 AM
morning all
 
0
Q: How are the values assigned in the following union?

cirronimboIn the following code, can the value of int be predicted ( how ? ), or it is just the garbage ? union a { int i; char ch[2]; }; a u; u.ch[0] = 0; u.ch[1] = 0; cout<<u.i; }

Dupe votes.
 
Ummm... there's no unions in the related q...
 
I don't see how that changes anything. You can alias the memory of anything with char, which is exactly what happens there.
3
A: union for uint32_t and uint8_t[4] undefined behavior?

R. Martinho FernandesFrankly, I can't find any mention in the standard that doing this is undefined behaviour. The standard does define the notion of "active member" for unions, but it doesn't seem to use that idea for anything other than explaining how to change the active member (§9.5p4), and to define constant exp...

 
@R.MartinhoFernandes unions are treated differently. I asked this a while back - stackoverflow.com/a/11373277/673730
 
Yes, I disagree with that.
When you have int i = 0; there are five object there (assuming sizeof(int) = 4).
"If only one value is stored, how can you read another? It just isn't there." is not entirely accurate.
 
7:50 AM
@R.MartinhoFernandes also see the accepted answer on the question you posted.
 
so apt
2
 
@R.MartinhoFernandes I agree it's vague, but we don't really know what active is.
And "last written value" is the closes we can guess...
 
@LuchianGrigore Yes, I know how everybody talks about this active member thing.
I also know it's not used for that in the standard.
 
Well, IDK then, but I'd rather be safe.
There's no mention of what happens if you read a different member either.
 
@LuchianGrigore It's safe anyway, because implementations make it safe.
 
7:52 AM
And unspecified is undefined, right?
 
@LuchianGrigore You can read chars off of anything.
It's right near the start.
 
@R.MartinhoFernandes ok, I'm still not convinced... :P
 
Consider char& c = u.the_char_array[0]; u.the_int = 0; std::cout << c;.
Is this UB?
 
Xeo
@R.MartinhoFernandes Ask it
I'd say yes.
 
Xeo
7:53 AM
Even though you can alias the memory region of any object with char
 
What's the difference between that and reinterpret_casting the int directly?
 
Xeo
It's explicitly stated (IIRC), that accessing anything but the last written value is UB
 
@Xeo No.
No mention of last written value.
 
Xeo
I don't have the pdf handy, else I'd dig for it myself, but...
Jul 26 at 21:11, by jalf
If you want reliable, high quality answers quickly, use SO. If you want to gamble and maybe get a useful answer, maybe get a good answer, and maybe waste your time, feel free to ask questions here :)
aka make it a question :P
 
There's also no mention that this would be ok (reading from union). And unspecified is undefined, right?
 
7:55 AM
The standard doesn't even say that accessing non-active members is UB. The whole argument is built on vacuous assumptions.
 
I agree that it will work on all implementations.
 
Xeo
@LuchianGrigore no
 
@LuchianGrigore It's reading from a char reference.
 
Xeo
56
Q: Undefined, unspecified and implementation-defined behavior

ZolomonWhat is the difference between undefined, unspecified, and implementation-defined behavior in C and C++?

@LuchianGrigore ^^
 
Neither does it say that it is valid to access the active member.
@Xeo I'm not asking it. I'm trying to make a point. There are already enough questions about this on SO.
And I'm sure I'd get an endless stream of answers mentioning this magical "active member" thing.
 
7:59 AM
:)
 
But the object model allows for overlapping objects, and explicitly states that all objects overlap a bunch of unsigned char objects.
Whatever you do, the chars are always there.
 
@R.MartinhoFernandes Watching you.
 
6
Q: Accessing inactive union member - undefined?

Luchian GrigoreI was under the impression that accessing an union member that's not active is undefined behavior, but I can't seem to find a solid reference (other than answers claiming it's UB but without any support from the standard). So, is it undefined behavior?

 
Xeo
@R.MartinhoFernandes And maybe you'd get an authorative answer from Howard or some GCC dev :P
 
@Xeo Maybe I'll grab all the quotes together later tonight and post it.
Hmm, even if the standard clearly stated that "last written value" thing, the chars would also be the last written value.
 
Xeo
8:05 AM
@R.MartinhoFernandes I think you may be focusing too much on the "chars are allowed to alias anything" thingy
 
@Xeo Just like everyone else is focusing too much on the "active member" thingy.
The difference is that you can reason about the chars alias anything thingy, but you can't about the active member thingy because it's a concept the standard doesn't define properly.
 
Xeo
I won't argue against that
 
Actually scratch that.
The standard clearly defines what an active member is.
It's just that everyone assumes it must mean something else.
> In a union, at most one of the non-static data members can be active at any time, that is, the value of at most one of the non-static data members can be stored in a union at any time.
 
So if I write the char member, which is the active member? The char, right?
 
5
Q: What is the use of a constant union object?

cirronimboIf I make a const union object (e.g in code below ), then no member assignment can be done in that. So is there any use of making a const union object, in any case ? union un { int i; float f; char c; }; const un a; /// ! a.i = 10; error.

I'm guessing a const union has no real use, besides paramater passing?!
 
Xeo
8:11 AM
If you don't know what you need until the point of initialization, and you don't need to change the type afterwards, a const union can be quite fine
 
@Xeo How do you initialize it?
 
I'm out. G'night!
 
Good night
 
@LuchianGrigore Have fun.
 
Xeo
@R.MartinhoFernandes { .mem = init; }, in C :)
 
8:13 AM
lol
 
Xeo
In C++, you could write ctors
 
isn't that C++11 only?
 
Xeo
Unions are always a class type, you could at any time write ctors and member functions for them IIRC
Or am I misremembering something?
 
I think unions before were exactly like in C.
 
8:20 AM
FM ~ radio ~ Mathematics ~ Physics ~ programming
 
Time for my morning walk to work. I'll be back here to procrastinate soon.
 
8:37 AM
is there any programmer in world who avoids radio while work ?
 
I do.
I always avoid radio.
I prefer my iTunes library.
 
LOL
I prefer a seperate device instead of a seperate process
 
Xeo
room topic changed to Lounge<C++>: Procrastinators welcome. [c++] [c++11] [c++-faq] [nsfw]
 
@Drise Hopefully the rocket will not blow up!
 
8:57 AM
If life gives you melons, you are dyslexic.
 
sweet lord, my handwriting is so terrible
 
Xeo
@thecoshman Not surprising, really.
Most computer people have a rather... interesting handwriting. Though mine was already terrible in school.
 
I can hardly read it my self :P
 
I got email asking if Jeb is an atheist, and that their friend wasn't allowed to play if he was. I don't know if he is, but I am.
 
@notch I'm afraid his friend can't play Minecraft. On the other hand, he shouldn't use computers at all. Alan Turing was gay and atheist.
 
9:05 AM
@Xeo Misunderstanding. I thought OP wanted to map the buffer to some potential stack-allocated small buffer within std::vector (I know no standard library implementation which does that, but some do for std::string)
 
Xeo
Yeah, I thought something was bogus
 
I was under impression that using conventional pointers
on his memory block were too much or ugly. sorry for \n
 
@BartekBanachewicz You can edit your posts
 
@kbok 1st time here, thanks to @Xeo link in his profile ;)
 
9:10 AM
I love how it's tagged [nsfw] (hardly working right now)
 
Xeo
@BartekBanachewicz I humbly refer to the bold message in the starboard on the right hand side of this page
 
It might be doable with a custom allocator.
 
Xeo
@R.MartinhoFernandes Yeah, thought something similar
 
@Xeo you mean the "code of conduct"?
 
Xeo
but if OP just wants iterators, well, he got them already.
@BartekBanachewicz Formally called "newbie hints" :P
 
9:11 AM
@BartekBanachewicz There's formatting tips also, which comes really useful in time
 
@kbok Does the standard notation work?
sweet.
 
Most of the time, yeah. You'll eventually find the braindead corner cases on your own :)
 
Xeo
@R.MartinhoFernandes I wouldn't tag "multiline" messages as corner cases...
 
@Xeo Yeah, and there's nothing else that vector provides: iteration and resizing.
Since copying is not desired, I doubt resizing is necessary.
 
ANIMATED GIF!
KILL IT!
KILL IT WITH MIGRATION!
 
9:15 AM
I think it doesn't matter if it's necessary; If you allow the vector class to manipulate of his buffer, there's a possibility of it messing the C buffer. In a really bad way (like delete instead of free)
 
@RadekSlupik No, there's kitty in it !
 
@kbok I am I python. I eat kitties.
And pussies, but that is irrelevant.
 
Xeo
1 message moved to bin
Man that was so lagging my screen
 
It wasn't lagging my screen.
Buy a better computer.
 
@Xeo Okay, sorry
 
9:16 AM
@BartekBanachewicz Yeah, that's why a custom allocator would be necessary.
But it sounds like overkill.
 
Xeo
@RadekSlupik It's the bad connection where I am right now.
 
That's unfortunate.
 
@R.MartinhoFernandes I guess so. If the OP needs iterator, he should just write an iterator. Do you think it's viable if I completely change my answer?
 
Xeo
@BartekBanachewicz T* is an iterator
 
9:19 AM
@Xeo If OP needs fancy-packed rainbow-puke C++ end-safe iterator....
 
Xeo
@BartekBanachewicz C++ iterators are not end-safe :P
 
Make ranges not iterators.
 
Xeo
std::vector<int> v; auto it = v.begin(); while(*it++ != 5318008); will most likely never finish.
 
@Xeo It will finish as soon as the page ends.
 
@Xeo ++ operator throws an exception at the end of the range, I guess.
By The Way, anyone has any experience of Lounge working on iPad? Or is there any app for this? I don't have mine right now.
 
Xeo
9:22 AM
@BartekBanachewicz nope, standard ones don't.
 
there's a mobile version of the site
 
Xeo
0
Q: What does typename mean in this context

demorgeI'm reading this so I'm now looking at the implementation of std::forward and std::move: // TEMPLATE FUNCTION forward template<class _Ty> inline _Ty&& forward(typename identity<_Ty>::type& _Arg) { // forward _Arg, given explicitly specified type parameter ...

Close votes!
btw @Bartek, I'd advise to just delete your one answer there, it doesn't add anything to the question really and the misunderstanding in the comments is also cleared up
 
iterator_traits doesn't SFINAE.
Why? T_T
 
Xeo
huh?
Ah
I think you could write a wrapper that makes that SFINAE
 
@Xeo ok.
I'm amazed BTW how you were able to hit 38k being my age, and in C++ not C#. And I consider myself pretty good compared to other students. Shall you need any coder in gamedev, lemme know ;p
 
Xeo
9:30 AM
@R.MartinhoFernandes Wait, it does.
@BartekBanachewicz lots-a time during my 2 years of school
 
Damn, the intern broke the VS Solution generator.
The commit message says "update".
 
@Xeo Still. Being average takes a LOT of time to get reputation. My first 100 taught me that. So it basically means you're good, even if you're stalking SO 24/7.
 
Good thing he's been fired.
 
@Xeo Oh, you're right.
 
@BartekBanachewicz you just have to answer the right questions.
 
9:35 AM
You just have to play this horrible game in the right way.
 
Controversial opinionated ones, or essay-style ones which aren't just about "explain this language feature", but stuff like "why are C++ compilers so slow"
 
Or "should I use x << 1 or x / 2 to divide by 2".
Sorry, >>.
It's very important.
 
@CatPlusPlus nicely phrased.
@jalf I tend to defend my engineer status in my work against all these so-called "architects"; I guess I'd rather have to have all of my points earned for help and knowledge.
 
@BartekBanachewicz which so-called architects?
 
9:39 AM
@jalf "Make this in PowerPoint"
 
What are you talking about? I didn't say anything about Powerpoint
 
@jalf Misunderstood me. I meant ppl in my work, not SO community.
 
... but.. you said it as a reply to my comment? I don't understand
 
@jalf Your comment was about unspecific and elaboarate questions. I meant I'd rather earn my rep by actual ones.
 
lol, that guy made Jon Skeet mad
0
Q: Methods to convert Julian date to DateTime & Julian timestamp to hh:mm:ss

HenkealgI had alot of trouble finding good c# methods for this type of date conversion, so I ended up writing the two methods below by myself. The date conversion though have been found somewhere on the net. I hope someone will find these methods usefull. // convert julian datestamp into .net datetime ...

Noda Time (noda-time.googlecode.com) would make this code redundant... Heck, if this is just meant to be "days since a Julian epoch" then DateTime.AddDays would do the trick... — Jon Skeet 19 mins ago
 
9:43 AM
Oh god, that's awful.
 
@BartekBanachewicz I don't see why one is more "actual" than the other
 
Xeo
@R.MartinhoFernandes: The out-of-class ctor in the last snippet, fast.
 
Explaining why C++ compilation takes so long requires knowledge of C++, just as an explanation of "why doesn't this code work right?"
 
@Xeo Thanks :)
 
the only difference is that one encourages you to write longer, more free-form answers
 
9:45 AM
@jalf OK, I got your point. Still, I find short, precise, yet well documented answers the pure treasure of SO.
 
Xeo
Oh, and was that the question you needed to SFINAE through iterator_traits for?
 
Xeo
So, should I post an answer with a detail that your forgot (but still got right), or do I tell you.. :P
And you borked the last snippet with the edit
MyClass::MyClass in-class is wrong :P
and you forgot typename
Jeez, just what did you do there?
 
Was reformatting it.
@Xeo I don't mind either. As long as I get to know it.
 
Xeo
And to make you edit one more time, you forgot to explicitly mention that T* is a valid random-access iterator, but doesn't provide iterator_category as a nested typedef (you got it right to test through iterator_traits)
 
9:50 AM
I know I am overlooking one detail there, but that's because I am still thinking about it.
 
jeez, the intellisense parse is not multithreaded
 
Xeo
is_iterator_tester::template test<T>(0) no need for template here btw, is_iterator_tester is not a template / template parameter
 
Dammit, I'm getting too used to my tools.
 
Xeo
hrhr
 
I have a TraitOf alias that replaces that decltype for me.
 
Xeo
9:54 AM
ahum?
 
sbi
@R.MartinhoFernandes Getting assigned from one project to another one once in a while helps with that.
 
Xeo
@sbi His wheels aren't project specific
 
@sbi But I use that in all my C++ projects (two)!
 
Xeo
No wonder you put the template there
 
9:58 AM
The .h++ extension gives me creeps.
 

« first day (664 days earlier)      last day (4285 days later) »