« first day (672 days earlier)      last day (4331 days later) » 
00:00 - 19:0019:00 - 00:00

7:01 PM
I'm not sure there is any way to academically bridge the gap between architecture and the programming language.
 
user4704
Perhaps. I've not given it much thought.
 
user4704
Thing is, it's not necessary or even always useful to know how the processor works in a lot of detail to be a good programmer.
 
user4704
Certainly there are concepts, such as cache coherency and whatnot, that you should understand.
 
user4704
But it's not like you want to be writing specifically to a specific chip these days anyways, in most cases.
 
and "a little knowledge is a dangerous thing" probably applies, too. You don't want to be making assumptions with processor archirecture y because you've worked with x :p
 
7:14 PM
@TreDubZedd yeah, when I went to school, we started with a real language, then took a circuits class, and then an assembly class
 
@TreDubZedd "enough" is always a dangerous word
 
It's not dangerous, in itself...it's just ambiguous.
And it's the ambiguity that is dangerous :)
 
LISP is close enough to machine code, for appropriate values of "enough"
 
we did functional programming and assembly as the first two languages at uni
 
@JoshPetrie agreed no one can truly get an in depth understanding of how the computer works with learning C++
 
7:17 PM
well, it's easier to illustrate concepts with C++ than with the other languages you'd teach to first- or 2nd-year CS students (Python or Java)
not so much how the hardware works, but how the software at the lowest level works
 
my uni seems to have a different idea of a cs course :)
 
I never learned assembly but in our systems class we were still expected to be able to disassemble programs and figure out how to exploit buffer overflows
 
@melak47 we started with Java and then went to C++ and then Assembly in uni
of course I prefer python (or C#) as the first language to learn.
never liked Java at all
 
@Gajet may I as why?
 
opal was the first language we learned, a homebrew functional language
 
7:21 PM
@JohnMcDonald I'm not sure why actually,
 
Good reasoning
 
but I think the biggest problem I have is that operators are not overload-able.
 
we start with either Java (normal intro) or Scheme (advanced intro, SICP)
 
opal and assembly first semester, java and C 2nd, more java and C in the third semester, yet more java and C in the 4th :)
 
@Gajet You know (one of) the reasons they don't allow that, right? To prevent programmer error
 
7:23 PM
also unsigned types. nobody knows what they do anyway :p
 
I went from VB, to C++, to C++, to Java, to C#, and then a little web thrown in here and there (ASP.NET, JSP, HTML, CSS, JS)
ITT focused a lot more on getting you skills to get you jobs versus understanding how it works under the hood (compilers, assembly, etc.)
 
@melak47 unsigned types are less confusing than signed bytes
 
Though it could be argued knowing that stuff is still quite valuable in a job - my job is high level enough I can live without the info
 
I don't trust programmers who have no experience in things lower level than Java
 
if I go way back, my history looks like this: php, then delphi, prolog, java, assembly, sql, opal, assembly, C, java, assembly, C, and I don't remember when I started using c++
 
7:28 PM
it's like a driver who doesn't know what Antilock brakes are for. They can drive normally just fine, but you can't rely on them when things go wrong.
 
You can't be a (good) programmer and be scared of low-level languages!
 
I know C++, I just don't know anything about it... if that makes sense
 
Mainly I was just trying to cash-in on the same kind of rhetoric that got one of my other comments starred.
 
I noticed :P
 
hmmm is that a guaranteed star?
You can't be a (good) programmer and be scared of snakes!
3
testing.
 
7:38 PM
You can't be a (good) programmer and be scared of not getting stars!
 
I've created a monster.
 
You can't be a good programmer and a bad programmer
@TreDubZedd I blame you :P
 
@Damir I've had worse.
 
Well jebus. They just added Braid, Super Meat Boy, and Lone Survivor to the humble indie bundle.
$8 average right now
 
yeah this is the Justice League of Indie Bundles
 
7:49 PM
wow, that's awesome
 
