code logs -> 2012 -> Sun, 26 Aug 2012< code.20120825.log - code.20120827.log >
--- Log opened Sun Aug 26 00:00:14 2012
00:24 You're now known as TheWatcher[T-2]
00:29 You're now known as TheWatcher[zZzZ]
02:46 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
02:52 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
03:28
<~Vornicus>
Birthday haul: Knuth 4A
03:30 * Derakon gets back to trying to figure out why creatures in Pyrel are getting their turns skipped so much.
03:34
<&Derakon>
Man, WTF.
03:34
<&Derakon>
I'm getting "1 - 1 = 1" still.
03:34
<&Derakon>
I've ruled out threading issues by inserting a lock around the value I'm modifying.
03:37
<&Derakon>
...ah ha.
03:37
<&Derakon>
It was a threading issue, but not in the place I was looking.
03:37
<&Derakon>
So we have the base Command class.
03:38
<&Derakon>
Its constructor sets some member fields, and then by default starts up a new thread to obtain any additional required context for executing the command.
03:39
<&Derakon>
This means that any subclass of Command that wants to use the Command constructor and then also set its own member fields needs to explicitly tell that constructor to not start the contextualizer thread.
03:39
<&Derakon>
Otherwise the thread will be started while the rest of the subclass constructor is still running.
03:40
<&Derakon>
And somehow this resulted in the value for self.energyCost reasonably consistently getting updated in between the line where it was used (where it has the default value 0) and the line where it was printed, which was immediately afterwards.
03:40
<&Derakon>
I think I'll make every Command subclass have to start the contextualizer thread manually from now on. This is too slippery otherwise.
03:42
<&Derakon>
Yeah, okay, that seems to be working.
03:47
<&Derakon>
...JSON requires a leading "0" for numbers between 0 and 1. Okay.
03:47
<&Derakon>
(I.e. "0.5" is valid, but ".5" is not)
04:41 Kindamoody is now known as Kindamoody|breakfast
05:04 Kindamoody|breakfast is now known as Kindamoody
05:07
<@Alek>
"Some programmists are so lazy, they write working code right away."
05:12
<&Derakon>
That sounds silly, but the philosophy behind it is entirely sound.
05:13
<&Derakon>
Programmers should be intelligently lazy -- they want to minimize the total work needed to make something do what they want it to do, now and later.
05:13
<&Derakon>
Spending an extra few hours at the outset to figure out the right design can save you days of refactoring later.
05:14
<&Derakon>
Writing bug-free code is typically not feasible, though.
05:14
<&Derakon>
(But, again, a good design can make debugging much easier)
05:19 * Alek nods.
05:25 * Vornicus tries to figure out in what situations that specific restriction makes absolute sense.
05:25
<&Derakon>
What, the JSON thing?
05:25
<~Vornicus>
Yeah.
05:25
<~Vornicus>
I mean, it makes readability sense and I personally would not write .5 because it looks funny
05:25
<~Vornicus>
But...
05:27
<~Vornicus>
And lexing would want it that way too because, you know, numerals say "number coming!" and . says "attribute access" but it's not like there /is/ attribute access in JSON alone
05:29
<&Derakon>
Okay, it's late enough that I shouldn't be coding.
05:30
<&Derakon>
(That's another skill you should pick up if you don't have it already: the ability to recognize when you'll be doing more harm than good)
05:33
<&Derakon>
The specific thing I was working on was constructing a heat map that creatures could use to pathfind to the player.
05:33
<&Derakon>
The idea being that each tile would get a number indicating how far it is from the player; when a creature moves, they move to the tile that takes them closest.
05:34
<&Derakon>
Construction of the map should be a simple matter of floodfilling out from the player...
05:34
<&Derakon>
But it's easy to make inefficient.
05:34
<&Derakon>
And it has to be reconstructed every time the player moves or the terrain is modified.
05:36 iospace is now known as iospacedout
06:33 mac [NSwebIRC@Nightstar-fe8a1f12.il.comcast.net] has joined #code
06:33 mac [NSwebIRC@Nightstar-fe8a1f12.il.comcast.net] has left #code [""]
06:37
< Rhamphoryncus>
Derakon: yeah, that's just precomputed pathfinding
06:37
< Rhamphoryncus>
Well, for some definition of "precomputed"
06:51 Kindamoody is now known as Kindamoody|afk
06:51 Derakon is now known as Derakon[AFK]
07:07 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
07:08 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
08:22 Attilla_ [Obsolete@Nightstar-8e1acbff.as43234.net] has joined #code
08:22 Attilla [Obsolete@FBC920.173C5E.A79230.E8FE3E] has quit [Operation timed out]
09:03 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
10:04 You're now known as TheWatcher
11:44 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
11:58 Reiv [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [[NS] Quit: Going dooooown...]
11:58 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:06 Orthia [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code
12:15 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
12:28 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
13:04 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
13:16 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
13:51 iospacedout is now known as iospace
14:21 gruber [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has joined #code
14:21 gnolam is now known as NSGuest20319
14:21 gruber is now known as gnolam
14:22 NSGuest20319 [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
14:42 Kindamoody|afk is now known as Kindamoody
15:31 Kindamoody is now known as Kindamoody|out
17:59 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code
18:06 rms is now known as Vasi
18:17 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
18:19 Kindamoody|out is now known as Kindamoody
19:07 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
19:43 Derakon[AFK] is now known as Derakon
19:46
< gnolam>
http://img.photobucket.com/albums/v620/theweaselking/main7/5b6f87b3.gif
19:56 Kindamoody is now known as Kindamoody[zZz]
20:29
< froztbyte>
hahaha
20:33
< sshine>
nice.
21:14
< iospace>
gnolam: MY BRAIN IS FULL OF FUCK
21:56 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [Ping timeout: 121 seconds]
23:55 You're now known as TheWatcher[T-2]
23:58 You're now known as TheWatcher[zZzZ]
--- Log closed Mon Aug 27 00:00:30 2012
code logs -> 2012 -> Sun, 26 Aug 2012< code.20120825.log - code.20120827.log >

[ Latest log file ]