3 comments

  • regularfry29 minutes ago
    Tagged Netstrings (tnetstrings) was a related proposal from 15 years ago or so. It replaces the comma with a single-character type definition so you can do JSON-like objects with a couple of recursive types: you had &#x27;,&#x27;, &#x27;#&#x27;, &#x27;^&#x27;, &#x27;!&#x27;, and &#x27;~&#x27; for strings, integers, floats, booleans, and nulls, then &#x27;]&#x27; and &#x27;}&#x27; for lists and dictionaries.<p>Most of the links have bitrotted and I don&#x27;t think it ever got much traction, but I did always like how simple it was. There&#x27;s a copy someone grabbed of the original spec here: <a href="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;ged&#x2F;tnetstrings.info&#x2F;refs&#x2F;heads&#x2F;live&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;ged&#x2F;tnetstrings.info&#x2F;refs&#x2F;...</a>
  • ocrow48 minutes ago
    Seems like a coherent, sensible proposal, as one might expect from djb. Any notable protocols use them?
    • Scaevolus42 minutes ago
      BitTorrent&#x27;s bencoding format, used in .torrent files, effectively uses netstrings-- but without the trailing commas, so it uses &quot;5:hello&quot; to represent filenames and similar.
    • toast024 minutes ago
      Php serialized uses<p><pre><code> s:size:value; </code></pre> For strings, which is pretty similar. Size is in bytes.
  • gnabgib1 hour ago
    (1997) -DJB