--- Log opened Sat Sep 09 00:00:50 2017 |
00:09 | | RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has quit [Operation timed out] |
00:30 | | Kindamoody is now known as Kindamoody[zZz] |
01:00 | | celticminstrel [celticminst@Nightstar-pqopqb.dsl.bell.ca] has joined #code |
01:00 | | mode/#code [+o celticminstrel] by ChanServ |
02:34 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
02:35 | | Vornicus [Vorn@Nightstar-ct9c67.ma.comcast.net] has joined #code |
02:35 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
02:45 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
02:48 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
02:48 | | mode/#code [+o Alek] by ChanServ |
02:57 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Connection closed] |
03:02 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
03:02 | | mode/#code [+o Alek] by ChanServ |
03:27 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
03:27 | | mode/#code [+o mac] by ChanServ |
03:30 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
03:38 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
03:38 | | mode/#code [+o macdjord] by ChanServ |
03:41 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
04:07 | | Degi [Degi@Nightstar-uc9ip3.dyn.telefonica.de] has quit [Ping timeout: 121 seconds] |
04:25 | | Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection reset by peer] |
04:32 | <&McMartin> | This may be the least practical post I've ever made, but it was fun to data-gather for: https://bumbershootsoft.wordpress.com/2017/09/09/c64-basic-performance-tuning/ |
05:04 | | Derakon[AFK] is now known as Derakon |
05:58 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
05:58 | | mode/#code [+o mac] by ChanServ |
06:01 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
06:23 | | celticminstrel [celticminst@Nightstar-pqopqb.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:27 | | Derakon is now known as Derakon[AFK] |
06:57 | | Kindamoody[zZz] is now known as Kindamoody |
07:12 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
07:12 | | mode/#code [+o macdjord] by ChanServ |
07:15 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
08:20 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
08:20 | | mode/#code [+o mac] by ChanServ |
08:22 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
08:39 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
08:39 | | mode/#code [+o macdjord|slep] by ChanServ |
08:42 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
08:52 | | Kindamoody is now known as Kindamoody|afk |
09:17 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
09:17 | | mode/#code [+o macdjord] by ChanServ |
09:19 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
09:36 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
09:36 | | mode/#code [+o mac] by ChanServ |
09:39 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Operation timed out] |
09:53 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
09:53 | | mode/#code [+o macdjord] by ChanServ |
09:55 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
09:55 | | mode/#code [+o macdjord|slep] by ChanServ |
09:56 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
09:58 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
10:07 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
10:07 | | mode/#code [+o macdjord] by ChanServ |
10:10 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
10:19 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
10:19 | | mode/#code [+o mac] by ChanServ |
10:21 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Operation timed out] |
11:00 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
11:00 | | mode/#code [+o macdjord|slep] by ChanServ |
11:03 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
11:18 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
11:18 | | mode/#code [+o macdjord] by ChanServ |
11:20 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
11:21 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
11:21 | | mode/#code [+o mac] by ChanServ |
11:23 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
11:41 | | Jessikat [Jessikat@Nightstar-m5ad6c.dab.02.net] has joined #code |
12:32 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
12:32 | | mode/#code [+o macdjord] by ChanServ |
12:35 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
13:58 | | Jessikat` [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
13:58 | | Jessikat [Jessikat@Nightstar-m5ad6c.dab.02.net] has quit [[NS] Quit: Bye] |
14:17 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
14:17 | | mode/#code [+o mac] by ChanServ |
14:20 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
14:20 | | mode/#code [+o macdjord|slep] by ChanServ |
14:20 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
14:22 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
14:48 | | RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has joined #code |
15:16 | | celticminstrel [celticminst@Nightstar-pqopqb.dsl.bell.ca] has joined #code |
15:16 | | mode/#code [+o celticminstrel] by ChanServ |
15:41 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
15:42 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
15:42 | | mode/#code [+o macdjord|slep] by ChanServ |
15:51 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
16:01 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
16:01 | | mode/#code [+o macdjord] by ChanServ |
16:06 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [[NS] Quit: Wenn ist das Nunstück git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput] |
16:12 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
16:12 | | mode/#code [+o macdjord] by ChanServ |
19:41 | | Derakon[AFK] is now known as Derakon |
19:42 | <&Derakon> | So, I'm working on making my map generator deterministic. Its use of the random library is fine, it's where it runs into stuff like "the order of iteration over sets is not consistent" that I have problems. |
19:42 | <&Derakon> | In order to help me identify where my program state changes from one run to the next, I've been implementing __hash__ functions for all of my objects. |
19:42 | <&Derakon> | And I have discovered a very inexplicable behavior. |
19:43 | <&Derakon> | In one __hash__ function, I have: |
19:43 | <&Derakon> | for neighbor, door in neighbor_to_door.items(): |
19:43 | <&Derakon> | pass |
19:43 | <&Derakon> | And that results in one program behavior. |
19:43 | <&Derakon> | If I change it to: |
19:43 | <&Derakon> | for neighbor, door in neighbor_to_door.items()[:0]: |
19:43 | <&Derakon> | pass |
19:43 | <&Derakon> | Then I get a different behavior! |
19:44 | <&Derakon> | Both snippets should be no-ops, just one iterates over the entire dict and the other constructs a zero-length list and iterates over that instead. |
19:44 | <&Derakon> | (Well, this is 2.7, so the first generates a full-length list and iterates over it, and the second generates a full-length list, truncates it to zero-length, and iterates over it) |
19:44 | <&Derakon> | Either way, what the Christ. |
19:44 | < ErikMesoy> | Indeed. |
19:57 | | Jessikat` [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving] |
20:01 | | Kindamoody|afk is now known as Kindamoody |
21:55 | | macdjord is now known as macdjord|slep |
22:24 | < RchrdB> | Derakon, that IS weird. Lemme check for certain that set.items isn't lazy. |
22:24 | <~Vornicus> | in 2.7 it should not be. |
22:25 | < RchrdB> | wait that's dict.items(), I know that's not lazy |
22:33 | <~Vornicus> | when you say "different behavior" - do you mean the hash of otherwise identical objects are different? |
22:38 | <&Derakon> | I haven't done a great job of investigating yet, but one behavior results in successful completion of the map, and the other runs into a rare bug with trying to lock the same door twice. |
22:39 | <&Derakon> | Which is presumably caused by a different internal state of the map, somehow. |
22:41 | <&McMartin> | Are you modifying the members of the dict while it is mid-iteration? |
22:41 | <&McMartin> | ... which shouldn't matter for items() if it's nonlazy |
22:44 | <~Vornicus> | and we're single threaded here so there's no race yet |
22:44 | <~Vornicus> | items() will do all its work 'at once' as far as we care |
22:46 | | Degi [Degi@Nightstar-ln7ajd.dyn.telefonica.de] has joined #code |
22:52 | <&Derakon> | Indeed, if I were modifying the dict, I'd get an error because Python doesn't like it if you modify the thing you're iterating over. |
22:52 | <&Derakon> | And yes, singlethreaded. |
23:06 | < RchrdB> | You can have some concurrency in a single-threaded Python program; sys.trace(), signals and __del__() all run at unpredictable times w.r.t. the rest of your code. |
23:07 | < RchrdB> | Hopefully none of those matter for your specific program here, just mentioning for completeness. |
23:07 | <&Derakon> | I'm not using any of those. |
23:07 | <&Derakon> | Good to know about though. |
23:10 | < RchrdB> | sys.trace() is a debugging tool, it lets you run user-defined code once for every (line, function call, something else I can't remember) that occurs. It's super slow so it's only ever turned on deliberately, e.g. pdb uses it to let you single-step through your program. |
23:13 | <&ToxicFrog> | Argh. I think I finally have an idea for how to handle precompiled references to function definitions in ROM, but it's uuuugly and it feels like there should be a better way to do this. |
23:15 | < RchrdB> | oh yeah this reminds me sys.trace() is super cool for when you have a question of the form "okay which one of you ASSHOLES modified this fucking mutable data structure that I was hoping would never change?" |
23:16 | <&Derakon> | RchrdB: that's the kind of thing I usually use a namedtuple for. |
23:17 | < RchrdB> | yeah "just make the data structure immutable" isn't always an option in python |
23:17 | < RchrdB> | sometimes the data structure you care about is, say, sys.path |
23:17 | < RchrdB> | you can do stuff like, at start-up, set a trace function that tests if the thing has been fucked & calls pdb.set_trace() if it has; then you run your code as normal (and it runs like 10x slower, but oh well) and then you find yourself at a pdb prompt with the thing that screwed the pooch visible on the call stack |
23:19 | < RchrdB> | there was a really good talk on this and other uses of the weird bits of Python at Pycon last year https://www.youtube.com/watch?v=bAcfPzxB3dk |
23:35 | | Kindamoody is now known as Kindamoody[zZz] |
--- Log closed Sun Sep 10 00:00:52 2017 |