8 great games, 5 soundtracks, $8 (and that's if you want to go as cheap as possible!)
 
lol, @notch: $9,999.99
I guess he can afford it
Probably like 1hr's worth of work
 
Just a shame I have all but one.
 
Which one?
 
Lone Survivor
 
7:54 PM
I only had 3, but that's because I didn't really think I'd enjoy playing some of the others
 
I think I'm going to buy it for the music at least
 
8:15 PM
how can i multiply this lwjgl.org/javadoc/org/lwjgl/util/vector/Matrix4f.html with a float?
 
what do you mean, multiply it by a float?
what kind of matrix is it?
 
Two Guys From Andromeda are back together and are making a new game!
Hopefully there are people here who remember Space Quest :P
 
they have 300k+? I'm always surprised at the amount of "latent" money floating around in gamerland
 
8:35 PM
Are users really afraid of vertical scrolling on web sites?
 
I'm more afraid of horizontal scrolling
 
If you don't want vertical scrolling don't design me a form that only fits on an HD monitor
 
9:04 PM
@Jimmy me2
w8 vertical is the same scroll bar right of the windows right?
 
Titanium: All the fun of CSS, none of the documentation.
 
@Gajet - yes. Like to read old chat messages here you have to (vertically) scroll up
 
In mathematics, matrix multiplication is a binary operation that takes a pair of matrices, and produces another matrix. This term may refer to a number of different ways to multiply matrices, but most commonly refers to the matrix product. This article will use the following notational conventions. Matrices are represented by capital letters in bold, vectors in lowercase bold, and entries of vectors and matrices are italic (since they are scalars). Scalar multiplication The simplest form of multiplication associated with matrices is scalar multiplication. General definition ;Left...
 
@Chorche I know what matrix multiplication is
I'm asking why you want to scale by a float
 
1
Q: Importing 3D skeletal animations from .smd model

ChorcheI'm writing an .smd importer, and i'm stuck at the skeletal animation part. The problem is that i dont know exactly how it works. I'm using this this to write the exporter, but it doesn't show how to use the information stored in file. I imagine that all vertexes with the same bone id should be ...

vertexPosAnimated =
boneToWorld[0] * boneAtRest[0] * vertexPosModel * weight[0] +
boneToWorld[1] * boneAtRest[1] * vertexPosModel * weight[1] +
boneToWorld[2] * boneAtRest[2] * vertexPosModel * weight[2];
boneToWorld, boneAtRest and vertexPosModel are matrixes
and weight is a float
 
9:14 PM
what is vertexPosAnimated
vertexPosModel should be a vector, not a matrix
if it is a matrix, then weight[0] is a vector
 
@Chorche We're back to the same problem you had yesterday (and a few other times, here in chat). You need to provide context and question--not just one or the other.
(or neither)
So...what is it you're trying to do?
 
@TreDubZedd i asked "how can i multiply this lwjgl.org/javadoc/org/lwjgl/… with a float?"
 
Yes...but why?
 
@Chorche I'm 80% certain that's the wrong question
 
What is it you're trying to do that requires you to multiply (scale) a Java matrix by a float?
 
9:17 PM
You can multiply a matrix by a float, in the mathematical sense, but it makes no sense for 3D math
 
because i want to set mutiple bone for a vertex
so you want to say that the anwser is wrong?
 
no, I'm saying you dont' understand that formula you put there
one of those terms has to be a vector
 
no!
 
No, the question is wrong. You should be asking how to scale a matrix by a given weight...
 
okay
 
9:20 PM
A float, in and of itself, doesn't mean anything. There's no context.
 
boneToWorld[0] * boneAtRest[0] * vertexPosModel - matrixes
weight[0] - float
 
user4704
That does not make sense.
 
user4704
That means the result of that entire computation is a matrix.
 
user4704
Which is wrong.
 
user4704
Unless I misunderstand what you are trying to do here.
 
9:21 PM
No, @JoshPetrie, That's what he's trying to get.
 
user4704
vertexPosModel should be a vector.
 
Basically, you're trying to find a weighted sum of matrices, in order to apply that transformation to a vertex.
The variable names, in my opinion, do not correlate well with what's going on.
 
hmmm, okay I understand
he wants an interpolated transformation
I'm not sure this is how you'd go about it though
if you multiply a transformation matrix by a number, you screw up the W-values
 
Assuming your weights sum to 1, don't the resulting matrix's W-values work?
 
I'm not sure the relationships work out
since your bottom row values are implicitly multiplied by w-value
specifically the last entry might be an issue
I just did some napkin math, and you might be able to get away with Matrix4.Scale(weight[i]) * boneToWorld[i] * boneAtRest[i] * vertexPosModel
 
9:31 PM
Out of curiosity (since I've not done much 3D), what transformations could cause the 4th row to be anything but 0,0,0,1?
 
good question. I'm not sure
 
@JoshPetrie is there any difference between translating boneToWorld[0] * boneAtRest[0] by a vector, or translating an identity(vertexPosModel) matrix by a vector and then doing this boneToWorld[0] * boneAtRest[0] * vertexPosModel
 
user4704
"identity(vertexPosModel)" makes no sense to me.
 
user4704
You don't "translate" matrices.
 
@JoshPetrie i know
 
user4704
9:34 PM
Then why did you ask a question that makes no sense?
 
@TreDubZedd oh wait, Translations aren't affine, so any translation would be X,Y,Z,1 in the 4th row
 
the method is called "translate"
 
user4704
What method?
 
that's way i say that word all the timw
 
user4704
I don't know what that method does. Matrices do not (mathematically) have a "translate" operator so I have no context for what you're trying to do.
 
9:35 PM
he means interpret vertexPosModel as either a vector or a translation matrix from that vector
 
user4704
I think you need to brush up on your linear algebra. :|
 
@JoshPetrie i sayd that i know that
the method is called translate
that's why i always say translate
 
user4704
Well stop saying it, at least in general.
 
ok
 
user4704
9:36 PM
If the rest of these fellows know what you mean, you should probably continue to talk to them because they understand more about what you've been doing that I do.
 
I ignored the previous conversations
but as I said above, I'd try Matrix4.Scale(weight[i]) * boneToWorld[i] * boneAtRest[i] * vertexPosModel
 
"identity(vertexPosModel)" by that i wanted to say, that the identity matrix is called vertexPosModel. It's just a varname
 
vertexPosModel is always an identity matrix?
 
Matrix4f vertexPosModel = new Matrix4f();
vertexPosModel.translate(vertex);
 
That doesn't make sense. The multiplication boneToWorld[0] * boneAtRest[0] being the identity matrix does make sense.
 
9:39 PM
vertex is a Vector3f
 
@Chorche It looks to me like vertextPosModel should be a Vector3f.
 
yeah that's what I suspected
 
That is, vertextPosModel == vertex
 
Matrix4f.translate(vertex, vertexPosAnimated, vertexPosAnimated);
 
it smells like wrong, but he's converting all calculations into Matrix mode
including the original position
 
9:42 PM
Matrix4f.mul(bone.boneToWorldTransforms.get(2), bone.atRestTransform, vertexPosAnimated);
Matrix4f.translate(vertex, vertexPosAnimated, vertexPosAnimated);
is that ok?
 
ok, @Chorche, you're just spewing code without context, again.
what is bone.boneToWorldTransforms.get(2)?
 
it is a boneToWorldTransform that is stored in arrayList
 
Ah-HA! I think I see your problem.
Your output vertexPosAnimated needs to be a Vector3f.
Therefore, your input vertexPosModel also needs to be a Vector3f.
So, what you're doing is getting a weighted sum of vertex positions
(or, rather, what the StackOverflow answer is indicating you should do)
 
well, that's what I said, (and Josh said) earlier
 
Then I missed that, and I apologize.
 
9:46 PM
but Chorche is obviously trying to make everything a Matrix4 for some reason
 
@Chorche Stop doing that.
 
26 mins ago, by Josh Petrie
vertexPosModel should be a vector.
33 mins ago, by Jimmy
vertexPosModel should be a vector, not a matrix
 
Look at it this way: You have a transformation associated with each bone, which you are applying to a vertex. Once you have a transformed vertex position associated with each bone, you want to take the (weighted) average of all those positions.
 
so i have to:
Matrix4f.mul(bone.boneToWorldTransforms.get(2), bone.atRestTransform, vertexPosAnimated);
then turn vertexPosAnimated into a Vector3f, and then
Matrix4f.translate(vertex, vertexPosAnimated, vertexPosAnimated);
?
 
in short, no.
 
9:53 PM
why?
 
because vertexPosAnimated should not ever be a Matrix
Matrix4f.mul(bone.boneToWorldTransforms.get(2), bone.atRestTransform, vertexPosAnimated);

seems to imply that it is
 
how can i do this Matrix4f.mul(bone.boneToWorldTransforms.get(2), bone.atRestTransform, vertexPosAnimated); if the vertexPosAnimated is a vector3f?
 
you don't use Matrix4f.mul
or rather, there's so many bad things going on in that code, I'm not even sure where to begin
starting from the fact that you initially put the data for vertex into vertexPosAnimated and you immediately overwrite it with that Matrix4f.mul call
 
@Jimmy i dont
 
oh right, because of that second line
which does not do what you think it should be doing
 
10:00 PM
i do the Matrix4f.mul and then i do the translation call
 
yes, the TRANSLATION CALL makes no sense
why would you translate a transformation matrix by the position of the current vertex
 
just explain how should i do the
vertexPosAnimated =
boneToWorld[0] * boneAtRest[0] * vertexPosModel * weight[0] +
boneToWorld[1] * boneAtRest[1] * vertexPosModel * weight[1] +
boneToWorld[2] * boneAtRest[2] * vertexPosModel * weight[2]; part
because now you're just confusing me
 
okay, lets play detective.
1) boneToWorld[0] is a matrix
2) boneAtRest[0] is a matrix
3) boneToWorld[0] * boneAtRest[0] is also a matrix
 
