Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the square brackets syntax with the RDF data

Can you give an example?

I picked the current Turtle syntax because it seemed like the least line noise, and hopefully easy for contributors to understand. I would like to learn more about RDF. I don’t know if it was the right choice for this project to be honest though, I might end up switching to JSON.



As an example, the "alm-mmmidi" record can be written as:

  [
    device:make "ALM/Busy Circuits";
    device:model "mmMidi";
    device:inputs 1;
    device:typeB true;
    device:uri "https://busycircuits.com/alm023";
    device:eurorack true;
  ].
The names with _: are local to the file in which they appear. These names are not exported, so cannot be referred to by name externally, although the data is still exported (so, for example, if you ask for all nodes with a <http://example.org/vocab/device/make> property, you will still retrieve them). So, the result will be the same. (The name "device:" is also local to the file, but it is a local alias of the exported name <http://example.org/vocab/device/>, so other files can refer to it by the full name, or by defining its own (possibly the same) alias for it.)

I recommend not using the example.org namespace, but instead using your own. You could use the minimidi.world domain name, or, if you prefer, use a UUID (in lowercase, with "urn:uuid:" before, and "#" after).

However, for the kind of data you have, it does seem like JSON or TSV would probably do better, since it does not need the features of RDF (and the SQLite command-line shell supports both JSON and TSV (and with extensions, also RDF, but JSON and TSV are built-in)). The stuff I wrote above may still be useful if you find RDF useful for something else, though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: