--- Log opened Tue Mar 22 00:00:08 2011 |
00:06 | | Derakon [Derakon@Nightstar-cfae48c3.ca.comcast.net] has joined #code |
00:06 | | mode/#code [+o Derakon] by Reiver |
00:11 | | You're now known as TheWatcher[t-2] |
00:12 | | Kindamoody|chores is now known as Kindamoody |
00:13 | | You're now known as TheWatcher[zZzZ] |
00:22 | <@McMartin> | What the proverbial fuck |
00:22 | <@McMartin> | https://github.com/drbrain/meme/pull/13 |
00:22 | <@McMartin> | LOLCAT ALERT |
00:22 | <@McMartin> | Ah, I see |
00:23 | <@McMartin> | This is in fact for a program that itself is for making lolcat images. |
00:23 | | * Derakon eyes the random buff guy wearing a pink pony (unicorn?) costume. |
00:25 | <@McMartin> | Tarinaky: I'd normally handle that with a module level global |
00:25 | <@McMartin> | I am far less allergic to globals than most people seem to be |
00:25 | <@McMartin> | If you want to play to the Enterprisiness you can make it a function that returns a module-private value initialized on first use. |
00:29 | < Tarinaky> | Interesting. Apparently pygame really hates being initialised and deinitialised repeatedly. |
00:29 | <@McMartin> | ... yes, you shouldn't do that. |
00:29 | < Tarinaky> | Which is annoying because leaving it initialised plays havoc with my Laptop's limited resources. |
00:29 | <@McMartin> | What are you doing with it? |
00:29 | <@McMartin> | SDL is intended to be initialized and deinitialized once per process. |
00:29 | < Tarinaky> | Using an interactive python interpretter. |
00:30 | <@McMartin> | That's very likely to end in tears |
00:30 | < Tarinaky> | How so? |
00:30 | <@Derakon> | See earlier: initialized once per process. |
00:31 | < Tarinaky> | McMartin's response was very broad and sweeping though. |
00:32 | < Tarinaky> | It'd be okay if I could get ipython to sleep while I'm using vim >.> |
00:39 | < Tarinaky> | Even if I stop ipython using job control, pygame continues to chew up a lot of resources. |
00:41 | | Kindamoody is now known as Kindamoody[zZz] |
00:41 | < Tarinaky> | Oh derp, that'll be why - I'm stopping screen. |
00:43 | <@McMartin> | Pygame is in some sense too close a wrapper around SDL. |
00:46 | | Tamber [tamber@Nightstar-d36aadfc.co.uk] has quit [Operation timed out] |
00:47 | | Tamber [tamber@32231D.3D3757.05B717.E589DB] has joined #code |
00:47 | < Tarinaky> | Ahah! Figured out why it wasn't suspending. Screen was doing voodoo on it. |
00:47 | | * Tarinaky learned something new. |
00:48 | | * Tarinaky hopes that SDL doesn't mind being molested by UNIX job control >.> |
00:50 | <@McMartin> | I guess we'll find out |
00:51 | < Tarinaky> | Indeed. |
00:53 | < Tarinaky> | It's doing okay. |
00:54 | < Tarinaky> | The real test will be when I forget it's running and suspend to disk. |
01:48 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds] |
01:49 | | Derakon is now known as Derakon[shower] |
02:03 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
02:04 | | Syloqs_AFH is now known as Syloqs-AFH |
02:07 | | Derakon[shower] is now known as Derakon |
02:12 | | cpux_ [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
02:13 | | cpux [chatzilla@510B1D.8D602E.9FE2BE.9FAE21] has quit [Ping timeout: 121 seconds] |
02:13 | | cpux_ is now known as cpux |
02:25 | | cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
02:25 | | cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
02:32 | | Kazriko [kaz@Nightstar-5badc7ed.client.bresnan.net] has quit [Ping timeout: 121 seconds] |
02:41 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code |
03:49 | | cpux is now known as shade_of_cpux |
03:58 | | * Derakon eyes his code. |
03:58 | <@Derakon> | Still having trouble with drawing the entire map to a texture. |
03:59 | <@Derakon> | Now I'm trying to draw that texture to the main window, just to make certain that it actually has stuff on it...but the main window won't update. |
03:59 | <@Derakon> | (That is to say, even if I just clear the depth and color bits and flip the display, nothing happens) |
04:02 | <@Derakon> | Oh wait, need to unbind the framebuffer first. Derp. |
04:25 | | * Tarinaky facepalms as he finally understands: modules are singletons. |
04:26 | <@McMartin> | Heh. |
04:26 | <@McMartin> | That's one way of thinking of it. |
04:26 | < Tarinaky> | The down side is that the global keyword is a lot uglier than self. |
04:27 | <@McMartin> | True |
04:27 | <@McMartin> | modules can of course be imported |
04:27 | <@Derakon> | Importing yourself always struck me as hacky though. |
04:27 | <@McMartin> | And if you need to change backends on the fly, making it a function in the module that returns the module global is probably the best move than direct access. |
04:27 | <@McMartin> | Python Doesn't Do Data Hiding, not really |
04:28 | < Tarinaky> | Derakon: Thanks for that tip! I'll use it next time. |
04:29 | < Tarinaky> | Well, the underscore notation is as good as anything else for private attributes. |
04:29 | <@Derakon> | Dammit. ¬.¬ |
04:29 | < Tarinaky> | Derakon: It's not a hack if it looks more natural than the 'proper' way of doing it >.> |
04:40 | < Tarinaky> | Eugh. Remind me, how do you perform vector arithmetic on tuples? |
04:40 | < Tarinaky> | I vaguely remember it involving list comprehension. |
04:40 | < Tarinaky> | But I can't think how to do anything other than vector + scalar. |
04:44 | | Kazriko [kaz@Nightstar-5badc7ed.client.bresnan.net] has joined #code |
04:44 | | mode/#code [+o Kazriko] by Reiver |
05:17 | | * Tarinaky found it eventually. |
05:18 | < celticminstrel> | Wouldn't importing yourself be an infinite loop? |
05:19 | <@Derakon> | No. |
05:19 | < celticminstrel> | Why not? |
05:19 | <@Derakon> | However, if you import a module before that module is done importing, then you may not be able to use all of the symbols in that module immediately. |
05:19 | <@Derakon> | Because Python is smart enough to say "Hang on, I've been here before". |
05:20 | < celticminstrel> | Ah, well that's good then. |
05:20 | <@Derakon> | I occasionally have to resolve mutual dependency issues with one of the programs at work, which I generally do by moving one of the imports to just before it is needed. |
05:21 | <@Derakon> | Which is typically inside of a function; thus, it isn't run until the on-startup imports are long since complete. |
05:21 | <@Derakon> | Anyway, bed. |
05:21 | | Derakon is now known as Derakon[AFK] |
05:34 | | Kindamoody[zZz] is now known as Kindamoody |
05:38 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:10 | < Tarinaky> | W. T. F. |
06:24 | < Tarinaky> | It... doesn't appear to be initialising this dictionary properly. |
06:30 | < Tarinaky> | Okay, I have a test case. |
06:32 | < Tarinaky> | http://pastebin.com/sc3Xtw3j << This raises an out of bounds exception. |
06:59 | < Tarinaky> | Also: why does the documentation for dictionaries not tell you how to add a key to a dictionary, only remove? |
07:01 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed] |
07:02 | <@froztbyte> | In [1]: dict = {} |
07:02 | <@froztbyte> | In [2]: dict['moo'] = ['feh','bla'] |
07:02 | <@froztbyte> | In [3]: dict['bla'] = ['moo','feb'] |
07:02 | <@froztbyte> | In [4]: del(dict['bla']) |
07:02 | <@froztbyte> | In [6]: dict |
07:02 | <@froztbyte> | Out[6]: {'moo': ['feh', 'bla']} |
07:02 | <@froztbyte> | (basically) |
07:02 | <@froztbyte> | Tarinaky: but good question though, no idea |
07:03 | < Tarinaky> | I'm pretty sure I read somewhere that dictionaries didn't return none existant keys. |
07:04 | | * Tarinaky shrugs. |
07:15 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
07:16 | | Syloqs_AFH is now known as Syloqs-AFH |
07:20 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Ping timeout: 121 seconds] |
08:41 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code |
09:16 | | You're now known as TheWatcher |
09:21 | < Tarinaky> | I need some advice on how best to handle non-square terrain in an ASCII/tile based roguelike. |
09:21 | < Tarinaky> | I can't think of any examples where walls don't conform to the grid. |
09:22 | < Tarinaky> | I was wondering if anyone knew of exceptions. |
09:51 | < Tarinaky> | I think I have some decent approximations but I want to be sure >.> |
10:11 | | Attilla [Some.Dude@37647E.0E7447.22C7B1.567421] has joined #code |
10:12 | | mode/#code [+o Attilla] by Reiver |
10:30 | | gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has joined #code |
10:41 | | AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code |
10:41 | | mode/#code [+o AnnoDomini] by Reiver |
11:10 | < Tarinaky> | How do I divide two numbers to get a float in python? |
11:10 | < Tarinaky> | Neither / or // work. |
11:10 | < Tamber> | It probably involves some magic whitespace. |
11:14 | <@AnnoDomini> | Tarinaky: Try using const floats in the division? |
11:15 | <@AnnoDomini> | Like "number/2.0" or something? |
11:15 | <@TheWatcher> | or explicitly use float(x)/float(y)? |
11:39 | < Tarinaky> | Thanks. |
11:40 | < Tarinaky> | I have a function that draws oblique lines on roguelike tile maps ^^ |
11:40 | < Tarinaky> | And I mean, contiguous - without diagonal 'gaps'. |
11:40 | | * Tarinaky is dead chuffed it worked |
11:41 | <@TheWatcher> | \o/ |
11:42 | | * gnolam hands Tarinaky some cured Bresenham. |
11:44 | < Tarinaky> | Thanks. |
11:45 | < Tarinaky> | Ah, yeah I think I had something similar to that before. |
11:45 | < Tarinaky> | Trouble is it doesn't block off the diagonals. |
11:47 | < Tarinaky> | So I used an automata to walk through it along valid perpendicular directions only. The end points seem to be a little out though, but that might be forgiveable or workaroundable. |
11:47 | < Tarinaky> | Or that might have just been me not understanding how comparisons between mutable types work. |
11:49 | < Tarinaky> | I'll definitaly have a look at the circle one though, I've not seen it before. |
12:02 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited] |
12:06 | | AnnoDomini [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: leaving] |
12:16 | | Kindamoody is now known as Kindamoody|out |
12:39 | | AnnoDomini [annodomini@D553D1.9D4909.D8029A.E53810] has joined #code |
12:39 | | mode/#code [+o AnnoDomini] by Reiver |
15:04 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer] |
15:05 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
17:03 | | EvilDarkLord is now known as Maze |
17:13 | | AnnoDomini is now known as Cemunian |
17:19 | | gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has quit [Ping timeout: 121 seconds] |
17:40 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer] |
17:40 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
19:21 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
19:24 | < gnolam> | Tarinaky: so you're using an 8-connected grid then? |
19:26 | | Attilla [Some.Dude@37647E.0E7447.22C7B1.567421] has quit [Ping timeout: 121 seconds] |
19:26 | | Attilla_ [Some.Dude@37647E.0E7447.22C7B1.567421] has joined #code |
20:05 | | Derakon [chriswei@Nightstar-cfae48c3.ca.comcast.net] has joined #code |
20:05 | | mode/#code [+o Derakon] by Reiver |
20:05 | | * Derakon mutters at this math problem that is giving him fits. |
20:05 | <@Derakon> | I have a 5D array of data: wavelength, time, Z, Y, X. |
20:06 | <@Derakon> | I have a set of transformations: X and Y translate, rotate about the Z axis, scale in X and Y. |
20:06 | <@Derakon> | I want to extract a two-dimensional slice of the transformed data. |
20:06 | <@Derakon> | While doing the minimal amount of work needed, of course. |
20:07 | <@Derakon> | This needs to be able to accomodate taking a slice along the time axis, but that won't be the standard use case, I suspect. |
20:09 | <@Derakon> | My problem is figuring out how to limit the amount of transforming to do. |
20:13 | <@jerith> | Transform the slice parameters, grab the data and transform back? |
20:14 | <@Derakon> | Er... |
20:15 | <@Derakon> | So use the slice parameters to create a sampling function that does nearest-point sampling for each pixel in the desired slicle? |
20:15 | <@Derakon> | s/slicle/slice/ |
20:15 | <@Derakon> | That does sound like it'd work pretty well. |
20:15 | <@jerith> | Instead of rotating the data 90 degrees, rotate the slice -90 degrees. |
20:16 | <@jerith> | You do the transform twice (well, once in inverse), but on much smaller data sets. |
20:16 | <@Derakon> | Yeah, transformations take a long time when run on 2x50x60x512x512 data sets... |
20:17 | <@Derakon> | That's only 1x5 gigapixels. Puny modern hardware. |
20:17 | <@Derakon> | Er, 1.5. |
20:19 | <@Derakon> | I actually don't need to transform back, since what's desired is a 2D array that can be displayed to the user. |
20:19 | <@Derakon> | So basically we're mapping (X, Y) display space to (W, T, Z, Y, X) based on a) the slice direction, b) the slice position, and c) the transformation. |
20:20 | <@Derakon> | To ignore the wavelength and time dimensions for the moment, if we had a null transform and the user wanted a YZ slice passing through X = 256... |
20:21 | <@Derakon> | Then (0, 0) in the returned slice would map to (maxZ, 0, 256). |
20:21 | <@Derakon> | (1, 0) would map to (maxZ, 1, 256), etc. |
20:21 | <@Derakon> | Hrmph, I have trouble figuring out how to function-ize this kind of thing, though. |
20:29 | <@Derakon> | Argh, being completely agnostic about axes is hard. |
20:29 | <@Derakon> | I'm seeing now why the previous version of this program just special-cased each way it wanted to view things. |
20:31 | <@McMartin> | I totally read that wrong. |
20:32 | <@McMartin> | Single headed vs. Double headed vs. throwing: the eternal debate |
20:32 | <@Derakon> | Heh. |
20:32 | <@McMartin> | This is perhaps a sign I should eat lunch. |
20:34 | <@Derakon> | ...I think part of the reason I'm having trouble here is that I'm trying to wrap my head around applying a 3D transform to 5D data? |
20:34 | <@Derakon> | That could be an issue, yes. |
20:46 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
20:46 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code |
20:46 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
21:03 | | Kindamoody|out is now known as Kindamoody |
21:09 | | Maze is now known as EvilDarkLord |
21:11 | | Cemunian is now known as AnnoDomini |
21:45 | | Derakon [chriswei@Nightstar-cfae48c3.ca.comcast.net] has quit [[NS] Quit: leaving] |
22:05 | | AnnoDomini [annodomini@D553D1.9D4909.D8029A.E53810] has quit [[NS] Quit: Sleep.] |
22:18 | < Tarinaky> | gnolam: I don't understand what an 8-connected grid is. |
22:38 | <@ToxicFrog> | Tarinaky: a grid where each cell is connected to eight adjacent cells. |
22:38 | <@ToxicFrog> | Ie, one that permits diagonal movement. |
22:41 | <@ToxicFrog> | Question. When working with Bayesian probabilities, is P(dy|lc,pn) the probability of dy given (lc and pn), or the probability of dy given (lc or pn)? |
22:45 | <@McMartin> | I am unfamiliar with that syntax. |
22:45 | <@McMartin> | I've only ever seen P(dy|lc^pn) or P(dy|lc v pn) |
22:47 | <@ToxicFrog> | Yeah, same here. |
22:47 | <@ToxicFrog> | Hence the question. |
22:48 | | SmithKurosaki [smith@Nightstar-7820a96a.dsl.teksavvy.com] has quit [Operation timed out] |
22:50 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
22:54 | <@McMartin> | Number of highest-priority bugs entering my queue today: eleven. |
23:11 | | shade_of_cpux is now known as cpux |
23:21 | <@TheWatcher> | Ouch |
23:22 | <@McMartin> | This isn't bullshit, either - all of these seem to be "subsystem X on fire" bugs |
23:22 | <@McMartin> | Or look like it at first glance. |
23:22 | <@ToxicFrog> | Freenode informs me that in P(), comma is by convention ^ |
23:22 | <@ToxicFrog> | This is consistent with the rest of the problem, so I'm running with it |
23:22 | | * McMartin has bounced a number back with "this isn't as bad as it looks like; deprioritize and refile appropriately", but protocol is not off. |
23:23 | <@TheWatcher> | McM: well, best of luck with them. |
23:23 | <@McMartin> | I'm actually down to four already >_> |
23:24 | <@McMartin> | But yeah. QA cycles |
23:24 | <@McMartin> | Firmly in never-rains-but-it-pours territory once the major systemic tests start going. |
23:59 | | Derakon[AFK] is now known as Derakon |
--- Log closed Wed Mar 23 00:00:10 2011 |