Joe Groff
6828eeb27e
io.streams.peek: read-unsafe protocol
2011-10-17 21:23:04 -07:00
Joe Groff
a9ab3db167
ui.tools.listener: read-unsafe for interactor†
...
†there's a failing test with this patch that needs investigation:
===
resource:basis/ui/tools/listener/listener-tests.factor: 90
Unit Test: { [ t ] [ "promise" get 2 seconds ?promise-timeout text = ] }
wait-timeout
===
2011-10-17 21:23:04 -07:00
Joe Groff
7caed69d26
delegate.protocols: update input-stream-protocol
...
Add stream-read-unsafe and stream-read-partial-unsafe to input-stream-protocol.
2011-10-17 21:23:04 -07:00
Joe Groff
d2855bbf09
io: remove each-block* because it's not useful
2011-10-17 21:23:03 -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
5c945595ee
io.encodings.string: faster decode and encode
...
stream-contents is apparently way slow for decoders. Write decode out more directly as a read1/push loop so it's faster. encode isn't quite as bad, but we can still get a 25% speed improvement by writing to an appropriately sized byte-vector.
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
Joe Groff
9082d05582
io: tweak each-block* to be byte- or char-agnostic
2011-10-17 21:23:02 -07:00
Joe Groff
92d24b0a8f
vm: no-op reallot_array with same size, for real
2011-10-17 21:23:01 -07:00
Joe Groff
3f15127ead
mongodb.gridfs: move to unmaintained
...
It has no tests and nothing appears to use it, so I don't want to mess with it to make it implement the stream-read-unsafe interface.
2011-10-17 21:23:01 -07:00
Joe Groff
d54824cb40
io: nab io.streams.peek's stream-exemplar-growable
...
Rename stream-element-examplar to stream-exemplar to match.
2011-10-17 21:23:01 -07:00
Joe Groff
59f0b93290
vm: make reallot_array for same size a no-op
2011-10-17 21:23:01 -07:00
Joe Groff
055196d4b7
io.streams.(limited,throwing): read-unsafe methods
2011-10-17 21:23:00 -07:00
Joe Groff
01419b3e6b
io.streams.null: read-unsafe methods
2011-10-17 21:23:00 -07:00
Joe Groff
8261c941c2
io: non-copying each-block and contents variants
...
each-(stream-)block* is like each-block but takes a buffer object and reads into it repeatedly. (stream-)contents* determines the stream length then does a single stream-read-unsafe into a preallocated buffers. Both functions currently only work for byte-arrays (and contents* only for seekable streams), so they can't replace the non-starred versions completely just yet.
2011-10-17 21:23:00 -07:00
Joe Groff
a3b15543e1
io.ports: implement read-unsafe operations
2011-10-17 21:22:59 -07:00
Joe Groff
7e9dbde99f
io.buffers: factor out buffer-read-unsafe word
...
buffer-read-unsafe returns a length and a pointer into the buffer instead of a copy.
2011-10-17 21:22:59 -07:00
Joe Groff
b79d7158be
io.streams.memory: implement stream-read-unsafe
...
(The actual method is in alien.data due to bootstrap load order issues.)
2011-10-17 21:22:59 -07:00
Joe Groff
d5f4b6f155
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
Joe Groff
66bb07bbcf
io, io.streams.c: factor noncopying-reader mixin
...
Instances of the mixin implement stream-read and stream-read-partial in terms of stream-read-unsafe and stream-read-partial-unsafe, respectively.
2011-10-17 21:22:58 -07:00
Joe Groff
2518f1c0e9
io.streams.c: Document fputc primitive
2011-10-17 21:22:58 -07:00
Joe Groff
5a072c57a6
bootstrap, io.streams.c: use new fread primitive
...
Change the fread primitive to fread-unsafe, matching the new primitive in the VM, and update the implementation of c-reader to implement stream-read-unsafe and stream-read in terms of fread-unsafe
2011-10-17 21:22:58 -07:00
Joe Groff
ef8a179f34
io: non-copying binary stream read generics
...
Add generics stream-read-unsafe and stream-read-partial-unsafe, which take a buffer pointer and return a count of bytes read instead of returning a freshly allocated byte array.
2011-10-17 21:22:57 -07:00
Joe Groff
fde782cff6
vm: non-copying primitive_fread
...
primitive_fread now takes a buffer pointer argument and returns a count of bytes read instead of allocating a byte array.
2011-10-17 21:22:57 -07:00
John Benediktsson
38a54cb8df
math.functions: improve stack effect names for gcd*.
2011-10-17 20:37:36 -07:00
John Benediktsson
ac98269f53
math.functions: faster gcd means faster ratios.
2011-10-17 20:36:28 -07:00
Doug Coleman
a2804ebf54
find-dlist-node was returning duplicated information -- node/f tells you enough, no need for another boolean return value
2011-10-17 18:58:14 -07:00
John Benediktsson
d947553df8
benchmarks: tcp/udp should take less time for now (until it gets sped up).
2011-10-17 17:47:28 -07:00
Doug Coleman
7ffd51c485
A little ambitious on the tcp-echo2 benchmark. Reduce 20mil to 20k
2011-10-17 16:47:21 -07:00
John Benediktsson
bd0278cf63
lint: enable checks for quotations of length 2, and add some ignores.
2011-10-17 11:30:01 -07:00
Doug Coleman
5836634922
Rename echo benchmark to udp-echo. Rename file-server benchmark to tcp-echo. Add more benchmarks for different loads.
2011-10-17 10:25:28 -07:00
Doug Coleman
98979fc51c
Remove initializers from extra/constructors, add C:-like form that requires a stack effect
2011-10-17 10:25:27 -07:00
Doug Coleman
f21fee3b73
Rename complete-effect to scan-effect
2011-10-17 10:25:27 -07:00
John Benediktsson
54e075c76c
lint: fix unit tests.
2011-10-17 10:15:48 -07:00
Doug Coleman
db1d499a6f
Fix typo in tools.deploy.windows.ico
2011-10-16 23:06:11 -07:00
John Benediktsson
3582e9c168
More lint fixes.
2011-10-16 21:23:21 -07:00
John Benediktsson
4919339721
project-euler.150: 20% faster.
2011-10-16 21:21:07 -07:00
John Benediktsson
81714b8dc3
More lint cleanups.
2011-10-16 19:33:16 -07:00
John Benediktsson
45aeea52ce
lint: filter a bit better.
2011-10-16 19:32:16 -07:00
John Benediktsson
470e0be3e1
ui.tools.listener: call insert-newline directly.
2011-10-16 13:39:15 -07:00
John Benediktsson
fb9612ef73
sequences.deep: find drop >boolean is any?
2011-10-16 13:15:05 -07:00
John Benediktsson
c8732657b7
Cleanup more lint warnings.
2011-10-16 13:01:58 -07:00
John Benediktsson
ea4240cea0
lint: cleanup, deep compare, print clickable words.
2011-10-16 13:01:36 -07:00
John Benediktsson
6f1c44b46d
Cleanup some lint warnings.
2011-10-15 19:19:44 -07:00
John Benediktsson
df2000d8e7
random.blum-blum-shub: fix tests for recent random-integer change.
2011-10-15 10:39:16 -07:00
John Benediktsson
ed72c670b9
bootstrap.image: disable auto-use. Fixes #263 .
2011-10-15 10:34:34 -07:00
John Benediktsson
37deaec528
random: random integers is 90% faster.
2011-10-14 18:52:41 -07:00
John Benediktsson
d773d99de5
benchmark.splay: adding a splay-tree benchmark.
2011-10-14 18:10:49 -07:00