« first day (775 days earlier)      last day (4172 days later) » 

Xeo
1:02 PM
@kbok #define int (1) BOOST_PP_CAT(/,/)!
 
@Xeo better yet
 
@Xeo What's the catting for?
#define int (1),
 
int -> (1) //
 
Are you sure you can build comments with the preprocessor?
I think not.
 
Probably not
 
1:06 PM
Comments are replaced in phase 3.
 
Xeo
@R.MartinhoFernandes That's what I was trying to do with the concatting.
 
Macro expansion is done in phase 4.
 
Xeo
Damn.
So yeah, comma it is.
 
What's 1 and 2 ?
 
@kbok Decoding and replacement of \-newlines.
 
1:08 PM
mkay
 
1:26 PM
not so different from immoral #define, a colleague of mine told me that the operator,() can be overloaded and that it is particulary perverse... i have not tried...
 
good morning gents
 
afternoon
guess you're east coast US somewhere, right?
 
Xeo
@StephaneRolland Overloading operator, can make for some funny syntactical constructs, like std::vector<int> v; v += 1,2,3,4,5;
 
as I wrote my comment, I did a check and saw horrible things on SO about voluntarily overloading it :-)
 
#define REAL_COMMA , void(),
 
1:32 PM
@TonyTheLion oh yeah, Montreal... most of you are Europeans?
 
i hesitated to wish you a good lunch
 
@emartel yea a lot of us are.
there's some US citizens around later in the day.
and @EtiennedeMartel who is also from Montreal
 
and @Borgleader too
it's kinda weird, 3 game developers from Montreal...
 
You're all suck poppets, obviously.
 
our true identity has been discovered!
 
1:37 PM
lol
 
I'm gonna correct R. Martinho Fernandes classe which has a tiny bug IMHO :
classe le_vecteur { privé: taille_t la_taille; publique: taille_t taille() const { retourne celui_ci->la_taille; } };
 
this was translated wrongly?
 
It was not translated.
 
yep, it was funny however
 
@TonyTheLion It was just written as some French speakers pronounce "this".
 
Xeo
1:39 PM
I get the feeling I'm missing something about that quote. :|
 
Which quote?
 
"zisse"
 
oh right
 
Xeo
The le_vecteur one.
 
1:40 PM
@Xeo It was just a way to make use of zisse in pseudo-C++.
 
Xeo
Mhm.
 
#define zisse this
 
Xeo
other way around
 
meh, you can see I don't do hash define often
also, I don't seem to write that much code these days
It seems they rather have me configure build servers, edit xml files
 
1:41 PM
What's wrong with pronouncing this as "zisse" ?
 
didn't know you needed a c++ dev for that kind of thing
but hey, live and learn
 
@kbok not English
 
How should you say it then
 
@kbok th is not pronouced z. it's not the same sound
 
1:43 PM
Well, do you actually expect everyone to do that weird d/z/s sound
 
yes
because that's the language
 
th is not a weird sound, it's the same as though, think, thorough, etc.
 
@DeadMG yeah but in French we really don't have this sound
 
thought we were speaking English?
 
for a lot of French people, thought sounds like sought
 
1:45 PM
Though and think/thorough are different ths
 
@DeadMG not everybody is born speaking English :)
 
@CatPlusPlus No, they're not.
 
You can mock us when you're able to do proper "r".
 
Yes, they are.
 
@kbok Oh gawd, you're awful. There is no z sound in "this" or "the". I don't know how the heck do French people hear that. You should all get your ears checked.
 
1:46 PM
@emartel No, but the word they are trying to speak is in English, so fuck French.
 
One is /ð/, the other is /θ/.
In English, the digraph ⟨th⟩ represents in most cases one of two different phonemes: the voiced dental fricative (as in this) and the voiceless dental fricative (thing). More rarely, it can stand for (Thailand, Thames) or, in some dialects, even the cluster (eighth). It can also be a sequence rather than a digraph, as in the of lighthouse. Phonetic realization General description In standard English, both in Britain and the United States, the phonetic realization of the dental fricative phonemes shows less variation than for many other English consonants. Both are pronounced either i...
 
@DeadMG So, you don't know English, either?
2
 
@DeadMG what I'm saying is when you never have to produce certain sounds, it's hard to do it when you actually have to. I'm sure if you had to speak Korean you wouldn't pronounce words properly unless heavily exposed to it
 
It's either /θ/ or /ð/. Not the same at all.
 
If you pronounce though as ffough then you're weird.
 
1:47 PM
@kbok @DeadMG or a Dutch r. Or g. Or schr. Or ei. Muhahahahaha!
 
@CatPlusPlus there is the same difference in arabic, with the letter dhal and I don't remember the other one's name
 
@kbok I am. I can mock you.
 
