« first day (459 days earlier)      last day (4475 days later) » 

Xeo
10:00 AM
It was fun though
And I learned that void()const is a GNU extension. :(
 
sbi
10:38 AM
If I didn't get so many e-mails and IMs from colleagues throughout the day, it would be a lot easier to play Halo while working from home :)
 
I hereby declare myself proficient in the black art of Kerberos.
but at what cost, I wonder? I don't know if I'll ever fully recover
 
@sbi you just waking up?
 
sbi
@thecoshman No, but I just got to work.
 
10:45 AM
@RMartinhoFernandes conspiracy :O
@sbi I'm working real hard; waiting on people ¬_¬
 
If you're reading/writing to an int from two different processes and the int is in a memory mapped region (which both procs access), I need to synchronize, right? Even if the underlying read/write is implemented as single mov instruction. (I did look at the assembler)
 
Windows guarantees something about atomicity of int reads and writes I think.
But you may still need synchronization for other reasons.
Atomicity only guarantees that you won't see half of a write: either all or nothing.
 
like the fact I have multiple cores on my machine?
 
reads/writes of well-aligned data types (at least up to sizeof(double) are guaranteed to be atomic on x86 and most other architectures
 
> Simple reads and writes to properly-aligned 32-bit variables are atomic operations.
But, for example, i++ is not a "simple read" nor a "simple write". It's both.
 
10:53 AM
@RMartinhoFernandes yea I know that
 
volatile would be a valid solution here too, it seems
 
the other thing is, the int in question resides inside a struct with many other members
 
@TonyTheLion So, whether you need or not to synchronize depends on what you're doing with the int.
 
the entire struct is a shared thing
int f = s * 0x10000;
	int x = p_struct->shared_int &= 0xFFFF;
	p_struct->shared_int = x + f;
this is one of the things I"m doing to this int.
 
sbi
@RMartinhoFernandes Yeah, saw that yesterday, too. Good one, but netter yet was this tweet about it: "Investigative journalism at its finest." Haha!
 
10:56 AM
It looks dangerous to run that without more guarantees.
 
p_struct is shared between two processes
 
sbi
What about missing memory barriers? Are writes to mapped memory guaranteed to write through the cache?
 
I guess that would depend on the OS.
And you probably want to access mmapped data with volatile.
 
sbi
@RMartinhoFernandes So would volatile. I think only MS extended its meaning to include some sort of thread-safety.
@RMartinhoFernandes Oh, that is true, indeed.
Anyway, gotta work...
 
anyone else get an email from Daniel Visser?
 
11:05 AM
> Memory mapped files are completely thread safe. Any number of threads can access one or more file views with read and read/write access.
from here
 
@awoodland I did. Two.
Got the first one last thursday, and a reminder this morning. A reminder that I didn't fill his survey. Seriously.
 
hmm
 
@awoodland who is that?
 
Some dude that sent me an email asking me to fill out his survey.
 
some student at at tue.nl doing a (masters?) dissertation on Stack Overflow community
 
11:08 AM
A survey on what he calls "commercial open-source development".
 
I'm glad I didn't have to mark that research methods essay
 
From the description it appears he meant "open-source development on top of proprietary platforms".
Which is totally not the same thing.
 
 
1 hour later…
12:18 PM
@awoodland Oh! I just saw the title and assumed it was spam
 
12:36 PM
Hmm, why is valgrind claiming std::string is leaking?
 
@RMartinhoFernandes some crazy optimisations?
 
I didn't specify optimizations.
 
but it might just be the way your library implements it confuses valgrind
there's a large ish suppression list for false positives with valgrind, but if that's older than the library it reports lots of junk
 
Well, it's just 49 bytes in 3 blocks.
(Very small program though)
 
If you new std::string("hello"); then Valgrind will report both your code and std::string as leaking. (Not that I think you are leaking the string object. Just sayin.)
 
12:39 PM
I allocate three automatic strings.
 
what does it show for a full leakcheck?
 
I should show the stack trace of the allocation.
 
Oops, pasted twice for some reason...
 
Not sure if relevant here, but increasing --num-callers=<number> gives you longer stack traces.
 
is it O(1) memory? I.e. does the amount lost go up if you do more stringy things?
 
12:43 PM
@StackedCrooked No, doesn't help, that's all the trace it shows.
@awoodland Testing.
@awoodland Seems to be O(N).
 
You were using GCC 4.7 if I remember well. Perhaps it's a bug.
 
@awoodland Ah, that sounds like it.
I shall test.
@StackedCrooked I'm using 4.6.2 now.
 
@RMartinhoFernandes I just tried on my Linux box and Valgrind doesn't show any leaks.
 
Hmm, GLIBCXX_FORCE_NEW doesn't help :(
 
12:49 PM
~/Development/Playground $ valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 test
==15936== Memcheck, a memory error detector
==15936== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==15936== Using Valgrind-3.6.1-Debian and LibVEX; rerun with -h for copyright info
==15936== Command: test
==15936==
==15936==
==15936== HEAP SUMMARY:
==15936==     in use at exit: 0 bytes in 0 blocks
==15936==   total heap usage: 30 allocs, 30 frees, 3,681 bytes allocated
 
The string is inside a structure with more data, and that structure is allocated dynamically.
 
Perhaps you are leaking :D
 
But I would expect the trace to point to my code.
Oh, dammit.
 
by 0x418C482: (below main) (in /lib/libc-2.15.so)
 
I got it. virtual dtors.
 
12:50 PM
Ha!
 
I'm releasing my memory, but never call string's dtor.
 
I think -Wall or -Wextra might report this.
 
I thought -Wextra did
 
No, it's -Weff-c++
 
how's it automatic storage though if it's not calling that?
 
12:52 PM
Sadly, that one is too noisy.
@awoodland struct base { int x; }; struct derived : base { std::string s; };
 
woah didn't know about -Weffc++!
 
@RMartinhoFernandes Yep. I use cppcheck for extra checks.
-Weffc++ isn't very useful in practice.
 
> in use at exit: 0 bytes in 0 blocks
Solved (with a static_cast, mind you, I don't need polymorphism) :)
@StackedCrooked I just installed it. How do I see the results?
Checking dict.cpp...
1/2 files checked 69% done
Checking prog.cpp...
2/2 files checked 100% done
This is all it gave me.
Does this mean my code is perfect?
2
 
That's good then.
cppcheck --enable=style --template gcc . 1>/dev/null
 
brace your selves
http://www.reddit.com/new/
nothings comming
 
1:00 PM
how will I get the promoter badge now?
 
Reddit still online?
 
For less than 4 minutes.
@StackedCrooked Hmm, it seems to not be aware of new syntax.
I shall give it a try anyway.
 
You mean C++11 syntax?
 
That could be.
 
1:02 PM
Initializer lists seem to confuse it.
 
@StackedCrooked bad gateway 502 :(
 
Indeed.
 
@thecoshman Still working here.
 
The really took it down down. Not just a sopa banner. But down!
 
@StackedCrooked It's still up.
 
1:03 PM
@RMartinhoFernandes ¬_¬ tell me how!
 
~40 seconds.
 
I can load it on Firefox but not on Chrome.
 
@RMartinhoFernandes huh... I'm out of time
 
Time's up. But the thingy is still up.
 
@RMartinhoFernandes refresh, and it will be gone
 
1:05 PM
Perhaps router cache or something.
Or DNS.
 
Refreshed a bunch of times with cache bypassing.
Can only access the front page though.
Any other reddit link I click just brings me back to it.
 
It still works on Firefox, and not on Chrome :D
 
@rmart well, if I got to say /new I just get to the reddit.com with a 502
 
Anyway, time to work now!
Chop chop.
 
I'm surprised they didn't do a custom 502 page to say WHY they are down
 
Xeo
1:07 PM
wtf. Why do I get an error in shared_ptr<T>::swap when I have a member where T is an incomplete type in the class definition? -.-
 
Likely it's an accident.
 
@thecoshman But they did!
WTF kind of Internet are you guys accessing?
 
user142019
Today is boring with all those sites down.
 
Xeo
Oh, wait, I know why.
 
user142019
I hope the API still works.
 
user142019
1:11 PM
4chan does something original at least.
 
@RMartinhoFernandes The same as me:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/0.8.54</center>
</body>
</html>
 
Well, I get a pretty page explaining everything :P
 
SOPA sabotaging DNS ? hehe
@RMartinhoFernandes It's stands for 'Warning: eff-ing c++' (colloquially known as 'farking c++')
@RMartinhoFernandes it means that either the software has given up on telling you how wrong you are, or it just prefers watching you find the bugs on your own
 
@RMartinhoFernandes I get the content, but not the style -- ugly black text on white blackground.
Oh wait it 'works' now.
 
@thecoshman just a hunch, using opendns?
 
1:20 PM
Cool, so my Internet is the only one that is still working.
@LucDanton Oh, and yours too.
 
@LucDanton Here too. It was a glitch
It was n - g jinxed
 
lol
The Wiki carries a banner on top but it's still usable, for those of you who don't want to work.
 
@RMartinhoFernandes huh... took a while for that to show up then. for a while I was just getting a plain 502 error pages
The http://flickr.com protest is actually brilliant; you can censor /other people's/ photos with no due process -as per SOPA. #sopastrike
2
 
user142019
Just tried it and it works.
 
Xeo
Great. My transition from SDL -> SFML was rather easy. The good news is: it all compiles fine and shows a window. The bad news: The window is empty and black oô
 
1:33 PM
@WTP darken ALL the photos
 
user142019
You can only darken up to 10 photos.
 
user142019
After that, you must create a new account.
 
@WTP any one fancy getting clever with a script ¬_¬
 
morning
 
user142019
Anyway, the author of the photo had "congress" in its name. That was enough reason for me to darken it.
 
Xeo
1:36 PM
Oooh, I see why my SFML window is black. It also takes part in the SOPA protests. >_>
 
1:47 PM
right
 
@Xeo sfml?
 
sbi
@Xeo SFML?
 
Simple Fast Media Library.
 
in what magical way does sfml differ from sdl?
 
is it simple, fast, both or neither?
 
2:00 PM
It's fast, but it's not direct.
 
huh
I'll just take your word for that
 
sbi
@jalf It's also media.
 
@sbi SDL is also media.
 
No, it's layer.
 
user406009
Quickly, I need a logo to represent C++11.
 
user406009
2:02 PM
Anyone know where I can find one?
 
Quick, I just gave so few fucks I think I hurt my self
sorry, I think I might have been a bit harsh with that one
 
yeah
they're supposed to be "flying fucks"
 
AFAIK there is no standard C++ logo
 
user406009
It's fine. Manners don't exist on the internet anyways.
 
but images.google.com does link to some
 
user406009
2:05 PM
All I get pictures of are guns and girls.
 
user406009
 
like I said, there isn't really a set logo for C++, let alone C++11
 
@RMartinhoFernandes That static_assert is wrong and that just ruins the picture for me.
 
2:09 PM
:2397413 "bells and whistles" are way to hide shit
 
user406009
I already know the stuff on the poster iteslf is a horrible design.
 
@EthanSteinberg oh a poster, that's what shitty logos where made for!
 
@RMartinhoFernandes I see what you did there ¬_¬
 
@sbi but is it multi media?
single media is so 80's imo
 
2:23 PM
@jalf I think polly media has a much better ring to it
 
sbi
Hey, @thecosh, there's been four tweets from Debbie today, and only one reply from you? Are you slacking?
 
@sbi ¬_¬ fine, let me come up with some drivel to say to her...
 
Oh, @thecosh replies to Debbie?
 
sbi
@thecoshman Not that you had problems to reply something dull so far.
 
Hey guys, I'm starting out with Qt creator and I have a few questions.
 
2:32 PM
@RMartinhoFernandes and get response back :D
 
Xeo
@thecoshman SFML is C++, SDL is C
 
@Xeo you say potato, I say potato
@sbi happy now?
 
sbi
@thecoshman I wasn't unhappy before. (Did I mention your replies weren't particularly witty?)
 
user142019
@Xeo I see, the FML part is because of C++?
 
@sbi nor is the original content ¬_¬
 
sbi
2:36 PM
@thecoshman Most isn't, but the few pearls among them are worth the rest.
 
@sbi that they are :D
 
> If C++ isn’t your cup of tea, I completely understand; you’re a wuss.
2
 
@RMartinhoFernandes epic, where is that nugget of gold from :D
 
A comment in a stupid rant about C++0x from 2008.
I have no idea why I kept reading, but it was worth it.
 
@RMartinhoFernandes Link?
 
Dang.
 
@RMartinhoFernandes well played :P
 
Is there a way to get the Google Cache version?
 
Just found it :D
 
2:49 PM
0
Q: C++ return by reference multiple times

user788171I have been using return by reference to try to speed up my code and avoid multiple expensive copy operations. I have an access member function that looks like this: std::string const& access_element(int index) const; If I have another member function that calls access_element(), do I...

Misguided by (or even more likely, no benchmarks).
 
user406009
@RMartinhoFernandes I bet most of the people ranting against C++ in those comments never used it that much.
 
wow, it's impressive how little rep there is to be gained from kerberos-related questions
 
@EthanSteinberg Yeah, that's common in the Internet.
 
both of mine have got like 3 views over just as many days
 
2:56 PM
@jalf lol, trying to put your new superpowers to good use?
 
not that it matters. One guy found them and answered
@RMartinhoFernandes no, I was trying to gain them
was asking a few questions to get it working
 
Oh, I thought you had declared yourself "proficient" or something.
 
@RMartinhoFernandes looks like trolling pretty much. I'm continually impressed at how much changed without breakage
 
sbi
@jalf: What happened to that letter of yours to the SE Overlords? Did you sent it?
 
Any thoughts on having modifiers for members that are the same as their type versus their expected types?
 
2:59 PM
hey, D doesn't have namespaces
 
@awoodland Yeah, if you look at the list of breaking changes, it's almost everything some contrived corner case.
 
sbi
@JadziaMD I just read this four times, and I still have no idea what you are talking about.
 

« first day (459 days earlier)      last day (4475 days later) »