Re: open email to the W3C
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Fri, 02 Sep 2005 15:19:33 GMT
"Roedy Green" <look-on@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:kk6gh1t3a94opfmqr726d541o8inh3m48a@xxxxxxxxxx
> On Thu, 01 Sep 2005 14:38:24 GMT, "Oliver Wong" <owong@xxxxxxxxxxxxxx>
> wrote or quoted :
>
>> The binary format known as "ASCII" is such a format: Everyone
>>automatically has a viewer/editor for it, as it comes shipped with every
>>operating system I know of.
>
> ASCII is not a binary format. A binary format is one where numbers
> are stored in binary format either in 2s complement or IEEE.
I think we have a fundamental misunderstanding of the terminologies here. In
binary, there is no reason why a number MUST be stored in 2s complement or
IEEE. It could just as well be stored in 1s complement, or in some unsigned
format. Consider and RPG game, for example, which stores its save-game files
in a binary format. It may know that hit-points of a character will never be
greater than 255, and that it will never be negative, so it makes sense to
store this piece of data as an unsigned byte.
Finally, how would you store strings in your binary formats? Surely it must
be possible, because these save games also store the name of the hero, for
example. One way of encoding strings into binary files is called ASCII.
Another is EBCDIC. There are other less popular formats out there too.
When I say a file is an ASCII file, I mean that the file is encoded in such
a way so that each byte in the file represents on character, and the mapping
from bytes to character is as defined by the ASCII table. Also, ideally, the
file should only contain "printable" characters (e.g. not the 0x08 backspace
character, or the 0x07 bell character).
Did you think computers have special hardware for storing ASCII files in
some sort of "character" format as opposed to binary format?
> ASCII is
> a character format. Numbers are stored as strings of digit characters.
As a programmer, you must know that there is a big difference between i = 57
and i = "57". I would not say "the number 57 is stored as the character '5'
and '7'"; rather, I would say "the file contains the string '57'".
> In binary formats, fields are primarily positional, with implied
> lengths, rather than tagged with names as in XML.
This is a generalization which is not always true, but I'll let you get
away with it since you used "primarily".
> And there is no reason we could not come up with some universal binary
> formats that were just as universal and easy to view and edit.
I agree (especially since I consider ASCII to be one particular binary
format). But that's just not how the universe ended up. It's like there's no
technical reason why we didn't evolve with 3 arms instead of 2. But we ended
up with two arms, so when I go to a store to buy gloves, I buy a pair, not a
triplet.
> Binary formats can be just as convenient and portable as text based
> ones. They have the added advantage that people DON'T manufacture and
> distribute defective ones by hand without a proper tool the way they
> do with XML and HTML.
I would consider this a disadvantage. I like formats in which people can
manufacture and distribute by hand without a "proper" tool. Anything else
reeks of elitism, to me.
- Oliver
.
- Follow-Ups:
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- References:
- Re: open email to the W3C
- From: Oliver Wong
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- From: Oliver Wong
- Re: open email to the W3C
- From: Roedy Green
- Re: open email to the W3C
- Prev by Date: Re: open email to the W3C
- Next by Date: Re: open email to the W3C
- Previous by thread: Re: open email to the W3C
- Next by thread: Re: open email to the W3C
- Index(es):
Relevant Pages
|
Loading