« first day (421 days earlier)      last day (4536 days later) » 

5:04 PM
speaking of which, work to do
 
Xeo
hm. My Boost include doesn't seem to work on the vbox..
 
Probably OT here, but still, am I being trolled here? stackoverflow.com/questions/2317972/…
 
Xeo
Oh, curiousguy again...
sorry, don't want to bother with him
 
I'll take that as a yes, then.
 
user406009
5:25 PM
So what GUI library would you guys suggest?
 
user142019
@EthanSteinberg AppKit.
 
Xeo
Argh, I don't get it. What do I have to do to have clang and gcc find my Boost installation on my external hdd?
oh wait.. nvm me
 
Why did you put it on an external HD?
 
user142019
@Xeo -I/mnt/external_hdd/usr/include/ -L/mnt/external_hdd/usr/lib/
 
user406009
@Mystical He obviously wants even slower compile times. Having the files on an external HD is only going to slow things down more.
 
5:32 PM
Not really, no.
 
When you're dealing with tons of small files, an external HD isn't gonna be much slower than an internal one...
 
user142019
And it depends on the speed of the hdd and the cable.
 
Xeo
@Mysticial It's on my external HDD because that's where nearly all of my stuff is. I only got a 64gig SSD as my main HD
Also, shared folder in my vbox
 
If external HD is SSD, and your main HD is not, it will be actually faster to offload the I/O to that one.
 
ah...
I obviously didn't consider the possibility of an SSD...
My experience with SSDs have sucked...
 
user142019
5:34 PM
SSD + Thunderbolt = win
 
1st one I got was the write-bricking
 
