Re: open email to the W3C




"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


.



Relevant Pages

  • Re: new here, my lang project...
    ... > binary format is easy. ... for navigation because the navigation is via parsing and ASCII ... interactions to invoke the behaviors tend to be high level. ... An abstraction disconnect. ...
    (comp.object)
  • Re: open email to the W3C
    ... >It may know that hit-points of a character will never be ... >store this piece of data as an unsigned byte. ... When you talk of a twos-complement machine, or a binary format, the ...
    (comp.lang.java.advocacy)
  • Re: Positioning a mesh???
    ... > Also .x files are generally ASCII (not sure if there is a binary format) ... > Generally separate .x files is best, however I suspect there comes a point ... >>> News and Resources for Managed DirectX ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Positioning a mesh???
    ... >>> Also .x files are generally ASCII (not sure if there is a binary format) ... Also .x files are generally ASCII ... >>> separate .x files now and if it gets too slow you can rewrite the loader ... >>> News and Resources for Managed DirectX ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: help,how to convert a binary data file to ascii one?
    ... David Frank wrote: ... >> I just got a data file in binary format and want to convert them ... >>ascii text file. ...
    (comp.lang.fortran)

Loading