code logs -> 2011 -> Tue, 11 Jan 2011< code.20110110.log - code.20110112.log >
--- Log opened Tue Jan 11 00:00:46 2011
00:33 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
00:41 Attilla [Some.Dude@Nightstar-87c66023.threembb.co.uk] has quit [[NS] Quit: ]
00:41 celmin|supper is now known as celticminstrel
00:45 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
00:51 Kindamoody is now known as Kindamoody[zZz]
02:31 AnnoDomini [annodomini@Nightstar-10f8b8dc.adsl.tpnet.pl] has quit [[NS] Quit: Enough of this. I need sleep.]
04:35 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
05:16 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:30 cpux is now known as shade_of_cpux
05:43 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
06:09 Ior [NSwebIRC@Nightstar-4764665d.tbcn.telia.com] has joined #code
07:14 You're now known as TheWatcher
08:05 Serah [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:00 Serah [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
09:14 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Connection closed]
09:17 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
09:17 mode/#code [+o Kazriko] by Reiver
09:21 NSJavaGuest-6392 [NSjavaIRC@Nightstar-283cd59d.clmboh.sbcglobal.net] has joined #code
09:21 NSJavaGuest-6392 is now known as Janus
09:22 * Janus waits the required minute before launching into an inspired monologue
09:23
< Vornicus>
There's a required minute?
09:23
< Janus>
I don't wanna interrupt nothing!
09:23 ServerMode/#code [+o Vornicus] by *.Nightstar.Net
09:23
< froztbyte>
it's quiet, you may proceed
09:24 Vornicus changed the topic of #code to: Welcome to #Code! || Rants and monologues are encouraged; many cores, no waiting || Pastebin: http://pastebin.starforge.co.uk/ (Note antispam question, answer 'Yes') || ? x, ich werde x Wissenschaft tun
09:25
< Janus>
Okay! Then off I go! ... I had to take a moment to remember what I was so ready to rant about
09:27
<@Vornicus>
*snrk*
09:27 Vornicus is now known as Vornicus-Latens
09:27
<@Vornicus-Latens>
I sleep! You rant! Later, I read!
09:28
< Janus>
Why is coding things that actually do things, so hard? Like making physics stuff and parsers and managers and all sorts of little things. But when it's time to actually use those things, I always find an excuse to rewrite something. And then the alligator sa-- SLEEP
09:28
< Janus>
*physics and parsers and managers being among the things that don't do anything in this case
09:29
<@Vornicus-Latens>
No plan survives contact with the enemy.
09:29
<@Vornicus-Latens>
And the real world, let me tell you, is the most manxome foe of all.
09:31
< Janus>
I hate going against it, it always plays dirty
09:35 * Janus is rewriting the silly physics thing a 6th time. And it worked perfectly fine beforehand (sort of).
09:35
< Janus>
Set out to make it easy for myself to use this time. Which I am quickly thwarting as I go along.
09:39
< Janus>
Starting to wonder if I should just use someone else's library, so I can just be done with it, aha
09:41
< Janus>
Don't get me wrong, I actually enjoy it. Well, at least the non-math-y bits anyway. Sadly anything at polynomials and beyond, and you lose me.
09:41
< Janus>
*writing the physics stuff that is
09:42
< Janus>
I wonder how important math is to a programmer anyway. It uses very little of it, I've noticed. Even here, the most complex thing I had to work with was a cross/dot product
09:45
< Janus>
... okay getting back from that tangent, need to keep this monologue on track. I wonder if I am over-complicating this thing. There are indie games with entirely acceptable, bug free platformer physics, they make it look effortless enough. Like it's a really simple thing
09:50
< froztbyte>
how much complexity are you adding?
09:52
< Janus>
I'd think I've actually stripped it away, I think. There are static bodies which can move, but don't react to collisions, and dynamic bodies that do. It's only 2D rectangles. ... m-mostly 2D rectangles. The top part can be sloped. ... and any of the sides may be passable. And bodies can have callback functions assigned to them.
09:57
< Janus>
... maybe that's the problem. A lot of the trouble has been making the fake shape of a sloped rectangle work
10:15
< Janus>
... aha, suddenly changing it so that it's triangles and rectangles, fixed a lot of the falling through and sudden stop bugs. I will need to investizzz
10:15 Janus [NSjavaIRC@Nightstar-283cd59d.clmboh.sbcglobal.net] has quit [[NS] Quit: Nightstar's Java Chat http://www.nightstar.net]
10:22 Kindamoody[zZz] is now known as Kindamoody
10:43 Kindamoody is now known as Kindamoody|out
10:50 Ior [NSwebIRC@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
11:37 Serah [Stalker@26ECB6.A4B64C.298B52.D80DA0] has joined #code
12:14 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
12:17 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
12:25 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection reset by peer]
12:31 AnnoDomini [annodomini@Nightstar-91f3d793.adsl.tpnet.pl] has joined #code
12:31 mode/#code [+o AnnoDomini] by Reiver
12:33 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
13:45 Kindamoody|out [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [[NS] Quit: This computer has gone to sleep]
14:44 Attilla [Some.Dude@Nightstar-c23b61b3.threembb.co.uk] has joined #code
14:45 mode/#code [+o Attilla] by Reiver
16:28 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
16:39 You're now known as TheWatcher[afk]
17:50 Derakon [chriswei@Nightstar-cfae48c3.ca.comcast.net] has joined #code
17:50 mode/#code [+o Derakon] by Reiver
17:51
<@Derakon>
Seems like there must be some better way to do this...
17:52
<@Derakon>
I have a set of child classes that all implement the same function, which returns a tuple of (program name, argument list).
17:52
<@Derakon>
The invoker of that function then combines those values with a list of files to iteratively invoke the program on each of them.
17:52
<@Derakon>
I've discovered now that one of the child classes has to provide an additional argument that is specific to each file (basically an additional output file).
17:53
<@Derakon>
Which means the tuple has to be extended, which in turn means either hacking the invoker to check the tuple length, or modifying every child class to insert a null value in their tuple.
17:53
<@Derakon>
Or I suppose I could add an additional function to the base class getFileSpecificArguments and override that for just the one child class...
17:54
<@Derakon>
Seems kinda a weird approach though.
17:54
<@Derakon>
Any thoughts?
17:55
< Rhamphoryncus>
What's the tuple look like?
17:55
<@Derakon>
(program name as a string, program arguments as a string)
17:55
< Rhamphoryncus>
Where's the output file specified?
17:55
<@Derakon>
I'd extend it to be (program name as a string, program arguments as a string, list of file suffix strings)
17:56
<@Derakon>
Currently (without the extra suffices), the invocation is % programName inputFile inputFile arguments
17:56
<@Derakon>
That is, the output overwrites the input.
17:56
<@Derakon>
For this specific case, I need something like %programName inputFile inputFile inputFile-plot arguments
17:56
< Rhamphoryncus>
hrm
17:57
< Rhamphoryncus>
a collections.namedtuple might help clean that up
17:57
< Rhamphoryncus>
Or let that class override the tuple-handling method
17:57
<@Derakon>
Or return a dict instead, maybe?
17:58
< Rhamphoryncus>
I'd prefer a namedtuple over a dict
17:58
< Rhamphoryncus>
Or a full class over a dict, which could have some other helper methods
17:58
<@Derakon>
Mm, yeah.
17:58
<@Derakon>
That'd work.
17:59
<@Derakon>
Of course, it'd involve changing all the other child classes too, but it'd also be nicely future-proofed.
17:59
<@Derakon>
When in doubt, make your data smarter~
17:59
< Rhamphoryncus>
It's also possible to subclass a namedtuple, so you could name it Foo now, then later when you have extra methods you rename it to FooBase and add a new Foo
18:00
< Rhamphoryncus>
although by that point you might want to drop the tuple-ness
18:00
<@Derakon>
Yeah.
18:09 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
18:52 SmithKurosaki [smith@Nightstar-e94c2dff.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds]
19:00
<@Derakon>
Hrm, one problem with the smart-container approach: I have to put all the details of invoking the program onto the commandline at some point, to pass them to a second Python program that actually puts them on the command line "for real".
19:01
<@Derakon>
That is, local Python program gets user input => connect to remote server => % ./invokeProcessor.py programName arguments files => invokeProcessor.py uses subprocess to run programName with the specified arguments for each file.
19:01
<@Derakon>
So basically I have to serialize the smart container in a commandline-friendly fashion.
19:01
<@Derakon>
Ick.
19:02 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed]
19:11 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
19:12 Syloqs_AFH is now known as Syloqs-AFH
19:52
< Rhamphoryncus>
Can you make the container smart enough to produce its end result at that point?
19:53
<@Derakon>
The problem is that its result has to be generated once for each file, but invokeProcessor.py iterates over each file.
19:53
<@Derakon>
So I have to basically give invokeProcessor.py an instance of the container, which means serializing it.
21:10
<@Derakon>
Any suggestions for serializing/deserializing an object without using eval, that fit the serialization onto one line?
21:10
< Rhamphoryncus>
json? :/
21:10
< Rhamphoryncus>
I wouldn't end up doing a one-liner
21:11
< Rhamphoryncus>
I'd have a helper method
21:11
< Rhamphoryncus>
(or two. serialize and deserialize)
21:11
<@Derakon>
No, no.
21:11
<@Derakon>
I mean, the specification for this object is an argument to a script.
21:11
<@Derakon>
Unless I want to write the serialization to a file, transfer the file across to the remote server, and then pass the path to the file.
21:12
< Rhamphoryncus>
ugh no
21:12
< Rhamphoryncus>
Unfortunately I still can't picture all of what you're doing
21:13
<@Derakon>
Let me write up a pastebin outlining things...
21:20
<@Derakon>
http://derakon.dyndns.org/~chriswei/temp2/processor.txt
21:20
<@Derakon>
Sorry about the lack of newlines.
21:22 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
21:23
< Rhamphoryncus>
huh
21:24
<@Derakon>
It's the transition from the program that's running on the local machine to the program that's running on the cluster that's giving me trouble here.
21:24
< Rhamphoryncus>
You actually could upload a file to deserialize.. but I'm not sure I'd bother. Since it's small you could just as well use one blob as a single argument
21:25
<@Derakon>
So what do I use to deserialize, without relying on eval? Or do I just give up and assume that my users are not hackers?
21:25
< Rhamphoryncus>
I'd use json
21:25
<@Derakon>
Argh, being called away. >.<
21:25
<@Derakon>
This is really inconvenient timing.
21:25
<@Derakon>
(I think I'm using Python 2.5, BTW, so no json...)
21:26
< Rhamphoryncus>
I'd become python invokeProcessor.py blob
21:26
< Rhamphoryncus>
Available as a third-party install
21:27
< Rhamphoryncus>
I'm not sure it's that hard to do client-side though
21:28
< Rhamphoryncus>
It looks like invokeProcessor.py is somewhat like xargs. You have a list of files, running the target program for each, and you have a list of arguments for that program
21:30
< Rhamphoryncus>
xargs lets you use placeholders. You might do something like invokeProcessor.py file1 file2 file3 file4 file5 -- {input} {output1} {output2} arg1 arg2
21:55 Attilla [Some.Dude@Nightstar-c23b61b3.threembb.co.uk] has quit [Ping timeout: 121 seconds]
22:04 Vornicus-Latens is now known as Vornicus
22:19 Attilla [Some.Dude@Nightstar-516247f5.threembb.co.uk] has joined #code
22:19 mode/#code [+o Attilla] by Reiver
22:55 RichardBarrell [mycatverbs@Nightstar-689c9c54.cable.virginmedia.com] has joined #code
23:13 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
23:38 shade_of_cpux is now known as cpux
--- Log closed Wed Jan 12 00:00:47 2011
code logs -> 2011 -> Tue, 11 Jan 2011< code.20110110.log - code.20110112.log >