Commit Graph

46 Commits (50dced41d41a4b7e66e6ac82b7b649e597125dcc)

Author SHA1 Message Date
Slava Pestov 98d98ab04a io.ports: clean up 2011-11-10 00:40:31 -05:00
Joe Groff d685cb6502 io.ports: make read-step inline 2011-11-09 19:59:46 -08:00
Joe Groff a67931b7c5 io.ports: fix bootstrap
Apparently can't use TYPED: or have HINTS: in the wrong place.
2011-11-09 16:32:47 -08:00
Joe Groff 5a3537b90a io.files: add file-reader, file-writer mixins
This lets us do some trickery so that the stream-element-type propagates from <file-reader>/<file-writer>. For #376.
2011-11-09 14:43:39 -08:00
Joe Groff bab801b321 io.ports: make read-step TYPED:
Eliminates more dispatch. For #376.
2011-11-09 14:13:41 -08:00
Joe Groff 63c48aa952 io.buffers, io.ports: trim some dispatch
For #376. Still some work to do.
2011-11-09 13:31:02 -08:00
Joe Groff 13b17fb84a io: input-stream and output-stream mixins 2011-10-18 16:25:09 -07:00
Joe Groff 9a812cc5c9 io.ports: lift common methods onto buffered-port 2011-10-17 21:23:37 -07:00
Joe Groff 863ab575e3 io.ports: stream-seekable? and stream-length
io.files.windows, io.backend.unix: platform-specific backends for those methods
2011-10-17 21:23:08 -07:00
Joe Groff 6f12322bda 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 a3b15543e1 io.ports: implement read-unsafe operations 2011-10-17 21:22:59 -07:00
Doug Coleman 7228c2df2c stream-element-type on output-ports was broken -- it looked for a stream>> slot but no such slot exists. add some unit tests 2011-10-12 01:05:01 -07:00
John Benediktsson 4f42c72012 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
Slava Pestov 6e3dee43d4 io.ports: calling '0 read' now returns an empty sequence without blocking (reported by Brennan Cheung) 2010-07-30 15:58:33 -04:00
Slava Pestov 01d67104f6 io.ports: fix stream-seek with seek-relative seek type (reported by Joe Groff) 2010-07-07 17:32:30 -04:00
Slava Pestov a7384d5de6 io.ports: fix stream-tell implementation 2010-07-07 02:27:34 -04:00
Slava Pestov a8098e3182 specialized-arrays: rename byte-array>T-array to T-array-cast, and make it work with anything that responds to >c-ptr / byte-length 2010-05-18 23:09:34 -04:00
Slava Pestov 627295f094 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 2eda6fc6aa 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 17b095a524 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
Doug Coleman ebd2cce1be Add some commented out unit tests to io.ports.tests that seem like they should be supported 2010-02-24 03:33:16 -06:00
Slava Pestov af0ddd5985 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 9fea67f3ff triyng to rice crc32 a bit 2009-12-13 02:03:06 -06:00
Doug Coleman 93de179c2f over push -> suffix!, over push-all -> append! 2009-10-28 15:29:01 -05:00
Doug Coleman ed1636a0c0 fix stream-tell 2009-10-03 19:26:59 -05:00
Doug Coleman aa37a57b9a take the buffer position into account on buffered-port stream-tell 2009-10-03 19:15:56 -05:00
Doug Coleman 098fd0248a support limited-streams correctly for seekable streams 2009-10-03 18:27:09 -05:00
Keith Lazuka 405e5d015b docs: change $subsection to $subsections 2009-10-02 12:15:48 -04:00
Slava Pestov 46045c882e Disposables are now registered in a global disposables set. To take advantage of this, subclass disposable instead of providing a disposed slot and call new-disposable instead of new. tools.disposables defines two words, 'disposable.' and 'leaks', to help track down resource lifetime problems 2009-08-24 02:26:13 -05:00
Slava Pestov 7aeb13e58a io.buffers and io.ports performance tweaks 2009-04-20 03:27:30 -05:00
Slava Pestov 07a5a46009 Add stream-element-type generic word 2009-03-15 17:11:18 -05:00
Doug Coleman 16312f6711 clean up stream-seek with some suggestions from slava 2009-02-08 10:35:30 -06:00
Doug Coleman 44a4c20f23 update stream seeking on windows for new api 2009-02-07 11:00:16 -06:00
Doug Coleman bc0521f88a make seeking support the full lseek options, add seeking on output ports, remove seeking from decoders.. 2009-02-07 10:30:51 -06:00
Doug Coleman 790f3b867c remove bogus unix depenedency, implement seeking on windows 2009-02-07 01:12:03 -06:00
Doug Coleman f6f716c4e3 unix support for stream seeking 2009-02-07 01:03:12 -06:00
Slava Pestov f34c14a0f5 Remove some usages of tuck 2009-01-23 18:20:47 -06:00
Slava Pestov ada08e6d0e Removing prettyprint and debugger dependencies from io code 2008-12-08 19:45:48 -06:00
Slava Pestov 4ec8326917 Move underlying-handle word from io.launcher to io.ports, add a new underlying-port word
Add a remote-address symbol to io.sockets, with-client binds it, ditto for io.servers.connection
io.sockets.secure now has two new words, send-secure-handshake, accept-secure-handshake, to upgrade existing connections
2008-11-30 13:46:39 -06:00
Slava Pestov 63a9975a0e Support inline, foldable, flushable on methods; add declarations in a couple of places for ricing purposes 2008-11-06 13:13:37 -06:00
Slava Pestov bfd119e3b5 I/O ricing: various hints added so that UTF8 and ASCII fastpaths compile with less dispatch. 25% improvement on reverse-complement 2008-11-06 00:02:44 -06:00
Slava Pestov c19f2257f4 Fix permission bits 2008-10-02 08:34:49 -05:00
Slava Pestov 0c304b8fc6 Removing old accessor usages from core and basis 2008-08-31 07:45:33 -05:00
Slava Pestov a452dd86f6 Better fix 2008-08-15 18:57:00 -05:00
Slava Pestov 713cf91f2a Fix memory leak 2008-08-15 16:13:13 -05:00
Slava Pestov d66f887736 Create basis vocab root 2008-07-28 22:03:13 -05:00