# Binary I/O

H. Peter Anvin (hpa@trantor.storm.net)
Fri, 26 Jan 1996 19:31:24 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    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-