gotta have some examples on the landing before the fold, otherwise i have no reason to explore
Not a fan of annotation (that can be used as comment syntax) having # followed by a space character have a different behaviour feels strange.
21–30 of 46 posts
gotta have some examples on the landing before the fold, otherwise i have no reason to explore
Not a fan of annotation (that can be used as comment syntax) having # followed by a space character have a different behaviour feels strange.
Is it true that Records are the same as Dictionaries, because the labels in the records can have any value? Interesting on how on one hand the size of SignedInteger is unlimited, but on the other hand there is a ByteString. A ByteString could also have been represented by as a sequence of SignedInteger. I also wonder if it would not better to have a Unicode character as an atomic unit and represent a string as a sequ…
No, a record is a tagged (sequence of) value(s). If you put a single dictionary-valued "field" in a record, you get a variation with named fields Records have positional "fields" because of the Scheme heritage of the design. -- Re bytestring -- yes there are some concessions to real machines/languages in there that aren't absolutely required. Other examples include booleans and strings, which could have been and and…
Are there any good examples of nontrivial schemas etc?
gotta have some examples on the landing before the fold, otherwise i have no reason to explore
Why/when/where would I need this?
I was going to ask the exact same question. The title makes it sound like something I might be interested in, then I visited the page and I have no idea what it does. After some brief reading of docs, I'm trying to write one sentence explanations. Maybe this will be helpful to you What Preserves is a specification and set of libraries in popular languages that lets you reliably exchange data between XML, JSON and EDN…
As someone familiar with Protobuf, comparing Preserves vs Protobuf text format, here's my quick comparison between the two after reading through the tutorial:
- Preserves' Symbol is very close to Protobuf enums. But Symbol can contain characters like dash
- There doesn't seem to be an equivalent of Preserves' Record in Protobuf, but the tutorial's example of using To denote a missing can be simulated using the `oneof` field in Protobuf.
- Having to write #t/#f in Preserves is unfortunate. I guess this is the result of schemaless serialization language and potential parsing ambiguity with a Symbol?
- Protobuf have a way to annotate the schema and reuse at runtime, very similar to Preserves' annotations.
gotta have some examples on the landing before the fold, otherwise i have no reason to explore
Tutorial link too hard to click? Seriously: these comments inevitably come up for most language related pages, and I don’t see how they don’t fall under the site guidelines of “Please don't post shallow dismissals”.