MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Binary I/O



On the subject of binary I/O, I must say I have personally been
partial to the "byte vector" syntax used in LPMOO (I think.)

A probably bastardized version goes as follows:

expr ::= bytevect | ...whatever expr currently is...

bytevect ::= '[' ']' | '[' bytes ']'

bytes ::= expr | expr ',' bytes

The expressions can be integers or strings; integers get translated to
the appropriate ASCII code and strings are inlined as-is.  (It could
be made legal to include byte vectors, lists, floats, objects or errors; the
former two would simply recurse and the latter three would have effectively
toint() applied on them.)

Another thing that would probably be a lot easier to implement but
would be very helpful to non-U.S. sites would be to have the printable
character set be runtime configurable (probably a property on
$server_options?)  European sites probably want the whole ISO 8859
character set available, for example.  It's okay to always disallow control
characters < 0x20, if necessary, however.

	-hpa
-- 
PGP public key available - finger hpa@terminus.storm.net
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
GE/CS 3.1 d- s-:- a- C++++ ULIS++++$ P+++ L++++>+++++ E++ W++ N++ o+ K
w--- O@ M V- PGP+ t+ 5++ X? R@ tv- b++ DI++++ D++(+) G e++ h- r-- y-



Home | Subject Index | Thread Index