AltME: Ren - Data Exchange Format

Messages

Geomol
About my point regarding bloat, I do mean it. :) Figure a system with thousands of hour:minute data being exchanged. If you force seconds in, which will always be 00 in such a system, and it will look like XML with end-tags. It is unnecessary bloat.
If you use Ren to exchange data between systems, where it means MM:SS, and you allow the first part to be any value (larger than 23 also), then it should work too, shouldn't it?
Isn't Ren about what you allow users to write. How they interpret it, is up to each case.
A string in one human language might mean something else in another human language, but it's still valid text.
Gregg
It's an interesting problem, because whether hh:mm or mm:ss is expected is based on context. The only way around that is to require all fields. Of course, REBOL made a good call, and it's right most of the time, but I've been tripped up by it a couple times myself. More importantly, you have to explain it to everyone that needs to use it. hh:mm:ss is unambiguous.
But if it can be either, and we only allow decimals on seconds, it gets trickier still.
Geomol
In a language with computation, you need to explain, yes. But in a data format, couldn't you let it be up to the user, how to interpret two integers separated by a colon?
The argument to mee is like sending just one integer telling the receiver, it's the number of days until some event. If the receiver choose to interpret the integer being number of weeks, we have a problem. But I wouldn't restrict the format because of just misinterpretation.
mee -> me
Gregg
My point about context, yes. BUT (all caps), what does your spec look like now? Ugly is what.
Geomol
:)
Date and time is some of the hardest datatypes to implement.
Rebolek
I think the REN data format should be self-explaining. XX:YY isn't.
Gregg
Now we know why JSON left out date-time. :-)
If we make seconds optional, the onus is on the user to make things unambiguous if they want. If we say two segments are hh:mm, that's what they are, even if we sometimes forget. :-\
Geomol
World goes a bit further. Examples:
w> 12:00 + 1    ; Here 12:00 is HH:MM
== 12:00:01
w> 12:00.1      ; Here it's MM:SS.1
== 0:12:00.100000
So if you just have two numbers separated by a colon, it is minutes and seconds, if you have fraction also.
Gregg
REBOL does that as well, which I think Ren should NOT do.
Geomol
Ah yes, Rebol does it too.
Geomol
Maybe you need Loose Ren and Strict Ren?
Gregg
Nope. Need to keep it simple.
Geomol
agree
Gregg
That doesn't mean people can't write tolerant loaders though.

Last message posted 176 weeks ago.