code logs -> 2011 -> Sun, 06 Mar 2011< code.20110305.log - code.20110307.log >
--- Log opened Sun Mar 06 00:00:48 2011
00:26 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
00:37 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
00:59 AnnoDomini [annodomini@Nightstar-a7b3a800.adsl.tpnet.pl] has quit [[NS] Quit: Enough!]
01:00 You're now known as TheWatcher[T-2]
01:04 You're now known as TheWatcher[zZzZ]
01:24 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
01:27 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Ping timeout: 121 seconds]
01:45 Alek is now known as Sofia
02:32 Kindamoody is now known as Kindamoody[zZz]
04:28 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Connection closed]
04:28 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
04:59 * Derakon starts ripping Jetblade's map graph to shreds in an attempt to replaced the pseudo-cyclic tree structure with a standard undirected planar graph.
04:59
<@Derakon>
<3 source control for making this safe to do~
05:00
< Sofia>
ooo, we can has Jetblade any time soon?
05:00
<@Derakon>
Um, I haven't done any significant work on it since, uh, June.
05:00
<@Derakon>
And despite putting it up on Google Code somehow I haven't received the stream of contributors one might expect~
05:02
< Reiv>
Yeah, shocking innit
05:02
< Reiv>
The key is you sort of need to do work on it too, which is a pain.
05:02
< Reiv>
In fact one could say it rather defeats the point~
05:02
<@Derakon>
I got a crapton done on it between, oh, February and June.
05:02
<@Derakon>
Then I started looking for a job.
05:02
<@Derakon>
(Wait, that was a year and a half ago.)
05:06 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
05:07 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
05:15 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
05:15 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
05:20 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
05:20 Kindamoody[zZz] [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
05:35 Sofia is now known as Alek
05:48 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
05:53
<@Derakon>
Any objections to the construct "[foo.bar() for foo in fooList]"?
05:57 * Derakon finishes the refactor, hits the go button, gets a segfault.
05:57
<@Derakon>
Silly Python, you aren't supposed to segfault.
05:58
<@Derakon>
...and it's apparently segfaulting before a location that just earlier was giving me runtime errors because of undefined symbols, and which presumably it had to have reached previously.
06:04
<@Vornicus>
Der: no problems there.
06:06
<@Derakon>
Oh, durr.
06:07
<@Derakon>
I had two conflicting CProfile instances since delaunay.py was still under the assumption that it was a standalone program.
06:07
<@Derakon>
...now I'm getting malloc errors? O_o
06:08
<@Derakon>
"Python(971,0xa0942500) malloc: *** mmap(size=4294725632) failed (error code=12)"
06:08
<@Derakon>
That size looks bogus.
06:09
<@Derakon>
Now how do I get that error to result in a stack trace?
06:09
<@Derakon>
Right now it's not immediately fatal, which makes tracking it down difficult.
06:10
<@Vornicus>
how the hell are you getting an mmap of size... uh.
06:11
<@Vornicus>
-241664? that's kind of random.
06:12
<@Derakon>
Um, 4294725632 is 2^32.
06:13
<@Vornicus>
4294967296
06:13
<@Vornicus>
No it's not.
06:14
<@Derakon>
Oh, whoops.
06:14
<@Vornicus>
it's 241664 less than 2^32
06:14
<@Derakon>
It's just almosts 2^32.
06:14
<@Derakon>
Right.
06:14
<@Derakon>
Sorry, a bit tired.
06:16
<@Vornicus>
http://www.wolframalpha.com/input/?i=241664 which is a little bit interesting, it's a multiple of 4096.
06:17
<@Derakon>
...wait, what. The first malloc error comes when I call random.seed().
06:17
<@Derakon>
Or rather, I've bracketed it to that point using print statements.
06:18
<@Derakon>
But I can't be certain that the print statements and the malloc errors come out in the right order.
06:18
<@Vornicus>
random.seed creates a 624-entry list.
06:18
<@Derakon>
Okay, yeah, if I do sys.exit() before calling random.seed() I still get the malloc error.
06:19
<@Vornicus>
weird
06:20
<@Derakon>
...it's my logger. What?
06:21
<@Vornicus>
wtf is your logger doing, causing giant mallocs
06:21
<@Derakon>
I have no idea.
06:21
<@Derakon>
But the difference between "logger.inform("Test"); sys.exit()" and just "sys.exit()" is a malloc error message.
06:22
<@Derakon>
The logger doesn't do this if I isolate it, which is good because I haven't changed the bloody thing in ages.
06:22
<@Derakon>
It's pretty simple.
06:22
<@Derakon>
So I must be horking it somehow.
06:25
<@Derakon>
Okay, the errors start showing after I import mapgraph.py, which is the new module I wrote to generate maps using the Delaunay triangulator.
06:26
<@Derakon>
...oh. Right.
06:26
<@Derakon>
Similar to the earlier error.
06:26
<@Derakon>
delaunay.py is also recompiling the Vector2D and Line Cython moduless.
06:26
<@Derakon>
And initializing pygame.
06:27
<@Derakon>
And creating a new screen.
06:27
<@Vornicus>
Whoops.
06:28
<@Derakon>
Yeah, there we go. Now it breaks it a much more sensible manner.
06:28
<@Derakon>
AttributeError: 'NoneType' object has no attribute 'zone'
06:39
<@Derakon>
...bahhh, apparently Python's sort() function can't handle comparators that return longs instead of ints.
06:42
<@Derakon>
I need a function to order my Vector2D instances into some consistent, if arbitrary ordering.
06:42
<@Derakon>
I was using (a.ix - b.ix) * 1000000 + (a.iy - b.iy) but that gets out of bounds.
06:42
<@Derakon>
ix and iy are accessors that cast the x and y fields to ints.
06:47
<@Vornicus>
ix*ix + iy*iy is your key
06:47
<@Derakon>
Ah, makes sense.
06:47
<@Derakon>
Thanks.
06:48
<@Vornicus>
Don't use compare, use a sort key like that.
06:48
<@Vornicus>
I wonder if there's a nice way to make your thing use a default sort key.
06:49
<@Derakon>
I'm doing "foo.sort(sortVectors)" where sortVectors is the function that, now, returns a.ix * b.ix + a.iy * b.iy.
06:49
<@Derakon>
Oh, wait, you were suggesting mapping each Vector2D to self.ix ** 2 + self.iy ** 2, weren't you?
06:49
<@Derakon>
And then sorting based on those values?
06:49
<@Derakon>
Should be functionally similar to using sortVectors() though.
06:57
<@Vornicus>
Right.
06:57
<@Derakon>
This is a one-time sort so I'm not terribly worried about performance.
06:58
<@Vornicus>
actually no, your sort there won't be a reasonable sort.
07:19
<@Vornicus>
like, it's literally dotproduct.
07:19
<@Vornicus>
it doesn't meet even the most basic requirements of a sort comparison.
07:20
<@Derakon>
What about a.ix ** 2 + a.iy ** 2 - (b.ix ** 2 + b.iy ** 2)
07:21
<@Derakon>
Hm. This is...not desirable. http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen38.png
07:28 Kindamoody[zZz] is now known as Kindamoody
07:34 Derakon is now known as Derakon[AFK]
07:36 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!]
07:50 Kindamoody is now known as Kindamoody|out
08:00 Kazriko [kaz@Nightstar-5badc7ed.client.bresnan.net] has quit [Ping timeout: 121 seconds]
08:11 Reivles [orthia@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
08:15 Reivles [orthia@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds]
08:16
<@Vornicus>
no it is not.
08:30 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
08:43 Vornicus is now known as Vornicus-Latens
08:47 Kazriko [kaz@Nightstar-5badc7ed.client.bresnan.net] has joined #code
08:47 mode/#code [+o Kazriko] by Reiver
09:05 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
09:05 mode/#code [+o Attilla] by Reiver
09:52 AnnoDomini [annodomini@Nightstar-a7b3a800.adsl.tpnet.pl] has joined #code
09:52 mode/#code [+o AnnoDomini] by Reiver
10:02 Reivles [orthia@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
10:16 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
10:46 Kindamoody|out [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
10:50 You're now known as TheWatcher
11:26 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
11:26 mode/#code [+o Attilla] by Reiver
11:43 AnnoDomini [annodomini@Nightstar-a7b3a800.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
11:46 AnnoDomini [annodomini@Nightstar-c155cec9.adsl.tpnet.pl] has joined #code
11:46 mode/#code [+o AnnoDomini] by Reiver
11:55 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
12:47 Reivles [orthia@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds]
14:06 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
14:48 PinkFreud is now known as SteveJobs
14:49 SteveJobs is now known as PinkFreud
15:04 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer]
15:04 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
15:26 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
16:27 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Client closed the connection]
16:27 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
16:47 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
16:47 KiMo [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
16:49 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
16:50 Kindamoody is now known as Kindamoody|out
16:50 KiMo [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Client exited]
16:54 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer]
16:54 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
17:12 Derakon[AFK] is now known as Derakon
17:24 Kindamoody|out is now known as Kindamoody
17:26 KiMo [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
17:29 KiMo [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Client exited]
17:31 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
17:31 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
17:32 Syloq is now known as Syloqs-AFH
17:32 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
17:37
< Phox>
Hmm. Riddle me this. I'm interfacing an ARM micro with an LCD screen. The spec-sheet for the screen keeps writing values as "0xFFH", rather than teh expected "0xFF" What's the H doing? Is it just there to imply an active high logic state?
17:37
< Phox>
*the
17:39
< Phox>
It's even in the example assembly code. For example, to test for a busy flag, they use "MOV P1,#FFH".
17:39
< FurryHelix>
Combining 0xFF and FFh, just to make sure you really really know it's hex? :p
17:40
< gnolam>
h as in hex.
17:40
< gnolam>
FurryHelix: Yup.
17:40
< Phox>
Oh, derp, yes. That's exactly the context
17:40
< Phox>
Thanks
17:41
< gnolam>
For more information, contact the Department of Redundancy Department.
17:42
< Phox>
Actually, on that topic, is that just a typographical thing for clarity? Or, is it actually compilable in that format?
17:42 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
17:43
< gnolam>
Actually compilable.
17:45 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Client closed the connection]
17:45 Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
17:45
< gnolam>
Assemblers are /meant/ to be simple.
17:46
< gnolam>
And consistent.
17:52 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
17:54 Syloq is now known as Syloqs-AFH
17:58 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
18:01 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
18:07 AnnoDomini is now known as Birds
18:46
<@Derakon>
It seems like I ought to be able to use map() instead of the "[foo.bar() for foo in fooList]" construct, but how?
18:46
<@Derakon>
Problem being that bar() requires foo as a first argument.
18:56
<@jerith>
"List comprehension".
18:56
<@jerith>
And you can, but it's less elegant.
18:57
<@jerith>
map(lambda x: x.bar(), foolist)
19:05
<@Derakon>
Yeah, I know what that construct is called. :p
19:06
<@Derakon>
Invoking a lambda doesn't seem much better than the list comprehension.
19:06
<@Derakon>
Oh, well.
19:41 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
19:42 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
19:49 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [[NS] Quit: ]
19:56 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
19:57 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
20:07 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
20:10 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
20:19 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
20:24 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
20:27 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
20:27 mode/#code [+o Attilla] by Reiver
21:10 Vornicus-Latens is now known as Finerty
21:12 Birds is now known as AnnoDomini
21:13 * Derakon eyes his output.
21:13
<@Derakon>
"set([<Vector2D (2669.0, 1716.0)>])"
21:15
<@Derakon>
I guess it's normal for sets to display as "([item1, item2, ...])". Weird.
21:15
<@Derakon>
I thought I had a set of lists of size one.
21:19
<@Derakon>
Okay, what the crap.
21:19
<@Derakon>
http://paste.ubuntu.com/576644/
21:20
<@Derakon>
I'm calling that function on object A with object B as the argument; A != B.
21:20
<@Derakon>
Before calling it, A has zero neighbors. After, it has 2, one of which is itself. WTF?
21:20
<@Derakon>
self.neighbors is a set.
21:24 * Derakon adds "print self.neighbors is neighbor.neighbors", gets True. What the Christ.
21:24
<@Derakon>
Here's the constructor: http://paste.ubuntu.com/576645/
21:24
<@Derakon>
Apparently this is causing all GraphNode instances to share the same list of neighbors. What. The. Christ.
21:25
<@Derakon>
Where's Rhamphoryncus when you need him?
21:25
<@Derakon>
Or Vorn!
21:25
<@Derakon>
Oh, Vorn's under an assumed name.
21:35
<@Finerty>
Okay here's the deal
21:35
<@Finerty>
Objects as default arguments are method-static.
21:36
<@Finerty>
Which means that using mutators on them will make you go "what"
21:37
<@Finerty>
Many people have called this a bug in Python but the coredev doesn't seem to want to hear it.
21:37
<@Derakon>
Argh.
21:37
<@Derakon>
Python should not have gotchas. :(
21:37
<@Derakon>
Okay, thanks.
21:37
<@Finerty>
Use None instead of set() and then check against None to decide whether to generate the set.
21:37
<@Derakon>
Yeah.
21:37
<@Derakon>
Or just do set(arg).
21:53 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
21:53 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
21:53 mode/#code [+o Attilla] by Reiver
22:20 Attilla_ [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
22:22 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
22:37 Reivles [orthia@3CF3A5.E1CD01.36D449.95F5A5] has joined #code
22:44 AnnoDomini [annodomini@Nightstar-c155cec9.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
22:57
<@Derakon>
Okay, progress is being made. http://derakon.dyndns.org/~chriswei/games/jbrl/mapgen38b.png
22:57
<@Derakon>
That's using the new Delaunay triangulation method.
22:57
<@Derakon>
Unfortunately it's not without flaws.
22:57
<@Derakon>
In the lower-right area there's an edge whose corresponding tunnel got blocked, and in the mid-right there's an excessively narrow tunnel.
22:58
<@Derakon>
I think the problem here is that edges in the graph are able to come too close to nodes in the graph, but I don't know how to prevent that.
23:07
<@Finerty>
I like it though.
23:08 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
23:11 Finerty is now known as Vornicus
23:11
<@Derakon>
Yeah, aside from the glaring flaws it's a nice map~
23:12 Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code
23:14
<@Derakon>
Hm, if I prune all edges that have a distance to a node not in the edge that is less than the average edge length, then I end up with a map composed entirely of walls.
23:34
< Reiv>
What's delauny triangulation method?
23:39 Attilla_ [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
23:45 Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code
23:45 mode/#code [+o Attilla] by Reiver
23:47 You're now known as TheWatcher[T-2]
23:51 Kindamoody is now known as Kindamoody[zZz]
23:58 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
23:58 You're now known as TheWatcher[zZzZ]
23:58 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
--- Log closed Mon Mar 07 00:00:49 2011
code logs -> 2011 -> Sun, 06 Mar 2011< code.20110305.log - code.20110307.log >