Xeo
My external HDD is no SSD :(
 
SSDs are WinRAR
 
second one was great until it suddenly died after 9 months
 
user406009
@Xeo Still, boost is only about 60MB.
 
user406009
5:35 PM
Stick it on your SSD
 
user142019
@EthanSteinberg and you don't need to include every single header. Just the ones you use.
 
Ram Drives FTW!!!
 
Xeo
@EthanSteinberg Uh, no.
 
user142019
@Mysticial do you have too much money?
 
Xeo
@EthanSteinberg And no, because I just want it on my external HDD.
I carry that thing everywhere
 
5:37 PM
@WTP You don't need a 60GB ram drive to compile code... or even games for that matter... lol
 
RAM drives greatly improve compilation and linking speed.
 
1GB is more than enough...
 
user406009
@StackedCrooked How would you set that up though? What goes on the ram disk?
 
I sometimes mount some my RAM as a drive and checkout my code on it and develop on there.
I take about 2 GB.
 
Did some timing and using RAM instead of my disk saved me nothing.
 
5:38 PM
I don't actually put any code on Ram Drives since they're volatile. Instead, I just have extra memory in my machine and let SuperFetch take care of it.
 
user406009
Hmm, my whole include folder is nothing, just 200MB. Might just make a ramdisk and use that.
 
The only time I truly abused ram drives was when I was testing some I/O intensive code at small scale...
 
I only compared compressed vs non-compressed NTFS on a RAM drive
NTFS Uncompressed RAM drive
---------------------------
SVN Checkout xulwin: 75s
Size: 87,4 MB
Size on disk: 90,4 MB
Build Test_vs90: 4m50s

NTFS Compressed RAM Drive
-------------------------
SVN Checkout xulwin: 60s
Size: 87,4 MB
Size on disk: 36,8 MB
Build Test_vs90: 4m50s (!)
Build Test_vs90 after defrag: 4m52s (Defraggler defragmentation application)
Oh, that was only checkout.
Build times were equal.
 
user406009
@Mysticial They are also useful when doing screen recording.
 
Same here. Build times end up the same.
 
user406009
5:43 PM
This must be able to tell us how much time is spent on I/O.
 
The worst I/O bug I had to fix I did using ram drives.
 
Asterisk and Obelisk (^^the Caption^^)? Is this a reference to:
{| class="infobox" style="width: 18em; font-size: 3; text-align: left;" |- | colspan="2" style="text-align: center; font-size: 125%; font-weight: bold" | AsterixAstérix |- | colspan="2" style="text-align: center;" | |- | colspan="2" style="text-align: center;" | Some of the many recurring and regular characters in Asterix. In the centre of the group is Asterix, the eponymous hero of the series. |- |Created by: |René Goscinny and Albert Uderzo |- |Genre: | Humor and satire |- |Publisher: |Dargaud (France) |- |Original publication period: | 29 October 1959 – 22 October 2010 |- |Status: |...
 
I had about >50k lines of I/O code. Somewhere inside I had a 32-bit index, that would only overflow when the data-size was > 16 GB.
I ended up having to reconfigure the only server I had capable of producing that size of a ram-drive.
 
Xeo
So, clang is obviously pretty bad with includes. Empty main and only #include <boost/format.hpp> at the top takes it 14.4sec to compile and link. GCC takes 2.3sec
 
intermediatehacker: how did you send a message like that
 
Xeo
5:45 PM
Or I did something horribly wrong while building clang
 
@redoc01 I read the newbie hints
 
user406009
@Xeo Something is wrong for you. I get:
 
user406009
clang++ foo.cpp 0.35s user 0.05s system 97% cpu 0.406 total
 
user406009
Only 4 tenths a second
 
Xeo
content of foo.cpp?
 
user406009
5:48 PM
#include <boost/format.hpp>

int main()
{
   return 0;
}
 
Xeo
okay..
 
@intermediatehacker where the newbie hints?
 
@redoc01 I am sure @sbi @CatPlusPlus @DeadMG etc. will be able to tell you.
 
epic timing
 
I was right! ha!
 
5:49 PM
thanks
 
Xeo
I'd expect my compilations to be slower than yours, because I'm on a virtual box, but not that much slower
Also, the big discrepancy between g++ and clang for me is strange
 
you know, I'm really starting to appreciate Visual Studio a bit more
ever since I learned to place several files open on one screen
 
Xeo
@DeadMG My regular setup is a vertical split, two files side-by-side
 
yeah
 
Xeo
sadly, VS has really bad support for multiple screens
 
5:52 PM
Is this a threat:
Note that all >10k users get notified about every flagged message across all rooms of the chat and most of them find that_ very annoying _~newbie hints...
 
I have two screens, so my natural inclination was to place the second file on the second screen
but it doesn't work out that well
 
Xeo
Nope
Bad multiscreen support
 
it's better to use one screen because you can control the width
I have an enum listing and I just changed that file to have a very small size
same for the AST listing
so now I have a main source file which still has maybe 60% of the screen, which is more than enough, and the AST listing and the token listing on the same screen
way more efficient and customizable
I think that VS11 has better multiscreen support
 
Xeo
I can't try, no second screen. :(
 
user406009
I just use my first screen for all code, and the second for documentation.
 
Xeo
5:53 PM
And my VS11 install seems broken too
 
or chat whistles
 
Xeo
Since a crash some days ago my devenv.exe is "not a valid win32 application" anymore
 
lol
that usually means that the PE header is bust
 
My damn antivirus describes the programs I made as "malicious"
I hate overly-protective antiviruses
 
hahaha
describing your own code as malicious
I love it
 
user406009
5:56 PM
What were you doing? Shoving assembly into a buffer and compiling at run time?
 
Antiviruses are prejudiced. They think awesome , professional and literally THE BEST software of all time are "malicious", just because they are jealous.
 
The difference between GCC and Clang errors: Clang starts with the thing causing it, GCC ends with it (if you're lucky).
 
Xeo
Damn small print
 
lol
 
6:02 PM
@FreakEnum lol. Reminds me of commercials. special offer*
50% off* *remove the zero after 50
 
@DeadMG Doesn't VS10 allow you to detach editor windows?
 
yes
 
Xeo
But detached editor windows kinda suck
 
but there's little control over them relative to what you have in the IDE, for example, they don't snap together or tab
 
Xeo
Because you can't attach them to other detached ones
 
6:04 PM
@rubenvb And I'm not entirely sure GCC is consistent about that.
 
and it's pretty fucking hard to get Windows to make it half a screen wide, for example
 
Xeo
@DeadMG Is it?
 
@DeadMG No Windows 7 I see...
 
the detached windows are fine, if you want one single detached window to take up the whole second screen
 
Xeo
Just move it to the rhs of the screen
 
6:05 PM
morons
 
19 mins ago, by IntermediateHacker
@redoc01 I read the newbie hints
 
how am I going to do that for the lhs?
 
Wow. I can't believe this.
 
Windows won't snap to the middle boundary, only the edges
 
Xeo
@DeadMG Easy
It will
 
6:06 PM
 
Xeo
Winkey + left-arrow :D
 
@RMartinhoFernandes Miracles do happen* (*I had nothing better to do)
 
@DeadMG just move it manually after it's been resized
@Xeo Wow cool. Didn't know about that one
handy
 
Xeo
Winkey + left = left-snap, + up = maximized, + down = minimized, + right = right-snap
 
I use that all the time to move windows to the off-screen.
 
Xeo
6:07 PM
and if you have it in any state, winkey + opposite key makes it floating
 
If it's left-snapped, Win+left moves it to the screen on the left.
 
@FreakEnum STOP POSTING JOKES!!! ( that's my job... )
 
Xeo
yep
Awesome functionality
 
@IntermediateHacker Does it pay well?
 
Xeo
4
Q: How to access a variable which is neither global nor local?

Andrey ChernukhaLook at this piece of code int x = 1; int main(int argc, char* argv[]) { int x = 2; { int x = 3; cout << x << endl; cout << ::x; } getch(); return 0; } When i call x from within the block i'm getting 3. When i call ::x i'm getting 1. Is it possible to call x equ...

I love these questions
 
6:08 PM
@IntermediateHacker Didn't know that you were assigned to do that :D
 
@Xeo If it isn't global or local what is it?
 
@Xeo Hehe, you didn't know you could stuff junk in answers.
 
Xeo
It's still local, but not the innermost local
 
now to remove all if(error_status()) return /*whatever*/; with nothing and all emit_error calls to a throw. Ugh, should've done that when I started this thing :/
 
@FreakEnum no problem. Remember it next time. :D
I don't want to end up with ^^THEM^^
 
Xeo
6:10 PM
Cool, my cheating even got the accepted answer
 
@FreakEnum lol so fecking truee xD
 
Xeo
@IntermediateHacker My reason to avoid facebook
It sucks
 
@Xeo that's not cheating. std namespace uses that frequently to acces C functions
 
Xeo
6:12 PM
@rubenvb huh?
 
@Xeo u aren't from China are you?
 
What?
C functions are not local variables.
 
Xeo
@IntermediateHacker Eh. No?
@rubenvb maybe diff question xeos_answer will help
:P
 
does sizeof used with a fixed char array, return the size of the array or just the char?
 
@Xeo No problem, never mind.
 
Xeo
6:13 PM
@TonyTheLion Items and size of array
 
if it's a T[n], then expect sizeof(T) * n
 
Xeo
since sizeof(char) == 1
 
@TonyTheLion If you're careful and don't let it spill decay, the size in bytes of the whole array.
If you shake a little, the size of a pointer.
 
Xeo
-4
Q: Use the functions of the stack and the queue to move all items from the stack into the queue

mge1234guys i have realy have to do need this and i dont know how---Implement two C++ classes Stack and Queue assuming the items in each of them will be integers. For the stack data structure write the functions: push(), pop(), peek(), is Empty(),isFull(), and size(). On the other hand, for the queue da...

Wait, what?
 
I'm going to stop talking here, I'm clearly in a too serious of a mood...
 
@Xeo Great, there's already a vote to reopen.
 
Xeo
@IntermediateHacker, could you please post them as just links, without oneboxing them? It's getting slightly annoying
 
@RMartinhoFernandes oh
 
Xeo
like [img] YOUR_LINK_HERE
 
6:15 PM
and how do I apply this "careful" ??
 
Xeo
@TonyTheLion Don't use sizeof
 
@Xeo ok, I'll use a constant
 
@Xeo I know how to post as image links. as I said , I read the newbie hints
 
Xeo
template<class T, unsigned N>
/*constexpr*/ unsigned array_size(T (&)[N]){ return N; }
@IntermediateHacker That [img] is just there to break the oneboxing
It's got nothing to do with image links :P
 
someone find me a dupe for this
0
Q: Strang behavior of increment

Andrey ChernukhaLook at this int main(int argc, char* argv[]) { int a = 10; cout << ++a + ++a << endl;//23 int b = 10; b = ++b + ++b; cout << b; //24 Why??? getch(); return 0; } The first event is reasonable. 11 + 12 = 23. But why b is 12 both times in second event? What is the differ...

 
6:17 PM
@Xeo I read the newbie hints. stop instructing me!!!
 
Xeo
NOT AGAIN!!
 
argh, it's an i++ + ++i bullshit again
 
The newbie hints is the answer to all life's problems
 
:D :) :-) :P
 
@IntermediateHacker What he was trying to say was: "Please don't onebox so many images in a row. It breaks the flow of conversation."
 
Xeo
6:18 PM
@Mysticial Done
 
awesome
 
At least it's not a 2D array again.
 
@IntermediateHacker No, it's [img](src)
 
lol @DeadMG (i.e. the comment I can't seem to get inlined)
 
Xeo
6:21 PM
@IntermediateHacker I think you didn't get what I meant with [img] - it's just there to stop the oneboxing, it could be blargh or anything else. Just something so the chat doesn't onebox the image
 
@IntermediateHacker do your job correctly!! , It's a repost :D
 
haha, he deleted it before the 5th close vote
 
Xeo
even a simple -!
 
grrr
I just need a static int in my struct so I can use it for my array size
 
and the compiler wont accept my const static int buff_size = 1024;
 
Xeo
@Mysticial That's bad, it was one of the only questions with "increment" in the title :/
Vote to undelete
 
why????
 
@DeadMG What's a "mofucker"?
 
if the OP deleted it, let him delete it
don't piss on the OP
 
What the puppy said.
 
@RMartinhoFernandes Insert imagination.
 
lol
I'd rather not.
 
Xeo
6:23 PM
No, it's better searchable this way. Not as if any of those who ask that would ever search but...
 
Undeleting it definitely help for google searching
 
Do not piss on the OP.
 
but will probalby earn the OP a shit-ton of extra downvotes...
 
he chose to delete it, and it's his fucking question
 
what's Morkdown ?
 
Xeo
6:23 PM
anyways, afk dinner
 
@Mysticial Exactly.
 
DeadMG is pissed
 
yeah
I had a question earlier about switch on UDTs
and got like 10 comments, none of which actually read the mother fucking question
 
Doesn't work.
 
very frustrating
 
6:24 PM
@DeadMG That sounds like a normal day.
 
DeadMG has been reinstalling his system: chat.stackoverflow.com/transcript/message/2073535#2073535
 
and I told them this in no uncertain terms, and some fuck deleted my comment
 
Xeo
@DeadMG Oh, that one
 
yes
that one
where everyone who read the comments developed blinding cataracts after the block of code and didn't notice the important part
what a gigantic fucking waste of my time
 
6:25 PM
now I can't even delete it
this site is a piece of shit
 
Xeo
Somebody's pissed.
Anyways, afk
 
hey I quoted that bit of the standard for you yesterday
 
@DeadMG Potatoswatter answered saying it's a VC bug. Why do you think that's not a good answer?
 
well, sure, he got the point
pity none of the other assholes did
 
6:30 PM
DeadMG's pissed at assholes.
 
@rubenvb I often am. Usually, though, they're not here, shitting on my questions.
 
user406009
@Intermediate And the program is a load of junk.
 
user406009
Using an int for time, a bool for day, not checking your conditionals ...
 
6:35 PM
Not initializing arrays...
 
using Java...
 
user406009
A programmer is walking along a beach and finds a lamp. He rubs the lamp, and a genie appears. “I am the most powerful genie in the world. I can grant you any wish, but only one wish.”

The programmer pulls out a map, points to it and says, “I’d want peace in the Middle East.”

The genie responds, “Gee, I don’t know. Those people have been fighting for millenia. I can do just about anything, but this is likely beyond my limits.”

The programmer then says, “Well, I am a programmer, and my programs have lots of users. Please make all my users satisfied with my software and let them ask
 
@EthanSteinberg The wish hasn't come true yet.
 
user406009
We all know this is true
 
@EthanSteinberg that used to be my gravatar. lol
 
6:43 PM
@IntermediateHacker wow, insulting every mathematician and physicist in a room full of programmers by calling them "nerd".
 
@rubenvb is that good or bad?
 
user406009
I remember, just the other day

Them: "Hey your autocorrection code also causes the robot to spin in a circle when kicked."

Me: "Don't worry that is a feature."
 
@IntermediateHacker I don't know. I'm a physicist, so, probably not ;-)
 
Hey, you're mistreating robots!
 
6:45 PM
@EthanSteinberg wow, u work with robotics?
 
@IntermediateHacker my professor put that in his complex analysis course notes.
 
user406009
@Intermediat This
 
user406009
I still have to get that fixed, after a while the gyro drifts and the robot gets "angry" and makes noises.
And then it spazzes out.
 
Angry? So you are mistreating robots!
 
You'll be first against the wall.
0
Q: Create a boost::shared_ptr to an existing variable

Bill CheathamI have an existing variable, e.g. int a = 3; How can I now create a boost::shared_ptr to a? For example: boost::shared_ptr< int > a_ptr = &a; // this doesn't work

 
6:49 PM
boost::shared_ptr<int> a_ptr(&a, noop_deleter); solved!
 
Here's another 2D-array question for your amusement. :) stackoverflow.com/questions/8466491/…
 
user406009
@LucDanton That is not how a boost::shared_ptr is supposed to be used ...
 
A fair answer to a maybe unfair question nonetheless.
 
user406009
A boost::shared_ptr implies that it is NEVER invalid, that the shared_ptr controls the life.
 
user406009
6:56 PM
If you point a boost::shared_ptr to something that it does not control, you are lying to code that uses that boost::shared_ptr
 
Oh, I thought you meant you couldn't create it like that.
 
Since nobody wrote an answer with a noop deleter, I provided one.
 
user406009
"Thou shalt not bear false witness"
Code like that will usually end up causing hard to find failures though ...

I remember the last time I tried sharing local variables. Took me a long time to find that little error.
 

« first day (421 days earlier)      last day (4536 days later) »