« first day (755 days earlier)      last day (4186 days later) » 

12:00 AM
To read from a stream in a predetermined fashion ( by the bits, by the bytes, or by the text, or in some other specific format (FlaBitcReader) )
 
So, why do you need to store anything other than a stream in your reader?
 
For convenience, and because getting other files in the same directory - if that directory exists - is useful for a number of things the Readers are used for: Shader Compilation, Normal/Texture maps in the same folder, etc.
 
Sounds like crappy design.
 
It's not necessary, you're right: I can do
FileStream* fstream = dynamic_cast<FileStream*>( &(Reader->BaseStream) );
if ( fstream != null ) {
/* Get the filename, take directory name, and use it */
}


But I'd be doing that in a lot of different places, and that's really annoying.
 
Put your directory handling in a layer above the reader.
@ThePhD And all those things sound like stuff that are done by a resource manager.
Ideally, with filemapping.
 
12:08 AM
Starting to sound a lot like you're asking me to pass around a ReaderContext.
Or a Context of some kind to hold the other information.
 
Non, I'm saying you should separate the reading from what's being done with the reading.
 
any one seen Ell today
 
As good as it sounds to separate it out... I don't see any reason to. None of the Reader's behavior changes if it's dealing with a FileStream or not. It's just a shortcut that extracts filename and also the directory of that file, which is useful when I'm debugging a reader and need to know if it's opened a file that I can pop-open and stepthrough with my eyes while I'm coding.
 
12:29 AM
is there a good paste site i can post code to
i dont like paste.to its not v.clean
 
pastebin.com, ideone.org, liveworkspace.org
 
ok thanks
 
@ThePhD codepad.org
 
Never knew about that one. Thanks!
 
Yay, callgrind. :)
 
12:35 AM
wow my C++ script which loads 5 buttons is soooooo slow wtf
 
user1357851
Has anyone not seen me holding this baby magpie: pbs.twimg.com/media/A4XOSG4CEAIHkH9.jpg:large
 
@Griwes lol indeed
 
ive held a few different birds - cat used to bring them in and drop them next to me n wait for some kind of praise
 
@Telkitty I didn't not
 
Hoy.
 
12:39 AM
Yoh!
... For some reason, I wanted to say Bach.
 
@ThePhD Stravinsky
 
Unfortunately, I'm not up on my classic-sounding peoples. D:
 
@ThePhD Too bad. Prolly something you'll regret not fixing earlier once you find out why you would
 
Why do the tag badges take so long to receive?
 
(of course that was a load of crap. No need to regret much)
 
12:43 AM
@Rapptz They're once per day. I believe at 10PM CST. But since DST just flipped, I think it'll happen at 9PM CST.
 
So in 2 hours I get the bronze C++ badge? Cool.
 
user1357851
@sehe how do you like it ;)
 
@Telkitty I thought some of your sites were pretty nice. The birds didn't do much for me
(in YT speak: I found that really hard to masturbate to?!)
 
user1357851
ok for anyone who was here yesterday hearing me ranting app threatening to call me and remove all my apps ... they just called
 
@Dave Each button must be very precious.
 
12:47 AM
@Telkitty "To say I love you"?
 
user1357851
its apparently about they suspect me trying to manipulate rating/reviews :x
 
Well that's not nice is it?
 
...
 
user1357851
they told me I had influx of suspicious ratings. I told them it could be my online enemies trying to get me banned from app developer program :'(
 
user1357851
@sehe please dont tell anyone else I would like people to see me as 1337 troll
 
user1357851
12:51 AM
if they see what you see it would damage my 1337 troll status
 
@Telkitty Well, doesn't matter. Most people will abandon the task after the third screen with unsightly, overly large fonts :)
 
user1357851
true
 
So you want us to treat you like a troll?
 
Oh. The hunter is at work
@Mysticial Of course. All trolls like that. Do we treat our other resident trølls any differently?
@kbok well played, sir
 
1:00 AM
@StackedCrooked Reasons why newspapers are dying out
 
That's not the reason why they are dying out.
 
I'm pretty sure whoever made that had a bad day
 
Theyre dying out because they can't keep up with the internet (which often gets you news faster and for free)
 
Thank you, Captain Obvious.
:P
 
My work here is done! flies away
(Also the internet doesn't get your hands dirty... well unless you're watching porn)
 
1:03 AM
Newspapers are fun for one reason. Well two..
Comics and puzzles.
 
Oh so true
 
Where I work they drop off newspapers at our place so when I'm bored I get to do the puzzles or read the comics.
 
