--- Log opened Thu Mar 15 00:00:11 2012 |
00:08 | <~Vornicus> | indices[0][1][indices[0][0]] in steps[perm[-1]][indices[-1][1][indices[-1][0]]] <--- how to tell you've had too much fun with indexing. |
00:12 | | * Vornicus is a 3-star programmer today, apparently |
00:14 | <~Vornicus> | Rham: no, the true agony is realizing /you/ wrote it. |
00:14 | < Rhamphoryncus> | No, I can fix my code |
00:15 | < Tarinaky> | I sleep. |
00:38 | < Rhamphoryncus> | Vornicus: this should bleed your eyes a little less: http://i.imgur.com/luqmW.png |
00:39 | < Rhamphoryncus> | Took a lot more effort |
00:39 | < Rhamphoryncus> | And yes, the tracks are in a different position |
00:41 | < Rhamphoryncus> | Not sure about the implications though |
00:45 | < Rhamphoryncus> | It looks pretty but if you shift it 2/3rds of a tile to the right, making the second track be at the center.. the diagonals no longer line up |
00:50 | | Derakon[AFK] is now known as Derakon |
00:54 | | You're now known as TheWatcher[T-2] |
00:58 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Thu Mar 15 01:13:07 2012 |
--- Log opened Thu Mar 15 05:05:43 2012 |
05:05 | | TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has joined #code |
05:05 | | Irssi: #code: Total of 24 nicks [9 ops, 0 halfops, 0 voices, 15 normal] |
05:05 | | mode/#code [+o TheWatcher[zZzZ]] by ChanServ |
05:05 | < maoranma> | Uhg, python for ?? |
05:06 | | Irssi: Join to #code was synced in 45 secs |
05:06 | < maoranma> | Actually nevermind |
05:06 | <~Vornicus> | if you're in 3, just run it straight and save in utf-8 |
05:08 | <~Vornicus> | in 2, make sure you're in a unicode string and use \u00e9 |
05:08 | < maoranma> | I just replaced it, pyyaml is fussing about it |
05:13 | | Eri [Eri@Nightstar-3e5deec3.gv.shawcable.net] has joined #code |
05:14 | < maoranma> | okay, now to update the old dictionaries with the new ones... |
05:18 | | Kindamoody[zZz] is now known as Kindamoody |
05:19 | | eckse [eckse@Nightstar-868611e1.dsl.sentex.ca] has joined #code |
05:19 | | mode/#code [+o eckse] by ChanServ |
05:21 | < maoranma> | Okay, now this is tricky, my current dictionarries look like... {'A': {'Aa': 'aa'}} and I need to add {'A': {'Ab': 'ab'}} so that it looks like {'A': {'Aa': 'aa', 'Ab': 'ab'}}... lemme try something |
05:22 | | eckse_ [eckse@Nightstar-9d1e7712.dsl.sentex.ca] has quit [Ping timeout: 121 seconds] |
05:23 | | eckse_ [eckse@Nightstar-6eb9245d.dsl.sentex.ca] has joined #code |
05:23 | <~Vornicus> | So you have... two dictionaries, sharing keys, and you want to merge them using a particular function that merges the values? |
05:24 | < maoranma> | Yes |
05:24 | < maoranma> | Note they are nested dictionaries |
05:24 | <~Vornicus> | okay. Do you mind if one of the dictionaries is mangled? |
05:24 | < maoranma> | No |
05:24 | <~Vornicus> | Okay. |
05:25 | <&Derakon> | for key, value in foo.iteritems(): if key in bar: for key2, value2 in bar[key].iteritems(): foo[key][key2] = bar |
05:25 | <&Derakon> | Er, replace the final bar with value2. |
05:25 | <~Vornicus> | Actually, cleaner |
05:25 | | eckse__ [eckse@Nightstar-fc02319d.dsl.sentex.ca] has joined #code |
05:26 | <~Vornicus> | for key, value in foo.iteritems(): if key in bar: bar[key].update(value) |
05:26 | | eckse [eckse@Nightstar-868611e1.dsl.sentex.ca] has quit [Ping timeout: 121 seconds] |
05:26 | <&Derakon> | Ah, yes, good ol' update(). |
05:26 | <&Derakon> | Anyway, bedtime. G'night. |
05:26 | <~Vornicus> | That gives you bar as your result dictionary. |
05:26 | | Derakon is now known as Derakon[AFK] |
05:26 | < maoranma> | Yea, that's what I was aiming for |
05:27 | | eckse_ [eckse@Nightstar-6eb9245d.dsl.sentex.ca] has quit [Connection reset by peer] |
05:28 | <~Vornicus> | oh, that won't necessarily work, hang on |
05:28 | < maoranma> | Oh, kay |
05:28 | <~Vornicus> | for key, value in foo.iteritems(): if key in bar: bar[key].update(value);; else: bar[key] = value |
05:28 | <~Vornicus> | where ;; means dedent |
05:29 | < maoranma> | Ah |
05:30 | <~Vornicus> | This makes bar contain values for items where foo had them but bar didn't |
05:30 | < maoranma> | So, assuming that they have exactly the same keys, that bit isn't necessary? |
05:30 | <~Vornicus> | Correct |
05:31 | < maoranma> | And I can drop the if part too, and just have the bar[key].update(value) |
05:32 | < maoranma> | I really should stop using python as a word processor, hehe |
05:32 | <~Vornicus> | This looks like data processing |
05:32 | <~Vornicus> | Stop complaining, you're doing it approximately right |
05:32 | < maoranma> | I am basically |
05:33 | < maoranma> | Basically, I have 64 entries that I'm adding single line to, in yaml |
05:33 | < maoranma> | And I'd eat my own teeth before doing it by hand |
05:34 | < maoranma> | And eventually, I'm going to have a yaml file with 649 entries (I think), so I want to figure out how to do this ahead of time |
05:34 | <~Vornicus> | If you have to do it more than twice, automate it |
05:35 | < maoranma> | I definately will with the the very large one, since I will probably have to add data to it constantly |
05:36 | < maoranma> | the load time on this bot is going to be -e p i c- |
05:40 | < maoranma> | Luckly, yaml can dump into a file correctly...once I figure out the syntax |
05:41 | | eckse [eckse@Nightstar-77c9f1a4.dsl.sentex.ca] has joined #code |
05:41 | | mode/#code [+o eckse] by ChanServ |
05:41 | | Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
05:43 | | eckse__ [eckse@Nightstar-fc02319d.dsl.sentex.ca] has quit [Ping timeout: 121 seconds] |
05:44 | < maoranma> | However, I need to restructure the yaml file, so I'll just write a string join like the one you showed me |
05:45 | | eckse [eckse@Nightstar-77c9f1a4.dsl.sentex.ca] has quit [Client closed the connection] |
05:51 | | * McMartin reads about yaml, is vaguely horrified |
07:09 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds] |
07:09 | | Kindamoody is now known as Kindamoody|shower_etc |
07:16 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Client closed the connection] |
07:53 | | Kindamoody|shower_etc is now known as Kindamoody |
08:12 | | Kindamoody is now known as Kindamoody|out |
08:51 | | You're now known as TheWatcher |
09:05 | | Attilla [Obsolete@Nightstar-7d4a92bc.as43234.net] has joined #code |
09:21 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
09:47 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Client closed the connection] |
09:47 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
09:50 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Client closed the connection] |
09:51 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
10:01 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Gone] |
10:02 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
11:35 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
11:35 | | mode/#code [+o Syloqs_AFH] by ChanServ |
11:36 | | Syloqs_AFH is now known as Syloqs-AFH |
11:38 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
11:45 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
12:26 | | Attilla [Obsolete@Nightstar-7d4a92bc.as43234.net] has quit [Connection reset by peer] |
13:07 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [[NS] Quit: If I had a world of my own, everything would be nonsense. Nothing would be what it is because everything would be what it isn't. And contrary-wise; what it is it wouldn't be, and what it wouldn't be, it would. You see?] |
14:07 | | maoranma [maoranma@Nightstar-333d981b.pools.spcsdns.net] has quit [Ping timeout: 121 seconds] |
14:08 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has joined #code |
14:25 | | Attilla [Obsolete@Nightstar-da240ac4.threembb.co.uk] has joined #code |
14:27 | | Attilla [Obsolete@Nightstar-da240ac4.threembb.co.uk] has quit [[NS] Quit: ] |
14:28 | | Attilla [Obsolete@Nightstar-da240ac4.threembb.co.uk] has joined #code |
14:51 | < Rhamphoryncus> | http://i.imgur.com/j23By.png |
14:53 | < RichyB> | Rhamphoryncus, looks nice, except that the lines seem to get closer together? |
14:53 | < RichyB> | Doesn't seem right, given that OpenTTD uses an orthographic projection. |
14:53 | < Rhamphoryncus> | "diagonals" in openttd have always been like that |
14:53 | < RichyB> | Have they? You're right. |
14:54 | < RichyB> | I guess maybe it just makes it more obvious when you see it done smoothly. |
14:55 | < Rhamphoryncus> | yeah |
14:56 | < Rhamphoryncus> | For the same reason there might be issues with train rotation. Only so many angles to work with |
14:59 | < Rhamphoryncus> | still to do: the other half of the curves (and then flip them both), then figure out the number of sprites and tile variations |
14:59 | < Rhamphoryncus> | Particularly for overlapping tracks and switches |
15:00 | < Rhamphoryncus> | Hum.. maybe, rather than a gravel layer and a track layer.. I should do a gravel+track layer and a track *surface* layer |
15:00 | < Rhamphoryncus> | The later being a shiny bit at the top that makes it all look continuous |
15:20 | < RichyB> | What about sleepers? |
15:21 | <~Vornicus> | RichyB: actually this is still a trick of perspective. |
15:22 | <~Vornicus> | Sort of. |
15:22 | < RichyB> | Vornicus, ? My confusion was that I thought TTD used an orthographic projection, not perspective. |
15:23 | < RichyB> | But it's actually more like perspective within the tiles, ortho between them. |
15:24 | | Kindamoody|out is now known as Kindamoody |
15:24 | <~Vornicus> | What's happening here - and why it looks like it's getting closer together - is that you have a transformation that squishes the "vertical" by half. |
15:26 | <~Vornicus> | So in the image, the ellipses are much closer together, but that's simply because the transform makes it that way. |
15:26 | <~Vornicus> | TTD does use an orthographic projection - it's just that orthographic isn't the same as "circles still like circles" |
15:28 | <~Vornicus> | er, still look like circles. |
15:29 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
15:31 | < RichyB> | It's orthographic at a 60° angle, then? |
15:33 | <~Vornicus> | 60 degrees off vertical, yes. |
15:34 | < RichyB> | Thank you for correcting me. |
15:46 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
15:46 | | mode/#code [+o ToxicFrog] by ChanServ |
15:46 | <~Vornicus> | Though |
15:47 | <~Vornicus> | Another thing that may help here is that Rham has not made the circles concentric. |
15:52 | <~Vornicus> | Yeah. Technically, the inner three circles are one tile apart along the whole arc; the outer three are not concentric and so are much closer at the apex. |
15:54 | | * Vornicus redoes the curves in an ortho grid projection to show. |
15:55 | < Tarinaky> | http://i.imgur.com/ur02U.png < Progress! |
15:58 | < Rhamphoryncus> | Tarinaky: shiny :) |
15:59 | <~Vornicus> | Hooray, Progress |
15:59 | < Rhamphoryncus> | the verticals are not squished by half. It's 2 tracks where you should fit 1.4 |
15:59 | | * Vornicus should really use letters and colored box |
15:59 | <~Vornicus> | instead of agonizing over graphics so much |
16:00 | < Rhamphoryncus> | The second smallest curve should actually begin in the center of the tile, making a full circle take 3x3 |
16:01 | < Tarinaky> | Does anyone have suggestions on a Markhov Chain I could use for world name generation? |
16:01 | <~Vornicus> | http://www.flickr.com/photos/7861878@N06/6984917015/ the curves in rham's drawing, shown in an ortho grid projection instead of the 3/4 on the thingy |
16:02 | < Rhamphoryncus> | yeah |
16:02 | <~Vornicus> | Markov Chain is probably not your best bet - it's designed to make stuff like sequences. |
16:02 | <~Vornicus> | You're just generating a pile. |
16:02 | < Rhamphoryncus> | Hmm. Nope, you got the second smallest wrong |
16:02 | < Rhamphoryncus> | The apexes should all match, but there should be a gap after the first one |
16:02 | <~Vornicus> | Second smallest I couldn't figure out how to do, yours is not actually a circle but I can't tell what it is. |
16:02 | < Tarinaky> | Vornicus: Isn't a name a sequence of letters? |
16:02 | < Rhamphoryncus> | It's hand drawn ;) |
16:03 | <~Vornicus> | Tarinaky: ...well, sure |
16:03 | < Rhamphoryncus> | The others I figured out a better way to get gimp to draw lines |
16:03 | < Tarinaky> | Otherwise, what do you mean by pile? |
16:03 | <~Vornicus> | Tarinaky: you're generating a pile of names. |
16:03 | <~Vornicus> | Actually |
16:03 | <~Vornicus> | Go look into how OTTD does name generation. |
16:04 | < Rhamphoryncus> | Or you could ask me ;) |
16:04 | < Tarinaky> | Isn't that just a Markhov Chain? (Root)->(Suffix)->(Suffix)... |
16:04 | < Rhamphoryncus> | At least for newgrfs I know. The builtin ones are special |
16:04 | < Rhamphoryncus> | That sounds about righ |
16:05 | <~Vornicus> | New Gartfingburg! |
16:05 | < Tarinaky> | Prefix->Root->Suffix->Suffix :) |
16:05 | < Tarinaky> | :p |
16:06 | < Rhamphoryncus> | Newgrfs use random combinations of prefixes, roots, and suffixes. They get to design their own tables to control it |
16:06 | < Rhamphoryncus> | But the builtin has some random word generators too |
16:06 | < Tarinaky> | The problem is, I know how I'd generate names from a table of prefixes/roots/suffices and the like. |
16:07 | < Tarinaky> | or some similar set of sequence expansion rules. |
16:07 | < Tarinaky> | I'm not, however, sure what those rules should be. |
16:07 | < Tarinaky> | ottd has a particular 'theme' from its names (British towns) that isn't really thematic for scifi :p |
16:08 | <~Vornicus> | Most games I know draw from a big list of names. |
16:09 | < Rhamphoryncus> | You probably want random word generation. Prefixes/suffixes are secondary |
16:10 | < Rhamphoryncus> | I've seen various fantasy/D&D name generators |
16:13 | < Tarinaky> | And it's coming up with the rules that's the hard part :/ |
16:15 | <~Vornicus> | One thing I've seen that I think could be done further is |
16:16 | <~Vornicus> | SotS has this bit where planets are named from a variety of lists, and it chooses the list based on what race starts closest to it |
16:17 | < Tarinaky> | More effort than I can be bothered with. |
16:17 | < Tarinaky> | I just want to assign every planet a random name :p |
16:20 | <~Vornicus> | THen just find yourself a list of names for now - SotS, SE, MoO, etc etc, they all just go list of names. Can even steal one, for early work. |
16:21 | < gnolam> | https://www.youtube.com/watch?v=YzoXPav7uzs&feature=player_embedded |
16:25 | <~Vornicus> | AI War, OTTD, uh, and that's really about all I can name, use name generation. |
16:37 | < RichyB> | Tarinaky, but it'll be more fuuuun if they pick different lists. |
16:37 | < RichyB> | Well, memorable. |
16:37 | < RichyB> | Much easier to keep track of planets when the west end of the galaxy tends to sound french and the east end of the galaxy tends to be all german. |
16:39 | <~Vornicus> | But what I was geting at and didin't finish |
16:39 | <~Vornicus> | SotS still only gives one name to each star. |
16:41 | <~Vornicus> | But look around the world and you'll find that many stars have multiple names. Alpha Librae is Zubenelgenubi is Elkhiffa Australis. |
16:42 | < Tarinaky> | Okay. What I've got at the moment: Pick two phonecian letters + space + greek letter + number from [1,9] |
16:43 | < Tarinaky> | ie: Hekaph Theta 2 |
16:44 | <~Vornicus> | I like it |
16:45 | < Tarinaky> | ValueError: Attempted relative import beyond toplevel package :/// |
16:45 | < Tarinaky> | Am I being thick? |
16:46 | <~Vornicus> | I don't even know hwat you just did |
16:46 | <~Vornicus> | What's the line that spews that? |
16:48 | | Kindamoody [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has quit [[NS] Quit: See you later, I'm going to get stuff fixed.] |
16:51 | < Tarinaky> | If I try to import from the parent module with from .. import name. |
16:55 | | * Tarinaky shrugs and just adds stuff to the python path. |
17:11 | <~Vornicus> | I've never worked with packages so I don't know how to drive them. |
17:21 | | Kindamoody|out [Kindamoody@Nightstar-5b3db968.telia.com] has joined #code |
17:21 | | mode/#code [+o Kindamoody|out] by ChanServ |
17:30 | <@jerith> | Relative imports are generally bad. |
17:30 | <@jerith> | Try to avoid them. |
17:31 | <@jerith> | (Hint: There are *very* few situations in which avoiding them is hard.) |
17:59 | < Rhamphoryncus> | implicit or explicit relative imports? |
17:59 | < Rhamphoryncus> | Explicit relative imports are good.. when they work. |
18:02 | | ShellNinja is now known as Number3 |
18:02 | | Tarinaky is now known as Lowpass |
18:13 | | Kindamoody|out [Kindamoody@Nightstar-5b3db968.telia.com] has quit [Ping timeout: 121 seconds] |
18:52 | | Number3 is now known as AnnoDomini |
18:52 | | AnnoDomini is now known as Number3 |
18:56 | <~Vornicus> | Rham: actually if you wanted the second inner one to match up it really should have been the same as the innermost one. |
18:57 | < Rhamphoryncus> | The desire is to let them all hit a diagonal at their apex, but the innermost is a cheat |
18:58 | <~Vornicus> | Ah, that would be a little trickier. |
19:05 | | * Vornicus fiddles, examines |
19:05 | <~Vornicus> | Honestly if I were doing it I'd have a 2-long diagonal, and a 3-long diagonal, and have done with it. |
19:05 | <~Vornicus> | (with slopes 1/3 and 1/5 respectively) |
19:44 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds] |
19:50 | | Kindamoody|out [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has joined #code |
19:50 | | mode/#code [+o Kindamoody|out] by ChanServ |
19:54 | | Kindamoody|out is now known as Kindamoody |
19:58 | | Kindamoody|out [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has joined #code |
19:58 | | mode/#code [+o Kindamoody|out] by ChanServ |
19:59 | | Kindamoody|out [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has quit [Client exited] |
20:09 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
20:10 | | mode/#code [+ao Derakon Derakon] by ChanServ |
20:10 | <&Derakon> | Woo scipy. |
20:10 | <&Derakon> | Sure wouldn't want to do 528 * 512 linear fits manually. |
20:12 | <&Derakon> | I'm measuring the response of pixels in a camera to light, so we can perform some postprocessing to account for variations in that response. |
20:16 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
20:16 | | Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
20:17 | <~Vornicus> | woo scipy |
20:18 | <~Vornicus> | --and maybe a 2-3 diagonal |
20:43 | | maoranma [maoranma@Nightstar-333d981b.pools.spcsdns.net] has joined #code |
20:48 | | maoranma [maoranma@Nightstar-333d981b.pools.spcsdns.net] has quit [Connection reset by peer] |
20:49 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
20:58 | | Kindamoody is now known as Kindamoody[zZz] |
21:11 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
21:13 | | maoranma [maoranma@Nightstar-333d981b.pools.spcsdns.net] has joined #code |
--- Log closed Thu Mar 15 22:20:07 2012 |
--- Log opened Thu Mar 15 22:20:31 2012 |
22:20 | | TheWatcher [chris@Nightstar-3762b576.co.uk] has joined #code |
22:20 | | Irssi: #code: Total of 26 nicks [8 ops, 0 halfops, 0 voices, 18 normal] |
22:20 | | mode/#code [+o TheWatcher] by ChanServ |
22:21 | | Irssi: Join to #code was synced in 41 secs |
23:10 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
23:24 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
23:24 | | mode/#code [+o himi] by ChanServ |
23:50 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
23:50 | | mode/#code [+ao Derakon Derakon] by ChanServ |
23:55 | <&Derakon> | So has anyone figured out anything interesting to do with Google's I/O toy yet? |
23:56 | < gnolam> | ? |
23:57 | <&Derakon> | https://developers.google.com/events/io/input-output/ |
23:58 | <&Derakon> | I used the word "toy" deliberately; it appears to be a 2D computerized version of those marble roller coaster things, more or less. |
--- Log closed Fri Mar 16 00:00:25 2012 |