Doug Coleman
6c4043bb25
io: Make stream-contents call stream-contents* and do the disposal in the top-level. Fixes #645 .
2012-08-25 17:03:51 -07:00
John Benediktsson
980f1236cf
io: improve docs for stream-copy*.
2012-08-14 15:12:19 -07:00
John Benediktsson
1a3e8a2994
io.backend: fix docs to show nanoseconds instead of micros.
2012-08-01 12:08:18 -07:00
John Benediktsson
3c03803f21
io.streams.sequence: minor refactor, minor speedup.
2012-07-27 21:12:26 -07:00
John Benediktsson
68f8d5bc17
io: more inlining.
2012-07-25 20:55:01 -07:00
John Benediktsson
4e72d80256
Using "same?" in more places.
2012-07-21 10:22:44 -07:00
John Benediktsson
b9900248b7
io: simplify stream-exemplar.
2012-07-16 19:30:10 -07:00
John Benediktsson
a642f39a9a
io.streams.sequence: faster stream-read-until.
2012-07-11 18:26:41 -07:00
John Benediktsson
752b5c6887
io.streams.memory: adding with-memory-reader.
2012-06-18 17:24:21 -07:00
otoburb
30d8b5211e
io.pathnames: removed dependency on environment.
...
I had an erroneous dependency on basis/environment.
2012-03-30 21:03:01 -07:00
otoburb
152c301d49
io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/".
...
This mimics the same behaviour as "ls ~" in the shell, which expands the alias
as a directory, and not as a filename. For the specific edge-case where a
filename called "~" must have a path constructed to it (e.g. "./~" or "~/~").
2012-03-30 21:01:57 -07:00
otoburb
cb6eb8b2bd
io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname.
...
vocab:, resource: and ~/ are special pathnames. Modified absolute-path word,
added test cases and updated io.pathname documentation.
2012-03-30 21:01:46 -07:00
Joe Groff
83a3a0346b
io.files: check argv when initing resource-path
2012-03-27 16:58:12 -07:00
Joe Groff
0ddb6fa96e
Revert "io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname."
...
This reverts commit 4e10f09787
.
2012-01-31 11:46:02 -08:00
Joe Groff
af8dc62104
Revert "io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/"."
...
This reverts commit 251a2a19a6
.
2012-01-31 11:45:51 -08:00
otoburb
dc11f2d7a2
io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/".
...
This mimics the same behaviour as "ls ~" in the shell, which expands the alias
as a directory, and not as a filename. For the specific edge-case where a
filename called "~" must have a path constructed to it (e.g. "./~" or "~/~").
2012-01-11 02:36:47 +00:00
otoburb
a5e8cc75b9
io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname.
...
vocab:, resource: and ~/ are special pathnames. Modified absolute-path word,
added test cases and updated io.pathname documentation.
2012-01-11 02:36:47 +00:00
Doug Coleman
3ba787b277
core/basis: trim down using lists
2011-11-30 23:15:42 -08:00
Joe Groff
78d23ce6a0
io: implement stream protocols on f
...
Fixes deployed applications that write to output-stream
2011-11-28 20:36:34 -08:00
Joe Groff
1d9838aa57
io.files: back out resource-path change
...
It's too brittle against varying current directories or the Factor directory being moved.
2011-11-27 12:37:58 -08:00
Joe Groff
88c9483343
io.files: use initialize to set resource-path
...
If a resource path is already set in the image, don't change it. Should make #364 work a bit more as expected, and let us set the resource path for deployed Mac OS X bundles.
2011-11-27 12:37:58 -08:00
Joe Groff
943596575a
use radix literals
2011-11-23 19:03:40 -08:00
Joe Groff
0cf0b91aad
io: clean up some mess
2011-11-09 19:11:04 -08:00
Joe Groff
b4947a62f6
io: fix each-block-slice typo
2011-11-09 18:06:58 -08:00
Joe Groff
4f4bbd3304
io: more hot-rodding for #376
...
* Change the interface of read-into to return a slice and an eof boolean separately so the compiler can optimize the slice.
* Add an each-stream-block-slice combinator that behaves like each-block but reuses a preallocated buffer for every iteration.
* Pull some strings in the stream-read-into implementation to further improve type propagation and bounds check elimination.
2011-11-09 17:22:01 -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
f31fb8a968
io:read: don't resize output buffer if unnecessary
...
Even with a short-circuit test in the VM primitives, resize still has an overly high runtime cost in tight loops. For #376 .
2011-11-09 14:29:12 -08:00
Doug Coleman
c731dc6edb
Rename lookup to lookup-word.
2011-11-06 16:00:00 -08:00
Joe Groff
186bf65a00
constants for special object hardcoded literals
2011-11-02 12:54:50 -07:00
Joe Groff
1386212d23
vm: dispatch signal handlers through subprimitive
...
We also need to save C ABI volatile registers before calling the signal handler in order to be able to reliably resume. Add signal-handler and leaf-signal-handler subprimitives to preserve volatile registers before invoking the signal handler C function.
2011-10-27 21:18:18 -07:00
Doug Coleman
7b6f27eda6
Add a lint check for swap .. swap that can be replaced by dip. Clean up the cases it finds.
2011-10-26 13:01:04 -07:00
Doug Coleman
1882e3de3e
Use dip instead of swap swap for making file streams
2011-10-26 11:48:26 -07:00
Doug Coleman
51c033a1f6
Fix all failures in the linux64 build email
2011-10-24 19:33:09 -07:00
John Benediktsson
5a943b32c4
Remove stack effects from HELP: declarations.
2011-10-20 19:36:11 -07:00
John Benediktsson
f4a6e10818
More cleanup of unused stuff.
2011-10-19 11:01:16 -07:00
Doug Coleman
c5cca8a6c6
Forgot using in io.tests
2011-10-19 01:16:41 -07:00
Doug Coleman
0e46502f6e
Add with-error>output word and test
2011-10-19 00:56:11 -07:00
Joe Groff
13b17fb84a
io: input-stream and output-stream mixins
2011-10-18 16:25:09 -07:00
Joe Groff
d61f335fee
io: error stream combinators
...
* with-error-stream(*)
* with-output+error-stream(*) -- sets output and error stream to same stream
* with-output>error -- sets output stream to error stream for scope
* with-input-output+error-streams(*) -- like with-streams, but sets output and error to same stream
2011-10-18 15:13:33 -07:00
Joe Groff
4493d66282
io.encodings.utf16: auto-use strikes again
2011-10-17 21:46:08 -07:00
Joe Groff
67cccc63b3
formatting
2011-10-17 21:23:36 -07:00
Joe Groff
5443664df7
io.encodings.utf16: guess-*coded-length hints
2011-10-17 21:23:11 -07:00
Joe Groff
4bdef412fc
io.encodings.utf16: fast path & slow path speedups
...
Implement M: utf16[bl]e encode-string to use a fast implementation if a string is ASCII only, and do some inlining so the slow path optimizes a bit better.
2011-10-17 21:23:11 -07:00
Joe Groff
aa36db5ca8
io.streams.sequence: missed a USING:
2011-10-17 21:23:10 -07:00
Joe Groff
cd0eb76806
io: remove higher-order stack effects
...
More stack checker breakage
2011-10-17 21:23:10 -07:00
Joe Groff
0353179a92
io.streams.c: remove -seek and -tell methods
...
M: c-stream stream-seek was broken and bootstrap doesn't need it so save some code.
2011-10-17 21:23:10 -07:00
Joe Groff
e426512534
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
1b0b765e82
io: document new words
2011-10-17 21:23:09 -07:00
Joe Groff
3588e6e4dc
io.streams.c: help-lint
2011-10-17 21:23:08 -07:00
Joe Groff
4d224b552f
io: stream-read-into and stream-read-partial-into
...
Safe user-facing wrappers for stream-read-unsafe.
2011-10-17 21:23:08 -07:00