News for hackers. Stuff that matters.
Re:Show HN: Tired of the non-portability of my playlists, I ... by zeveb on Wednesday March 01, 2017 @02:29PM (#13767345)
> Probably in this day and age it would have better chance at adoption if it would be a JSON file. It's just network effects.

And here I was feeling badly for thinking that it'd be better as S-expressions! I wasn't going to post that, but since you already did, here's the same example in the original YAML:

    ---
    format: UPL1
    name: Favorites
    id: 2b43009f-d6a6-4f00-8533-09a9a73d8b54
    entries:
    - artist: Anciients
      title: Following the Voice
      duration: 408.764081632
      ids:
        sha2: e577cce68a69735acccd5d8603b3e663f6aa5bc9
        sha3: e577cce68a69735acccd5d8603b3e663f6aa5bc9
        mbtrackid: b00a2b97-53f1-485a-9121-1fe76b55e651
        filepath: Anciients/Following the Voice.mp3
        uri: nfs://example.com/music/ftv.mp3
as JSON:

    {
        "format": "UPL1",
        "name": "Favorites",
        "id": "2b43009f-d6a6-4f00-8533-09a9a73d8b54",
        "entries": [
            {
                "artist": "Anciients",
                "title": "Following the Voice",
                "duration": 408.764081632,
                "ids": {
                    "sha2": "e577cce68a69735acccd5d8603b3e663f6aa5bc9",
                    "sha3": "e577cce68a69735acccd5d8603b3e663f6aa5bc9",
                    "mbtrackid": "b00a2b97-53f1-485a-9121-1fe76b55e651",
                    "filepath": "Anciients/Following the Voice.mp3",
                    "uri": "nfs://example.com/music/ftv.mp3"
                }
            }
        ]
    }
And as S-expressions:

    (playlist
     (format UPL1)
     (name Favorites)
     (id 2b43009f-d6a6-4f00-8533-09a9a73d8b54)
     (entries
      (entry
       (artist Anciients)
       (title "Following the Voice")
       (duration 408.764081632)
       (ids
        (sha2 e577cce68a69735acccd5d8603b3e663f6aa5bc9)
        (sha3 e577cce68a69735acccd5d8603b3e663f6aa5bc9)
        (mbtrackid b00a2b97-53f1-485a-9121-1fe76b55e651)
        (filepath "Anciients/Following the Voice.mp3")
        (uri nfs://example.com/music/ftv.mp3)))))
I wonder which in general people think are prettier.
Re:Show HN: Tired of the non-portability of my playlists, I ... by StavrosK on Wednesday March 01, 2017 @04:03PM (#13768307)
For me, it goes YAML, S-expressions and JSON, in order of prettiness.