#milkymist IRC log for Thursday, 2013-03-14

larsclekernel: that the remaining non-deterministines is small enough, so I could verfiy that things still work09:27
larscat least the generated code is the same09:28
lekernelall non-determinism is bugs and should go...10:56
lekernelI think I just found another one... let me check10:57
Action: lekernel is just back from TU10:57
lekernellarsc, better now? send me a diff of the changed lines if you still get problems11:21
GitHub44[migen] sbourdeauducq pushed 1 new commit to master: http://git.io/Zqjb1Q11:21
GitHub44migen/master 5adab17 Sebastien Bourdeauducq: flow/actor/filter_endpoints: deterministic order11:21
lekernelthere's still an issue in asmicon but I'm not sure you're using it now11:21
lekernelgrmbl I wish there were an option in python to make ids and iteration orders on sets/dictionaries deterministic11:28
lekernelthis thing is just super-annoying with migen11:28
lekernelI wonder how much performance they get by dropping deterministic iteration orders... and it's not like python is optimized for performance to begin with11:32
wpwrakdoes iteration over the same set/dict yield different orders ? or do you mean iteration over equivalent but not identical ones ?11:35
lekernelthe iteration order will be different between runs of the same program11:36
lekernelif you don't modify the set/dict, and don't re-run the program, the order is the same11:36
wpwrakhmm, you could sort by content if you really really need this sort of determinism ...11:37
wpwrakit's interesting that order would change per invocation if everything else is identical11:38
larscI think there is a OrderedDict11:39
lekernelsorting by content is basically what I'm doing right now, but I have to do it manually and spot problematic code11:39
wpwrakmay it's caused by some address space layout randomization. you could try to turn that off. ... or of course use lars' suggestion :)11:40
lekernelalso, sometimes you have dict/sets of other objects, then python uses the id() by default, which is whatever address it got from malloc() - another source of non determinism11:40
lekernelmigen has a HUID class that makes the id() an object creation counter instead, but again you have to use that manually11:41
lekernelOrderedDict isn't the default, if you use the syntactic sugar you get a normal non-deterministic dict11:41
lekerneland there's no ordered set11:41
lekerneland object.__dict__ is not an OrderedDict but the crappy one11:41
lekernellots of time wasted to that little detail11:42
larscwell, a set is a dict where all the values are None11:42
lekernelyes, but again - if you build a set with {item1, item2, ...} that's not what you get11:43
larscbecause normally you don't need this11:43
lekernelcan't they just make all sets and dicts OrderedSet/OrderedDict and be done with that?11:44
larscsend a patch ;)11:46
lekernelyeh, a "PEP" with all the bureaucracy...11:46
lekernelpick your evil11:46
lekernel(and then, assuming it gets through, people like debian users will still have problems for years)11:52
lekernellarsc, do you still have non-determinism problems after my last commit?12:21
larsclekernel: I'll test when I'm back home12:23
lekernelthe unordered set/dicts really seem to cause more problems than they solve12:49
lekernelah: On Python 3.3 and greater, hash randomization is turned on by default.12:52
lekernelI had Python 3.2 before... this explains some of the new problems12:53
lekernelotoh this can be used as another argument in favor of orderedsect/ordereddict by default... anyone feels like writing a PEP?12:59
lekernelthey even get non-determinism in their own compiler now :-)13:00
lekerneland then we could also (ab)use keyword arguments to replace .eq()13:04
larscfound the cause for last non determinisic naming19:07
larscit's in the very core of migen itself19:07
lekernellarsc, that is...?22:40
--- Fri Mar 15 201300:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!