What's funny is that people from Quebec can't properly speak English and can't properly speak French according to people in France :D
 
@R.MartinhoFernandes I know :( I was addressing the puppy.
 
they speak french, but have a huge accent, and some really different expression and words
 
1:48 PM
The robot was addressing you
So am I. I can do proper r in a variety of dialects. Yay
 
@sehe I am addressing you right now
 
@StephaneRolland hehe I know, and with GSP, who's probably one of the biggest international mainstream figure (with Celine Dion I guess :P), it shows how bad some of us can be at pronouncing English :)
 
@kbok Whooo
 
@emartel I didn't know anything about GSP 30 seconds ago :-)
 
@StephaneRolland haha really? I guess mixed martial arts aren't a big thing in France
 
1:54 PM
@R.MartinhoFernandes I'm a native speaker. It's hard to argue that I don't have sufficient knowledge of English
 
@emartel Is that a sport that is not football? Then, no, it's not a big thing in Europe.
 
@R.MartinhoFernandes I thought petanque was big in france ;)
His accent improved over the years :) youtube.com/watch?v=xjS6SftYQaQ
 
quoting Wikipedia may as well be quoting the C++03 Standard on export
 
Record yourself pronouncing though and think.
 
1:57 PM
ahh nice, it keeps the same name in English en.wikipedia.org/wiki/P%C3%A9tanque
 
@emartel indeed I'm not really in fighting sports ;-)
 
 
@R. :-)
 
@StephaneRolland too bad, you had a great K1 fighter in Jerome Le Banner :) en.wikipedia.org/wiki/J%C3%A9r%C3%B4me_Le_Banner
 
2:11 PM
@emartel first time I hear the name :-)
 
@StephaneRolland oh well... :)
 
morning all
haven't been here in weeks
 
morning sir
ahh crap, un autre de Montreal :P
Nice to meet you, I'm new here :P
 
yeah I was going to ask about that
 
good morning, netcoder
could I interest you in a discussion about strncpy?
 
2:23 PM
@emartel: J'étais là en premier!
actually I wasn't the first, but before you anyway ;-)
 
hehe
 
I have banned strncpy from my c++ coding
 
@melpomene: you could try I guess
 
Maybe in the C room
 
@StephaneRolland That's a good idea.
 
2:26 PM
@netcoder: ok, so why did you bring up std::string and POD types earlier?
 
@melpomene: I guess I took your comment as if C strings were to be entirely avoided in C++
 
I didn't even mention C++.
 
@melpomene: well no, but the question was tagged c++
 
True. I still think in C by default.
 
2
Q: What type of declaration is this?

OmkantExtending from this question I am having trouble to understand this code. struct foo myfoo; // --> Is it forward declaration or object creation. ? struct foo { int a; }; int main() { return 0; } In the code marked arrow --> Is it forward declaration or object creation. ? If that ...

hmmm
that doesn't look like a forward declaration to me
 
2:34 PM
@kbok: I don't think there's a C room anymore
 
but I'm not experienced enough in C
to know
 
@TonyTheLion: It's an object definition.
 
@TonyTheLion: would be if there was a typedef before it
as it is, no it's not
 
Xeo
@melpomene Should give incomplete type error.
 
@melpomene so like my answer said?
except that it's not valid, because the struct definition is in the wrong place
 
Xeo
2:36 PM
I mean, you can do stuff like struct foo* pf;, but struct foo myfoo; requires a complete object.
Or should, anyways.
 
@TonyTheLion: yeah, although compiler will complain because struct foo is an incomplete type at this point
although a pointer to an incomplete type would be valid
 
@netcoder: The issue is that gcc does not complain.
 
maybe it's a gcc extension or something, no idea
according to the standard, it's illegal AFAIK
 
gcc has a compat mode for C. It's what we can call a tentative definition here.
 
ah
that makes sense
shall I add that to my answer?
 
2:40 PM
ooh, I didn't know you could extern incomplete_type foo;
 
Sure
Also you can remove the statement saying it's a bug. I'm pretty sure it's not. :)
It takes more than that to find bugs in gcc.
 
@kbok ahhhh.. right
 
@kbok: Hah, not in my experience
 
I always forget that C allows that
 
e.g. gcc used to erroneously allow bitfields of (function) pointer type
 
2:44 PM
meh another funky rule
 
aww, looks like my favorite gcc bug got fixed: gcc.gnu.org/bugzilla/show_bug.cgi?id=20140
 
this doesn't help, this is code copied from MSDN, which is not helpful. — woohoo 2 mins ago
troll or not troll?
he just went in and downvoted every answer except the accepted answer
with the same damn comment
 
@melpomene hah (long live keyboard fails :F)
 
@melpomene I love this:
> Confirmed. This fails since gcc 2.95.3 or earlier 2005-02-22 12:56:16 UTC
> Heh, this "new" bug still exists in 4.3.0. 2008-03-13 09:28:35 UTC
 
