Commit Graph

29 Commits (ecfaab4b03e86153c1e76569ed5e7f2115eb352e)

Author SHA1 Message Date
John Benediktsson 3337401551 core: cleanup USING lists. 2013-03-05 10:34:47 -08:00
Joe Groff eee483654a use radix literals 2011-11-23 19:03:40 -08: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 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
John Benediktsson 0e3d598e69 specialized-arrays: performed some cleanup.
Specifically,
    •   Created >c-array to be replacement for >T-array.
    •   Created cast-array to be generic replacement for all T-array-cast words.
    •   Created c-array@ to be generic replacement for T-array@ words.
    •   Replaced usages of <T-array> with T <c-array>
    •   Replaced usages of <direct-T-array> with T <c-direct-array>
    •   Replaced usages of >T-array with T >c-array
    •   Replaced usages of T-array-cast with T cast-array
    •   Replaced usages of malloc-T-array with T malloc-array.
    •   Removed malloc-T-array.
    •   Removed T-array-cast.
    •   Removed T-array@.
    •   Removed >T-array.

I also added (but didn't change any code to use):
    •   T c-array-type, returns T-array
    •   T c-array?, returns T-array?
    •   c-array{ T ... }, returns T-array{ ... }

Bootstraps just find on Mac OS X.  Also `load-all test-all` works for me.
2011-09-26 11:37:51 -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 776f184ed0 serialize, io.streams.byte-array: fix unit tests for utf8 encoding strictness 2010-08-25 17:51:44 -07:00
Slava Pestov 500882d603 io: missed a few byte-array>int-array in unit tests 2010-05-19 16:22:39 -04:00
Slava Pestov 2dde82ffff Slices over specialized arrays can now be passed to C functions, written to binary output streams, and given to malloc-byte-array 2010-02-25 04:50:31 +13:00
Slava Pestov c1e7a3ffc2 Specialized arrays, structs and other objects responding to the >c-ptr / byte-length protocol can now be written to binary streams 2010-02-24 20:18:41 +13:00
Doug Coleman aabaccff5e fix a bunch of typos in docs 2009-10-21 17:40:43 -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
Slava Pestov a742145fd9 compiler.tree.modular-arithmetic: >fixnum elimination and value info annotations were too aggressive 2009-08-17 01:20:25 -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 d991690a47 Merge branch 'master' of git://factorcode.org/git/factor 2009-05-04 05:16:47 -05:00
Slava Pestov 4d438a3edd Remove cruddy string encoding/decoding code from VM 2009-05-02 13:45:38 -05:00
Slava Pestov ca8091443c Move byte-vectors and io.streams.byte-array to basis 2008-12-08 13:59:25 -06:00
Slava Pestov a4d9cdfeb3 Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov 75fb15ee4c Split stdio up into input-stream/output-stream, pipes work in progress 2008-05-05 02:19:25 -05:00
Daniel Ehrenberg b362175d43 Initial optimization of encodings 2008-03-18 17:01:14 -04:00
Slava Pestov 32526206f1 Help fixes 2008-03-11 19:51:58 -05:00
Daniel Ehrenberg 93c4ac23a8 Encodings updates; /* */ comments in multline 2008-03-05 14:51:01 -06:00
Daniel Ehrenberg 44f4aa4c69 More updates for encodings 2008-02-24 19:58:34 -06:00
Daniel Ehrenberg 8249ce2116 OK, now everything should load 2008-02-21 18:05:04 -06:00
Daniel Ehrenberg 7ae14a746f Refactoring byte-array and string streams 2008-02-16 13:58:38 -06:00