@Rapptz And you can read them during lunch when you are away from your computer.
 
Chances are I already read what's on the newspaper online.
 
@Rapptz What's that. And why. Looks like a deleted SO post
 
1:18 AM
Huh
 
what profilers do you guys use ?
@sehe its from 4chan
 
@Dave valgrind (callgrind, massif), iperf, oprofile (not anymore) gprof
 
yay, callgrind. :)
 
i tried sleepy - didn't understand it at all :P
 
@TrevorPowell with kcachegrind. If only for prettyness. But also for profoundness especially with --trace-instructions --trace-jumps showing disassembly
@Dave never heard of, unless it's a condition in living entities
 
1:21 AM
When I'm working on OSX, I tend to use Instruments as a first pass. Then say unpleasant things and throw it away and go use callgrind instead.
I haven't played much with kcachegrind. I really should.
 
it looks like this : i49.tinypic.com/34pymtd.jpg
 
x.o
 
@Dave What does?! kcachegrind (luckily) doesn't!
 
that image is the sleepy profiler
 
@Dave wokay
Whoa:
> In fact, one could easily categorise efforts to pollute the Free Software ecosystem with fake, non-Free software as evil, which would mean all JSON.org code fails to comply with its own license, due to shipping with its license (Inception, anyone?)
> It is also interesting to note that the author of this “do no evil” clause works at PayPal. Read that twice, go and repair your irony meters, then come back.
 
1:33 AM
w00 fixed my lag issue
silleh mistake ^_^
 
You fixed it by using a profiler that is alert, instead of sleepy
 
lol
i was loading font file every frame
 
oops. well, that's what profilers exist for anyway
 
ill try valgrind next time
thanks :)
 
ok. I'm off to bed. 2:45am here
 
1:41 AM
night :)
 
2:05 AM
> Build your iPhone (and Android) games in JS
why?
 
Theres this FoamJS thing that I hear allows you to make one application that'll work on both iPhone and Android
that means no cross-platform hassle
 
Google has an Objective-C to Java thing iirc
 
Won't work with libraries?
 
I think its entire point was to make porting of iOS apps to Android easier.
 
Easier != Hassle free, then again fuck JS
xDDD
 
2:12 AM
Easier == Less hassles
Can't find it... ah well.
 
Can't find what? Oblivious-C to Java converter?
 
Yeah
Oh, it's the other way?
 
I have no idea why I thought it was called FoamJS
WTF brain...
 
Phone sounds like Foam.
lol god you really slipped that
FoamGap
Looks cool though, but it's CSS/JavaScript/HTML. I'm making a phone app, not a webpage.
 
You can make some pretty sick shit with HTML5 & JS
 
2:17 AM
HTML is kind of torture. JavaScript is so bad. Objective-C isn't any better though..
 
HTML is not nearly as bad since 5
JS is shit, but much more tolerable if using jQuery
 
Any language that uses $ for anything deserves to be shot
dat accent.. hnng.
 
jQuery is not a language. It's a library. And as it stands, it makes working with JS a hell of a lot less painful than it could be.
 
> Any language that uses $ for anything deserves to be shot
can be read as
> JavaScript uses $ for jQuery and deserves to be shot
:D
 
Oh, actually it doesn't? I think jQuery desides that... also I think you can replace $ by jQuery, but don't quote me on that.
But the fact that you can use $ is stupid in the first place.
 
2:23 AM
What's wrong with $?
 
It's ugly. % is a close second but it's used for modulus.
Not to mention $ isn't in all keyboards afaik
 
I hate writing ~ because I can never find it on my keyboard so I always use Alt+126
 
In Ruby $ is used as a prefix that denotes global variables.
I.e. $a is a global variable, @a is a member variable , a is a local variable.
 
Oh that's right. Ruby is also really ugly
 
@Rapptz Use an English layout for coding.
 
2:27 AM
I like Ruby.
 
I should be asleep.
Good night.
 
Me too actually.
 
@R.MartinhoFernandes Is it gonna be your 5th first day? XD
 
Sleeping?
Oh right you all live in like
the Netherlands and the Germany and the other place with the flag and the yeah...
Quiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiick question, though.
Natively, basic_string and all such implementations are resizable and have an allocated capacity beyond the regular size of the string (which also denotes that C++ std::basic_string<*,*,*> are mutable)
 
basic_string<*,*,*>?
 
