These are chat archives for csarven/ldn

8th
Nov 2016
Melvin Carvalho
@melvincarvalho
Nov 08 2016 06:52
Use Case:
Alice is using a vocab training application. And she achieved her high score. She would like to publish that event on her timeline, via her inbox.
Question: what could be an example message that could be sent by the app?
<#this>     <http://purl.org/dc/terms/created> "2016-11-05T09:11:03.929Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    <http://purl.org/dc/terms/creator> <http://melvincarvalho.com/#me> ;
    <http://rdfs.org/sioc/ns#content> """You scored 60% correct, from 10 of the top 2000 czech words.""" ;
    a <http://rdfs.org/sioc/ns#Post> ;
    <http://xmlns.com/foaf/0.1/img> <https://melvincarvalho.github.io/vocab/images/icon.png> ;
    <http://www.w3.org/ns/solid/terms#timeline> <https://melvin.databox.me/Public/timeline/> ;
    <http://www.w3.org/ns/mblog#author> <http://melvincarvalho.com/#me> .
proposal ^^
I think this is compatible with our current apps, such as cimba, webid.im, gitter logs and solid.social
Melvin Carvalho
@melvincarvalho
Nov 08 2016 06:58
So now I can write a consumer that will read this post, verify it, and then post it to a timeline.
Where can I document these message patterns?
Perhaps I'll write a quick spec
Melvin Carvalho
@melvincarvalho
Nov 08 2016 07:33
Sarven Capadisli
@csarven
Nov 08 2016 08:40
@melvincarvalho I recall expressing "scores" (or statistical observations as I'd like to think of them) with the RDF Data Cube vocabulary.
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:41
oh yes, thanks again for the reminder
im probably going to combine it with payments
and the same system can buy you storage and bandwidth on a commodity solid server
Sarven Capadisli
@csarven
Nov 08 2016 08:41
+1 to documenting this. Maybe we should add different notifications to a wiki (or something public edit)
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:42
sure i think there's going to be many types of message that go to inboxes, it will help people that write software to see examples, and perhaps prevent duplication of effort in heterogeneous systems
im write now going to write some utils that work with inbox messages
Sarven Capadisli
@csarven
Nov 08 2016 08:44
I'm definitely for more examples.. but we may need to informally use that somewhere outside of the spec. We can link to it from the ldn README.md for sure.
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:46
Great!
Sarven Capadisli
@csarven
Nov 08 2016 08:46
It'd be great to follow the same example pattern in the spec.. like with a caption etc. The way you have it in Inbox Posts is good, but may not be easy to scan for different ones. We can approach it like https://www.w3.org/TR/dpub-annotation-uc/ or https://www.w3.org/TR/shacl-ucr/
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:47
is there some actual RDF?
Sarven Capadisli
@csarven
Nov 08 2016 08:47
What do you mean?
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:48
I guess i wasnt clear on what pattern you'd like to follow
Sarven Capadisli
@csarven
Nov 08 2016 08:51
Oh, I'm just thinking through.. if it is going ot be a UC w/ examples, then probably better to go in the direction of dpub/shacl like.. if it is going to be a bit more quick drop-ins, then the way we have it in the LDN spec works.. because that just has the code example with a caption. Most people might find that easier instead of filling out a template that covers each criteria per UC
Open to suggestions.
Maybe start with the simple 'code + caption (+ brief description)'
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:52
what's a caption?
Sarven Capadisli
@csarven
Nov 08 2016 08:52
figcaption
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:52
oh cool this already works ...
rdf ls https://melvin.solid.live/inbox/
https://melvin.solid.live/inbox/c851ed80-a337-11e6-9fce-3d5eb747deb3
https://melvin.solid.live/inbox/c851ed81-a337-11e6-9fce-3d5eb747deb3
its not 100% clear to me concretely what the suggestion is, id be happy to add figcaptions
Sarven Capadisli
@csarven
Nov 08 2016 08:55
                        <figure class="listing example" id="sending-notification-request" rel="schema:hasPart" resource="#sending-notification-request">
                            <p class="example-h">Sending example request</p>
                            <pre about="#sending-notification-request" property="schema:description" typeof="fabio:Script"><code>POST /inbox/ HTTP/1.1</code>
<code>Host: example.org</code>
<code>Content-Type: application/ld+json;profile="https://www.w3.org/ns/activitystreams"</code>
<code>Content-Language: en</code>
<code></code>
<code>{</code>
<code>  "@context": "https://www.w3.org/ns/activitystreams",</code>
<code>  "@id": "",</code>
<code>  "@type": "Announce",</code>
<code>  "actor": "https://rhiaro.co.uk/#me",</code>
<code>  "object": "http://example.net/note",</code>
<code>  "target": "http://example.org/article",</code>
<code>  "updated": "2016-06-28T19:56:20.114Z"</code>
<code>}</code></pre>
                            <figcaption property="schema:name">Example request to send to an Inbox.</figcaption>
                        </figure>
Melvin Carvalho
@melvincarvalho
Nov 08 2016 08:55
This works too!
for i in $(rdf ls https://melvin.solid.live/inbox/) ; do echo $i ; rdf cat $i ; done
https://melvin.solid.live/inbox/c851ed80-a337-11e6-9fce-3d5eb747deb3
<#this>
<https://w3id.org/cc#amount> 10  ;
<https://w3id.org/cc#currency> <https://w3id.org/cc#bit> ;
  <https://w3id.org/cc#destination> <http://melvincarvalho.com/#me> ;
<https://w3id.org/cc#source> <https://workbot.databox.me/profile/card#me> ;
a <https://w3id.org/cc#Credit> .

https://melvin.solid.live/inbox/c851ed81-a337-11e6-9fce-3d5eb747deb3
<#this>     <http://purl.org/dc/terms/created> "2016-11-05T09:11:03.929Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    <http://purl.org/dc/terms/creator> <http://melvincarvalho.com/#me> ;
    <http://rdfs.org/sioc/ns#content> """You scored 60% correct, from 10 of the top 2000 czech words.""" ;
    a <http://rdfs.org/sioc/ns#Post> ;
    <http://xmlns.com/foaf/0.1/img> <https://melvincarvalho.github.io/vocab/images/icon.png> ;
    <http://www.w3.org/ns/solid/terms#timeline> <https://melvin.solid.live/timeline/> ;
    <http://www.w3.org/ns/mblog#author> <http://melvincarvalho.com/#me> .
@csarven oh that looks really nice! Two questions: 1. does it work with turtle? 2. Can I do it with respec?
Sarven Capadisli
@csarven
Nov 08 2016 08:59
I'm not sure what respec does but feel free to use the respec HTML. Examples can be in any RDF syntax you like.
Melvin Carvalho
@melvincarvalho
Nov 08 2016 09:00
ReSpec is a tool that makes writing specifications easier. ReSpec handles things like styling, referential integrity, bibliographical data, and other mundane tasks.
Melvin Carvalho
@melvincarvalho
Nov 08 2016 09:53
using a neat tool called pencil