« first day (565 days earlier)      last day (4385 days later) » 

5:00 PM
@stdOrgnlDave cur_ptr was a ?**, and is now a ?*
 
@rubenvb no. Look closely: * has a lower precedence than .. I have a pair containing an iterator to a pointer.
 
@stdOrgnlDave cur_ptr is initialized between those right?
 
return **pair.first; == return **(pair.first);
@Ell only UB when you dereference it (after casting, since you cannot dereference a void*).
 
Ell
@classdaknokt ahh kk
 
Not initializing a variable is moronic, but not UB.
 
Ell
5:02 PM
is it the cartesian axis with x & y and stuff or is that the eucludian? Just like basic geometry?
 
ugh, I hate pointer derefences
 
If you guys see my scene graph implementation, you'll cry. It uses pointers all over the place.
 
Ell
ahh yes I mean the derefencing of the pointer as ub
but I'm a newb so I haven't memorised all the ub's yet
 
I always try to use references or -> as much as possible. Only iterators are sucky in that regard...
 
sigh, I can't get it to take a cast of void * to void * in this case
 
5:03 PM
@Ell if it might be useful: it's UB
 
Ell
:L
I love pointer magic, like when I made my windowing thing which stored a pointer to a Window (my class) in window's UserData void* field
 
@Ell don't do that in C++
 
@rubenvb Add more ctors.
 
Ell
@MooingDuck why not? :'(
 
@RMartinhoFernandes lol
 
Ell
5:05 PM
magic is fun!
 
@Ell type safety. Use boost::any at least.
 
@rubenvb What's funny about it?
 
Ell
what about type safety? o.O
 
It's the way to do it.
 
Ell
but winapi is c so you don't gets boost::any :P
 
5:05 PM
@Ell you've lost all type safety. A C++ program should never have void*, (except when interfacing with non-C++ code)
 
Ell
it was doing exactly that :P (interfacing with non-c++ code)
 
@Ell oh, nevermind me then
 
Ell
sorry for the confusion :(
 
@RMartinhoFernandes that's kind of what initializer_list was made for: MyClass mc{{1,"bla"},{2,"blie"}...};
 
@Ell it'd help if I read all of what people type instead just glancing over everything
 
5:06 PM
roflol, got my new one dereferencing 10k pointers now moving to 64mb
 
@rubenvb Oh, you meant "a set of more than one", not "more than one set" then.
 
@RMartinhoFernandes I saw the two args as one set of params. Sets are associative or whatchamacallit
 
@Ell Rule of thumb: if in doubt, it's UB.
 
@RMartinhoFernandes or SFINAE
 
Ell
:P
is inheriting from a template generally a bad idea? (have never heard this... just seems it)
 
5:09 PM
There's a very common pattern that involves exactly that.
CRTP.
 
Ell
oh god that confuses the hell out of me
I tried to use it for static polymorphism for cross platformed-ness once. Didn't work. It made me sad :(
 
Fuck trees.
 
Ell
walk sky
sing house
(verb) (noun)
 
@Ell inheriting from a template is just fine, and common
 
Ell
kk :)
 
5:12 PM
@classdaknok_t If you love 'em, fuck 'em.
 
Ell
I still don't understand why the compiler can't infer whether a function is const or not? as long as it knows what things are const/not const on primitives (int, bool, etc.) then can't it just keep looking down the chain? and if any operations aren't const the function isnt const?
 
@Ell const is a logical thing.
A function may not change anything, but still be a modification.
 
Ell
what do you mean?
In what case is that?
 
Consider a file class, that has nothing but an OS handle for a file.
file::write is not const, even though it doesn't change the data in the class.
 
Ell
ahhh yes of course
this keeps happening to me - after I grasp a concept, I just forget it a month later
maybe my brain is full o.O
 
5:15 PM
Apr 26 at 19:13, by class daknok_t
If I have a class that stores some of its state on disk, and I have a member function that modifies the state on disk but not the state in memory, should I mark that member function as const?
And context.
 
@Pubby Woah I see a lot of FUD going on here... where should I start?
 
@stdOrgnlDave you cannot do that. You cannot dereference a void pointer.
 
:)
 
@classdaknok_t You get a void&!
 
@RMartinhoFernandes you getn't.
 
5:16 PM
:)
 
:D
 
:5
 
Pubby y u interrupt smiley golf.
 
Ell
for c++, should we use sqrt from cmath? or is there something else?
 
5:17 PM
@Ell yes.
 
@classdaknokt y u interrupt smiley golf.
 
Ell
kk. the c part of cmath put me off :P
 
50 mins ago, by Pubby
Hmm, if process is using tons of memory but not swapping that will obviously hurt performance but can CPU still show up as being used 100%?
This is correct. Thrashing memory will show up as CPU usage.
 
Yay
 