Xeo
> This is terribly broken as of today. Request.Browser returns Mozilla17 for Firefox 17
 
2:51 PM
> On it. I see what's going wrong, fixing it should be relatively easy. 2012-01-02 00:42:34 UTC
 
Yeah, long live eternal bugs.
 
@Xeo combo breaker
 
(that's all from the same bug by the way)
 
@IDWMaster In the vast, vast, vast majority of cases, inline assember won't beat intrinsics
 
Xeo
3:00 PM
// aa.bb.2001 temporary fix
// xx.yy.2011 temporary my ass
 
int $42 = 0; int main() { return $42; }
 
If I want to have a function that returns a std::vector<myfoo> in a DLL, do I need to explicitly instantiate that specialization and add an export attribute or something? Or is doing this just absolutely fucked up?
 
Xeo
Exporting templates is fucked up, AFAIK. :s
 
@R.MartinhoFernandes I don't quite recall, but I think it's le fucked.
refer to the MSDN page on __declspec(dllexport) and it will list the restrictions/etc.
 
Yeah, I thought so too.
 
3:10 PM
I think that exporting the function is OK.
 
But won't using it have the potential to end up with different instantiations or something?
 
yep
if you export it, then it's your job to make sure caller and callee are using the same version of the Standard library headers and not doing any funky shit like specializing it or different definitions or some crazy shit like that
 
Yeah, I'll just avoid going down this road for now :)
 
brum brum
 
So the only ABI safe alternative would be to write your own opaque wrapper (effectively some pimpl shit), right?
 
Xeo
3:14 PM
VS2010+ has #pragma detect_mismatch(...), which is also used in the stdlib to provide error messages for static linking. I don't know if that works with DLLs too, but may be worth investigating.
 
Hi all, regarding the answer I posted: stackoverflow.com/a/13628368/942596. If i implement a cast operator, do I need to explicit use c-style cast or static_cast to invoke it?
 
Not unless your mark it explicit.
 
@ahenderson You never need c-style casts
 
@ahenderson why don't you just write it and try?
 
Xeo
@ahenderson An implicit cast operator will always be invoked if you have Angle and need a float in your case.
float x = Angle(...); // invoke operator const float() const
 
3:16 PM
"implicit cast" :-(
 
Thanks, Xeo.
 
Yes, why do you want to remove the singletons? They might be the most appropriate pattern. — user1158692 1 min ago
kek
 
Hi, anyone know some books about Linux Virtual Memory?
I need to wrote some kernel module that interact with VMM
Or some PDFs, whatever
 
I think I can simply move the ABI a level down. There I use ABI-safe stuffs and return pointers and shit, and the headers have inline wrappers that make the ABI-unsafe stuffs for proper interfaces.
@TonyTheLion Why is it that singletons, game engines, and managers are so often together.
 
because the all suck?!
 
3:27 PM
I wonder, too
 
what does manager even mean.
 
Collection, container.
 
do you even lift
 
Except if you look at it in a dictionary.
 
I come to the conclusion that IRL, anyone with the word manager in their title has no idea what managing even entails
 
3:28 PM
But in programming, "manager" often means container.
 
in programming yes
I'm talking about the people definition
 
Xeo
@kbok lol
 
real life managers that hide behind their computer all day, every day are NOT managers
managers should talk to their personnel
 
@TonyTheLion With whips.
 
you can't manage a group of people by hiding behind a computer
that's a dev job
 
3:30 PM
@R.MartinhoFernandes nope. it also means domain logic
 
@R.MartinhoFernandes no, with your mouth and words
@Abyx it also means, I suck at naming things and I will give generic names to things
I should mention that I'm in a bad mood
 
@TonyTheLion is it wrong to name a manager "manager"?
 
managers suck
 
Xeo
@Abyx What does "managing" stuff entail?
 
@Abyx So, basically, "this is where the stuffs go"?
 
3:32 PM
...like a ConnectionManager - a thing which manages network connections
 
Xeo
And what does "managing" a connection mean?
 
That description is not very descriptive.
 
Connections
std::vector<connection> connections
even better
says everything you need to know
 
@Xeo accepting connections, etc
 
Xeo
@Abyx Single-responsibility principle?
 
3:33 PM
@Xeo who cares
 
Xeo
I just noticed that hitting Esc when you got a plink is clearing that little circle.
 
I call that an acceptor, or a listener.
 
Xeo
Damn, how did I not notice before?
 
@Xeo Always did.
 
3:34 PM
That's damn useful
 
@Xeo ohh nice
 
Xeo
I always either manually clicked them away
Or wrote a message which also auto-clears them.
 
yep me too
 
Yeah, that's what sucking means.
2
 
Yes, I know, I suck.
 
Xeo
3:35 PM
Shaddup, furniture.
Anyways, afk buying stuffz.
 
furniture? is it broken and can only be used this way?
uhm... sorta "second life"
 
@Xeo Make sure you manage them.
 
/** Stuff manager
 * Manages stuffs.
 */
class StuffManager {
public:
    Stuff BuyStuff(StuffType type, Money cash);
    Money SellStuff(Stuff thing);
};
 
it's nice that when you sell stuff you actually sell a copy :D
 
3:40 PM
@R.MartinhoFernandes it's not a "stuff manager". it should create stuff to be called its manager
 
@emartel Unless Stuff is a shared_ptr
 
@Abyx What do you think BuyStuff does?
 
@Collin that kind of breaks the joke
 
I think StuffManager should contain the stuff aswell
 
@R.MartinhoFernandes uhm... it's weird if stuff is created every time you buy it
 
3:41 PM
@emartel We never make jokes. This StuffManager is serious business.
@Abyx How do you think stuff you buy in real life comes about?
 
Anyway, my point is that you can call any goddamn thing a "manager", and that tells you right about jack shit about what the fuck it is.
And, 100%, what it does will have nothing to do with actual meanings of "manage" (and there are lots of them!).
 
@R.MartinhoFernandes nope. you still don't understand what "manager" is
 
Well, because it is such a clear concept, obviously.
 
fuck manager anything
it sucks
 
Well, in a game engine, the AudioManager will pretty much handle occlusion, keep references on playing sounds, allow queries on anything that has to do with audio... I don't see how it tells you "jack shit" about what it does
 
3:44 PM
you can't be a decent gamedev without such important knowledge...
 
@Abyx you're a game dev?
(just wondering)
 
@emartel Erm. Where is all that in the name? Because it has "audio" in it?
Certainly not because it has "manager" in it.
Unless you take "manager" to mean "does stuff".
 
@emartel are you trying to offend me?
 
How would you name it?
@Abyx I guess
 
I just got an email from someone asking me to answer their ruby question... um...
 
3:45 PM
@R.MartinhoFernandes give me an example how you would structure that
 
@emartel I have no idea. That does not make "manager" any better a name.
(Also, it's hard/silly to name things with a clear spec)
 
posted on November 29, 2012

Every bug is different, so saying something that applies to the act of debugging requires finding something general to say about a bunch of unrelated specific cases that defy generalization by their very nature.

 
well, it's "general culture" in gamedev that managers are collections/namespaces for everything that has to do with what goes in front of "Manager"
 
@emartel I know that.
21 mins ago, by R. Martinho Fernandes
@TonyTheLion Why is it that singletons, game engines, and managers are so often together.
 
@Abyx what's offensive about being a gamedev by the way? :P
I see
 
3:48 PM
Another name for classes for everything that whatever is "god object" (well, "god class" would be more accurate).
 
anyway, I'm a "manager" so I don't know what I'm talking about :)
 
Hence ResourceGod, SoundGod, GraphicsGod, etc. Much more descriptive.
 
"Lets initialize the Gods!"
 
@emartel Why put all of those things in one class? That's way too many.
 
Manage all the things!
 
3:51 PM
@DeadMG define "all those things"? You mean the queries along side the data they're meant to query?
 
What's up with the pink? Is it barbie day?
 
audio occlusion handling- that's one job
 
pink is manly
 
loading audio files- that's another job
keeping references to loaded audio data- that's a third job
 
Looks like it is, there's a ssBarBee here :p
 
3:52 PM
@kbok Wut
 
What a coincidence
 
Yeah.
I should have played lotto today
 
AAARGH PROLOG
KILL IT, KILL IT WITH FIRE
 
oh no you back into Prolog?!
 
3:54 PM
no
 
@DeadMG so for you all these "jobs" are defined as what? global namespace functions that work on global namespace collections?
 
Btw, just in case it is not clear: namespaces are a C++ feature. You don't need to emulate them with classes. That's what they do in Java.
 
#define TEMPLATEMATRIXCR template<class T, int , int >
 TEMPLATEMATRIXCR Matrix<T, R> operator* (Matrix<T, int, R> a, Matrix<T, R, int> b);
who the fuck does that ^
 
It's also not the second millenium anymore, just in case your compiler does not support namespaces.
 
@R.MartinhoFernandes I know that
 
3:57 PM
Java has two halves of an ass for namespaces: packages and static methods/static inner classes
 
"two halves of an ass" - isn't that just... an ass.
 
@TheForestAndtheTrees They're two left halves, though.
 
@TheForestAndtheTrees not if you don't have two MATCHING halves
 
Whereas C++ namespaces is a plain smooth lady butt
 

« first day (775 days earlier)      last day (4172 days later) »