So, I raised the spectre of lisp earlier because brainstorming about the previous suggestion naturally has lead us to thinking about how we could be arbitrary about what fits in this configuration space, allowing nesting and so forth to make it very flexible.

We don't strictly need this for anything that is planned in the near future, and I'm not yet convinced we want it. I think it's still a fruitful exercise to think about what that might look like to figure out if we're setting ourselves up for pain. So ... on with the brainstorming...

For the sake of brevity I'll use 'atom-tag-filter-foo' to mean 'http://www.melkjug.com/filters/AtomTagFilter?tag=foo' etc. If we allowed nested combinations in the thing that became a list, we could express all sorts of other complicated things:

{
'title': 'Show me the Fleem',
'weight': 0.5,
'type': 'custom-amazing-fleem-filter',
'function':
   { 'op': 'max',
     'inputs': ['nick-starred-it',
                      {'op': 'or',
                       inputs: [
                                'atom-tag-filter-foo',
                                'atom-tag-filter-bar',
                       ]
                      }
                    ]
    }
}

The value is the 'max' of the 'nick-starred-it' and the 'or' of the 'atom-tag-filter-foo' and 'atom-tag-filter-bar'... I look at that and start to see an ugly ad-hoc lispy thing:

(max nick-starred-it (or atom-tag-foo atom-tag-bar))

That makes me feel like just leveraging a real existing language in that space if when we have a specific need this sort of flexibility...

On the other hand... it's slightly easier currently to have an ad-hoc buggy lisp and this rendition of is somewhat friendly to work with for most parts of this system. If we were to go this route, my inclination is to just kind of embrace the lispiness and head for something like:

['max', ['nick-starred-it', ['or', 'atom-tag-foo', 'atom-tag-bar'] ]

or in context:

{
'title': 'Show me the Fleem',
'weight': 0.5,
'type': 'custom-amazing-fleem-filter',
'function': ['max', ['nick-starred-it', ['or', 'atom-tag-foo', 'atom- tag-bar'] ]
}

More as it develops....

- Luke


On Jun 25, 2008, at 3:46 PM, Luke Tucker wrote:


Thinking this through a little, for context, It also seems to be an appropriate time to make reference to:

http://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule

" Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.[2] "

- Luke

On Jun 25, 2008, at 1:49 PM, Luke Tucker wrote:


Josh and I have been working on a new filter that allows you to specify multiple tags, it promotes articles that have any of the tags specified. This is primarily driven by Bryan and Sonali's work on figuring out a good demo -- it's pretty common for different blogs use different tags to represent basically the same topic, and we'd really rather not have separate sliders for each of them. For now, the UI for this will be much like the tag filter, but accept a comma separated list of tags. I think it will be pretty cool.

We're thinking rather that rather than having new indexes over all the documents for each cluster of tags that a user set's up, we'll assemble the score out of the already indexed individual tag information during the request.

As a little background, currently the configuration backing one of the sliders you see in the UI looks something like this in json:

{
'title': 'Show me the Golf',
'weight': 0.5
'filter_uri': 'http://www.melkjug.com/filters/AtomTagFilter?tag='golf' ,
}

where the weight corresponds to where the slider is set and the 'filter_uri' corresponds to the type of filter that it's controlling (in this case a tag filter for the tag 'golf'). One slider = one filter. A whole "Jug" specification includes a list of these along with the list of feeds being considered.

We're thinking of changing this up a bit so that one of these 'sliders' can have a more complicated internal configuration. For example, the multi tag filter might look like:

{
'title': 'Show me the Sports',
'weight': 0.5

'type': 'http://www.melkjug.com/filters/MultiTagFilter,

'filters': [ 'http://www.melkjug.com/filters/AtomTagFilter? tag='golf', 'http://www.melkjug.com/filters/AtomTagFilter?tag='baseball' ,
               'http://www.melkjug.com/filters/AtomTagFilter?tag='hockey'
             ],
'op': 'or',
}

Here, we make 'filter_uri' into a list of filter_uris and specify an operation 'op', which signals how to combine the scores of the individual filters in the list. A 'type' is retained so that we know what widget controls it.

So this 'sports' filter will promote an article if it tagged 'golf', 'baseball', or 'hockey' by combining the normal individual tag filters with an (imaginary) "or" operation. I'm sure you can picture some other uses for this structure outside the bounds of the multi-tag filter.

What do y'all think?  better ideas?

- Luke


--
Archive: 
http://www.openplans.org/projects/melkjug/lists/melkjug-development-list/archive/2008/06/1214416175337
To unsubscribe send an email with subject "unsubscribe" to [email protected] . Please contact [EMAIL PROTECTED] for questions.






--
Archive: 
http://www.openplans.org/projects/melkjug/lists/melkjug-development-list/archive/2008/06/1214423214840
To unsubscribe send an email with subject "unsubscribe" to [email protected] . Please contact [EMAIL PROTECTED] for questions.


!DSPAM:4013,4862a123294513327367457!




--
Archive: 
http://www.openplans.org/projects/melkjug/lists/melkjug-development-list/archive/2008/06/1214430037294
To unsubscribe send an email with subject "unsubscribe" to [EMAIL PROTECTED]  
Please contact [EMAIL PROTECTED] for questions.

Reply via email to