« first day (90 days earlier)      last day (4841 days later) » 

4:00 PM
ok, another API question
I've got a bunch of classes where the only public constructor is a reference to another object
should I just ditch it and have like, Child child = master.CreateChild(), rather than say, Child child(master);
damn
why do I keep using master and child, rather than parent and child or master and slave?
 
@DeadMG I dislike factories, but if it's going to suppress a bunch of constructor arguments, go for it. I'm suspect though.
 
well
I also dislike factories
but I'm suspect of constructors where the only parameter is a reference to another object
I guess though it makes it more consistent, because there are some cases where I need two references
 
@DeadMG oh I see. This is a good advantage. Passing parent object sucks.
 
well
I was thinking that I would do both the object groups and per-object bool for visibility
 
You probably want the 2 ways, I believe.
 
4:05 PM
and it occurred to me that suddenly, all my objects want an object group and a paret
even though the parent is already in the object group
I also need to go through and change all my getters and setters
 
@DeadMG makes sense if you restrict your scene to a single root node.
 
no
the scenes are independent- there's no single-root here
there's a single master render class that handles like, the Direct3D Device, and that kind of thing
but apart from that
you can have whatever scenes you like
I was also thinking of allowing subscenes
 
@DeadMG right, but a scene has a single root node, doesn't it?
 
of what?
the scene is not a graph
that's it
it is a list of objects to draw
 
@DeadMG ahhh ok. I always think of scenes as graphs :(
 
4:09 PM
I am the human cdecl. My super powers are...
 
well
apparently, 3D scenes are graphs and you have to traverse them somehow
 
@AlfPSteinbach I've made no personal comments whatsoever. And if you'd paid a bit more attention to the conversation, you'd see that there was a good rationale to say that we don't know the return type was non-ref. It was not clear. The term that the OP used is the same one that even the standard itself sometimes uses in a context where it means returning a reference. So, yea. That's the last I will say on the matter.
 
@DeadMG the advantage of having a graph is that you can multiply transformation matrices when rendering, and doesn't have to keep a global xform matrix for each object if you don't want to.
 
but that's not my experience of rendering them
 
@CharlesBailey ... supposed to be only used for good. Too bad my therapists took them away.
 
4:10 PM
jweyrich, I don't get it
you're suggesting that I define an object's position as the previous object's position * a transform matrix?
that's quite ridiculous
faster to build the transforms from scratch
and way less error-prone
I'd run into loads of transform accumulation problems
 
@DeadMG suppose obj1 is at 0,0,0, and obj2's position is relative to obj1. How do you achieve that? You need to somehow multiply their xform matrices to place obj2 in the right place. Think of a solar system, where a planet orbits the sun.
 
Do you guys mind voting on the best answer on stackoverflow.com/q/4691608/176769 so I can close it and move on?
 
yeah
so when you set the position initially, you just do obj2.Position(obj1.Position() * my_transform);
 
@karlphillip, upboat complete.
@DeadMG, just wondering, what is your rationale for having visiblity in a group and at the object level?
 
@MooJuice thanks
 
4:17 PM
well
consider that I'm playing an RTS, and I have an options menu
it's pointless to recreate all those buttons every time the user asks for the menu
so you stick them in one group, and the main 3D scene in another
then on menu button press, you just add the menu scene to the main 3d scene
 
oh I see
I am getting confused with your terminology.
 
why?
 
Scenes in scenes :) I am used to scene nodes. Each scene having a single root node, and then everything else a child of that root node, or a child of another node. So, one would just hide the parent node and all children would automatically go with it.
 
well
if you wanted, you could create a graphical construct of them
 
@karlphillip Done. Charles' reply is OK. Upvoted.
 
4:20 PM
but obviously, sometimes, you will want to control visibility at the object level
 
@DeadMG, if objects can be children of objects you only ever need it on the object level :)
 
no, no, no
scenes are just groups of objects
they're not objects in their own right
what are yu gonna do, make a new scene containing just one object so you can control it independently?
 
I have no idea, I am not writing your API :) You asked why I was confused with terminology, I've just told you what i am used to, hierarchies of objects (or rather, scene nodes) and where/how visibility got set in that environment. Not bashing your API whatsoever. :)
 