yes
 
4) vertexPosModel is a vector. Lets make it a vector4 because that's easy to multiply with a matrix4
5) boneToWorld[0] * boneAtRest[0] * vertexPosModel is another Vector4, since VertexPosModel is a Vector4
6) weight[0] is a float
7) the results of [5], scaled by a float, remains a Vector4
we've just established that vertexPosAnimated is a vector4. if you ignore the W, it is a vector3.
 
10:05 PM
Note that, if W is 1, you can ignore W safely.
 
daah :D
 
(alternatively, converting a Vector3 to a Vector4 is done by making the W term 1)
(x, y, z) == (x, y, z, 1)
 
I'd guess W should be 1, or at least we should probalby be ignoreing it, since we're ignoring the camera transform matrix so we're not doing any perspective divides.
 
lwjgl.org/javadoc/org/lwjgl/util/vector/Matrix4f.html witch method should i use to multiply a matrix with a vextor4f?
 
transform
 
10:11 PM
ty
 
Vector4f convertedFromV3 = new Vector4f(v3.getX(), v3.getY(), v3.getZ(), 1);
Vector3f convertedFromV4 = new Vector3f(v4.getX() / v4.getW(), v4.getY() / v4.getW(), v4.getZ() / v4.getW());
 
this is one of those cases where lack of overloaded operators stinks
 
