Live data from Hacker News

Uniform eXchange Format (UXF) – plain text human readable typed storage format

github.com

41–50 of 62 posts

Re: Uniform eXchange Format (UXF) – plain text human readable typed storage format

#41
post #2

Pretty cool I guess, although there sure are a lot of such formats now ... but I like the typed-ness. I feel the spec warranted more discussion about why strings instead of the way more common "like this", i.e. why angle brackets are used to quote strings. Probably to make it easier to embed quotes, but I'm not sure. It was rather surprising at least, although I guess you get used to it if you read a lot of raw files…

There are languages that use \q instead of \" as a representation for quote inside quoted strings; I personally like it, it really simplifies and speeds up searching for the end of a string during parsing, and makes regex-based processing much more reliable.

Re: Uniform eXchange Format (UXF) – plain text human readable typed storage format

#45
post #27

This seems unnecessarily terse. If you want types, why not make it look like one of the existing popular languages with types? (Rust/TypeScript/protobuf) Instead of: uxf 1 =Database server:str ports:list connection_max:int enabled:bool =DateTime when:datetime tz:str =Owner name:str dob:DateTime =Hosts name:str [ (Owner (DateTime 1979-05-27T07:32:00 )) (Database [8000 8001 8002] 5000 yes) (Hosts ) ] Why not: type Data…

> Evidence shows that people like that kind of format

Please cite this evidence. I like your proposed format, just interested in that research.

Re: Uniform eXchange Format (UXF) – plain text human readable typed storage format

#46
post #27

This seems unnecessarily terse. If you want types, why not make it look like one of the existing popular languages with types? (Rust/TypeScript/protobuf) Instead of: uxf 1 =Database server:str ports:list connection_max:int enabled:bool =DateTime when:datetime tz:str =Owner name:str dob:DateTime =Hosts name:str [ (Owner (DateTime 1979-05-27T07:32:00 )) (Database [8000 8001 8002] 5000 yes) (Hosts ) ] Why not: type Data…

> Evidence shows that people like that kind of format Please cite this evidence. I like your proposed format, just interested in that research.

The existing programming languages are the evidence. Sorry I thought that was clear. I'm suggesting they take hints from the structured languages that humans actually read and write.

Re: Uniform eXchange Format (UXF) – plain text human readable typed storage format

#48
post #32
post #12

Earlier quoted context omitted.

Could you please elaborate? Why is true a better value than yes? Seems like an arbitrary choice to me. Does one choice have some advantages over the other?

I would say “yes” and “no” are locale specific. Why not German “ja” and “nein”, French “oui” and “non” (with the advantage of being of the same, short, length), etc? Yes, “true” and “false” are English words, but in programming circles, IMO transcend locale. (The more locale agnostic ⊤ and ⊥ ( https://en.wikipedia.org/wiki/Verum and https://en.wikipedia.org/wiki/Up_tack ), IMO are a bit elitist and difficult to type)

UXF has plenty of English-specific keywords.

I agree that "true" and "false" would be clearer than "yes" and "no", but the fact that "yes" and "no" are English words isn't an issue.

Re: Uniform eXchange Format (UXF) – plain text human readable typed storage format

#49
post #12

Earlier quoted context omitted.

Could you please elaborate? Why is true a better value than yes? Seems like an arbitrary choice to me. Does one choice have some advantages over the other?

True/false is more widely used than yes/no in this context. The fact that the author felt the need to explain that yes/no maps to true/false indicates that they also believe this to be the case. The only time I can remember seeing yes/no used in a format like this is YAML, and that caused problems[1]. [1]: https://hitchdev.com/strictyaml/why/implicit-typing-removed/

The Norway problem came to mind for me, too, but I don't think there's much opportunity for that to arise here given that strings are quoted. Meanwhile, there's plenty of other precedent for yes/no instead of true/false; shell scripts come to mind.

I don't know if I prefer this over treating everything as a string and letting readers/writers decide on their own how to parse things, but it seems like a much more reasonable approach than YAML's.

Re: Uniform eXchange Format (UXF) – plain text human readable typed storage format

#50
post #46

Earlier quoted context omitted.

> Evidence shows that people like that kind of format Please cite this evidence. I like your proposed format, just interested in that research.

The existing programming languages are the evidence. Sorry I thought that was clear. I'm suggesting they take hints from the structured languages that humans actually read and write.

They're evidence that people like that style. Which is not evidence that people wouldn't like another style.
Post reply on HN