@Ell Or if you're a unix guy and tend to remove all vowels from identifiers, in which case you want to use girl::sqrt.
Okay horrible, horrible pun.
 
5:19 PM
48 mins ago, by Mooing Duck
@Pubby usually if there's no swapping happening, memory doesn't affect performance much/at all.
um... no...
 
Ell
haha no i like it :)
 
@Pubby fu xD
 
it takes SOOO long to dereference 16770000 pointers
 
48 mins ago, by std''OrgnlDave
@Pubby if you've ever started swapping your memory, well, you'd know the answer is 'the program will become unbearably slow and still eat up all my CPU time'
No, when a process is swapping, it doesn't use any CPU. So a process that's thrashing virtual memory will be using a lot of disk, but very little CPU.
 
@classdaknok_t Sometimes you only remove them from the end, i.e., creat.
 
5:20 PM
Unless it has some other threads that aren't blocked by the I/Os.
 
@RMartinhoFernandes and sometimes you don't remove any of them. open.
Oh the consistency.
 
50 mins ago, by Mooing Duck
@Pubby there's small effects from the L1-L3 caches, but not a lot
Depends on what kind of effects. Performance? Yes. CPU consumption, no - at least not directly.
 
@RMartinhoFernandes btw I'll be on vacation in Portugal in August. Any interesting places I should be visiting?
 
Ell
c++, y u no double ^ int ?
 
I'll be in Lisbon.
 
5:23 PM
@Ell double xor int?
 
@Ell Just use pow(your_double, your_int)?
 
49 mins ago, by std''OrgnlDave
@MooingDuck he said there's tons of memory. lots of memory can mean fragmentation which can mean thrashing in some cases
If you're talking about fragmentation on the page level, there will be no effect. This is because the hardware prefetchers are not allowed to prefetch across page boundaries.
 
@classdaknok_t you will probably check out the in town elevator
 
@Pubby Zing!
 
Ell
@FredOverflow ahh - that worked thank you
 
5:24 PM
@classdaknok_t Sorry, I live in the North. I don't really know Lisbon, other than the usual tourist attractions everyone visits.
 
@Ell ell y u no stop complaining and modify free compiler with new language extension.
 
it took 33 seconds to dereference my 16 million pointers just 1000 times
 
@RMartinhoFernandes ah k.
 
@Ell alias icanhaz="sudo apt-get install"
5
 
@stdOrgnlDave that's 2.0625 ns per dereference. Oh pointer dereferencing is slooww!
 
Ell
5:26 PM
@sehe I knew it wasn't right :P
 
@sehe OMG, now I finally get it! There was a joke in there.
 
I apt-got clang yesterday!
 
@classdaknokt it is when there's more pointers than there is cache space. and since I'm walking backwards through the chain, the cache has a harder time predicting when I need another page
 
@classdaknok_t 3.1?
 
@Mysticial Thanks for the clarification.
 
5:27 PM
:3563301
% clang -v
clang version 3.2 (trunk 155826)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
@RMartinhoFernandes but that was a joke. I don't use apt-get to get clang, the Debian package is outdated.
 
Ell
brb guys
 
sudo apt-get install clang installs clang 2.9.
 
Damn, GCC 4.7 (release) ICEs building clang on 64-bit.
 
clang y u build using libstdc++.
@ScottW did you eat a chicken today?
 
Thanks for telling me.
 
5:31 PM
@ScottW Deep vein Thrombosis , sounds so wrong
 
I really appreciate it
 
@ScottW So you ate chicken? You… you… inhuman dog! Your legs hurting is the punishment you deserve!
Wait, I ate chicken too today xD
I'm an inhuman chicken!
 
lol
 
@ScottW what? Eating your granny? 3:
:P
The way it should be.
 
what's your guys' favorite Epic Rap Battles of History? sound off. I vote for a tie between Mr. T vs Mr Rogers, and Einstein vs Hawking
 
5:40 PM
@stdOrgnlDave Hitler vs. Vader.
 
Kernighan Vs. Ritchie ?
 
I'm using 2gigs of pointers ATM
there's a kernighan vs ritchie?
 
no there isn't
@classdaknokt the first or second?
 
@stdOrgnlDave I don't know. I don't watch ERBH.
 
5:43 PM
sigh
how can you not watch that
 
I dislike rap. I prefer heavy metal and screamo.
 
@stdOrgnlDave A friend showed me the one of Hitler vs Vader once.
I was forced to watch it!
I'm a heavy metal chicken!
 
@classdaknokt Wasn't that done in sonic ?
 
@Dev2rights I don't know.
 
5:46 PM
come on, "Hawking: I'll be dropping mad apples on you from the shoulders of giants" "Einstein: I'm the giant whose shoulders you'd have stood on, if you could stand!"
 
Making fun of paralyzed people isn't a good thing to do.
 
watch the video
 
