Channel #semsol: Logs

This is a public chat log generated from the #semsol IRC channel.

08:43:24 kwijibo: bengee: I can think of two use cases for pre-query triggers now: SPARQL-rewriting, and generating changesets with each DELETE/INSERT
08:45:25 bengee: interesting
08:45:53 kwijibo: maybe triggers could have before and after methods
08:46:15 bengee: those are rather hoks than triggers, though, I guess. You'd want to adjust parameters and in-scope variables, which is a bit tricky to generalize
08:46:25 bengee: s/hoks/hooks/
08:47:35 kwijibo: hmm - well you pass $infos to the trigger's constructor - I was thinking that would be enough for the use cases I was thinking about
08:48:20 bengee: yeah, but the triggers don't affect any other app flow
08:49:09 bengee: a pre-query trigger couldn't change the actual query
08:51:21 kwijibo: it could - you could make it takes the infos from the trigger/hook object before doing something with it (if there are any triggers set)
08:53:31 bengee: sounds a bit too fragile to me. every pre-query trigger then had to return some defined structure that conatined the changed infos and other stuff
08:54:49 kwijibo: i'm not seeing the problem?
08:56:13 bengee: we'd have to hard-code what a pre-query trigger had to return
08:57:08 bengee: sort-of
08:57:23 kwijibo: not necessarily
08:58:09 bengee: how does the query method then know that the the infos were changed?
08:58:19 kwijibo: the processTriggers part could just call the pre() method
08:58:56 kwijibo: and then, if $trigger->infos is set (and not empty perhaps), take that value
08:59:00 kwijibo: for infos
08:59:11 kwijibo: and pass it to the next trigger in the queue
08:59:52 bengee: pre() ?
09:00:09 kwijibo: or before() or whatever
09:00:50 kwijibo: (I was thinking instead of two different classes of trigger object, it might be more useful to have two different methods on the same object)
09:05:43 bengee: I'd probably replace the current triggers with a more generic hook mechanims as well
09:07:14 bengee: hooks could be definded for selected methods, either as entry-hooks at the very beginning (where thy could change input parameters), or as exit-hooks at the very end (where they could change return values)
09:20:53 kwijibo: sounds fair enough
10:13:24 kwijibo: kwijibo wonders what the difference between query time and load time is
10:13:58 bengee: bengee too ;)
10:14:10 bengee: I think load_time doesn't include index updating
10:58:45 kwijibo: bengee: if micrordf is a true superset, could it be a convincing answer to the testing and compound difficulties they've been having?
10:59:25 bengee: I hope
11:00:53 bengee: it might be that micrordf disagrees with some deployed microformats, though (e.g. when you put multiple node-type indicators on a single tag)
11:01:25 bengee: like <div class="vcard hentry">... or so
11:02:09 bengee: well, that could actually be valid..
11:05:37 kwijibo: another use case I had for hooks is to do on-the-fly fetching and caching of data from FROM graphs over the web
11:06:21 bengee: oh, right, that'd be nice
11:09:31 kwijibo: I did it as an option on the talis store, but the hook functionality would allow it to work with any arc persisted store
11:10:21 bengee: yeah, and w/o having to hard-code it, you could just enable the hook
11:16:44 kwijibo: yeah, exactly
11:17:07 kwijibo: atm, you have to set it as a config param to the store instantiation
11:17:15 kwijibo: a hook would be neater
13:02:38 kwijibo: hmm, I wonder if there's some useful way to use the live FROM idea with 'virtual graphs' that used search engines like google and amazon
13:02:58 kwijibo: or perhaps, more amenably, sindice
15:56:07 kwijibo: bengee: RDFa doesn't default to XMLLiteral anymore? it's XMLSchema#String ?
15:56:36 bengee: it's plain, I think, unless you have ags in the literal
15:56:43 bengee: s/ags/tags/
15:56:55 kwijibo: hmm
15:57:10 bengee: then is xmlliteral, unless you have @datatype=""
15:57:11 kwijibo: so you have to autodetect what's in the literal?
15:57:23 bengee: yes
15:57:27 kwijibo: fookin hell :p
15:57:38 kwijibo: more complicated than I though
15:57:43 kwijibo: *thought
15:58:33 kwijibo: If not specified, then the default value is string as defined in [XMLSCHEMA]. - so that's a plain literal?
15:59:12 bengee: I'm doing a get_plain_content(), and get_raw_content(), and when the two are identical, I'm not setting a datatype, which was straight-4ward to implement
16:00:08 bengee: I don't think plain values should be auto-typed as xsd:string
16:00:34 kwijibo: hope not
16:00:41 kwijibo: that would be daft
16:01:22 bengee: the test cases expect plain literals
17:50:50 kwijibo: bengee: Isn't it possible to *only* extract rdfa from some html?
17:51:41 bengee: yeah, set the sem_html_formats to 'rdfa'
17:52:16 bengee: or set auto-extract to false, and then do a extractRDF('rdfa')
17:53:10 kwijibo: oh yeah
17:53:15 kwijibo: I see it now :)
18:17:05 kwijibo: bengee: http://n2.talis.com/svn/playground/kwijibo/PHP/arc/plugins/trunk/ARC2_RDFaSerializer/
18:17:48 bengee: wow