mul.transform(mul, vecPosMod, vecPosMod);
can i do this?
 
@Jimmy @TreDubZedd seems the pattern is working, You can't be a (good) programmer be scared of *
 
(store the result in the same vector that i was multiplying?)
 
10:14 PM
don't know, I've never used LWJGL before
 
user4704
You can't be a (good) programmer and not be me.
 
user4704
:D (worth a shot right?)
 
lies! although I'd support a weaker form of that statement and insist that your name begin with "J"
 
Hm...I don't have a 'J' in any of my names or aliases...I guess I'm out of luck.
 
you must be a terrible programmer....
 
10:15 PM
Depends on who you talk to.
 
maybe some people misspell your name with a J
 
Foreign Nationals who can't pronounce "Zedd"? Maybe.
I could go by "Jedd" in France, e.g.
 
@JoshPetrie there is only one big problem with that statement
it doesn't have the "scared" part
You can't be a (good) programmer and be scared of me!
that would be a better shot
 
You can't be a (good) programmer and be scared of being me!
 
user4704
You should be scared of me, I am mean.
 
user4704
10:18 PM
I make people cry.
 
Only when you tell them they can't play GW2 Beta.
 
@JoshPetrie then I won't send my resume to ArenaNet.
I guess I need some advise here,
 
user4704
@TreDubZedd All you gotta do is buy the game ;)
 