and, by the way, NOT joking about paralyzed people is kind of worse
 
200ms out of what? It makes a bit of a difference if the program took 210ms to run in total, or if it took 6 hours. We also don't know which version of your compiler you're using, or which flags you're compiling with. So we really can't say much more than "well, I guess your compiler generates different code when std=c++0x is specified, eh?" — jalf 2 mins ago
 
5:47 PM
though the way einstein does it is certainly tasteless
 
lol, 9 upvotes in 2 min.
 
but it's a rap battle, so it's OK
 
Ell
the police are my favourite band
 
What genre?
 
Ell
but if the band is called "The Police"
 
5:51 PM
since you're so sensitive, here's one without jokes about paralyzed people
 
@stdOrgnlDave you see the strike-through, right? That means that I say something I don't really care about. Besides, I'm from the Netherlands :P.
 
I thought the strike-through was to indicate it was wrong
 
Ell
I don't know what genre - i'm not good with music :P Rock?
 
OK now I'm confused
why does it take the same amount of time to dereference 2 gigs of pointers as it does to call a trivial function that just sets a pointer to itself
 
@Ell give me a link to youtube.
 
5:55 PM
English rock with reggae and jazz influences
 
sounds fun.
 
Ell
 
Sting isnt my cup of Tea, give me some classic Ska from teh 80's instead
 
@sehe alias kthxbye="exit"?
 
Ell
I love sting!
how can you not :P
Muse is also another of my favourites
 
5:57 PM
i love message in a bottle , but i know i just dont like his voice, odd i know
 
@Ell I don't like it, but it's not bad.
 
Ell
yeah message in a bottle is really good
 
grawr, still doing this wrong
 
@ScottW I liked Bring Me the Horizon xD
 
Ell
is there a difference between english & american rock?
what is an example of american rock?
 
6:03 PM
0
Q: Displaying floating point variable as a hex integer screws up neighbouring integer

StackerI have this simple program #include <stdio.h> int main(void) { unsigned int a = 0x120; float b = 1.2; printf("%X %X\n", b, a); return 0; } I expected the output to be some-value 120 (some-value will depend on the bit pattern of `float b` ) But I see 40000000 3FF33333 Why is ...

 
@Ell just the amps^^
 
AHHHHHHHHHHHHHHHHHHH!!!!!
 
@Ell american rock is gray instead of grey ;)
 
I like Amon Amarth, from Sweden.
 
What's the current subject?
 
Ell
6:04 PM
ahh american rock hurts my ears :'(
 
@EtiennedeMartel Music.
 
Ell
nah it's not that bad really :P
 
Ell
yeah
 
@Ell an American band could even make English rock.
They won't do it well, but it's possible.
 
6:05 PM
@classdaknokt Debateable
 
@Dev2rights as always with music, which is highly subjective.
 
^ Technically, that is post rock.
 
Ell
I love 80s music so much
 
@EtiennedeMartel nice.
 
@classdaknokt yes but american's rarely do a good accent , and as it is subjective it is always written to include the artists expression
 
Ell
6:07 PM
@ScottW did you live through the 80s?
 
From the 90s. Watch your subwoofer.
 
Ell
i love the song "somebody that I used to know" - Gotye
 
Ok another newbie question , well more of a clarification, i was of the belief that switch statements when compiled down to binary are more efficient than using if statements when dealing with a large set of constants, is this correct ?
@classdaknokt listening, haven't got m laptop connected to my studio monitors so wont matter :)
 
Ell
@Dev2rights It might be? IIRC it uses a lookup table - not sure. I will google :P
 
@Dev2rights You'd have to look at the assembly your compiler is putting out, but I would imagine they're pretty much the same anymore
 
6:10 PM
@Dev2rights switch statements can be easily compiled to jump tables. For if statements this is more difficult, but certainly possible.
 
optimizers are pretty good at that sort of thing
 
@Mysticial yeah, a shame it's just a comment ;)
 
@Dev2rights I would look at the assembly code if you want to know it.
 
@classdaknok_t Interesting, reminds me of Tool in some way.
 
Thanks, thats more definitive than what i understood
 
6:11 PM
@EtiennedeMartel
> Peach supported the band Tool on the European leg of their tours throughout 1993-1994 after the release of Undertow, and then released an album, Giving Birth to a Stone, themselves.
 
@Dev2rights Yes, that's correct. Lemme pull out a recent answer I made about it.
 
@Ell Then you'll love this:
 
Tool and Peach made similar music, yes. Peach's now called "Suns of the Tundra", if I'm right.
 
Well, damn.
 
Ell
6:11 PM
34
Q: Switch vs if-else

Zing-What's the best practice for switch vs if for a 30 unsigned enumerations where about 10 have an expected action (that presently is the same action). Performance and space need to be considered but are not critical. I've abstracted the snippet so don't hate me for the naming conventions :p // n...

 
wtf is up with this, why is it illegal to grab the value of data pointed to by a pointer, take that and stuff it into another pointer
 