2:34 AM
Is it worth it to just use a basic_string as a kind of 'Builder' or a quick scratch-space?
Um. Representing the various arguments that can be put into a basic_string
Like * can be char, wchar_t, unsigned long int, etc.
 
I looked at it like parameters.
You can only have 1
 
no it has 3 iirc
 
"Builder"? I still use std::stringstream for complicated string construction. And I weep a silent, invisible tear for snprintf.
 
2:36 AM
Character type, character trait type, allocator.
Every container has allocator tempate argument.
 
@CatPlusPlus Ah that makes sense.
I wasn't looking at it that way
 
o_O How does Cat even show up in here? He just like, explodes in with information and I never ever see it coming.
 
@ThePhD That's in his nature... he just sleeps in a corner not paying attention and the BAM he's all up in your face.
 
emot-science.gif
 
2:39 AM
As for string builders, stringstream is the canonical one.
snprintf isn't really related, there's Boost.Format/FastFormat if you want formatting.
 
Mmm. Guess I'll stick with stringstream then.
I was kind've hoping to just get away with a regular basic_string, since it seemed mostly mutable, but then again ti doesn't have Formatting for non-string arguments and something like stringstream does.
On the bright side, I don't have to allocate a whole new string.
If I' writing to basic_string, that is.
 
How do you think resizing works. :v:
 
Resizing allocates enough space (plus a little extra) for the requested size, meaning an array is allocator::Allocate()'d for the job. Which kind've works like a regular std::vector, I guess.
 
@ThePhD It also copies everything from the original into the new one
afaik anyway
 
@Borgleader Would be pretty broken if it didn't, lol.
 
2:46 AM
Hm.
 
.add(item);
// Internal resize happens
char c = mystring[0]; // Wtf, '\xCC'
 
@ThePhD some people think the resizing somehow allocates more memory to the original array, without encurring (sp?) a copy
 
@Borgleader That's actually possible, though, if you have a memory manager.
Allocate a giant array of like 50 MB.
You'd be able to potentially 'request' a resize by just adding extra bytes onto the end of what you want, enough bytes to fit the objects you want.
 
@ThePhD That's possible but not 100% because you could have something stored right after your array.
 
Yeah, you'd have to keep track of positions in memory and the things that're allocated and how much size they take.
 
2:55 AM
Okay, so yeah, kcachegrind is pretty awesome. :)
 
is that the thing that lets you see cache misses and stuff?
 
No, it's just a function profiler afaik.
But useful for finding "low hanging fruit".
 
Oh, I think there's a similar feature in VS
 
Actually callgrind is the profiler and kcachegrind is the visualizer.
 
You've earned the "c++" badge. See your profile.
whoo.
 
3:07 AM
> Confetti.
 
I love that I can tell kcachegrind to group cost by elf object. That's freaking hot. xD
 
That cat looks pissed
 
Someone's face is about to get mauled.
 
@Rapptz That cat looks like he got pissed on.
 
3:13 AM
> People are saying that face means "your dead" or "prepare to die," but as an expert with a degree in wet kitten face reading, that face says "motherfucker, I will rape you with a rake"
 
Is he going to cry
 
Not really.
He was only slightly leaking.
 
