Commit Graph

70 Commits (abc12f7d42d17db08752e5d30d9050c73dadb7e2)

Author SHA1 Message Date
Joe Groff eb2a7737d8 io.streams.limited: missed INSTANCE: input-stream 2011-10-18 21:27:08 -07:00
Joe Groff b230b306f5 io: input-stream and output-stream mixins 2011-10-18 16:25:09 -07:00
Joe Groff d35c67dde4 more stream-seekable? and stream-length methods
- limited-streams and throw-on-eof-streams
- string-readers and byte-readers
2011-10-17 21:23:09 -07:00
Joe Groff 7cf22250ce clean up forwarding stream-read-partial-unsafe
Now that "io" provides a method on object for stream-read-partial-unsafe that forwards to stream-read-unsafe, individual stream class that don't implement partial reads don't need to provide such a method themselves.
2011-10-17 21:23:06 -07:00
Joe Groff 1e37b525a3 kill noncopying-reader mixin, stream-read generic
Now that all streams have been updated to implement the stream-read-unsafe protocol, take out the noncopying-reader shim. Turn stream-read and stream-read-partial into plain functions over the -unsafe generics.
2011-10-17 21:23:05 -07:00
Joe Groff 46c9858114 io.streams.(limited,throwing): read-unsafe methods 2011-10-17 21:23:00 -07:00
Joe Groff dcc17306cf io.streams.null: read-unsafe methods 2011-10-17 21:23:00 -07:00
Joe Groff 9737ca956f io.streams.sequence: change to provide read-unsafe
Change io.streams.sequence and its children io.streams.byte-array and io.streams.string to implement the -unsafe protocol and mixin noncopying-reader.
2011-10-17 21:22:59 -07:00
Doug Coleman 41eb5cae4b Make sure 0 read always returns f. Fixes issue #70.
More unit tests, fix read-until to return f f sometimes
Rename ((read-until)) to read-until-loop. Fix the stack effect declarations of (read) and handle-readln.
2011-09-09 18:51:06 -07:00
Slava Pestov d865b366dd Remove stream-peek and stream-peek1, re-implement dns vocab to not need this abstraction 2010-10-08 18:55:13 -07:00
Doug Coleman 1c344420ce Implement and document stream-peek 2010-10-08 06:34:19 -07:00
Doug Coleman 5b13204639 Fix io.streams.throwing word and write docs for it. Fix typo in io.streams.limited docs 2010-09-27 20:20:48 -05:00
Doug Coleman 0ac5146fcc Fix file uploads by using unlimit-stream for now. Will compare solution to with-combinators tomorrow. 2010-09-08 02:50:25 -05:00
Joe Groff a1e1a62c39 io.streams.throwing: add test file 2010-07-09 23:36:40 -07:00
Joe Groff 4d082e08f4 io.streams.throwing: rename throws-on-eof -> stream-throw-on-eof and input-throws-on-eof -> throw-on-eof and change stream-throw-on-eof to leave the rigged stream on the stack, to better follow convention of other io words 2010-07-09 18:10:51 -07:00
Joe Groff ddcb743bbd io.streams.limited: scrape out last vestiges of unlimiting 2010-07-09 14:56:54 -07:00
Joe Groff a35344d462 io.streams.throwing: implement read-until 2010-07-09 14:26:01 -07:00
Joe Groff fc35dc8a28 io.streams.throwing: implement tell and seek 2010-07-09 14:08:54 -07:00
Joe Groff 47a47f8e76 io.streams.limited: remove unlimit* 2010-07-09 13:52:15 -07:00
Doug Coleman d00ea1892a Split off io.streams.throwing from io.streams.limited and update usages of limited streams 2010-07-09 13:32:09 -05:00
Slava Pestov d2d466de29 Language change: tuple slot setter words with stack effect ( value object -- ) are now named FOO<< instead of (>>FOO) 2010-05-06 17:21:02 -04:00
Slava Pestov 28a9cf79ff io.encodings: add a fast-path for ascii, utf8 and 8-bit encodings when string only contains ASCII characters 2010-04-19 01:14:00 -05:00
Slava Pestov 08b6ebc7fa Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Doug Coleman 2dcce81803 add docs to 8-bit encodings vocabs, update usages 2009-11-12 18:36:20 -06:00
Doug Coleman b5fd809209 memq? -> member-eq?, sorted-memq? -> sorted-member-eq? 2009-10-28 15:02:00 -05:00
Doug Coleman 38072ffe51 clarify behavior of seekable/nonseekable limited streams 2009-10-05 16:16:59 -05:00
Doug Coleman 2d6d9dd46c update docs for stream-tell 2009-10-03 19:39:06 -05:00
Doug Coleman 0db130d05a better tests for stream-tell 2009-10-03 19:33:54 -05:00
Doug Coleman 9a777b0969 support limited-streams correctly for seekable streams 2009-10-03 18:27:09 -05:00
Keith Lazuka 8f79ea91ba docs: change $subsection to $subsections 2009-10-02 12:15:48 -04:00
Doug Coleman 4d0ca37fb0 define a method on stream-element-type, fix a bug in unlimited-input and add a unit test 2009-09-28 15:51:40 -05:00
Doug Coleman c700447192 support seeking on limited streams 2009-08-26 13:48:41 -05:00
Slava Pestov 236409fbe5 io.streams.duplex: fix test 2009-08-24 20:19:55 -05:00
Doug Coleman 9ba6f1205b add a <limited-file-reader> word to open a limited stream from a file correctly 2009-06-03 21:21:21 -05:00
Slava Pestov f2ab6a261a Clean up init-stdio implementations and move io.streams.null to basis 2009-05-12 03:35:48 -05:00
Slava Pestov cd64833360 clean up contents and lines words; contents never outputs f now 2009-05-10 16:39:51 -05:00
Slava Pestov 4d438a3edd Remove cruddy string encoding/decoding code from VM 2009-05-02 13:45:38 -05:00
Slava Pestov 0d0c7f2d55 Fix unit test failures caused by stricter type checking in M: encoder stream-write 2009-04-20 20:05:17 -05:00
Slava Pestov e12f0f2280 Treat a limit of f as unlimited instead of throwing an error 2009-04-07 04:11:56 -05:00
Slava Pestov f97389503f Fix stream-read-until on byte-readers 2009-03-27 19:26:16 -05:00
Slava Pestov 723bfab030 Fixing unit tests for syntax change 2009-03-23 00:34:02 -05:00
Slava Pestov 4b26ff6a95 Add variables to set request-limit and upload-limit 2009-03-20 01:47:09 -05:00
Slava Pestov 07a5a46009 Add stream-element-type generic word 2009-03-15 17:11:18 -05:00
Doug Coleman 12a53bbdc0 add seeking to byte-array streams 2009-03-06 17:34:21 -06:00
Slava Pestov 25a877e50b Merge OneEyed's patch 2009-02-28 17:06:55 -06:00
Daniel Ehrenberg 2c462745f1 Redoing string streams and byte-array streams without copying 2009-02-27 00:53:05 -06:00
Slava Pestov 421ee726b8 Merge branch 'master' into new_ui 2009-02-16 21:22:12 -06:00
Slava Pestov 6b25e99470 Add summary for heaps more vocabs 2009-02-16 21:05:13 -06:00
Slava Pestov 27daa4b1d4 Split off formatted-output-stream-protocol from output-stream-protocol, and clean up io.streams.duplex 2009-02-06 02:43:55 -06:00
Slava Pestov a0c1d32197 Move io.streams.string from core to basis 2009-02-06 01:58:51 -06:00