lol
I haven't finished designing a lot of it
mainly, I can't work out if I want to use run-time inheritance or just a #define and some typedefs for an abstraction
 
what kind of objects are we talking about?
 
4:25 PM
uh
a button, some text, a mesh, a font, a texture, an instance of a mesh
 
@DeadMG by traversing a plain list, you'll have to compute each xform matrix independently. Suppose you have a relation of parent -> child -> subchild. To render it, you'll need 6 matrix multiplications instead of just 3, because you have to multiply the parent matrix to render a child. This assuming you're using relative positions. If you're not, then you should, because otherwise you'll get in a hell dealing with matrix updates when you change a parent's matrix.
 
the current objects aren't related in any way at all
 
Hm, I get notified of Tomalak's message when includes ref to me. So, "ignore" is not "ignore completely", it slips through with direct references, and in transcript.
 
@DeadMG oh, forgive me. Ignore everything I said then.
 
more importantly
I already implement a mesh instance that holds it's own transform matrix
as D3DX provides a function to decompose
I can implement get/set on a cached matrix
rather than recomputing each frame
or rather
I could do if I felt that it would provide a substantial performance benefit
 
4:27 PM
@DeadMG, cool. When I was doing some 3D coding I had a single object in which you could add/remove components to induce behaviour (MeshComponent, MaterialComponent, LightComponent, SoundComponent, AIComponent, etc). Made it very easy in an editor to plonk custom objects in and get them to do shit :) Probably nothing like you're doing :)
 
@Alf i will upvote your meta bugreport
 
me too.
 
@DeadMG, missed that bit about shared memory, lol.
 
so did I
yes
my 3D library is mainly aimed at, well, myself
and thus is really aimed at small-time development
 
4:36 PM
@Alf wow Jeff Atwood deleted your answer xD i just notice now
 
he can't do what I did either
because the function pointers won't be valid in other memory
 
@JohannesSchaublitb 2 Bad. Then I'm probably soon in punishment box for having insulted the code.
 
Here we go again!
 
@MooJuice: My main problem is that I realized that I'm not sure that my own game idea actually makes sense
 
@DeadMG, might be an idea to thrash that out before you code it then. If you're not sure, chances are players won't be either :)
 
4:41 PM
lol
I did thrash it out
I just lost confidence
 
Care to share?
 
well
initially I was going to use something like
a sphere in space, where the player controls a spaceship that's fairly similar in behaviour to, say, a jet
where the surface of the sphere is totally busted
kinda like a crushed car, but larger
but in space it's really dark
so the players would hide and seek amongst the ruins
but I realized that seeking would be way too risky, as you basically can't see the people that are hiding since it's much too dark
 
Hm.. about enabling some kind of light that has limited life, or only usable in certain circumstances to aid finding?
 
well
I was thinking of having independent lights
then I was thinking of moving the sphere so that it would be close to the Sun, effectively illuminating half and leaving the other half dark
but then, why would anyone go to the light side?
 
It could be spinning faster than normal, exposing a face for a brief time.
 
4:47 PM
i'm thinking infrared signatures, and some IR noise players could hide among, and shielding at cost
 
so you'll get a mad-rush every 5 mintes :P
 
well
I was thinking of making it spin
 
@Alf stuff i send to comp.std.c++ recently seems to not appear on usenet. is the moderation queue broken?
 
but how fast?
 
fast enough so that players have to keep moving to stay hidden in the dark, but not so quick that they have no reprieve
though the speed could be level-defined or something.
 
4:49 PM
@JohannesSchaublitb comp.std.c++ has never been fast, but I have an article lingering for about 2 days now
 
well what I had in mind was
moving emits light, and so does firing
so if you shoot at someone, you give yourself away
 
@JohannesSchaublitb they're using same server and mod software as clc++m and the mod queue is working AFAIK
 
i sent two post on 12 January and they didn't appear. then i resent them
 
but you also give out light so if anyone is hiding nearby they're illuminated
 
hmm maybe i should have waited some more :)
 
4:50 PM
It sounds like the kind of game that would be brilliant if done right.
But might be frustrating if done wrong.
 
