code logs -> 2011 -> Sun, 23 Oct 2011< code.20111022.log - code.20111024.log >
--- Log opened Sun Oct 23 00:00:14 2011
00:17 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
00:35 celticminstrel [celticminstre@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
01:21 You're now known as TheWatcher[T-2]
01:25 You're now known as TheWatcher[zZzZ]
02:18 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
02:49 Kindamoody[zZz] is now known as Kindamoody
03:09 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
03:09 mode/#code [+qo Vornicus Vornicus] by ChanServ
06:05 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:12 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!]
06:13 kwsn [kwsn@6824B1.5AFD35.C0F31F.42DAA5] has quit [Ping timeout: 121 seconds]
06:23 kwsn [kwsn@6824B1.5AFD35.C0F31F.42DAA5] has joined #code
06:24 celticminstrel [celticminstre@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:07 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
07:34 Derakon is now known as Derakon[AFK]
07:49 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
08:17 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
08:19 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
08:19 mode/#code [+qo Vornicus Vornicus] by ChanServ
09:48 Vornicus is now known as Vornicus-Latens
09:53 You're now known as TheWatcher
10:29 Attilla [Some.Dude@Nightstar-f29f718d.cable.virginmedia.com] has joined #code
10:37 Kindamoody is now known as Kindamoody|out
13:22 Kindamoody|out is now known as Kindamoody
13:24 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
14:26 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
14:43 Kindamoody is now known as Kindamoody|out
14:53 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
15:03 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
17:03 Kindamoody|out is now known as Kindamoody
17:27 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
17:38
< gnolam>
http://www.lukesurl.com/archives/1534
17:49 Derakon[AFK] is now known as Derakon
19:19 Kindamoody is now known as Kindamoody[zZz]
19:31
< sshine>
gnolam, could you help me proofread a very short swedish text?
19:32
< sshine>
gnolam, http://pastie.org/2746457
19:40
< gnolam>
o_O
19:45 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Connection closed]
19:48 * Derakon eyes his output, determines he really needs some kind of shading to be able to recognized depth.
19:48
< Derakon>
So, time to look up OpenGL lighting, I guess.
19:56
< Derakon>
And now I start wanting to load models and render them instead of specifying vertices manually. Whee vertex normals.
19:57
< gnolam>
OBJ's your friend then. Supported by most modelers, and simple enough to write a basic loader for in an afternoon.
19:57
< Derakon>
Heh.
19:57
< Derakon>
Only problem is I'm feeling a bit blarghy and having trouble concentrating.
19:58
< Derakon>
At least this tutorial is doing a good job of explaining what's going on: http://glprogramming.com/red/chapter05.html
20:02
< gnolam>
Also, I advise you to start with shaders as soon as possible.
20:02
< Derakon>
I'm basically trying to build my knowledge towards whatever modern OpenGL is.
20:03
< gnolam>
While shaders require more knowledge about what goes on under the hood, it's more than compensated for by the fact that you no longer have to care about OpenGL's peculiar model quirks.
20:04
< Derakon>
Heh.
20:04
< gnolam>
I mean, more than half that chapter is taken up by "how, specifically, OpenGL's standard model does it".
20:47 Vornicus-Latens is now known as Vornicus
21:01 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [[NS] Quit: Into the hole again, we hurried along our way, into a once-glorious garden now seeped in dark decay.]
21:32 * Derakon eyes http://www.youtube.com/watch?v=R_w4HYXuo9M&NR=1
22:09 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:19
< sshine>
do map-reduce frameworks usually assume that reduction is not commutative?
22:20
< sshine>
i.e. reduction needs to happen in the order of the original input data.
22:20<~Vornicus> I suspect so; some frameworks might let you say that your reduction can happen in any order though
22:22<~Vornicus> (in truth, the real test is associativity)
22:23
< sshine>
ah, right.
22:25<~Vornicus> (but if you do get both you can reduce stuff as it comes in no matter what)
22:49 celmin [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
22:51
< celmin>
So apparently it seems that rotating a cube on a fixed, external axis is easier than rotating it on its internal axis.
22:52
< gnolam>
?
22:56 You're now known as TheWatcher[T-2]
22:57
< celmin>
If I'm only rotating on the x axis for example, it doesn't make a difference, but as soon as it's been rotated on one axis, a rotation on another axis is different than if it hadn't been rotated at all.
22:59
< celmin>
Basically I always want to rotate it on an axis perpendicular to one of the faces.
22:59
< celmin>
(Well, two of the faces, but same thing.)
23:01
< gnolam>
Ah. Yes. Rotation is not commutative.
23:02
< celmin>
I... suppose that can describe the issue, sure.
23:05 You're now known as TheWatcher[zZzZ]
23:14 kwsn [kwsn@6824B1.5AFD35.C0F31F.42DAA5] has quit [Ping timeout: 121 seconds]
23:15
< celmin>
Doesn't really help me figure it out though. :/
23:20 kwsn [kwsn@6824B1.5AFD35.C0F31F.42DAA5] has joined #code
23:21
< celmin>
Yay, I broke it completely again.
23:25
< celmin>
I don't know what I did, but it looks like it almost works right now... but, almost probably isn't good enough.
23:39
< celmin>
Huh, why did I think translation wasn't working? It seems to work perfectly fine now that I've drawn axes as reference points.
23:41
< Derakon>
Agggggh, no, you idiot.
23:41 * Derakon mutters at http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml
23:42
< Derakon>
Which looks like a nice enough tutorial except that it starts off by doing "from foo import *" for a crapton of modules.
23:42
< Derakon>
So you can't tell where the fuck any given piece of functionality is coming from.
23:42
< celmin>
I don't see a major problem with that. <_<
23:42
< celmin>
Though maybe for a tutorial it's not the best choice...
23:42
< Derakon>
"from foo import *" is fundamentally bad programming. I'm amazed that Python allows it.
23:43
< celmin>
I'm glad Python allows it.
23:43
< Derakon>
"from foo import specific named functionality that you need" is more acceptable.
23:43
< Derakon>
But everything should be properly namespaced.
23:43
< celmin>
Well yes, that is better.
23:43
< Derakon>
So the best is just "import foo; use foo.something you need".
23:43
< celmin>
If you only need a couple of things.
23:43
< Derakon>
Remember that the actual typing portion of programming is like 2% of your time.
23:44
< Derakon>
Making things easier to type is worse than neutral if it makes the program at all harder to debug.
23:44
< celmin>
But sometimes it's really annoying to use foo.something. For example, "import time; use time.time ..."
23:44
< Derakon>
NAMESPACE YOUR SHIT
23:44
< celmin>
Other times it makes more sense to "import foo" than "from foo import whatever", for example my dice module.
23:45
< Derakon>
I strongly advise you to just get in the habit of only ever using "import foo".
23:45
< celmin>
I think. Can't quite remember.
23:45
< Derakon>
Seriously.
23:45
< celmin>
"time.time" <-- stupid
23:45
< Derakon>
No, it's not.
23:45
< celmin>
Yes it is. It's redundant and useless.
23:45
< Derakon>
It's not at all redundant.
23:45
< Derakon>
You're calling the time() function from the time module.
23:45
< celmin>
It's saying the same thing twice.
23:45
< Derakon>
No, it's not.
23:46
< Derakon>
The two "time"s have different meanings.
23:46
< celmin>
Oh sure, Python sees them as different things, but they have the same name. It's ugly.
23:46
< Derakon>
You know what's more ugly? Not being able to tell where a function comes from, that's what.
23:46
< celmin>
It's obvious where the time function comes from.
23:47
< Derakon>
(For what it's worth, back in college I thought namespaces were a pointless waste of time. Having had to deal with complex codebases since then, oh fuck was I stupid)
23:47
< celmin>
Unless for some reason you also made your own.
23:47
< celmin>
Heh.
23:47
< Derakon>
Basically what I'm saying here is that you should establish good coding habits.
23:47
< Derakon>
You can always find an exception that says "Oh, but in this situation it's okay!"
23:47
< Derakon>
But that's just looking for an excuse to break your consistency rules.
23:47
< celmin>
(I nearly always have a "using namespace std;" at the top of my cpp files.)
23:47
< Derakon>
And coding benefits strongly from consistent style.
23:48
< celmin>
(But I use explicit qualification in the headers.)
23:48<~Vornicus> I just opened the Python documentation and found this function: "log"
23:48<~Vornicus> Which module was it in?
23:48
< celmin>
Heh.
23:49
< Derakon>
The math module, I'm guessing.
23:49<~Vornicus> Wrong!
23:49
< celmin>
Without additional information, I'd guess the same as Derakon.
23:49
< Derakon>
There's also the logger module.
23:49<~Vornicus> ALso wrong!
23:49
< Derakon>
And a million obscure other modules that I never use.
23:49
< celmin>
Oh wow.
23:49
< celmin>
What else would have a log?
23:50<~Vornicus> The module I got it from was cmath.
23:51
< celmin>
Oh, complex math.
23:51
< celmin>
...though seriously, if you ask me that should be merged into the math module. <_<
23:51<~Vornicus> That would be surprising, actually
23:52
< celmin>
I can see that.
23:52
< celmin>
But it's also surprising when you do sqrt(-1) expecting to get j, and instead get... whatever it returns in the math module.
23:52
< celmin>
I guess both ways have their issues.
23:53
< Derakon>
Math domain error.
23:53
< Derakon>
That's what it gives you.
23:53
< celmin>
Ah, an exception.
23:53
< Derakon>
I can definitely see value in having a set of math operations that deal exclusively in real numbers.
23:53
< Derakon>
Since most people don't know or care about imaginaries.
23:53
< celmin>
In C(++) it returns NaN.
23:53
< celmin>
Yeah.
23:54
< Derakon>
And there's no clean way to tell the math module "no, I want to switch over to using imaginary numbers" that wouldn't be better-done by just using cmath.
23:54
< celmin>
Point.
23:55
< Derakon>
Anyway, back to point. namespace your shit
23:55
< Derakon>
If not for you, then for the guy who has to read your code.
23:55
< Derakon>
(And remember, you're him, two weeks down the road!)
23:55<~Vornicus> (or two years.)
23:55
< celmin>
But, it's also surprising to say (for example) sqrt(1j) and get an exception rather than the square root of i.
23:55
< celmin>
Heh.
23:56<~Vornicus> "who wrote this shit", the most common answer is "I wrote this shit"
23:57
< celmin>
Okay, hm, I need to shift this rotation axis out of the cube.
23:58
< celmin>
ie instead of rotating around a rotation axis passing through the cube's centre, rotate it around an external parallel axis.
23:59
< Derakon>
Move the center of rotation, you mean.
23:59
< Derakon>
That's easily done by translating before rotating.
23:59
< celmin>
Okay.
23:59
< celmin>
I thought of that but wondered if it would actually work.
--- Log closed Mon Oct 24 00:00:10 2011
code logs -> 2011 -> Sun, 23 Oct 2011< code.20111022.log - code.20111024.log >

[ Latest log file ]