fluid-work IRC Logs-2012-09-20

[08:11:57 CDT(-0500)] <colinclark> hey Justin_o

[08:14:11 CDT(-0500)] <Justin_o> colinclark: hello, good morning

[08:14:44 CDT(-0500)] <colinclark> I'm sorry our chat about persisting JSON in Python trickled off there yesterday

[08:14:54 CDT(-0500)] <colinclark> but I wanted to see if I could help at all with your design

[08:15:46 CDT(-0500)] <Justin_o> colinclark: yah.. the community meeting pretty much ate up all the time..

[08:16:12 CDT(-0500)] <colinclark> What do you think of the idea of rolling a super-mini ChangeApplier?

[08:16:21 CDT(-0500)] <Justin_o> colinclark: the good news is that i couldn't sleep last night so i spent an hour or so in the early morning working on it

[08:16:25 CDT(-0500)] <colinclark> lol

[08:16:28 CDT(-0500)] <colinclark> sorry to hear it

[08:16:30 CDT(-0500)] <Justin_o> but i was at home so i didn't have my setup to test it on

[08:16:45 CDT(-0500)] <Justin_o> i'll try to put something in a pastie one second

[08:17:58 CDT(-0500)] <colinclark> cool

[08:18:18 CDT(-0500)] <Justin_o> colinclark: here's the simple event system http://pastie.org/4759927

[08:19:01 CDT(-0500)] <colinclark> you don't go with the fancy operator overloading

[08:19:06 CDT(-0500)] <colinclark> fair enough (smile)

[08:19:24 CDT(-0500)] <Justin_o> colinclark: i'm not really sure it made sense to do +=

[08:19:30 CDT(-0500)] <Justin_o> and -=

[08:19:42 CDT(-0500)] <Justin_o> i figured having more specific control would be easier.

[08:19:43 CDT(-0500)] <colinclark> It might seem more idiomatic if you were a C++ programmer

[08:19:51 CDT(-0500)] <colinclark> I agree, though

[08:21:18 CDT(-0500)] <colinclark> So from the event system, will you roll a little ChangeApplier with a requestChange() method that takes a dictionary?

[08:21:30 CDT(-0500)] <Justin_o> colinclark: this is the start of the changeApplier.. although i realized as i tried to go back to sleep that it wasn't quite right

[08:21:30 CDT(-0500)] <Justin_o> http://pastie.org/4759945

[08:21:32 CDT(-0500)] <colinclark> and fire an modelChanged event from there to a listener that will take care of persistence?

[08:22:25 CDT(-0500)] <colinclark> How is it not quite right, Justin_o, do you think?

[08:23:20 CDT(-0500)] <Justin_o> colinclark: i think i finally understood what Bosmon was saying.. which has to do with ELPaths.. so i'll change this to take in an ELpath instead and method (i.e. add, delete)

[08:23:36 CDT(-0500)] <colinclark> ah, right

[08:23:41 CDT(-0500)] <Justin_o> so in the end, it may only have one actual method on it

[08:23:49 CDT(-0500)] <Justin_o> requestChange

[08:23:51 CDT(-0500)] <colinclark> right

[08:24:05 CDT(-0500)] <colinclark> I'm sorry that you end up having to roll bits of existing infrastructure

[08:24:13 CDT(-0500)] <colinclark> but it's probably a reasonably fun exercise, anyway

[08:24:27 CDT(-0500)] <colinclark> I'd love to chat more about your designs, too...

[08:24:44 CDT(-0500)] <colinclark> I was really impressed to hear you evaluating the goals of your design in the channel yesterday

[08:25:18 CDT(-0500)] <colinclark> that "self-persistent model object" design is one I used to encounter a lot in Java, with more interesting consequences

[08:25:35 CDT(-0500)] <colinclark> the fact that you're already a JSONist helped to deflect most of the pain you would have felt...

[08:25:57 CDT(-0500)] <colinclark> if you were thinking more traditionally in Object Oriented terms, you would have, long ago, modelled all your data as typed object

[08:26:03 CDT(-0500)] <colinclark> probably with lots of getters and setters

[08:26:22 CDT(-0500)] <colinclark> and then you'd be inserting this self-persistence logic as a base class for all your model types

[08:26:41 CDT(-0500)] <colinclark> shoe-horning in the save() functionality into each of your setters or whatever

[08:27:44 CDT(-0500)] <Justin_o> colinclark: yah.. i wouldn't want to do that..

[08:28:15 CDT(-0500)] <colinclark> If you look at how persistence is done in most frameworks, there are sort of two categories

[08:28:33 CDT(-0500)] <colinclark> the object/relational mappers I encountered in Java typically had a separate object that was the central point for persistence

[08:28:48 CDT(-0500)] <colinclark> like Hibernate's Session or, back in the old days, WebObjects had the "EOEditingContext"

