IRC log for #storm on 20081001

00:01.05*** join/#storm wallflower (n=wallflow@ip-205-246-113-216.pool.grokthis.net)
01:10.56*** join/#storm niemeyer_ (n=niemeyer@200-138-34-156.ctame705.dsl.brasiltelecom.net.br)
01:19.15*** join/#storm jbot (i=ibot@pdpc/supporter/active/TimRiker/bot/apt)
01:19.15*** topic/#storm is The Storm Python ORM - http://storm.canonical.com/ - 0.13 released! || Review branches: https://code.launchpad.net/~storm/storm/trunk/+landing-candidates
02:47.30*** join/#storm mwhudson (n=mwh@canonical/launchpad/mwhudson)
03:30.45*** join/#storm jamesh (n=james@canonical/launchpad/jamesh)
05:38.24*** join/#storm jml (n=jml@mumak.net)
05:56.34*** join/#storm jukart (n=jukart@lsfw01.lovelysystems.com)
06:03.49*** join/#storm dobee (n=dobee@lsfw01.lovelysystems.com)
06:22.24*** join/#storm jukart (n=jukart@lsfw01.lovelysystems.com)
07:13.18*** join/#storm goschtl (n=goschtl@p5B0BD1B5.dip.t-dialin.net)
07:24.33*** join/#storm dobee (n=dobee@lsfw01.lovelysystems.com)
08:24.02*** join/#storm mwhudson (n=mwh@canonical/launchpad/mwhudson)
08:50.59*** join/#storm lightyear (n=ben@nat/fluendo/x-4c2a3c8ee0d104c6)
10:13.24jameshtherve: there is a test failure with your latest merge to storm's trunk
10:13.33jameshI've filed https://bugs.launchpad.net/storm/+bug/276690 with the details.
10:13.40therveoops
10:13.45thervejamesh: thanks, I'll look at it
10:14.31thervehum, it passes for me
10:15.17jameshthe __hash__() implementation for all variable classes is insane.
10:16.59thervewhat's your python version?
10:17.15jamesh2.5.2
10:17.32jameshthe standard build on hardy/amd64
10:17.52therveah 64 bits, interesting
10:18.22jameshhaving hash() implemented on an object that can mutate its value breaks dictionaries and sets
10:19.05jameshthe hacks in PickleVariable.__hash__ and ListVariable.__hash__ should have been warning signals
10:19.35jamesh(those bits aren't from your branch -- your branch just tickled the existing issue)
10:20.23therveright
10:22.59jameshthere seems to be a lot of code that depends on variables being hashable
10:23.12jameshand hashable based on value
10:25.31therveI don't understand why it doesn't fail for me though
10:27.22jameshme either.
10:27.33jameshactually, yes I do.
10:28.48therveah?
10:29.46jameshso, both variables are hooked to the start-tracking-changes event
10:30.09jameshthe order they get called depends on set iteration order
10:30.48jameshif prop1 gets called first, then its _detect_changes() handler gets hooked to the "flush" event
10:31.08jameshif they get called in the other order, then prop2's _detect_changes() wins
10:31.15therveahah right
10:31.27jameshhaving different set iteration order on different platforms is not too surprising
10:32.23therveindeed
10:38.15*** join/#storm jamesh_ (n=james@canonical/launchpad/jamesh)
10:43.02thervejamesh_: what do you thin of that: http://paste.ubuntu.com/52792/
10:43.41therveI think it's makes sense to special case these variables, as there are mutable ones
11:06.02*** join/#storm niemeyer (n=niemeyer@200-138-34-156.ctame705.dsl.brasiltelecom.net.br)
11:06.57jameshtherve: I tried something like that, and it seemed to pass the tests
11:07.24jameshtherve: but having hash() implemented for _any_ variable is wrong when combined with the __eq__() implementation
11:09.03jameshniemeyer: when you've got time, could you give some input on https://bugs.launchpad.net/storm/+bug/276690 ?
11:09.18niemeyerjamesh: Hey!
11:09.20niemeyerjamesh: Of course
11:09.30niemeyerjamesh: I'll check it out right now
11:12.50jameshI wonder if some variant of "frozen" variables is needed.
11:13.41jameshhmm.  That wouldn't really help for some of the other uses :(
11:13.58niemeyerjamesh: Interesting
11:14.49niemeyerjamesh: I'm not entirely sure if that's a problem right now
11:14.58niemeyerjamesh: I mean, we have to fix this behavior for sure
11:15.17niemeyerjamesh: But the use case for hashing variables now doesn't mutate them
11:15.40niemeyerjamesh: At least I think so, from my vague memories
11:15.54jameshniemeyer: adding a variable method as an event handler hashes the variable.
11:16.29niemeyerjamesh: Right, that was introduced with the recent change
11:16.30jameshor even including a variable as an extra argument to an event handler will
11:16.58niemeyerjamesh: I wasn't clear, sorry.  I was just wondering if we have a bug in the last release or not
11:17.21*** join/#storm andrea-bs (n=andrea@ubuntu/member/beeseek.developer.andrea-bs)
11:17.55niemeyerjamesh: We should definitely do what you suggest and hash by identity
11:18.08jameshniemeyer: PickleVariable.__init__() sure looks like it is hooking methods before therve's merge.
11:18.32niemeyerjamesh: The use case for the current hashing is the caching of objects in the Store.. it should be trivial to fix that with different logic
11:18.33jameshso that aspect isn't new.
11:18.47jameshyeah.  The store._alive dictionary
11:19.18niemeyerjamesh: Ok, so we have to do a 0.14 soon
11:21.01jameshI guess no one was using >1 Pickle or List columns in a single class enough to notice ...
11:21.58niemeyerjamesh: Yeah
11:24.33niemeyerjamesh,therve: I wonder if using the value of get(to_db=True) as the alive key is semantically correct
11:52.53jukartniemeyer: just run into a problem : if a column for a select is a Select it is not surrounded by parenthesis :(
11:55.25therveniemeyer: humm, where does that come from?
11:55.58niemeyerjukart: Can you please file a bug about this one?  Should be easy to fix
11:56.13niemeyertherve: From the variable (?)
11:59.46therveniemeyer: sorry, I'm not following you
11:59.53therveniemeyer: what's the alive key?
12:00.05niemeyertherve: The key of the alive dictionary in the Store
12:00.40therveso for me it's (cls_info.cls, tuple(primary_vars)) ?
12:02.26niemeyertherve: Right
12:02.51niemeyertherve: That's the only reason why variable hashes are as they are now
12:03.06niemeyertherve: We can easily fix the issues we have by replacing the keying
12:05.03therveok I may get it
12:06.05therveright now we're using the variable *object* into the alive dict
12:06.13therveinstead of using the variable value
12:06.49thervethus leading to your comment on get(to_db=True)
12:07.08therve(phew, I catch up)
12:07.31niemeyertherve: That's it! :-)
12:07.38therve:)
12:08.07therveso yeah, it looks good semantically
12:08.11jameshniemeyer: well, they also need to be hashable to be used in event handlers.
12:08.40niemeyerjamesh: How do you mean?
12:08.43thervejamesh: but if we fix the problem in the alive dict, we can remove uoru custom __hash__
12:08.49niemeyerRight
12:08.56therves/uoru/our
12:09.06jameshniemeyer: the hooked callable + extra arguments are stored in a set, so need to be hashable
12:09.30niemeyerjamesh: Right, these expect the variable to be hashable by identity
12:09.48niemeyerjamesh: If we change the behavior of the alive key, we can remove the custom hashing
12:10.18jameshniemeyer: having hash() go by identity but == go by value is still a problem
12:10.33thervethat's true...
12:10.43thervedo we need __eq__ ?
12:10.44jameshif two items end up in the same hash bucket, then you've still got the same problem
12:12.27jameshthere were a bunch of tests that failed when I commented it out, but I didn't check to see if they were all related to store._alive
12:13.03jameshyou really do need "A == B" to imply "hash(A) == hash(B)"
12:13.05niemeyerjamesh: Yeah, we'd have to remove it too.. I imagined that the only reason why that equality is in place is the hashing of alive too
12:13.07jameshor things go wobbly
12:13.13niemeyerjamesh: But it's been two years, so my memory is fading
12:23.33jukartniemeyer: reported here : https://bugs.launchpad.net/storm/+bug/276741
12:23.40niemeyerjukart: Thanks!
12:24.05jukartniemeyer: my problem is now, I can't find a workaround :(
12:24.18johanjamesh: are you working on improving django support?
12:24.38johaneg, admin integration
12:24.45niemeyerjukart: Try to use an Alias perhaps
12:24.54niemeyerjohan: Morning!
12:24.59johanhey niemeyer
12:25.15johanniemeyer: I started to move Stoq over to storm, having plenty of fun :-)
12:26.30niemeyerjohan: Yeah, I can imagine that :)
12:26.43jukartniemeyer: work perfect, thanks for the hint
12:26.51niemeyerjukart: Sweet!
12:28.40therveso removing eq/hash, and fixing alive to use get(to_db=True), seems to work
12:28.57therve52 test failures, mostly from test comparing 2 Variables instances
12:29.08jukartniemeyer: added the workaround to the bug description
12:29.14therveI'm a bit worried about the performance impact though
12:35.05niemeyertherve: It may be a bit more costy indeed
12:35.17niemeyertherve: But there are some savings on equality comparisons, for instance
12:35.52niemeyertherve: Have you made any rough tests to have an idea of the impact?
12:36.06therveniemeyer: not really
12:36.18therveniemeyer: I can try to run landscape test suite :)
12:37.01niemeyertherve: Cool, that might be nice.. also that test you made in the sprint which had a large number of objects alive might give a hint
12:37.49therveoh good idea
12:43.31*** join/#storm kov (n=kov@debian/developer/kov)
14:03.15jameshjohan: integrating with the django admin interface is not something I plan to spend time on.
14:03.35johanjamesh: oh, too bad. It would have been a killer feature.
14:03.42jameshit isn't something I need, and it is non-trivial
14:04.20jameshthe URL traversal alone for the admin interface is pretty heavily tied to the django ORM
14:04.48johanAnd I guess there's no proper interface for that as well
14:57.42*** join/#storm andrea-bs (n=andrea@ubuntu/member/beeseek.developer.andrea-bs)
15:45.32*** join/#storm niemeyer (n=niemeyer@200-181-177-142.ctame705.dsl.brasiltelecom.net.br)
17:24.24*** join/#storm jamesh_ (n=james@canonical/launchpad/jamesh)
17:42.31*** join/#storm dobee (n=dobee@85-124-200-100.static.xdsl-line.inode.at)
18:12.18*** join/#storm jamesh__ (n=james@canonical/launchpad/jamesh)
19:05.49*** join/#storm jamesh__ (n=james@canonical/launchpad/jamesh) [NETSPLIT VICTIM]
19:05.49*** join/#storm jdobrien (n=jdobrien@238.205.119.70.cfl.res.rr.com) [NETSPLIT VICTIM]
19:05.49*** join/#storm rockstar (n=rockstar@canonical/launchpad/rockstar) [NETSPLIT VICTIM]
19:05.49*** join/#storm bac (n=bac@cpe-065-190-187-178.nc.res.rr.com) [NETSPLIT VICTIM]
19:05.49*** join/#storm radix (n=r@wordeology.com) [NETSPLIT VICTIM]
19:05.49*** join/#storm therve (n=th@88.191.37.10) [NETSPLIT VICTIM]
19:19.13*** join/#storm oohlaf (n=olaf@unaffiliated/oohlaf)
19:46.36*** join/#storm jamesh_ (n=james@canonical/launchpad/jamesh)
20:57.35*** join/#storm dobee (n=dobee@85-124-200-100.static.xdsl-line.inode.at)
21:34.05*** join/#storm mwhudson_ (n=mwh@118-93-51-162.dsl.dyn.ihug.co.nz)
22:43.07*** join/#storm kov (n=kov@debian/developer/kov)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.