John Benediktsson
19cd3c1fae
io: improve docs for stream-copy*.
2012-08-14 15:12:19 -07:00
John Benediktsson
dcf2a5e508
io.backend: fix docs to show nanoseconds instead of micros.
2012-08-01 12:08:18 -07:00
John Benediktsson
35f9ef9e88
io.streams.sequence: minor refactor, minor speedup.
2012-07-27 21:12:26 -07:00
John Benediktsson
82f2daa6ad
io: more inlining.
2012-07-25 20:55:01 -07:00
John Benediktsson
e654e4afd9
Using "same?" in more places.
2012-07-21 10:22:44 -07:00
John Benediktsson
c855074412
io: simplify stream-exemplar.
2012-07-16 19:30:10 -07:00
John Benediktsson
e292492653
io.streams.sequence: faster stream-read-until.
2012-07-11 18:26:41 -07:00
John Benediktsson
ab2c150363
io.streams.memory: adding with-memory-reader.
2012-06-18 17:24:21 -07:00
otoburb
45870bfcd8
io.pathnames: removed dependency on environment.
...
I had an erroneous dependency on basis/environment.
2012-03-30 21:03:01 -07:00
otoburb
f48ba4d2e1
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
91d993cb2e
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
e87c37ca0a
io.files: check argv when initing resource-path
2012-03-27 16:58:12 -07:00
Joe Groff
dbbfdd7651
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
63f25a179e
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
251a2a19a6
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
4e10f09787
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
c3dcf43e03
core/basis: trim down using lists
2011-11-30 23:15:42 -08:00
Joe Groff
b50ffc6da0
io: implement stream protocols on f
...
Fixes deployed applications that write to output-stream
2011-11-28 20:36:34 -08:00
Joe Groff
8018250bd9
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
19db0464a6
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
eee483654a
use radix literals
2011-11-23 19:03:40 -08:00
Joe Groff
0617838fb9
io: clean up some mess
2011-11-09 19:11:04 -08:00
Joe Groff
f5bdff14f6
io: fix each-block-slice typo
2011-11-09 18:06:58 -08:00
Joe Groff
53d027928c
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
ce6669d87d
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
1de810f416
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
be9f8a99f0
Rename lookup to lookup-word.
2011-11-06 16:00:00 -08:00
Joe Groff
8aebe4677b
constants for special object hardcoded literals
2011-11-02 12:54:50 -07:00
Joe Groff
cb6f175ef8
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
313a8dbe88
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
1641adc511
Use dip instead of swap swap for making file streams
2011-10-26 11:48:26 -07:00
Doug Coleman
f05e33fa37
Fix all failures in the linux64 build email
2011-10-24 19:33:09 -07:00
John Benediktsson
a13676f3b6
Remove stack effects from HELP: declarations.
2011-10-20 19:36:11 -07:00
John Benediktsson
8641187299
More cleanup of unused stuff.
2011-10-19 11:01:16 -07:00
Doug Coleman
412c7263f1
Forgot using in io.tests
2011-10-19 01:16:41 -07:00
Doug Coleman
2a6c59a305
Add with-error>output word and test
2011-10-19 00:56:11 -07:00
Joe Groff
b230b306f5
io: input-stream and output-stream mixins
2011-10-18 16:25:09 -07:00
Joe Groff
8ae554ef6e
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
89e98cd99b
io.encodings.utf16: auto-use strikes again
2011-10-17 21:46:08 -07:00
Joe Groff
35a5bdabc3
formatting
2011-10-17 21:23:36 -07:00
Joe Groff
49cf017399
io.encodings.utf16: guess-*coded-length hints
2011-10-17 21:23:11 -07:00
Joe Groff
6d6864b47c
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
7adce45340
io.streams.sequence: missed a USING:
2011-10-17 21:23:10 -07:00
Joe Groff
a73dc7b4b5
io: remove higher-order stack effects
...
More stack checker breakage
2011-10-17 21:23:10 -07:00
Joe Groff
7b4e62b87f
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
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
10bcb933db
io: document new words
2011-10-17 21:23:09 -07:00
Joe Groff
0c225d1e8d
io.streams.c: help-lint
2011-10-17 21:23:08 -07:00
Joe Groff
21e2fdc25c
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
Joe Groff
440130d618
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