« first day (312 days earlier)      last day (4641 days later) » 

8:00 PM
Besides, who cares, you can ignore tags.
 
"warning: control reaches end of non-void function"? WTF? That's a constexpr function! There's nothing there but a return! Screw you GCC.
 
@RMartinhoFernandes Can I see the code of that expression?
 
template <typename T>
static constexpr T impl(T t) {
    return ((t & (static_cast<T>(0xFF) << (CHAR_BIT*(I-1)))) << (CHAR_BIT*(N-I)))
         | ((t & (static_cast<T>(0xFF) << (CHAR_BIT*(N-I+1)))) >> (CHAR_BIT*(N-I)))
         | swap_bytes<N,I-1>::impl(t);
}
CHAR_BIT is not defined.
And GCC flips out.
 
Nice... log a bug against the compiler
 
@sbi Never accepted doing anything because someone else said that I should
 
8:04 PM
I logged one once because of a misleading error message (even if the correct bits were there, there was also some spurious message) and it got corrected with time
 
lol
seems someone managed to piss off @sbi
:(
 
@TonyTheTiger You're sad? You should be happy that he is not pissed off at you!
;)
@hexa Yeah, Google told me.
 
@RMartinhoFernandes oh I"m happy about that :)
LOL at the tag line :)
only @puppy could say something like that
lulz
I'd say it the opposite way, but yea... guess I"m a tiger and not a puppy
 
8:09 PM
lol
 
so have we all left then?
I guess I can now go browse reddit/r/foreveralone :(
 
sbi
@DeadMG You should fail your courses.
@TonyTheTiger No, I was just brushing my teeth.
 
Trying some reverse psychology?
 
sbi
Good night everybody!
 
Is that a greeting or a goodbye?
Good night in any case.
 
8:14 PM
so @RMartinhoFernandes what did you do today?
except chat
 
Er, nothing special. Work, eat, those kinds of things.
 
More chat!
 
lol
so I'm confused
 
About what?
 
I want to use sprites to create my tetris game using Qt and OpenGL
but the sprites have to be moving within a subrect of my form
not sure how I would define the subrect in which they should be contained?
and is the class that should contain my OpenGL initialization code?
the class representing my subrect
 
8:19 PM
Well, you probably want to use a GL widget and use GL to draw them.
 
so I did create a class called tetris_canvas deriving from GLWidget
so this should contain my openGL init code?
 
There are virtual functions that are called when necessary, read the docs.
 
@TonyTheTiger To misquote one of my favorite Dilbert's ever: "I have proactively collaborated regarding the productization of my tiger team's priority matrix." Oh, and I wrote some code too...
 
initializeGL, resizeGL, paintGL.
 
Ell
8:28 PM
can someone give me the names of a few techniques to write cross platform code, as in, polymorphic classes for each platform etc.?
i just need some names that i can look into
when i google i just get pages about what it is and why and libraries etc.
 
Stay away from compiler extensions. Beware of compiler non-conformance. Don't use any system calls directly.
Hmm, I probably shouldn't be doing bitwise operations on signed types, am I right?
Hah, this is what std::make_unsigned is for :)
 
@Ell Sure. I call my favorite technique 'Bob'
 
Ell
bob?
 
Yeah, why not?
It's as good a name as any. And you were asking for names.
 
8:42 PM
What if the technique is female?
 
it isn't
 
2
Q: When is a shared library considered to be "the same" for the purpose of sharing?

Johannes Schaub - litbI'm wondering... When I'm starting a program X that uses a shared library A, and while the program runs, I modify the shared library on the disk, and run another program Y that depends on the same shared library. Will that program Y will use the already-in-memory version of the shared library, or...

 
But if it were, I'd probably have called it... hmmm..... Sara, I think
 
@JohannesSchaublitb I think libs are memmapped
in unix
so, if you modified in disk, it will get updated
 
Er, wouldn't that give disastrous consequences?
 
8:45 PM
No, it's not updated by changing the file.
That's why you need to restart services after update.
 
I know, I am talking about the Y program
in his question
it will get the "fresh" version
 
That's not really related to executables being mmaped.
Meh, I'm sleepy, I probably should just shut up.
 
9:39 PM
Damn, I'm leaking rep.
 
Lol, that guy.
1
Q: Why does the constness of a reference affect whether it can be initialized with a variable of a different type?

AjeetWhy does this code fail to compile? double d ; int & i1 = d // Compilation FAILS While this one does? double d ; const int & i = d // Compilation Succeeds Please, I am interested in knowing what was in mind of C++ designers that they allowed one behavior while disallowed anoth...

