In a production setting, it is occasionally very useful to be able to convert the binary database into a simple textfile. This can be useful for debugging, for transporting a db between machines with incompatible architectures (different byte-sex or floating-point representations, say), or for converting a database to a new revision of the server, should an incompatible change of database format prove necessary.
Such a facility has been implemented and tested,
based on the xxx_import()
and xxx_export()
functions in each module xxx, but has not been actively
maintained during recent changes and is likely
thoroughly crippled by bitrot.
The general scheme used is to represent immediate values such as integers and floats by lines like
i:1534 f:45.5
while representing, for example, a three-slot vector containing the above two numbers plus a pointer to itself, as
V:15a9f:3 i:1535 f:45.5 r:15a9f
The general format, then, is to delimit records by newlines and fields within a record by colons, and to represent a value by a record containing a type field, followed by any immediate value, followed in the case of composite objects by records representing the contained values.
Addressable objects are assigned unique hex identifiers, which are stored in the second field in their record, and are referred to using records consiting of the r type field followed by a field containing the desired hex identifier.
As a general convention, hardwired classes have three-character type fields matching their source filename, and other hardwired types have one- or two-character type fields. As a further convention, the latter are lower-case for immediate values and upper-case for composite values.
The defined type fields are:
makeIndex
.)
makePackage
.)
Go to the first, previous, next, last section, table of contents.