fluid-work IRC Logs-2008-10-10
[07:41:28 EDT(-0400)] * michelled (n=team@142.150.154.197) has joined #fluid-work
[08:19:56 EDT(-0400)] * EricDalquist (n=EricDalq@adsl-76-208-67-245.dsl.mdsnwi.sbcglobal.net) has joined #fluid-work
[08:37:00 EDT(-0400)] * EricDalquist (n=EricDalq@adsl-76-208-67-245.dsl.mdsnwi.sbcglobal.net) has joined #fluid-work
[08:51:49 EDT(-0400)] * jacobfarber1 (n=Main@CPE00095bc35ea1-CM001692f5798c.cpe.net.cable.rogers.com) has joined #fluid-work
[09:25:46 EDT(-0400)] * anastasiac (n=stasia@72.33.23.226) has joined #fluid-work
[09:43:03 EDT(-0400)] * theclown (n=theclown@guiseppi.atrc.utoronto.ca) has joined #fluid-work
[09:43:36 EDT(-0400)] * colinclark (n=colin@bas1-toronto09-1279475053.dsl.bell.ca) has joined #fluid-work
[10:06:13 EDT(-0400)] * EricDalquist (n=EricDalq@static-210-59.vpn.wisc.edu) has joined #fluid-work
[10:10:54 EDT(-0400)] * apetro (n=apetro@72.33.23.236) has joined #fluid-work
[10:24:14 EDT(-0400)] * jessm (n=Jess@c-76-19-199-61.hsd1.ma.comcast.net) has joined #fluid-work
[10:31:35 EDT(-0400)] <anastasiac> Bosmo1, good morning/afternoon
[10:32:48 EDT(-0400)] <anastasiac> I'm wondering if you can help me understand some rendering stuff
[10:33:10 EDT(-0400)] * Bosmon (n=Antranig@ginger.caret.cam.ac.uk) has joined #fluid-work
[10:33:33 EDT(-0400)] <anastasiac> Bosmon, I'm looking at the preferable use of the renderer that was just committed about 10 minutes ago
[10:33:56 EDT(-0400)] <anastasiac> it works, but i wouldn't have thought it would based on how I thought things worked
[10:34:16 EDT(-0400)] <michelled> that's with the dehydrated form of the tree that you talked me through, Bosmo1
[10:34:20 EDT(-0400)] <anastasiac> the component tree has "opts: null", etc
[10:34:41 EDT(-0400)] <anastasiac> I would have thought that the 'null' would have told the renderer to render that node with nothingness
[10:34:57 EDT(-0400)] <anastasiac> I'm clearly not understanding the nature/purpose of this tree...
[10:35:01 EDT(-0400)] <Bosmon> Ah, yes
[10:35:10 EDT(-0400)] <Bosmon> Well, you have to view it in terms of the "undehydrated" form
[10:35:24 EDT(-0400)] <Bosmon> "opts: null" expands to
[10:35:33 EDT(-0400)]
<Bosmon>
[10:35:42 EDT(-0400)] <Bosmon> And null is really indistinguishable from undefined
[10:35:52 EDT(-0400)] <Bosmon> which means you are supplying "no value" from the component tree side
[10:35:53 EDT(-0400)] <anastasiac> ok, but I still would have thought the same thing, null/undefined/{}
[10:36:09 EDT(-0400)] <anastasiac> that's my point - if you're supplying 'no value' then why is it rendering?
[10:36:11 EDT(-0400)] <Bosmon> Now, the real meaning of "supplying no value" is "I am happy with what is in the template already"
[10:36:20 EDT(-0400)] <anastasiac> ah!
[10:36:22 EDT(-0400)] <Bosmon> it is rendering because there is a component
[10:36:30 EDT(-0400)] <anastasiac> fog, lifting
[10:36:32 EDT(-0400)] <Bosmon> If there is a component, then things render
[10:36:37 EDT(-0400)] <Bosmon> If there is no component, then things do not render
[10:37:06 EDT(-0400)] <Bosmon> Now, components have values bound to them.... and values which are "no value" are a symbol which says, "I don't want to influence this piece of markup"
[10:37:30 EDT(-0400)] <anastasiac> light bulb brightening, albeit slowly
[10:37:44 EDT(-0400)] <Bosmon> The "rendering idiom" is really a sort of "do no harm" idiom
[10:37:58 EDT(-0400)] <Bosmon> Basically, unless you say something to influence something, you get whatever is already written in the markup
[10:38:07 EDT(-0400)] <anastasiac> ok, but if you don't want to change the template, why put an rsf:id on it at all?
[10:38:17 EDT(-0400)] <Bosmon> You might want to conditionally change the template
[10:38:32 EDT(-0400)] <Bosmon> Putting the rsf:id on it is a signal that you might want to take the driving seat in some cases
[10:38:49 EDT(-0400)] <anastasiac> ok, cool - makes sense
[10:38:57 EDT(-0400)] <Bosmon> But of course you must always have the option to "give away" your control
[10:38:59 EDT(-0400)] <anastasiac> I guess in differing situations, you may want to render
[10:39:03 EDT(-0400)] <anastasiac> very nice
[10:39:04 EDT(-0400)] <Bosmon> And revert it back to the markup author
[10:39:17 EDT(-0400)] <anastasiac> though I have to say, seeing 'null' is a bit unintuitive at first
[10:39:24 EDT(-0400)] <Bosmon> Yes
[10:39:26 EDT(-0400)] <Bosmon> Maybe
[10:39:27 EDT(-0400)] <anastasiac> not sure I can think of anything better, though
[10:41:36 EDT(-0400)] <anastasiac> ok, cool. more pieces of the puzzle finding their spot in my head...
[10:41:48 EDT(-0400)] <anastasiac> thanks!
[10:42:43 EDT(-0400)] <anastasiac> I think I will spend a bit of time learning more about the hydrated form of the component tree, since that seems to be the more 'real' format...
[10:42:54 EDT(-0400)] <Bosmon> Yes
[10:42:56 EDT(-0400)] <Bosmon> It is
[10:43:00 EDT(-0400)] <anastasiac> better to learn to write properly before learning shorthand
[10:43:50 EDT(-0400)] <anastasiac> so, regarding how to give control away, Bosmon...
[10:43:57 EDT(-0400)] <anastasiac> null, undefined, {}
[10:44:08 EDT(-0400)] <anastasiac> is there a preferred, more 'proper' choice of these three?
[10:44:31 EDT(-0400)] <anastasiac> I would think {} would be most appropriate. It doesn't have the
[10:44:34 EDT(-0400)] <Bosmon> Well, {} is really "not right"
[10:44:39 EDT(-0400)] <Bosmon> It actually represents an "object"
[10:44:42 EDT(-0400)] <anastasiac> ok...
[10:44:58 EDT(-0400)] <Bosmon> "null" is the preferred option
[10:45:15 EDT(-0400)] <Bosmon> Since I think it is not really good for "undefined" to be stored as a value member
[10:45:16 EDT(-0400)] <anastasiac> I would think that {}, being an object, might be more correct, since you do want the node rendered, you just don't want to supply your own value.
[10:45:23 EDT(-0400)] <anastasiac> but ok, null is the way to go
[10:45:26 EDT(-0400)] <Bosmon> Yes, but {} IS a value
[10:45:36 EDT(-0400)] <anastasiac> yes, and you do want the node rendered
[10:45:44 EDT(-0400)] <anastasiac> but you don't want to supply a 'custom' value
[10:45:48 EDT(-0400)] <Bosmon> Yes, but you have written a component
[10:45:50 EDT(-0400)] <Bosmon> To represent that
[10:46:01 EDT(-0400)] <anastasiac> I have??
[10:46:04 EDT(-0400)] <Bosmon> Yes
[10:46:22 EDT(-0400)]