"Whoops, I just posted completely irrelevant code, sorry."
 
What a mess he made.
3
Q: Can I get away with this C++ downcasting fib?

Josh HabermanI have a C library that has types like this: typedef struct { // ... } mytype; mytype *mytype_new() { mytype *t = malloc(sizeof(*t)); // [Initialize t] return t; } void mytype_dosomething(mytype *t, int arg); I want to provide C++ wrappers that are basically syntactic sugar. My gene...

 
10:01 PM
WTF, ReCaptcha keeps getting weirder every time. I'm having difficulties filling their new CAPTCHAs.
 
That's because captchas are meant to keep robots away, R. Martinho.
Only R. Daneel can gork them captchas.
Nice pic:
 
Why do people like to keep their requirements a mystery when asking questions? Then other people provide good answers that turn out to be wrong when the mystery requirement is finally revealed.
I hate this.
 
like what?
 
The question I linked above.
Q: "I came up with this crazy scheme to do what is basically syntax sugar. Is this valid C++?" A: "Well, this is a better solution." OP: "But I don't really want just syntax sugar, I want a lot more and your solution will not work."
 
the fun fact is
his hidden requirement doesn't invalidate silico's solution at all
the cast he wants to do is actually still valid
 
10:15 PM
You're right.
 
of course I am, I'm a Genius™
your point in general is of course well taken
 
My excuse for not realizing that is that I was very pissed off by the whole episode ;)
 
that's fair enough
 
Did he post that question twice? I recall adding a comment with "Premature optimization" Knuth quote, and link to an XKCD strip, but I can't see it now. Do moderators go in and remove topical comments, and if so, can one see that it's done?
 
don't know
 
10:20 PM
Usually, they only remove long "discussions that are not relevant" (according to some criteria).
Or spammy stuff.
 
but they get a lot more zealous about comments recently
 
I never saw an episode of a comment like you describe being surgically removed.
But you never know.
 
Well it was just like
Maybe someone is really sharp and noted that Knuth in turn attributed this quote to Dijkstra.
Hah.
 
Hmm, I don't see it in your activity page.
 
0
Q: Calling member function of zero data struct which was cast from incompatible type - Undefined?

Jeremy SalwenThere is a forward C struct declared in an unmodifiable header. I would like to "virtually" add convenience member functions to it. Obviously my first choice would be to extend the struct and add the methods to the derived class. No-can-do, as the struct itself is declared as "forward" in the h...

 
10:25 PM
Ah, it was a lot earlier.
 
It sort of reads like the same question.
 
Great, now he accepted a not so correct answer (wrong for C++03, correct for C++11, I think).
I should go to sleep.
 
night night
 
I don't know what this Google talk video is really about, but someone posted it on FB.
 
is it just me or there's no audio?
 
10:39 PM
I hear audio
I found out what it is
 
oh, there is now
 
"Your Brain at Work: Strategies for Overcoming Distraction, Regaining Focus, and Working Smarter All Day Long [Hardcover]" by that guy
 
Your brain at work: derp.
 
Anyone understand how to make memory in .NET that isn't protected?
 
10:53 PM
Protected as in managed?
 
I'm having problems with memory I've created in C# being inaccessible in C++. Even though I have done it before the same exact way in another sample project. I don't understand what could be different between the two.
 
There's a method to allocated unmanaged memory from C#: msdn.microsoft.com/en-us/library/s69bkh17.aspx
That what you're looking for?
 
you might have the memory being moved by the GC
 
Not memory allocated with Marshal.AllocHGlobal.
That's really unmanaged memory coming from LocalAlloc.
 
@DeadMG I can see the data in debug on the native side, I just fail when accessing it?
NVM
ZOMG
 
11:11 PM
14
Q: How can I not snap people's necks (or only snap it a little bit)?

Ian PugsleySo the wall-punching augmentation (in the Cybernetic Arm Prosthesis augmentation tree) allows you to punch through weak walls, but will automatically have you snap the neck of anyone standing on the other side of them. Am I correct in assuming this will ruin a pacifist playthrough? Is there any...

 
Good night everyone.
 
11:31 PM
snap his neck a little bit
lol
 
11:45 PM
Ok, I figured out what to do.
I have to use an unmanaged data area and marshal back and forth into my struct.
Which is funny, since the work was routine.
I used a template to do it for me.
Which means my template is named...... drumroll...... UnmanagedStructManager
 
rofl
 

« first day (312 days earlier)      last day (4641 days later) »