hmm, I thought it sounded pretty fun
I spent quite a bit of time working on my lighting effects, as the whole gameplay is based around light
and there's a big plus side, which is that I don't need
e.g., reflections, water, that kind of thing
 
@JohannesSchaublitb you might first try just writing to the moderators (see banner at end of each article, the csc++ FAQ is not updated with right address). if not work, try contacting James Dennett. He's the one to update the FAQ, btw.
 
@DeadMG it's certainly interesting. I hope it creates new game-memes such as "light-stealing fags"
 
lol
well
it's been a VERY long time since a game set like that succeeded
so I'm a tad nervous
but then
I develop it for free in my spare time
what's the risk?
 
you've got nothing to lose, but everything to gain from knowledge of making a game.
So why be nervous? If you enjoy coding it, code it. If it works, it works. If it doesn't, use it as a launch-pad for your NBI :)
 
4:58 PM
lol
I already tried once
but I'd only been coding in C++ for about two months then
it was a tad ambitious
now a year later, I think I'm in a much better position
and with a much better compiler
 
There you go then. Key thing is not to give up.
 
my university
it doesn't do a module on concurrency
I r disappoint
still
api transformations go go go
 
Anyway, time to pick leave work and pick the boys up. See ya later peeps.
 
have funcakes
 
@Johannes: I just fired up TB and it seems csc++ has approved some articles, including one of yours (the one you waited for?)
 
5:11 PM
@AlfPSteinbach what's "TB"?
 
Mozilla Thunderbird
 
ohh
didn't know it can do usenet. nice!
 
@JohannesSchaublitb you know, sending emails is trivial these days.
 
@jweyrich not sure I understand what you mean.
 
@JohannesSchaublitb Thunderbird, Mozilla's email and Usenet client.
 
5:17 PM
@JohannesSchaublitb usenet works via email too.
 
0
Q: What is the performance of STL bitset::count() method?

anand.arumugI searched around and could not find the performance time specifications for bitset::count(). Does anybody know what it is (O(n) or better) and where to find it?

usenet "works via email"?
they are completely different systems
TB has a Usenet client built-in, though.
 
@TomalakGeretkal well, let me rectify my statement. Google Groups has a front-end that send out digest emails with usenet contents. See comp.lang.c++.moderated.
 
@jweyrich better ;)
 
@Alf ah i will look up. never used thunderbird. currently i use knode + gmail for usenet/email. I'm not up on all this stuff. I just found out about gmane :)
 
You'll need an NNTP server. I just the free news.eternal-september.org. There's also the free Italian AIOE, but it has lots of spam. If you're willing to pay just a few Euro's for quality service then there's a German service I used to use, I don't recall name, but very good (it was originally free, by some German university).
 
5:34 PM
ohh
 
Hello brothers and sisters by language :-)
 
I recommend mutt for mail and slrn for news.
 
hello Vlad
by the way, there's a charge for joining this family
gotta pay the upkeep, you know
it's just a couple hundred euros direct into my account
 
@johannes: the german server i was talking about, €10 per year, individual.net
@johannes: gmane is, of course, Norwegian. :-)
 
of course
 
5:43 PM
Can someone explain why argb = ((rgba >> 8) | (rgba << 24)) performs bit rotation?
 
2
Q: Is there memory area called 'stack' in C++ to store automatic variables

ajayIs there a specific area in memory called stack in C++ where automatic variables are getting stored.

litb^
 
@PierreAntoineLaFayette wan't it supposed to?
 
@PierreAntoineLaFayette because you told it to!
If you want an explanation of the bitwise operations there, you might be better off posting a question on SO proper.
 
@jweyrich I want to know why the A byte isn't lost during the first shift
@TomalakGeretkal ^
 
@PierreAntoineLaFayette >> doesn't change the rgba variable. it just computes the shifted bitpattern. expression, not modifier.
 
5:51 PM
@PierreAntoineLaFayette it should work. See codepad.org/Q3j0R20U
 
Because it's still there on the RHS
 
@AlfPSteinbach I understand now, my coworker just explained that to me. I was confused for a sec.
@TomalakGeretkal right
 
You're not doing rgba >>= 8; argb = rgba | (rgba << 24);
:)
 
Thanks guys :)
 
np Pierre-
see if you'd make this a real question, we'd all get lots of upvotes and rep
 