[08:29:01 CDT(-0500)] <colinclark> which implemented methods for saving and the like

[08:29:24 CDT(-0500)] <colinclark> and then you'd probably roll your own "Data Access Object" layer to accompany it

[08:29:47 CDT(-0500)] <colinclark> michelled can probably remember the kinds of DataManagers and the like that would take the responsibility for persisting different types of data

[08:30:02 CDT(-0500)] <colinclark> again, much of it mitigated in your distinctly less typeful view of the world, Justin_o

[08:30:20 CDT(-0500)] <colinclark> In "client-side" APIs, you typically see an event system of some kind

[08:30:47 CDT(-0500)] <colinclark> some kind of observation of changes on objects to deal with state changes and the "side-effect" of the need to persist them

[08:31:20 CDT(-0500)] <colinclark> Cocoa and iOS have key/value coding, which has some analogs to our system

[08:31:36 CDT(-0500)] <colinclark> in that it's path-based, allowing you to traverse a graph of related objects using "key paths"

[08:32:01 CDT(-0500)] <colinclark> but then, if I remember, persistence ends up in the older pattern of having a CoreDataContext or something similar

[08:32:06 CDT(-0500)] <colinclark> been a while (smile)

[08:34:08 CDT(-0500)] <colinclark> I guess it's called the ManagedObjectContext in CoreData

[08:34:17 CDT(-0500)] <colinclark> which tells you a lot about the philosophy of its designm

[09:58:10 CDT(-0500)] <Justin_o> yura1, anastasiac: do you remember what fluid.get returns of the elpath doesn't exist?

[09:58:27 CDT(-0500)] <anastasiac> hm

[09:58:48 CDT(-0500)] <yura1> undefined

[09:58:58 CDT(-0500)] <anastasiac> good question, no, and the docs don't say. I'll have to fix that. Thanks for pointing it out (smile)

[09:59:43 CDT(-0500)] <Justin_o> anastasiac, yura1: thanks

[10:25:24 CDT(-0500)] <Justin_o> yura1: do you know if i'm reading this correctly, if i want to perform a deletion of part of the model with the changeApplier, i still need to pass in a value?

[10:27:24 CDT(-0500)] <yura1> not sure you do, but i would have a "DELETE" directive

[10:27:28 CDT(-0500)] <yura1> otherwise i would pass undefined

[10:28:01 CDT(-0500)] <Justin_o> yura1: thanks

[11:41:54 CDT(-0500)] <colinclark> Justin_o: Remind me again what the standard bug workflow is...

[11:42:03 CDT(-0500)] <colinclark> if I review and push a fix, do I resolve and close it?

[11:52:46 CDT(-0500)] <Justin_o> colinclark: yes

[11:54:36 CDT(-0500)] <colinclark> ok, great

[12:55:12 CDT(-0500)] <jessm> idrc, you've gone dark on IM

[12:55:22 CDT(-0500)] <jessm> except the jabber server

[12:55:30 CDT(-0500)] <jessm> oh, maybe just jameswy

[12:55:32 CDT(-0500)] <jessm> nevermind

[13:13:41 CDT(-0500)] <alexn> colinclark michelled: I'm looking into FLUID-4793 and it happens that I found 2 other issues along the way. I created 2 separate JIRAs for them to tackle separately. FLUID-4796 and FLUID-4797 respectively. FLUID-4793 has some explanations how I stumbled upon them. In the meantime colinclark I submitted a fix for FLUID-4796 here https://github.com/fluid-project/videoPlayer/pull/60

[13:14:30 CDT(-0500)] <colinclark> cool, yes

[13:14:59 CDT(-0500)] <colinclark> alexn: I wonder if you have some time this afternoon to think through the "setupEnvironment" thing with me here in the channel?

[13:15:33 CDT(-0500)] <alexn> yes sure we can chat about it any time

[13:16:37 CDT(-0500)] <colinclark> cool

[13:16:40 CDT(-0500)] <colinclark> i'm just eating some late lunch

[13:16:49 CDT(-0500)] <colinclark> i hear i missed indian buffet today

[13:16:56 CDT(-0500)] <colinclark> yura1 must have that special glow

[13:17:01 CDT(-0500)] <alexn> oh no worries I'm still looking into this evil FLUID-4793

[13:17:10 CDT(-0500)] <alexn> oh yes indian lunch was great

[13:17:33 CDT(-0500)] <yura1> colinclark: wasn't my idea (smile)

[13:17:37 CDT(-0500)] <alexn> yura1 has a special "butter chicken" glow

[13:18:17 CDT(-0500)] <Bosmon> colinclark - nice discussion of persistence methodologies

[13:18:27 CDT(-0500)] <colinclark> oh hey

[13:18:30 CDT(-0500)] <colinclark> "morning"

[13:18:39 CDT(-0500)] <Bosmon> Such a relief we can put these evil days of Hibernatism behind us

[13:18:40 C