IRC log of dig on 2010-10-31
Timestamps are in UTC.
- 00:17:59 [presbrey]
- good evening everyone
- 00:18:29 [presbrey]
- timbl, in Tabulator, how do I create a new RDF document from empty?
- 00:18:36 [melvster]
- melvster has quit (Ping timeout: 240 seconds)
- 00:23:21 [presbrey]
- if I curl a few triples up, its easy to edit them
- 00:23:38 [presbrey]
- but if I'm starting from nothing in Tabulator, I'm not sure how to insert a new statement
- 00:28:26 [presbrey]
- ericP, I have everything working in PHP but swobjects
- 00:28:46 [presbrey]
- I will hook up application/sparql-query POST to python for now
- 00:29:03 [presbrey]
- but it would be nice to trim these dependencies a bit
- 01:21:28 [jnpato_]
- jnpato_ has quit (Ping timeout: 252 seconds)
- 01:43:32 [presbrey]
- SWObjects base URI support is not working right
- 01:43:36 [presbrey]
- when you're around ericP
- 01:47:13 [presbrey]
- looks like RdfDb.toString does not use base URI
- 01:55:20 [lkagal]
- lkagal (~lkagal@pool-96-237-240-136.bstnma.fios.verizon.net) has joined #dig
- 01:57:11 [lkagal]
- lkagal has quit (Client Quit)
- 02:13:41 [kennyluck]
- kennyluck (~kennyluck@EM114-48-111-215.pool.e-mobile.ne.jp) has joined #dig
- 02:23:36 [kennyluck]
- kennyluck has quit (Ping timeout: 240 seconds)
- 04:07:25 [lkagal]
- lkagal (~lkagal@pool-96-237-240-136.bstnma.fios.verizon.net) has joined #dig
- 04:50:40 [ericP]
- presbrey, i bounced the link prob off a friend and he said he doesn't think the E_NOTICE is disabling dynamically loaded extensions, but instead some configuration
- 04:51:34 [ericP]
- [[
- 04:51:36 [ericP]
- PHP Notice: Constant swig_runtime_data_type_pointer already defined in Unknown on line 0
- 04:51:57 [ericP]
- PHP Warning: dl(): Dynamically loaded extensions aren't enabled in t_SWObjects.php on line 3
- 04:52:00 [ericP]
- ]]
- 05:25:48 [lkagal]
- lkagal has quit (Quit: lkagal)
- 06:21:01 [nunnun]
- nunnun is now known as nunnun_away
- 07:30:46 [nunnun_away]
- nunnun_away is now known as nunnun
- 07:34:21 [nunnun]
- nunnun is now known as nunnun_away
- 08:51:21 [nunnun_away]
- nunnun_away is now known as nunnun
- 09:31:30 [nunnun]
- nunnun is now known as nunnun_away
- 09:37:15 [nunnun_away]
- nunnun_away is now known as nunnun
- 11:42:00 [timbl]
- presbrey, Good question.
- 12:10:40 [melvster]
- melvster (~melvster@p5797FD46.dip.t-dialin.net) has joined #dig
- 13:08:58 [melvster]
- melvster has quit (Ping timeout: 265 seconds)
- 13:29:17 [lkagal]
- lkagal (~lkagal@pool-96-237-240-136.bstnma.fios.verizon.net) has joined #dig
- 13:31:45 [ericP]
- presbrey, could you give me a curl invocation that emulates the POST with application/sparql-query ?
- 13:37:50 [timbl]
- See the DesignIssues
- 13:43:04 [ericP]
- nice!
- 13:44:38 [lkagal]
- lkagal has quit (Quit: lkagal)
- 14:11:39 [presbrey]
- good morning
- 14:12:27 [presbrey]
- curl --cert ./webid.pem -kv -H 'Content-type: application/sparql-query' --data 'INSERT DATA { <a> <b> <c> } WHERE {}' https://presbrey.rdf.me/test/insert
- 14:14:50 [presbrey]
- ericP, you shouldn't use dl with t_SWObjects
- 14:15:23 [presbrey]
- when you call php, use `php -d extension=swobjects.so t_SWObjects.php`
- 14:16:20 [presbrey]
- dl is missing/disabled from many phps now
- 14:16:50 [presbrey]
- if its loaded before-hand with extension=, the swig wrapper should skip the dl load code
- 14:18:44 [ericP]
- does that fix the php on the dig box?
- 14:18:49 [ericP]
- s/box/vm/
- 14:19:06 [presbrey]
- maybe, I'll check
- 14:19:51 [presbrey]
- I'm also having a problem getting toString to serialize with relative URIs
- 14:20:28 [presbrey]
- or I forgot the magic switch
- 14:20:32 [ericP]
- it works in python?
- 14:20:38 [ericP]
- or is this a general bug...
- 14:20:41 [presbrey]
- I'm not sure
- 14:21:10 [presbrey]
- in python it doesn't work
- 14:21:22 [presbrey]
- I'm using python on rdf.me now
- 14:21:54 [presbrey]
- eg. SPARQL POST: INSERT DATA { <a> <b> <c> } WHERE {} to https://presbrey.rdf.me/test/insert
- 14:22:21 [presbrey]
- results in seeing https://presbrey.rdf.me/test/insert when I request eg. http://presbrey.rdf.me/test/insert.json
- 14:23:25 [ericP]
- can you add a test for it in t_SWObjects.py ?
- 14:23:31 [ericP]
- (and commit)
- 14:23:47 [ericP]
- (so's i can work an a machine with a litttle more space)
- 14:24:25 [presbrey]
- sure
- 14:25:03 [ericP]
- tx
- 14:25:28 [presbrey]
- all negotiations have it, eg. http://presbrey.rdf.me/test/insert.nt
- 14:25:47 [presbrey]
- vs. POST Turtle (append) works fine
- 14:25:52 [presbrey]
- but that doesn't use SWObjects
- 14:26:22 [presbrey]
- toString doesn't take a base URI, does it?
- 14:26:28 [presbrey]
- where am I supposed to set that, RdfDB?
- 14:26:59 [ericP]
- i think it does take a baseURI
- 14:27:31 [ericP]
- hmm
- 14:27:38 [presbrey]
- I looked in RdfDB.{c,h}pp
- 14:28:05 [ericP]
- std::string BasicGraphPattern::toString (MediaType mediaType, NamespaceMap* namespaces) const
- 14:28:20 [ericP]
- lib/SWObjects.cpp:1866
- 14:28:33 [ericP]
- not much visibility of a baseURI there
- 14:28:43 [presbrey]
- no
- 14:28:56 [presbrey]
- so maybe only the RDF/SPARQL parsers are supposed to support it so far
- 14:28:57 [ericP]
- what's the natural calling convention there?
- 14:29:23 [presbrey]
- a serializer will take a base URI argument
- 14:29:24 [ericP]
- yeah, it works on the input, just doesn't round trip
- 14:29:43 [presbrey]
- use the base URI of its bound model
- 14:29:49 [presbrey]
- or allow an override passed
- 14:30:19 [presbrey]
- and it should be before namespaces
- 14:30:39 [ericP]
- we have
- 14:30:42 [ericP]
- bgp->toString(MediaType("text/turtle"), namespaceMap);
- 14:30:47 [ericP]
- we'd like:
- 14:30:58 [ericP]
- bgp->toString(MediaType("text/turtle"), baseURI, namespaceMap); ?
- 14:31:03 [ericP]
- bgp->toString(MediaType("text/turtle"), namespaceMap, baseURI); ?
- 14:31:27 [presbrey]
- I like the former
- 14:32:00 [presbrey]
- baseURI and namespaceMap should be nullable
- 14:32:22 [ericP]
- bgp doesn't store stuff like the current baseURI or namespaces (when constructed by the parser), but i guess it could
- 14:32:42 [ericP]
- but for now, i'll just make the caller keep track of it: bgp->toString(MediaType("text/turtle"), baseURI, namespaceMap);
- 14:32:43 [presbrey]
- doesn't need to now
- 14:34:06 [ericP]
- c++ is fussy (probably unnecessarily so) about optional parms; once you NULL one, you can't supply an more
- 14:35:05 [ericP]
- s/NULL/default/
- 14:35:33 [presbrey]
- you can't typically skip optional arguments
- 14:35:54 [presbrey]
- Python lets you if you specify the optional argument you are skipping to by name
- 14:36:01 [ericP]
- gotcha, which means that we'd need both:
- 14:36:07 [ericP]
- toString(MediaType type = MediaType("text/turtle"), const TTerm* baseURI = NULL, NamespaceMap map = NamespaceMap());
- 14:36:22 [ericP]
- toString(MediaType type = MediaType("text/turtle"), NamespaceMap map);
- 14:36:48 [presbrey]
- why?
- 14:37:11 [presbrey]
- why not always explicitly send a NULL baseURI?
- 14:37:16 [ericP]
- so you don't have to add a NULL to every toString which currently supplies a NamespaceNap
- 14:37:22 [ericP]
- ahh
- 14:37:35 [ericP]
- maybe that's the right level of in-your-face
- 14:37:37 [presbrey]
- it seems bad not to send a baseURI, I would make people be conscious of it
- 14:38:17 [ericP]
- as a computitarian, i feel like the typing SHOULD figure all that out for you, IF the types are unambiguous
- 14:38:24 [ericP]
- but yeah, your API makes sense
- 14:39:08 [ericP]
- hhm, can you think of any places where i do relative uri resolution?
- 14:39:44 [ericP]
- i guess that's the goal of the HT_URI code i still from libwww (and still don't know how to use)
- 14:40:14 [ericP]
- ht_parse, i guess
- 14:41:25 [ericP]
- actually, can you write me a nice recipe (in whatever language, though C++ using std::string would make it paste-able) which takes a URI string and an optional base and "does the right thing"?
- 14:41:42 [presbrey]
- I was going to spend the next few minutes doing the tabulator auto-update RDF manifest
- 14:42:01 [presbrey]
- right thing in terms of outputting a relative uri?
- 14:42:26 [ericP]
- yeah, including not absolutizing behind what the base uri suggests
- 14:43:01 [presbrey]
- behind? eg. I don't think the current relativizer puts in ../../ in cases
- 14:43:38 [ericP]
- yeah, let's see what we'd like:
- 14:43:40 [ericP]
- base("foo/") + "bar" => "foo/bar"
- 14:43:50 [ericP]
- base("foo/") + "../bar" => "bar"
- 14:44:15 [ericP]
- base("../foo/") + "bar" => "../foo/bar"
- 14:44:39 [ericP]
- base("../foo/") + "../bar" => "../bar" # i think
- 14:44:53 [ericP]
- base("/foo/") + "bar" => "/foo/bar"
- 14:45:01 [presbrey]
- base("/foo/bar/") + "/foo/" => "../"
- 14:45:16 [ericP]
- ahhh, interesting
- 14:45:33 [presbrey]
- base("/foo/bar/") + "/foo/bar/" => "."
- 14:46:09 [ericP]
- rule (guideline) appears to be "always keep it as relative as possible"
- 14:47:42 [oshani]
- oshani (~oshani@31-33-76.wireless.csail.mit.edu) has joined #dig
- 14:48:20 [ericP]
- i don't think 2396 licenses you to include the fqdn but elide the protocol a la: base("example.com/foo/") + "bar" => "example.com/foo/bar"
- 14:48:24 [ericP]
- but that would be cool too
- 14:48:40 [ericP]
- (would work for e.g. ftp and http)
- 14:49:24 [presbrey]
- sure
- 14:51:03 [presbrey]
- here's a version in JS: http://github.com/mootools/mootools-more/blob/master/Source/Types/URI.Relative.js
- 14:51:09 [ericP]
- hmm, need to extend to anchors as well
- 14:51:27 [presbrey]
- look at combine: function(bits, base)
- 14:51:28 [timbl]
- (presbrey, Ok, so where should there be a UI for adding completely new dat to an empty file?)dig-hg/tabulator/chrome/content/test/tc0000
- 14:51:30 [ericP]
- interruping cow?
- 14:51:59 [ericP]
- presbrey, does mootools do all the erring on the side of relative that you'd like?
- 14:52:12 [presbrey]
- ericP, yes
- 14:52:20 [timbl]
- tabulator/chrome/content/test/tc0000/test_uri.js
- 14:52:24 [presbrey]
- timbl, might be simple as putting a (+) button somewhere
- 14:53:02 [timbl]
- Well, then have to think of whether to make up a new random URI like <#a> or ask the user for one
- 14:53:27 [presbrey]
- why not put in a fillable-blank
- 14:53:32 [timbl]
- but the questionw as where.
- 14:53:56 [ericP]
- crikey, that's short
- 14:53:57 [timbl]
- Maybe a new little pane which comes up for any empty RDF file.
- 14:53:58 [presbrey]
- can't blanks be disambiguated explicitly with an id?
- 14:54:05 [ericP]
- (the .js)
- 14:54:23 [ericP]
- indicates that found *the* *thruth*
- 14:54:29 [ericP]
- s/that/they/
- 14:55:51 [timbl]
- they?
- 14:55:54 [presbrey]
- timbl, the pane should come up automatically for a 404
- 14:56:03 [presbrey]
- when the content-type is RDF-like
- 14:57:46 [presbrey]
- timbl, eg. I think tabulator should edit http://test.rdf.me/empty
- 14:58:18 [timbl]
- file:///devel/dig-hg/tabulator/chrome/content/test/tc0000/index.html
- 14:58:39 [presbrey]
- ahh, absolute URI!
- 14:58:56 [timbl]
- That isb't an empty file. That is a 404 nonexistant file.
- 14:59:11 [presbrey]
- did you curl it?
- 14:59:22 [presbrey]
- it has an <rdf />
- 14:59:27 [tlr]
- tlr (~tlr@89.204.137.254) has joined #dig
- 14:59:34 [presbrey]
- it has an MS-Author-Via: SPARQL
- 14:59:38 [timbl]
- No, I looked it up in Tabr, and looked in the Internetals pane , clocied on the URI and the request and the response
- 14:59:43 [presbrey]
- it has a Content-Type: text/turtle
- 15:00:13 [timbl]
- But at 14:58:05.215 the server said 404
- 15:01:14 [presbrey]
- at 14:58:05, the server said "this graph URI isn't found but you can post SPARQL to create it"
- 15:01:41 [presbrey]
- (you can also post turtle or rdf/xml to create it)
- 15:02:00 [timbl]
- No, to do that it would have to send back 200
- 15:02:02 [timbl]
- $ curl -I http://test.rdf.me/empty
- 15:02:02 [timbl]
- HTTP/1.1 404 Not Found
- 15:02:02 [timbl]
- Date: Sun, 31 Oct 2010 15:01:16 GMT
- 15:02:02 [timbl]
- Server: Apache
- 15:02:03 [timbl]
- Content-Type: text/html; charset=iso-8859-1
- 15:02:17 [presbrey]
- don't use -I, that sends HEAD and HEAD is broken right now
- 15:02:24 [presbrey]
- do curl -v http://test.rdf.me/empty
- 15:02:41 [timbl]
- the datawikie send back content-type application/rdf+xml and a vaid file with no triples in it
- 15:02:48 [tlr]
- tlr has quit (Client Quit)
- 15:04:06 [presbrey]
- there are at least 3 kinds of graphs in terms of existence
- 15:04:34 [timbl]
- Ah, Ok, so HEAD is just broken.
- 15:04:34 [presbrey]
- a) existing graph containing >=1 triple: graph <test> { <a> <b> <c> }
- 15:04:45 [presbrey]
- a) existing graph containing no triples: graph <test> {}
- 15:05:00 [presbrey]
- c) non-existing graph: (null)
- 15:05:18 [presbrey]
- I argue only (a) and (b) should return 200, (c) should return 404
- 15:05:48 [timbl]
- Well, it depends on whether you are doing the eiki thing, which is to assume everuything exists.
- 15:06:23 [presbrey]
- why can't we do the wiki thing another way?
- 15:06:35 [timbl]
- So in a wiki everything is 200, like wikipedia
- 15:06:59 [presbrey]
- => if a server tells you it supports SPARQL during a 404, you can wiki/sparql/post-append create that document/graph URI
- 15:08:09 [presbrey]
- what I suggest is the real way wikipedia works, for example.
- 15:08:13 [presbrey]
- and it makes sense to me as well
- 15:08:17 [timbl]
- Actually I lie. The wikipedia http://en.wikipedia.org/wiki/RDFalkjlsajfldjflgkjSKDLFALKJLKASDJFKLASD returns 404 but a nice 4040 page whcih looks like a uccess
- 15:08:24 [timbl]
- success
- 15:08:46 [presbrey]
- yes, the former way you suggest is more like comcast/roadrunner always replying DNS entries when they don't exist
- 15:08:57 [timbl]
- yes.
- 15:09:17 [presbrey]
- lets not do liken ourselves to that
- 15:09:28 [timbl]
- Yes.
- 15:09:40 [presbrey]
- ~]$ curl -v http://en.wikipedia.org/wiki/Joe_Presbrey 2>&1 | grep 'HTTP/1'
- 15:09:40 [presbrey]
- > GET /wiki/Joe_Presbrey HTTP/1.1
- 15:09:41 [presbrey]
- < HTTP/1.0 404 Not Found
- 15:10:13 [timbl]
- ok, so we then need to have a way to allow the system to bootstrap itself up to editing a new file.
- 15:10:37 [lkagal]
- lkagal (~lkagal@pool-96-237-240-136.bstnma.fios.verizon.net) has joined #dig
- 15:10:50 [timbl]
- What should the tabulator do first to use a new file? A PUT?
- 15:11:02 [timbl]
- (of a zero-triple file)
- 15:11:30 [presbrey]
- a POST of zero-triples
- 15:11:45 [presbrey]
- or a SPARQL INSERT DATA {} WHERE {}
- 15:12:28 [presbrey]
- PUT/DAV should be avoided whenever possible
- 15:12:40 [lkagal]
- lkagal has quit (Client Quit)
- 15:13:08 [ericP]
- why avoid PUT?
- 15:13:17 [timbl]
- How does the tabr know that it should put up the "Does not exists -- Create it" button?
- 15:14:02 [presbrey]
- ~]$ curl -v http://test.rdf.me/Joe_Presbrey 2>&1 | grep -E 'HTTP/1|Content|Author'
- 15:14:02 [presbrey]
- > GET /Joe_Presbrey HTTP/1.1
- 15:14:02 [presbrey]
- < HTTP/1.1 404 Not Found
- 15:14:02 [presbrey]
- < MS-Author-Via: SPARQL
- 15:14:02 [presbrey]
- < Content-Type: text/turtle
- 15:14:19 [timbl]
- OK
- 15:14:47 [presbrey]
- Via: SPARQL => indicates creation is possible
- 15:14:56 [timbl]
- a link:PotentailDocument
- 15:15:09 [timbl]
- or DAV I assume -- why avoid DAV
- 15:15:23 [presbrey]
- to avoid problems with concurrency
- 15:15:39 [presbrey]
- say we are both creating the new document
- 15:15:50 [melvster]
- melvster (~melvster@p5797F91F.dip.t-dialin.net) has joined #dig
- 15:15:57 [timbl]
- You can't use Content-Type: text/turtle -- that is the conten type of hte 404 error message, whcih i snormally HTML
- 15:16:17 [presbrey]
- the document I sent is turtle
- 15:16:31 [presbrey]
- the client said they would HTTP Accept: it
- 15:16:54 [presbrey]
- whats the problem with sending something HTTP Accept'd, regardless of response status
- 15:17:14 [presbrey]
- if the first step of creating a new document is to PUT 0 triples
- 15:17:37 [presbrey]
- if I start creating it and then you start "after" me, when you "start" you crush all my work when you PUT 0
- 15:18:06 [presbrey]
- rather, if we both POST then when the round-trip refresh occurs, we see we are both creating/editing the same graph and can reconcile
- 15:20:28 [presbrey]
- PUT would be fine if it triggered a real DAV2 locking etc., but it doesn't on dig.csail/xvm, rdf.me, anywhere!
- 15:23:08 [timbl]
- Ok, you don't mean that field to indivate that a PUT should use
- 15:24:50 [timbl]
- In fact BTW it isn't that weird to imagine that all documents exist and are empty. But it may be useful to distinguish nonexistent and empty later.
- 15:26:10 [presbrey]
- ok travel safe
- 15:26:48 [presbrey]
- for now I will suggest creation of new via curl -T, ?sparql=, and maybe ?load=
- 15:26:49 [ericP]
- have fun in lyon, timbl
- 15:28:02 [lkagal]
- lkagal (~lkagal@pool-96-237-240-136.bstnma.fios.verizon.net) has joined #dig
- 15:28:08 [ericP]
- so tabulator will work even if the backend store signals non-existence with a 404?
- 15:28:29 [timbl]
- No.
- 15:28:34 [timbl]
- Not yet.
- 15:28:58 [timbl]
- No, right now the store has t send an editable zero-triple document.
- 15:29:05 [timbl]
- So Joe is proposing a change
- 15:29:08 [timbl]
- to the protoocl
- 15:29:24 [presbrey]
- thanks timbl!
- 15:30:06 [presbrey]
- (but even 200 status zero-triple documents can't add new triples with tabulator)
- 15:30:20 [tlr]
- tlr (~tlr@89.204.153.151) has joined #dig
- 15:30:22 [presbrey]
- (not in the UI anyway)
- 15:30:37 [ericP]
- sorry, "will" as in the future tense, not the conditional
- 15:30:50 [timbl]
- You should be able to bey going to newdoc.rdf#foo
- 15:31:01 [timbl]
- That should give you outlie mode with just a blue plus.
- 15:31:32 [timbl]
- There is an existing bug I think maybe about that
- 15:36:33 [timbl]
- ?
- 15:36:49 [timbl]
- Ohm, great .. so the snapshot will auto-update
- 15:36:51 [timbl]
- excellent
- 15:37:14 [timbl]
- timbl has quit (Quit: timbl)
- 15:42:46 [tlr]
- tlr has quit (Ping timeout: 252 seconds)
- 16:20:16 [webr3]
- presbrey, ericp - I've got two js and a php lib for full URI support with relatives etc
- 16:20:43 [webr3]
- see: http://github.com/webr3/URI
- 16:22:42 [webr3]
- also in: http://webr3.org/apps/play/api/rdfapi.js for js
- 16:48:01 [timbl]
- timbl (~timbl@217.41.237.203) has joined #dig
- 17:41:08 [freddyt]
- freddyt (~chatzilla@c-24-34-86-78.hsd1.nh.comcast.net) has joined #dig
- 17:42:44 [freddyt]
- freddyt has left #dig
- 17:42:49 [freddyt]
- freddyt (~chatzilla@c-24-34-86-78.hsd1.nh.comcast.net) has joined #dig
- 18:41:49 [timbl]
- Actually presbrey has anyone checked that tabulator doesn't allow you to edit something if it has returned a MS-author-via with a 404?
- 18:43:08 [timbl]
- timbl has quit (Quit: timbl)
- 19:38:27 [presbrey]
- hi webr3 thanks
- 19:39:14 [presbrey]
- rdf.me supports almost every request type and format we've ever done
- 19:39:56 [presbrey]
- after the relative URI fixes are in place for SPARQL Update, it should be a very nice platform
- 19:42:58 [presbrey]
- I'm going to work on better documentation and put up some examples
- 20:15:46 [lkagal]
- lkagal has quit (Quit: lkagal)
- 20:20:37 [lkagal]
- lkagal (~lkagal@pool-96-237-240-136.bstnma.fios.verizon.net) has joined #dig
- 21:02:26 [kennyluck]
- kennyluck (~kennyluck@accormercurelyon0472836996.pck.nerim.net) has joined #dig
- 21:02:27 [kennyluck]
- kennyluck has quit (Excess Flood)
- 21:03:21 [kennyluck]
- kennyluck (~kennyluck@accormercurelyon0472836996.pck.nerim.net) has joined #dig
- 21:19:30 [timbl]
- timbl (~timbl@93-158-30-199.subs.ibrowse.com) has joined #dig
- 21:38:22 [lkagal]
- lkagal has quit (Quit: lkagal)
- 21:40:05 [jnpato_]
- jnpato_ (~jnp.irc@c-98-229-160-12.hsd1.ma.comcast.net) has joined #dig
- 21:44:14 [jnpato_]
- jnpato_ has quit (Client Quit)
- 21:49:31 [oshani]
- oshani has quit (Quit: Mama nidi!)
- 22:40:45 [timbl]
- timbl has quit (Quit: timbl)