I think I need to make some changes into my project, since the whole structure now is kinda of a mess.
but the problem is I can't change the classes one by one
everything there depend on each other.
 
user4704
That is a problem, and you should fix it. This is why encapsulation and isolation are important.
 
10:22 PM
"everything depending on each other" is usually a sign of bad design
 
the problem is if I want to fix a class, I need to fix 3 or 4 classes at a same time, which will result in changing more than 1000 lines of code
 
have you run static analysis over your code?
 
user4704
But I do find it hard to believe that it's actually everything that depends on everything else.
 
let me see
 
user4704
So you can probably untangle a little bit that you can fix in isolation, and build from there.
 
10:23 PM
it can give you metrics on classes that depend on too many other classes
 
it's a little bit more complecated...
and the main problem is I don't know where to start with isolation
 
user4704
Ideally you start when you are initially designing things, but that ship sailed.
 
user4704
What is an example of something you're trying to change -- a small thing -- and what prevents you from doing so?
 
when I started that thing I didn't think it was going to be big at all.
and little by little I've added new features over each other.
which now resulted into a big pile of mess.
@JoshPetrie I've got two classes representing player.
one is doing everything regarding it's logic, and the other one is an information holder
 
looks like you need to spend some time refactoring
 
10:27 PM
and there is a third classes which controls those two and also draws players
 
that's not bad so far
 
it doesn't look bad at all.
but the problem is everything is controlled by hand in there.
there is almost no isolation and I can easily break the whole code with one wrong statement.
 
user4704
"Information holder?"
 
it's hard to visualize
 
user4704
Doesn't sound like you need three things for this.
 
user4704
10:29 PM
I'm going to a meeting, I'll be back later.
 
I've got two or three duplicates for everything, which I need to keep in sync and so on.
 
I'm going to a party, will not be back later
 
@JoshPetrie information like position or current hit point and so on. as I you suggest having 3 classes is wrong. But I can't really clear my mind to find out what I want.
and the main problem is I can't really separate access to class members, I think my whole code flow is just a mess :(
 
10:44 PM
@JoshPetrie is it a good practice to separate a class into two classes, for the sole purpose of isolation? In result everyone will get a pointer to parent class (which is holding data) and I put every other member (which should be isolated) into another which inherit that parent?
 
11:01 PM
vertex winding ordering is confusing 0.o
calculating normals is also confusing
damn you OpenGL! I give up for the evening.
perhaps sleeping on it will help things sink in ;)
waves
 
user4704
11:20 PM
@Gajet If you split a class into two classes, but still keep them coupled, you really just created a more complex representation of the same thing. Generally.
 
user4704
Why not just have a single class of type Player that contains the player's logic data and methods to operate on that logic data?
 
they will not be coupled
one will inherit the other, and have more functionalities.
@JoshPetrie cause they were developed in different times, with different approaches at their time
and that's why it's a little bit hard to handle everything right now.
actually at the time, I was thinking about an AI contest and to prevent cheating I split those classes
 
user4704
@Gajet That's coupling.
 
user4704
Why do you need inheritance, why not just modify the original?
 
user4704
Inheriting is extension and so appending to the base should be fine.
 
user4704
11:24 PM
I fail to see how this design helps prevent cheating.
 
@JoshPetrie they have the information through some const instances which they can not change
and I just ask their classes to think and report which action should they make
so they can't directly make any change in data section, and I can validate everything before applying .
 
user4704
const is a language construct, it doesn't prevent cheating
 
I know that,
 
user4704
cv qualification (and access modifiers) are not security; if you have the code they can be circumvented and they have no impact in the compiled binary.
 
user4704
So I still don't see how this prevents any kind of cheating.
 
11:31 PM
but still it's a little bit safer, I can create copies and send them
but without separating those classes creating a copy would not be possible.
I don't know what information they need to create a deep copy of an AI class
 
