TODO.org (2085B)
1 - [X] Use a single object to track RSV position. 2 - [X] Tried it and it results in GC churn. Use rows and columns 3 instead. 4 - [X] I don't like the naming of the libraries. Rename things into 5 something proper. 6 7 Zipheir's points: 8 9 - [X] ALL-CAPS-NAMES are not very Schemely, 10 - [X] you can write hex literals, e.g. #xfd, #xff, etc., 11 - [ ] every 'match' expression should have a catch-all failure clause 12 that raises an exception (probably an assertion-violation, in R6RS 13 terms). i.e. a more *useful* exception than "no match". 14 - [X] For the library, you may want to provide a way to read a large 15 RSV in chunks (say a row) rather than all at once. A stream or 16 coroutine generator might be a good choice for this. For example 17 rsv->stream might return a stream of rows which are parsed 18 on-demand. This might take some design thinking. 19 - [X] BTW, I think the row & offset numbers should be passed to 20 'error' as irritants instead of formatted into the error message. 21 That way, people can easily extract them. So (error <message> 22 row-num offset) You can then call error-object-irritants in R7RS to 23 get them out. It's not important for the binary tools, of course. 24 - [X] Oh yeah, if they're doing I/O they should definitely be called 25 read-something. 26 - [X] Actually, X->Y procedures in Scheme generally return one 27 value. I don't think there are any exceptions. 28 - [ ] [me: i should make a note about the error api, which i don't 29 quite understand.] That will take some thought. The library should 30 raise a specific type of condition to indicate RSV errors. This is 31 similar to the bytestring library, which exports 32 bytestring-error?. https://srfi.schemers.org/srfi-207/srfi-207.html 33 [me: so define-record-type <rsv-error>?] That's the most portable 34 way to do it. If you're willing to depend on R6RS conditions (which 35 Guile has, and which R7RS-large will eventually have) you could use 36 define-condition-type. Then you'd use something like (raise 37 (make-rsv-error-object MESSAGE IRRITANT ...)), instead of 'error', 38 to actually signal a problem.