somewhat disappointed
:(
 
user1357851
got to love cat bath machines
 
What can you expect really :p
You're never gonna see him bawl.
 
3:20 AM
A couple tears at least
 
Xeo
Yaaay~ Back home. x_x
 
Oh there were a couple of tears.
 
A few tears.
I don't think I've ever seen honest tears come out of a President's eyes.
 
better than nothing? :D
 
Way better than nothing.
It's just that you can tell he's way more level-headed than other politicians.
 
3:37 AM
I think it's cool that I can live in this time period, where Obama is president. And I'm from Belgium.
2
 
user1357851
3:48 AM
I think it cool to live in this time period where I can occupy the interweb with millions of my smart phone apps
 
user1357851
and get millions of users
 
user1357851
that was not possible 20 years ago
 
> usenet
 
Use it.
 
user1357851
4:01 AM
the grim reaper could be a good hacker? yes:no
 
4:14 AM
@Rapptz Seems legit.
 
It isn't? Darn.
 
God that song was awful.
 
4:36 AM
My program launches subprocesses. And every time it does so, callgrind switches to a new log file. :/
 
JTA
Any DX11 Win8 users here?
 
user868935
5:18 AM
I'm having a problem with cout... this line gives me an error: std::cout << "Number " << s << std::endl;
 
Me too.
 
user868935
the "<<" after "Number" is giving the error
 
Xeo
's' - undeclared identifier
 
user868935
@CatPlusPlus what IDE are you using
 
5:20 AM
edit.com
 
user868935
whats that
 
State of the art technology.
 
user868935
fixed it... durrrrrr!
 
(i'm using Visual C+++ 2010) suppose i have defined a tuple like this:

typedef std::tr1::tuple<
int //i want to set its default value to 9
, double //i want to set its default value to 3.3
, int //i want to set its default value to 2
, double //i want to set its default value to -7.2
> Mytuple;

i can do that in a struct. but i wonder if it is possible to do that in std::tr1::tuple
is it possible to set the default value of std::tr1::tuple?
 
Xeo
As was said in the comments, write a friggin struct.
Hmhm, so, I have two ways to write an O(1) instantiations, non-recursive any_of metafunction (similarly for all_of and none_of). Which one should I use? I'm leaning towards the overload one, since partial specialization is done via overloads in the end.
@LucDanton @R.MartinhoFernandes ^
 
5:53 AM
finally, a case for singletons!
namely, apparantly namespace scope variables in a DLL are initialized before the user-defined DllMain is called, i.e. before the DLL handle is known...
^ My singleton. :-)
 
6:14 AM
@Cheersandhth.-Alf I still hate Singletons.
 
posted on November 09, 2012 by Anders Schau Knatten

I have already argued that you shouldn’t put all your includes in your .h files. Here is one more reason, compilation time. Have a look at this example, where the arrows mean “includes” file5.h apparently need access to something which is defined in file4.h, which again needs access to three other headers. Because of this, [...]

 
@Rapptz Haskell uses $ like this: f $ x = f x :)
 
@FredOverflow Kill them along with their families!
@Feeds Another?
 
@StackedCrooked Sigils are not a good thing.
 
6:32 AM
@FredOverflow I cleaned it up a little. :-) pastie.org/5349692
 
6:52 AM
Hm, I'm having trouble figuring out how to use the boost preprocessor library to write a macro that joins sequence arguments so that (a)(b)(c) evalutes to "a.b.c".
This is the closest I get. But it has a trailing ".".
 
@StackedCrooked Because the PP works on tokens and not characters? Implementation can insert/remove all the whitespace it wants.
 
Thanks! That's better than mine :)
 
user1357851
7:19 AM
Anyone has any idea who might be potentially reading those forums
 
user1357851
Don't wanna troll on forums that gets too much publication
 
8:00 AM
Everyone.
 
Some!
Good moaning
@Telkitty Ahem. A lesson about the internet: everything is public
 
user1357851
@sehe that's true
 
user1357851
I must admit I have this impulse to troll
 
user1357851
on public forums
 
user1357851
:'(
 
user1357851
8:06 AM
troll = educate while entertain in a no serious way
 
user1357851
elite trolls are great internet entertainers
 
@TrevorPowell It's convenient yes. If it's hot, replace your CPU fan
 
user1357851
the best IMO
 
@Telkitty Depends on the execution. We have several modestly good trolls and about 2 or three great trolls here. It is the C++ room after all, which seems to attract the witty and the deviant
 
user1357851
someone once told me all genius are weirdos
 
user1357851
8:10 AM
probably true
 
@Rapptz I think you could do with linking to 4chan just once a day, instead of replicating the content feed verbatim?
@Telkitty You needed someone to tell you that :)
 
@Cheersandhth.-Alf huh? you always know "dll handle". it's just its base address.
 
@CatPlusPlus Aaaaaand Spirit Karma :)
 
Right.
 
8:14 AM
Heads explode as Twitter runs better on Java than Ruby http://reg.cx/1YNv via @regvulture
@StackedCrooked /cc ^
 
@Abyx well, how do you know the base address in the DLLs own code, while the DLL is loading? what I recall is that after the load you can load the DLL via its designated module name, no problem.
now they're flagging messages in private discussions. well well
 
@Cheersandhth.-Alf you know the base address of the dll the same way as any address in the dll.
I mean, it's known statically
in VC++ you just use address of extern "C" IMAGE_DOS_HEADER __ImageBase; variable
 
user1357851
now I am getting all suspicious. I was just saying that you can buy followers/fans on social networks last night. Then got a call from apple today asking me whether I have been conducting suspicious activities (i.e. manipulating ratings etc)
 
user1357851
8:30 AM
was trolling on some national newspaper for years without knowing a lot of people can actually see my email address (tied to my website).
 
user1357851
at one stage I was suspecting I was even economics/finance section editors' pet troll
 