5:57 PM
I wanted a quick answer :)
 
@PierreAntoineLaFayette SO answers appear fast... really fast.
 
@CharlesBailey You're right :) I actually just interviewed a guy and asked that question then my coworker came in and told me it was wrong because the A byte gets lost in the right shift. Then I got confused. But I knew I was right!
 
oops
delayed comment there; SO chat was waiting for me to "retry". it was to go underneath "see if you'd made this a...". Oh well.
 
The current reputation system isn't something I'd rely to estimate knowledge though. Basic questions & answers get much more upvotes then advanced ones, because nearly everyone knows the basics, while few know the advanced. Yet, you're not supposed to vote on something you don't understand. Concluding, the reputation system is kinda bad.
 
@PierreAntoineLaFayette hehe
 
6:01 PM
Sanity is restored to the world
 
@jweyrich Any society-based system is inherently flawed, because society is flawed. We just have to live with the flaws. :)
@PierreAntoineLaFayette Please slap him in the face for me.
 
@TomalakGeretkal I profoundly agree :)
 
@jweyrich \o/
 
@TomalakGeretkal he's interviewing the guy right now. will do when he returns. and he even challenged me in front of the interviewee!
 
@jweyrich I think rep of some of the guys here (e.g. Johannes) constitutes counter-examples. but i agree with general observation that rep != knowledge. I think rep is in general just measure of activity * how long been here.
 
6:02 PM
@PierreAntoineLaFayette Cheeky cock. Go in and tell him now!
I find it interesting how SO thinks your first name is "Pierre-"
@AlfPSteinbach Absolutely agree.
 
@TomalakGeretkal he's also my team lead! He's pretty smart though, he just probably got confused himself. lol.
 
I prefer rep per question restricted to C++ category.
 
cough rather explains how you have 8k
 
My name is Pierre-Antoine
 
@PierreAntoineLaFayette Yes, I picked up on that.
That's why I think it's interesting that SO disagrees with you.
 
6:04 PM
I'll change my name to avoid the conflict
 
@AlfPSteinbach absolutely true.
 
@PierreAntoineLaFayette No, keep it! File a bug!
 
@PierreAntoineLaFayette meta.stackoverflow.com I guess
 
@AlfPSteinbach btw, did you already post the bug related to ignore? Couldn't find it.
 
6:07 PM
@jweyrich nope, sorry
 
@AlfPSteinbach no worries. If you don't mind, let me know when you do, so I can comment & upvote.
 
sbi
@MooJuice I don't get this. And @Konrad even twittered it. Am I too dumb?
@TomalakGeretkal I string my swear words together in whatever combination I want to!
 
6:28 PM
guys, please downvote:
1
A: template-id does not match any template delcaration

Johannes Schaub - litbPlease look at @Maxim's answer. This is a symlink I installed, because I can't unaccept my answer. Thanks!

 
@JohannesSchaublitb Does that mean that writing template<> is invalid for the full specialization? I don't grok.
 
heya guys, please check out my new proposal for a code review website: area51.stackexchange.com/proposals/11464/code-review
117
Code Review

Proposed Q&A site for feedback on projects you're working on, by sharing your code with fellow programmers and getting extensive feedback/review of best practices, design pattern usage, application UI, security, etc.

Currently in commitment.

 
@Alf his constructor definition later on is invalid. it shouldn't have template<>
@Alf i did a PR against clang that contains some explicit specializations and when/when not one needs to write template<>. I put the link into the other guy's comment section.
 
Is it possible to write things so that accepted by all common compilers?
 
@JohannesSchaublitb downvoting is always a pleasure.
 
6:38 PM
lol
i took care and made my answer CW. so you can put your phasers on death mode!
 
@JohannesSchaublitb smart move!
 
lol
@Alf I guess i would only know when trying to write a compiler why the spec requires template<> only when it's followed by a template<something here> and not when it would only be followed by others template<> all the way down
 
@JohannesSchaublitb I'd ask this at the bugreport you submitted to llvm. Hopefully they can answer.
 
i came to the conclusion that such questions most probably aren't answered at such places. the ones that really know seem to think "let the guy find out himself" :)
 
@RobertPitt Do you know refactormycode.com?
 