user4704
It's not any safer, and I don't see how these classes enable creating copies.
 
user4704
(in a way that can't be done in one class)
 
let me write a psudo code
 
user4704
I think you should post examples of what you mean, your explanation isn't conveying anything
 
while(true)
{
	World.update();
	for(int i=0;i<n;i++)
	{
		Request r = player[i].think(World);
		World.ApplyRequest(i,r);
	}
}
this is how the function looks like now.
which is not safe as you say.
but changing "Request r = player[i].think(World);" into "Request r = player[i].think(World.copy());"
will result in safe calls.
the AIs can't change anything from actual data since there is no way they can get where data is stored.
and later I can delete that copy part to increase performance
and whole information about each playing in this case is stored in World class.
now if you are still not agreed with me, there should be something wrong with how I think.
 
user4704
11:41 PM
...
 
user4704
Okay, so, there is no reason you need two classes just to give one class a "copy" method. That sample does nothing to demonstrate a need for two classes.
 
user4704
Second, the copy is wasteful, just pass it by const reference.
 
user4704
Yes, "think" code can const-cast it away and do "bad things"
 
user4704
But such code is already in your address space and could already do bad things, so you're just wasting time for no reason.
 
you can do that with only one class?
@JoshPetrie just being in address space doesn't guaranty it can do bad things
 
user4704
11:44 PM
Absolutely it does.
 
user4704
And yes, you can trivially add a copy method to one class.
 
user4704
class A { int x; public: A copy () const; };
 
he needs to know where the instances are and I'm not providing it with any pointer.
 
user4704
Nope.
 
user4704
The code could maliciously stomp random memory.
 
user4704
11:46 PM
Run in an infinite loop.
 
user4704
It could find the original instance by searching memory and modify it.
 
not that it can't
but that's completely out of my audience league.
 
user4704
You've successfully made everybody's life harder in order to win the sad, lonely little prize of making the life of the one guy who wants to write code in your system that does "bad things" just a teeny tiny bit harder
 
user4704
It's a terrible plan.
 
(or at least I think so)
 
user4704
11:48 PM
But regardless that sample does not demonstrate any need for two classes.
 
it's just like installing anti-theft alarms on your car,
 
user4704
No, it isn't.
 
they can still steal it but it will be a little more tricky, and less people will bother trying to
 
user4704
int * p = 0; *p = 3;
 
user4704
DONE.
 
user4704
11:49 PM
My think() crashed your game. Your protection was trivial.
 
that's not what I'm trying to protect my self
 
user4704
Anything you can be trying to protect yourself against is less bad than a crash.
 
user4704
So you're still wasting your time.
 
well, I'm not trying to protect against any kind of crash.
 
user4704
The copy() function is entirely useless, and there is no reason you need two "player" classes (one a subclass of the other) to do so.
 
user4704
11:51 PM
So there you go. Refactor that mess.
 
I just want to prevent data manipulation without me being noticed
@JoshPetrie actually I was going to create two world classes
 
user4704
Whatever, the point still stands.
 
user4704
You don't need it; it's overly complex.
 
I've already have multiple player classes (for AI, Human, net)
 
user4704
Which isn't neccessarily good, nor should it be justification for doing it elsewhere where it is known to be unneccessary
 
11:54 PM
the whole point is to later write same code for a generic player and use overriding.
 
user4704
Uh, what?
 
user4704
So do that later.
 
user4704
Don't introduce complexity now that you think you might need later. It just makes things harder.
 
user4704
Also, I seriously question the need for a distinct local versus network player. AI, even.
 
user4704
It implies that your player is not just data and methods about a player, but also the things that control the player's actions.
 
user4704
11:56 PM
Which create multiple responsibilities and thus increase maintainability cost, and increased likelyhood of coupling, which also increases maintainability.
 
I told you players are doing everything about the logic.
for information I've got only one class
and it only contains information.
wait what am I saying, I'm not here to defend my structure.
as I said it's just the fact that I've added features one by one into the code and now I'm stuck with a big mess.
and I'm wondered how can I clean everything up,
 
00:00 - 19:0019:00 - 00:00

« first day (672 days earlier)      last day (4331 days later) »