On 03.01.2013 20:45, Jonadab the Unsightly One wrote:
> On Jan 3, 1:11 am, Janis Papanagnou <
janis_papanag...@hotmail.com>
> wrote:
>
>> Oh, C is an excellent and well readable assembler language.
>
> Okay, sure, but it's not significantly _better_ than
> assembly language (unless you happen to want to write
> code that runs on multiple hardware architectures).
Crap! - I've programmed in the past decades with about a dozen
assemblers (with different underlying machine architectures). -
There is a significant difference, and very obvious. I wonder
what drives you to make such a nonsensical claim.
> [...]
>
>> Then I recall that the first string types had just a 8
>> bit byte field to allow strings only of lengths up to
>> only 255 characters.
>
> I don't think I ever worked with a BASIC that had these
> limitations. More to the point, even in the old
> line-number BASICs you could insert things into the
> middle of a string without worrying about overflowing
> the allocated memory. That would be a problem in C.
Aha, I see where you're coming from.
>
> Of course, modern languages all have regex-based
> substitution operations, so strings *have* to be
> dynamic.
>
>> And don't ask for multi- byte characters or similar.
>
> Multi-byte character support is newer even than Perl. [...]
I don't recall when it was that multi-byte characters had
been introduced in IT; I'd have thought it was earlier.
>
>>> All date representations are arbitrary
>>
>> Umm, no.
>
> Umm, yes. In the first place, all date representations
> rely on the selection of an arbitrary epoch. Then,
> building on that, even if we accept the _length_ of a year
> as being non-arbitrary because it's based on a physical
> phenomenon, the question of when to start the beginning of
> each year is highly arbitrary. Why doesn't the year start
> on midsummer, for example? When the _day_ starts is
> problematic as well: some ancient cultures started the day
> at sundown, but now we use midnight. Why? Because
> somebody chose it, that's why. There's nothing _wrong_
> with this choice, but it _is_ an arbitrary choice. Some
> months have more days than others; which are which is
> completely arbitrary. Why do leap days happen in the
> second month of the year, instead of the last? Why do we
> have leap _days_, instead of waiting and eventually having
> a leap week or a leap month? Why is the day divided into
> 24 (or more precisely 12+12) hours?
Slow down! - You said: "All date representations are arbitrary",
and we have been talking about current dates, regular ones, and
irregular ones, not about historic dates. (In history you will
always find irregularities, in any area, and on any topic.)
If you'd have wanted to point out that in some small isolated
region there *still* exist different calendars, deviating from
the common convention, I'd agree with you. But that is not that
relevant in a claim starting with "All" and ending in "arbitrary".
>
> [...]
>
>> Predominant worldwide is the DMY ordering, and population
>> wise also the reverse YMD format.
>
> And to have one format for everyone you'd have to choose
> between them. How could you make the choice, if not
> arbitrarily?
The primary issue is to unambiguously understand the intention of
the represented date. It's of minor relevance WRT interpretation
errors and misunderstandings if you see 2013-01-02 and 2012-1-2
and 2012/1/2, or, 2.1.2012 and 02.01.2013 and 02/01/2013.
Restricting a date representation further by specifying a concrete
syntax completely will further simplify interpretation, specifically
if automated processing is done (but even there it's not necessary
in any case, since it's not uncommon to have sophisticated parsers;
instead of \d{4}-\d{2}-\d{2} you could write \d{1-4}[-/.]\d{1-2}...).
>
>> We can say that (practically) only the USA has this
>> insane MDY shuffled ordering.
>
> Why is MDY more insane than DMY?
(I've thoroughly explained that. If you still ask this question,
I'll bite.)
> Either one of them has to
> be parsed if you want to do any kind of cronological sort.
>
[...]
>
>> the important thing is that unambiguity at least can be
>> derived.)
>
> Not with just numbers, it can't.
If you write 2013 you know at least that it must be a year.
Now the only thing that you need to presume is the existence of
a _regular_ ordering. Then the position of the M and D are clear;
either 2013-M-D or D.M.2013 - ("big endian" or "little endian").
For the whole world[*] this is clear, see the posted reference
for the table and the world map.
[*] Well, for the whole world but the US of America, obviously.
> If you *label* the
> numbers, then it's clear. (This approach is used e.g., in
> Japan.) Alternately, if you don't like labels, you can use
> names instead of numbers for some of the components, most
> commonly for the month.
Oh, if you mean something like y:2013 m:01 d:12, then there's
something to say about that. First, labels are locale dependent,
so again not very appropriate for that purpose. Then, they are
also unnecessary, since all we need is just regularly ordered
numbers. (We have that convention in many places; time, money,
just to name two prominent ones.)
(If I buy something I have to pay "2.45", or, "two fourty five".
In your culture, do we need to say "two dollars, fourty five
cents"? Would foreigners have to expect that "2.45" means "45
dollars and 2 cents"? No. We assume and have a natural ordering.)
(Labels are interesting, e.g. in programming, when you want to
shuffle elements in case order is _insignificant_; parameters
(in perl?), for example. I think it is a good idea to support
such concepts in programming, in the design of languages, where
function parameters are involved. But that is a different topic.)
>
>>> and are tied to specific cultures. Date
>>> representations that use only numbers are absolutely
>>> *horrific* in that regard.
>>
>> That perception must be a result of the specific cultural
>> background as well. :-)
>>
>> While I've grown up in a region where "12. Jan. 2013" was
>> the cultural standard, I have no problems with either of
>> 12.02.2013 or 2013-02-12.
>
> But how do you feel about 1/12/13 or (I've actually seen
> this proposed) 1/12/113?
The former case has the problem that it's not unambiguous;
without a 4-digit year you can't, in the general case, tell
dates apart (example: 11/12/10, which could six possible
interpretations, but given that in the world you have only
three of the six permutations "implemented", even if you
assume regular ordering (i.e. exclude the US aberration),
you still have two possible interpretations). A precondition
for a universal format would, in my book, always have four
digits. (The possibilities of abbreviation in ISO 8601 with
using hyphens, I dislike. But I accept that, since the goal
to internationally talk to each other unambiguously is still
achieved.)
WRT "1/12/113" - I don't know where you got that from or what
it shall mean. - There are alternative day definitions in the
ISO 8601 standard that come close; "2013/042" is the 42th day
in the year 2013. But I suppose you intended to say something
else with your question?
>
> And when you say that DMY and YMD are both "not shuffled",
> you are completely ignoring the quite common issue of
> listing date and time together.
No, I have not been ignoring that. I was focussing on what
I think has been the primary misconception.
> To be consistent, you
> would have to insist that with YMD the time always be
> listed after the date and with DMY the time be listed
> before the date, ss:mm:hh. Otherwise your order is
> "shuffled". Oh, no, your date format is insane!
(Please don't play the ridiculous. Let's discuss is on a
rationale basis as we did before.)
In case that you have an _isolated_ date representation, any
regular (non-shuffled) form will be understandable. Since
_time_ has three 2-digit components, we don't have the option
to turn around the order of the digit groups; but we also
don't need to do that. Time seems to be predominantly written
in the most-significant-group-first order; even in the USA
(but note that, again, we have also the notational AM/PM
aberration in that cultural area).
In case we have _combined_ date/time representations, we
should address that by using the ISO 8601 format; which is
regular.
But note that the ISO format requires a 'T' as conjunction
of the two parts, as in "2013-01-12T12:46". So it may look
better (for a human reader) to consider those as two parts;
"2013-01-12" and "12:46". What I (in programming) regularly
do is to use a readable separator "2013-01-12_12:46", but
in human communication you want the two pieces apart anyway,
so you'd usually write something like "on 2013-01-12, 12:46",
or similar, with comma, spaces, etc.
Janis