Channel #semsol: Logs

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

23:05:18 kwijibo: doh, can just parse and reserialize 3 times and check that 2 and 3 are the same - that should be ok
23:05:31 kwijibo: and they are, whoohoo
23:19:02 kwijibo: http://n2.talis.com/svn/playground/kwijibo/PHP/arc/plugins/trunk/ARC2_SPARQLSerializerPlugin
08:06:49 kwijibo: bengee: I am wondering about dpeendencies between plugins - just document them, or include them in the same folder and require them (instead of using the ARC:inc )
08:07:30 bengee: hmm
08:07:49 bengee: document + ARC::inc perhaps?
08:09:00 kwijibo: okiley dokiley ;)
08:09:28 bengee: you could perhaps print an error if ARC::inc returns false
08:10:09 bengee: your plugin is already on /download/plugins, btw
08:10:22 kwijibo: cool
08:11:48 kwijibo: ooh, therre's also this one http://n2.talis.com/svn/playground/kwijibo/PHP/arc/plugins/trunk/ARC2_IndexUtils/
08:11:59 kwijibo: *oh
08:12:53 bengee: ."Plugin", and I'll add it
08:12:59 bengee: ;)
08:13:05 kwijibo: oh yeah :)
08:14:59 kwijibo: I was thinking last nigth that it would be cool to hack the sparqlparser to be more readily extensible, by passing in additional allowed query types and functions etc
08:15:09 kwijibo: I might have a hack on that later on
08:15:16 bengee: cool
08:15:51 kwijibo: the use case would be for stuff like allowing ABOUT { ?s ?p ?o }
08:15:57 kwijibo: catching that
08:17:00 kwijibo: and rewriting it to CONSTRUCT { ?stmnt rdf:subject ?s ; rdf:predicate ?p ; rdf:object ?o } WHERE etc
08:17:19 kwijibo: sorry, etc not obvious :p
08:17:25 kwijibo: WHERE { ?stmnt rdf:subject ?s ; rdf:predicate ?p ; rdf:object ?o }
08:18:04 kwijibo: I dunno, just making it easier to experiment with stuff really
08:18:39 bengee: would be cool if there was a way to hook into ARC::inc, so that you could specify e.g. $conf = array('class_replacements' => array('SPARQLParser' => 'MySPARQLParser)) which would then be checked when inc() is called
08:19:45 kwijibo: yeah, I suppose you might want to do the same for, eg, Remote SparqlEndpoint, or the TalistStorePlugin
08:20:06 kwijibo: although not so much maybe
08:21:25 kwijibo: maybe the SPARQL thing is not so much a straight replacement - you also want another layer that does the rewriting
08:22:01 kwijibo: hmm, triggers?
08:22:59 kwijibo: are triggers just for after an operation?
08:23:31 bengee: after queries
08:24:55 bengee: is there any way to set a variable in a non-instantiated class?
08:25:11 kwijibo: not that I can think of
08:25:23 bengee: self::foo = ...?
08:25:24 kwijibo: you mean in a statically called class?
08:31:21 kwijibo: bengee what about a static variable within the method ?
08:31:34 bengee: yeah, just investigating that
08:31:56 kwijibo: you could check if it isset, then set it from within the mtheod, or something like that
08:33:15 bengee: hmm "it's impossible to assign a variable result to a static variable"
08:34:55 kwijibo: that's a bit useless!
08:37:20 kwijibo: I killed the load script last night btw, it had got to 642000 triples
08:37:32 kwijibo: not that that's very useful information since it was before the patch
08:37:59 bengee: 'k
08:49:12 bengee: hmm, maybe that was a mis-info, you just can't assign a variable value via static $my_var = $val, but you can do static $my_var = ''; $my_var = $val
08:51:53 bengee: yep, worky
08:53:07 bengee: function setStatic($val) {
08:53:09 bengee: static $arc_static = '';
08:53:11 bengee: if ($val) $arc_static = $val;
08:53:13 bengee: if (!$val) return $arc_static;
08:53:14 bengee: }
08:53:16 bengee:
08:53:17 bengee: function getStatic() {
08:53:19 bengee: return ARC2::setStatic('');
08:53:21 bengee: }
08:53:34 bengee: bengee tries it with php5
08:54:24 bengee: seems to work, too
08:56:23 bengee: cool
08:58:01 bengee: now I could implement a ARC::replaceClass($old_class_name, $new_class_name) and link those defs with ARC::inc()
08:59:54 kwijibo: coolio
09:01:42 kwijibo: so the other part of the puzzle, I guess, would be before-triggers, in order to have the architecture amenable to SPARQL rewriting for stuff like danbri's ACL
09:02:20 kwijibo: not sure how necessary a feature it is though, so I won't push you for it ;)
09:02:32 bengee: you could simply sub-class/replace the sparql parser
09:02:47 kwijibo: yes
09:02:54 kwijibo: like you do for the sparqlplusparser
09:11:10 bengee: hm, the Class ... extends Parent will still point at the old parent, though
09:13:50 bengee: so this could only work for top-level classes
09:15:10 bengee: err, bottom-level, whatever
09:46:50 kwijibo: hmm, maybe it would be better to import/export in chunks of triples, instead of resources
11:15:43 scor: hey bengee!
11:16:00 bengee: heya
11:16:04 scor: what's the best way to cancel a query when it's taking too long
11:16:23 scor: best way means less destructive!
11:16:37 bengee: killing the mysql process
11:17:03 scor: well, isn't there a more gentle way. I imagined rebooting mysql for ex
11:17:19 scor: I'm trying to automatize that
11:17:27 bengee: rebooting will cancel all running processes
11:17:39 scor: and I don't want to end up killing processes if possible
11:18:12 scor: well, it's in a benchmark context so I don't mind.
11:18:21 scor: but I understand that on a production context it's different
11:18:42 scor: so there is no other way to do that through ARC2 then
11:19:03 scor: say setting up a timeout to a query before you send it for example
11:19:10 bengee: not yet. there are hooks in the endpoint class, but the code isn't in trunk yet
11:19:30 scor: alright
11:19:55 bengee: I'm using SHOW PROCESSSLIST, and then kill all process where "time" is more than the specified timeout
11:20:31 bengee: pretty simple to implement, but not added to ARC2 yet
11:23:55 scor: bengee: +1
11:23:58 scor: :)