@stdOrgnlDave code please
 
Ell
@FredOverflow
" This video contains content from WMG. It is not available in your country." :'(
 
@FredOverflow Maybe because that "pointer" is about 1.7 million levels deep written by a mega-star programmer.
 
@Ell cool , ill note that might save me some FPS or be the same , i am happy with that :)
 
6:13 PM
int i = 42;
int* p = &i;
int* q = &*p;    // should work
 
@ScottW their early logo was awesome.
lol
 
@classdaknok_t The logo reminds me of something, but I can't quite put my penis on it.
5
 
Ell
I need to bypass the youtube block!
 
I have some band shirts, but not many. One from BFMV, one from Slipknot, one from Slayer (though I don't know where it is) and one from Amon Amarth.
Oh and one from Iron Maiden.
@Ell YouTube block? D:
 
Ell
@classdaknokt I mean country wise - I'm in the uk and I cant view content from WMG (wherever that is :P)
 
6:16 PM
Ah, I see.
 
posted on May 03, 2012 by Herb Sutter

I occasionally get asked about whether, or how well, Visual C++ supports C99. This week, I just posted two replies to this questions on UserVoice (merged below). Last fall, I also answered it in an interview with Dr. Dobb’s (recommended for some rationale discussion). The short answer is that Visual C++’s focus is to support [...]

 
here is the basis of my problem. pptr = (unsigned long long)*our_ptr; pptr is of type unsigned long long, our_ptr is void *, and the error is "expression must be a pointer to a complete object type"
 
I still want a pair trousers with chains on it.
@ScottW I don't like that. :P
 
Since we're talking about metal.
 
@EtiennedeMartel nice!
And of course you can't have any heavy metal without some classical music.
It's live so it may sound a bit weird.
 
6:22 PM
METAAAAAL
 
Ell
what is everyones favourite solo piano/classical song?
 
@classdaknok_t OMG this is gay. Nice, but gay.
 
@FredOverflow I don't care.
 
@Ell can we post contemporary classical ?
 
@Ell not sure if it counts, but I like it:
 
6:24 PM
@Dev2rights You can post whatever you want.
 
Ell
yeah contemporary classical is fine :)
 
does anyone happen to know if robocopy or xcopy are faster than copy on windows?
 
@Ell If you like piano, perhaps you should take a look at The Köln Concert, by Keith Jarret.
 
This makes me always happy
 
@Collin Why don't you benchmark yourself?
 
6:26 PM
@FredOverflow I'm working on it, but the files are huge
If someone already knows, it would be nice
but i'll post results
 
then for pure classical darkness youtube.com/watch?v=bv5fvmbv6jE&feature=fvst
 
The hardware will probably be the bottleneck, I don't think it'll matter much.
 
@FredOverflow That's my guess as well, but I figure maybe xcopy or robocopy might do more or less buffering which could affect it
although they're probably all doing DMA underneath anyway
 
I would guess so.
@Dev2rights Somehow that sounds like metal, but without the electric guitars :)
 
@FredOverflow ive used the rifts from Hoslt loads when doing music production, true dark sounds
@ScottW im now getting some more phillip glass thanks
 
Ell
6:30 PM
woahh part one is 26 minutes :O
 
@Ell classical is how you get your monies worth :p
 
@Ell Yeah, but listen to the whole album.
 
@Ell This guy is funny, he mumbles while he plays:
 
Ell
I am learning to play Moonlight Sonata 3rd Mvt. Atm
but my piano playing is novice at best :P
 
@ScottW i listen to a lot and listened to a lot of philip glass ages ago just has been a while :) Thanks
 
6:33 PM
Don't worry, we're all novices on some thing or other. Most prominently, C++ :)
 
Ell
I love against all odds by phil collins :)
 
@FredOverflow thats no joke , im still reading the strasutrop book :p
 
@Dev2rights The strasutrop book? You may have a bootleg there :)
 
6:35 PM
its real either that or Amazon has started cheap pirate knock offs, ill blame my code errors on Amazon in which case :p
 
Ell
@ScottW noooooooooooooooooooooooooooooooo
 
@ScottW i fell for that so il redeem the conversation youtube.com/watch?v=RRMz8fKkG2g
 
I just figured out what std::ofstream("/dev/tty") << "Hello, world" << " Hello, world\n"; does. I've got to admit, I'm a little surprised.
 
the sound of soldiers faling in battle
 
@Dev2rights too much pathos
 
6:38 PM
@all Dinner time , thanks for the music and the switch clarification, biab
 
Ell
I must go! bye bye peeps :)
 
Gah, thunders are so loud.
 

« first day (565 days earlier)      last day (4385 days later) »