Commit Graph

68 Commits (c6bd2313ba1f27981890cf1e0f27503878140c78)

Author SHA1 Message Date
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
John Benediktsson f4a6e10818 More cleanup of unused stuff. 2011-10-19 11:01:16 -07:00
Joe Groff 13b17fb84a io: input-stream and output-stream mixins 2011-10-18 16:25:09 -07:00
Joe Groff 5627492f9b io.encodings: stream-contents method for decoder
stream-contents on decoder is much faster implemented using a read1 loop than with the default implementation.
2011-10-17 21:23:07 -07:00
Joe Groff 09f55f82fa 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 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 5e2d95ebb2 io.encodings: decoders can't really seek or tell 2011-10-17 21:23:03 -07:00
Joe Groff 73b6648b0e io.encodings: re-encrypt into stack-ese for core 2011-10-17 21:23:03 -07:00
Joe Groff 008ef0afd7 io.encodings: read-unsafe for decoders†
† currently uses locals, so not bootstrappable
2011-10-17 21:23:02 -07:00
Joe Groff ffacdaf0da io.encodings: encoded/decoded length hints
Add guess-encoded-length and guess-decoded-length generics that encodings can implement to provide hints as to how large the translation product will be, for sizing vectors and things like that.
2011-10-17 21:23:02 -07:00
John Benediktsson fec4cf9109 io.encodings.utf8: assume streams are largely ascii.
Results in 30% faster file-contents for test file and 7% faster benchmark.xml.
2011-10-03 21:49:21 -07:00
Doug Coleman 1b20b0c476 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 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
Doug Coleman 098fd0248a support limited-streams correctly for seekable streams 2009-10-03 18:27:09 -05:00
Slava Pestov 0f26d02d41 Passing the wrong type of sequence to M\ encoder write now throws an error 2009-04-20 03:26:56 -05:00
Slava Pestov 07a5a46009 Add stream-element-type generic word 2009-03-15 17:11:18 -05:00
Slava Pestov 91d0c4ed1f Fix conflict 2009-02-22 20:02:13 -06:00
Doug Coleman a6b40707df use CONSTANT: in core/ 2009-02-22 19:09:49 -06:00
Slava Pestov 1bbabcd5e1 Remove some usages of slip combinators from the core 2009-02-05 03:29:59 -06:00
Slava Pestov 669548e62e Clean up some usages of tuck, and add Joe's curried cleave/spread/apply combinators to kernel vocabulary 2009-02-02 13:43:54 -06:00
Slava Pestov daf2857d7b define-inline now takes an effect parameter
C: now sets the stack effect of the new word to slot names
add new basis/constants vocab; CONSTANT: foo bar is equivalent to : foo bar ; inline
(going to fold CONSTANT:, ALIAS: and qualified into core soon perhaps)
tighten the screws: inline words now need a stack declaration too
update some usages of inline words
2008-12-15 19:44:56 -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 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 95657e5742 Remove some funny retain stack usage 2008-08-18 20:13:24 -05:00
Slava Pestov f5c15481fe Move io.styles to basis 2008-07-28 22:28:13 -05:00
Slava Pestov ac2bf0b87d Adding inline recursive declarations 2008-07-18 19:22:59 -05:00
Slava Pestov 7ca3c2a878 Various minor compiler tweaks 2008-07-12 01:08:30 -05:00
Slava Pestov 27c89d75d4 I/O micro-optimizations; 12% improvement on reverse-complement 2008-06-17 05:22:33 -05:00
Slava Pestov 17001b40cd Improve encoding API 2008-06-12 03:49:29 -05:00
Slava Pestov 2cbfa9c2d7 Move destructors to core 2008-05-14 23:23:12 -05:00
Daniel Ehrenberg 8b6e234709 Encodings use singletons; descriptive error updates 2008-05-10 20:17:24 -05:00
Slava Pestov 75fb15ee4c Split stdio up into input-stream/output-stream, pipes work in progress 2008-05-05 02:19:25 -05:00
Doug Coleman 30b75a797a construct-boa -> boa
construct-empty -> new
2008-04-13 15:06:09 -05:00
Eduardo Cavazos aa40350aa7 replace add* and add with prefix and suffix 2008-03-31 18:18:05 -06:00
Slava Pestov aec04edbda Phasing out get-slots and cleaning up some code 2008-03-29 00:59:05 -05:00
Slava Pestov 4b32fa4d05 Fixing help-lint typos 2008-03-20 20:11:45 -05:00
Doug Coleman 936bd26a3a update core/ to use ERROR: 2008-03-20 15:00:49 -05:00
Slava Pestov 5904d3fffa Fix set-timeout with dan's new encoding stuff 2008-03-19 15:24:49 -05:00
Daniel Ehrenberg b362175d43 Initial optimization of encodings 2008-03-18 17:01:14 -04:00
Daniel Ehrenberg 56afb67bfc Unicode encoding changes 2008-03-14 03:09:51 -05:00
Daniel Ehrenberg ee9b940bc6 Modifications to the encoding protocol for later optimization 2008-03-06 00:23:38 -06:00
Daniel Ehrenberg 93c4ac23a8 Encodings updates; /* */ comments in multline 2008-03-05 14:51:01 -06:00
Daniel Ehrenberg 30eba00774 Bug fixes; docs 2008-03-04 21:05:58 -06:00
Daniel Ehrenberg 44f4aa4c69 More updates for encodings 2008-02-24 19:58:34 -06:00
Daniel Ehrenberg 75f1fb5246 Various refactorings of streams with encodings 2008-02-24 01:37:05 -06:00
Daniel Ehrenberg 72e15848bf More changes for encodings 2008-02-22 20:21:23 -06:00
Daniel Ehrenberg 1b80c453fd Little changes for encodings 2008-02-21 19:09:53 -06:00
Daniel Ehrenberg 8249ce2116 OK, now everything should load 2008-02-21 18:05:04 -06:00