Right. Blog. Keyboard. Fingers. Just start typing. So, I needed to take a screen capture of the Ripple command line for a presentation yesterday, and was a little embarrassed by this old and awkward formatting:
1 >> :timbl >> foaf:knows >> foaf:name >> .
rdf:_1 ("Dan Brickley"@en)
rdf:_2 ("Libby Miller")
rdf:_3 ("Jim Hendler")
rdf:_4 ("Henry J. Story")
2 >>
Old, because this is how it has been since the dawn of Ripple time. Awkward, because:
- The
>>input prompt clashes with the>>application operator (which in earlier versions of Ripple was a slash, apart from being an infix operator. More to come on the new syntax). - The RDF Bag -styled index for query results (
rdf:_1and so on) has always been a little misleading. It’s particularly wrong now that Ripple is much more loosely coupled with the RDF data model. - Without the spurious RDF Bag syntax, the parentheses around individual query results (indicating that they are lists) are as unnecessary as they are unsightly. Just as the top-level parentheses of a line of input are omitted — so you can type
2 3 add >>instead of the more obviously list-like(2 3 add >>)— so it can be with output: just pretend the parentheses are there, and remember that query results really are lists.
It took all of five minutes to put a much improved format in place:
1) :timbl >> foaf:knows >> foaf:name >> .
[1] "Dan Brickley"@en
[2] "Libby Miller"
[3] "Jim Hendler"
[4] "Henry J. Story"
2)
This does look better, doesn’t it?
0 Responses to “Prettifying the command line”