@ThePhD Hehe this tweet brought me to [YT] checking the key of the piece (It's E-flat, sadly, I had a pun based on E#)
> the string player at 7:00 just really wants to play.. haha
My answer:
> Lol. Of course, he's just preparing for the last movement. Apparently he doesn't know the work so well that he knows precisely how long it will take, and ... endings are always longer than you expect with Beethoven, the composer that kept stringing on one more cadenza. And then a final chord. Or two. Or three.
> Or, maybe a combination. In repeat. And then add octave. And timpani roll. General pause. Broad chord. Smorzando. Fermata. Double bass pizzicato to round it all off. Yeah. That's about it!
(TIL: YT character limit > SO chat character limit)
 
9:01 AM
Cthulhu, scrubbed
10.9k 1 13 42
I found him ^ Cthulhu
:P
mawning
 
He looks good, doesn't he?
 
grrrrrrrrrrr
VS2010 keeps crashing
suckage
@billz looks great :P
Where is everyone this morning?
is it holiday or something?
hai puppy
 
argh
some silly recruiter woke me up
 
what a bastard
 
Who does he think he is, daring to offer you shit?
Having the audacity to demand you go through their recruitment process.
@sehe Definitely a tiny little bit; not drawn out in the slightest.
 
9:15 AM
inorite
 
sbi
@TonyTheLion @R.Martinho, @Xeo, and I stayed up way too long last night, and between them the two emptied most of my alcohol stock, so that's three of us badly in need of a holiday today.
 
It's our fault now?
 
sbi
Meh. It's 10:20am here, and I should be at work. So I think I'll grab a shower now, and leave for work. YAWN.
@R.MartinhoFernandes Stop procrastinating here. Get back to work instead. Or find yourself an apartment. Whatever.
 
sbi
16 hours ago, by Etienne de Martel
@sbi Why is that so surprising?
 
9:22 AM
@sbi oh wow
 
sbi
And did I mention I am grumpy? Mumbles something unintelligibly.
Off to bathroom.
 
Woah, the ape is not a happy one today
@sbi TGIF
@R.MartinhoFernandes did you at least have fun then?
 
what does volts have to do with wave amplitude?
 
donno
well, if you represent voltage as a sine wave
then the amplitude is the magnitude. But I guess they don't really have a direct relation
 
9:39 AM
this is what's confusing me
 
sbi
@TonyTheLion Yeah, but unfortunately He made sure it's Friday morning when I wake up, so I have to slosh through the whole damn fucking day.
In other news:
> I forgot to shut the damn bathroom window last night. I almost froze to death while showering. I already hate that day. – sbi
 
user1357851
Should change the name of this room from the lounge to the Zoo
 
sbi
@DeadMG So the lion explains the connection between the two, and all you can reply is that this is what's confusion you?
Well, I'm off to work now. This place is dead anyway.
 
user1357851
@sbi that's why he is a programmer not a physicist
 
@sbi No, because it doesn't make sense in the rest of the context. It was the same relation as I'd assumed.
 
9:47 AM
I know nothing else about voltage and amplitude
but Google may!
 
@sbi That happens me all the time
 
Hey, what an idea, using Google
@Neil That's why I rarely open a bathroom window
 
My mother-in-law comes to clean our house sometimes and I swear she leaves the bathroom window open on purpose
 
@TonyTheLion Nah, the task is just rather under-specified.
 
user1357851
what is the context of the amplitude and voltage
 
9:48 AM
Free party in Paris after MineCon (November 25). A-Trak, Birdy Nam Nam and Skrillex. RSVP here: http://secretblackfedora.com/minecon/ Indie devs get VIP.
^ awesome
 
user1357851
sounds like high school physics
 
@Telkitty Well, the question implies that each file should hold multiple waves, but I see no evidence of that.
 
user1357851
@DeadMG what question
 
@DeadMG what are you doing?
 
user1357851
increase the voltage thus increase the sound wave amplitude?
 
9:53 AM
some silly technical test
 
user1357851
@DeadMG lol and of which you apparently are not doing too well :D
 
oh lol
 
user1357851
@kbok Paris ... that's only half a earth away
 
user1357851
but thats okay coz nubi like me wont get invited in da 1st place
 
1
Q: Where can we use list initialization?

Luchian GrigoreThis question already covers what PODs and aggregates are, and provides some examples on aggregate initialization. The question here is where can you use list initialization? Also where can you use (in lack of a better term) list assignment? An answer should deal with both C++03 and C++11, hi...

 

« first day (755 days earlier)      last day (4186 days later) »