Sat Nov 11 18:03:41 EST 2006
more things to clean up
- SEGV and other signal handling using setjmp.
- print/write semantics
about print/write semantics of strings.
- 'write' followed by 'read' is the identity for serializable atoms
- 'print' is human readable description of an object
- 'save' dumps in raw/binary/... format
print for strings at the moment is neither of those, it's dequoting,
or a form of interpretation. so i need a new word. maybe have a look
at how it's called in other languages... in scheme it's 'display',
'write' and 'print'. probably i need 'save' just for buffers. so,
'save' basicly means: dump in raw/binary/whatever form. currently,
only implemented for strings, but might be implemented for other
FIXME: save-string etc.. maybe call it save-atom?
"abc" print -> abc
so not 'save'...
somethings not right here.. let's try again
- 'write' is a machine and +- human-readable format for serialization
- 'print' is dequote: go from internal representation to raw result
- 'report' is a human readable summary, or 'write' if that makes sense
the core of the problem is of course that i want
"abc" p -> abc
((1 2 3>) >matrix p -> 1.000 2.000 3.000
means i mix print/report semantics as described above
its quite a job to clean this up probably..
so in this sense, printing a list doesnt make sense.. argh.. maybe i
should reserve the '.' word for this mixed semantics? ok, that's how
it's done now.. 'p' is just an alias for '.' with
: . string? if print else report then 32 emit ;;