6:47 PM
@jweyrich i once tried asking such a question here: gcc.gnu.org/bugzilla/show_bug.cgi?id=29286#c179 . seems noone of those 11 gurus wanted to answer :)
 
@JohannesSchaublitb ouch. That makes me delusioned.
 
7:18 PM
@JohannesSchaublitb question of object starts life or ends life, i think it's simply that we know what we'd like the rules to express, namely that if you know what's there you can use it, but problem is then finding interpretation of abstract rules so that they express that simple POV. i think that means that rules are simply too abstract, too removed from what one wants them to express
 
Good evening. INFIDELS!
Actually it's lunchtime. But yeah.
 
@wilhelmtell Correct.
@wilhelmtell Incorrect.
 
7:47 PM
Guh, people are such dicks about protecting their inaccuracies.
Would it really kill you to use terms that match up with reality? Really?
 
the meaning of the term has changed
get over it
 
Just because you decide that it has?
Burden of proof is on those that want to change the term, and until it appears in a standard document, I don't see why it should change.
Burden of whatever
 
@TomalakGeretkal The term hasn’t changed, the implementation has. Nobody “decided” that, it happend.
 
more importantly
it happened because the STL no longer exists as a separate library
all the people who designed the STl, guess what? They work on the Standard libraries now
 
and until there’s a good alternative, I’ll keep calling it that because the alternative would be not invoking it at all
 
7:49 PM
The implementation changed, and so did the specification then.
Everything about it!
If you want to call the C++ Standard Library the "STL", then call the STL "the old STL".
How giving two separate things the same name doesn't strike you as bizarre is beyond me.
 
it's not bizarre
because I never refer to the original STL
ever
 
@DeadMG Just because something no longer exists means very little. We're in an age where we have fast access to historical information. You wouldn't start a colony and call it The Roman Empire just because the empire fell some time ago.
@DeadMG Then you're simply being selfish by propogating it. Other people do.
 
I could do if I wanted to
access to historical information doesn't make that information useful or relevant
 
I could go and read up ll about the original STL -but why bother
I have a perfectly good one provided to me as Standard
 
7:52 PM
Just.. wow.
Out of curiosity, DeadMG, are you a team leader?
 
of what kind of team?
 
A software development team of any kind.
 
I'm a student
I lead the team of my group coursework
 
Haha
This conversation is so over
 
you're right
 
7:53 PM
Good luck with your studies
 
the fact that I'm a student instantly invalidates my opinion
3
I'm glad that you no longer need to justify yours
 
I said nothing of the kind, but if you really believe that...
 
just because you didn't explicitly say it doesn't make it what you said
 
It's just that your youth explains the way you conduct yourself on my answers' comment threads. There's no need for me to continue trying to figure it out.
@DeadMG Er, what?
You wanna try that sentence again?
 
uh
I'm sure there should be a couple more negatives in there somewhere
 
7:54 PM
:)
Even adding the negatives, you essentially just admitted to taking something that I didn't say, and officially pretending that I said it.
 
heh
you sound like a lawyer
 
Maybe I am a lawyer.
 
there is that possibility
 
Indeed.
 
I considered becoming a lawyer once
 
7:55 PM
Probably wise that you didn't continue down that course. :)
 
but I found my country of origin's legal system to be so unbelievably ridiculous that I couldn't stand it
 
Hmm, I could guess which country, but most legal systems are utterly fucked. It's sad.
 
it is
 
I wish there were a legal system on C++ terminology.
Where you'd be utterly fucked up somewhere unpleasant if you got it wrong. :)
OK, I'm completely satisfied. Good night!
 
did you know that here, there's a definition of manslaughter which sums up as "killed someone but didn't mean to"
it's ridiculous
 
7:58 PM
Same here.
That's what it means.
 
nah
it's supposed to mean, murder but with various specific mitigating effects
 
In practice it's less of a punishment for accidentally killing someone, and more of a punishment for shooting someone in the head, where it cannot be proven that you didn't mean to just shoot them in the shoulder.
 
for example, diminished reponsibility via mental illness
there's some other one as well that I forget
 
It's also used as a similar-category offence to provide a lower charge for use in plea bargains.
 

« first day (90 days earlier)      last day (4841 days later) »