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
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
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
fbbaef70c4
Remove stream-peek and stream-peek1, re-implement dns vocab to not need this abstraction
2010-10-08 18:55:13 -07:00
Doug Coleman
d462355035
Implement and document stream-peek
2010-10-08 06:34:19 -07:00
Doug Coleman
f7af445625
Add stream-peek1 and remove it from images.gif and dns. Add sequence-peek but not stream-peek (yet?)
2010-10-08 06:34:17 -07:00
Slava Pestov
28eb59824d
io: fix with-streams to dispose the output stream first, move (stream-seek) word to io.streams.sequence where it belongs
2010-09-12 22:07:23 -07:00
Slava Pestov
261e55a918
serialize, io.streams.byte-array: fix unit tests for utf8 encoding strictness
2010-08-25 17:51:44 -07:00
Slava Pestov
cb25591d36
io: missed a few byte-array>int-array in unit tests
2010-05-19 16:22:39 -04: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
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
Slava Pestov
1c10196c43
Rename kernel.private:getenv/setenv to special-object/set-special-object to mirror recent renaming on the VM side
2010-01-13 18:08:18 +13:00
Slava Pestov
f6c0c64518
threads, io.streams.c: cleanups
2009-12-15 07:20:41 -05:00
Slava Pestov
0612bc6177
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Doug Coleman
bd13e018dd
memq? -> member-eq?, sorted-memq? -> sorted-member-eq?
2009-10-28 15:02:00 -05:00
Doug Coleman
0d4b9132d7
fix a bunch of typos in docs
2009-10-21 17:40:43 -05:00
Doug Coleman
1d41f4c66c
add unit test for c stream-tell
2009-10-03 19:07:16 -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
bf57d78b09
compiler.tree.modular-arithmetic: >fixnum elimination and value info annotations were too aggressive
2009-08-17 01:20:25 -05:00
Doug Coleman
3f3d57032b
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring
2009-08-13 19:21:44 -05:00
Slava Pestov
96b1ae86a4
Clean up init-stdio implementations and move io.streams.null to basis
2009-05-12 03:35:48 -05:00
Slava Pestov
9488e78532
clean up contents and lines words; contents never outputs f now
2009-05-10 16:39:51 -05:00
Slava Pestov
8e3e67fad4
Fix test failures
2009-05-04 13:10:56 -05:00
Slava Pestov
b4088373b7
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-04 05:16:47 -05:00
Slava Pestov
a63ad6a7a5
Remove cruddy string encoding/decoding code from VM
2009-05-02 13:45:38 -05:00
Doug Coleman
0ad6d1fb7b
add a few usages of iota, remove most 1+ and 1- from core
2009-05-01 19:58:24 -05:00
Doug Coleman
ce7ad9a42d
fix unit tests that call lines or contents
2009-05-01 16:38:04 -05:00
Slava Pestov
9907bd9fe2
Add fseek primitive so that c-streams can seek. This lets the UI work without native IO
2009-04-03 10:16:25 -05:00
Slava Pestov
f97389503f
Fix stream-read-until on byte-readers
2009-03-27 19:26:16 -05:00
Slava Pestov
07a5a46009
Add stream-element-type generic word
2009-03-15 17:11:18 -05:00
Slava Pestov
7b9491066c
Fix conflict in images vocab
2009-03-04 21:43:56 -06:00
Daniel Ehrenberg
5b2c0c9cbf
Adding missing inline declarations
2009-03-02 00:06:27 -06:00
Slava Pestov
25a877e50b
Merge OneEyed's patch
2009-02-28 17:06:55 -06:00
Daniel Ehrenberg
2c462745f1
Redoing string streams and byte-array streams without copying
2009-02-27 00:53:05 -06:00
Slava Pestov
73dfa2ae65
Fix conflict
2009-02-16 21:47:35 -06:00
Doug Coleman
53224ebce0
remove empty file
2009-02-16 21:29:13 -06:00
Slava Pestov
421ee726b8
Merge branch 'master' into new_ui
2009-02-16 21:22:12 -06:00
Slava Pestov
6b25e99470
Add summary for heaps more vocabs
2009-02-16 21:05:13 -06:00
Slava Pestov
a0c1d32197
Move io.streams.string from core to basis
2009-02-06 01:58:51 -06:00
Doug Coleman
c253cd854a
move null streams to core and make them not depend on io.styles and io.timeouts, initialize the std streams to null-streams on windows in win32 mode
2009-01-29 18:33:19 -06:00
Slava Pestov
4204fd495f
Move formatted stream output words to io.styles; they didn't belong in core, and this reduces deployed image size
2009-01-13 17:12:43 -06:00
Slava Pestov
63fda570bf
Fixing assorted compile errors and help lint warnings
2008-12-16 01:12:36 -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
6ea1de887d
More unit test fixes
2008-12-14 22:38:14 -06:00
Slava Pestov
ca8091443c
Move byte-vectors and io.streams.byte-array to basis
2008-12-08 13:59:25 -06:00
Doug Coleman
2e31f7d792
fix help-lint errors
2008-12-05 12:57:36 -06:00
Slava Pestov
aa838dbc2d
Fix compile errors
2008-12-05 09:04:16 -06:00
Slava Pestov
7788b3e0db
Merge branch 'master' into microseconds
2008-11-23 03:06:32 -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
U-SLAVA-DFB8FF805\Slava
21856550e3
show doesn't need to print \r\n
2008-11-22 02:44:35 -06:00
Slava Pestov
8819f23312
Replace millis primitive with micros primitive
...
Add millis as a library word
sleep now takes either a duration or a microsecond count; code using durations doens't need to be updated, code using millisecond counts updated to use durations for the most part
2008-11-19 01:50:05 -06:00
Slava Pestov
fbe29ceca8
format-table should not be private since ui.gadgets.grids uses it
2008-11-16 15:31:17 -06:00
Slava Pestov
99fd539b01
Rename io.streams.string:null to null-encoding
2008-11-16 05:59:38 -06:00
Slava Pestov
c19f2257f4
Fix permission bits
2008-10-02 08:34:49 -05:00
Slava Pestov
2e48915f9c
Strip out C I/O if native I/O enabled
2008-10-02 03:38:36 -05:00
Slava Pestov
0c8e2584b4
Fixing unit tests for make, fry changes
2008-09-11 00:20:06 -05:00
Slava Pestov
44f53de164
Move make to its own vocabulary, remove fry _ feature
2008-09-10 20:07:00 -05:00
Doug Coleman
b1d26e100a
use if/when/unless-empty, docs
2008-09-06 17:10:32 -05:00
Slava Pestov
8a2f1d0451
More core cleanups
2008-07-28 22:57:43 -05:00
Slava Pestov
d66f887736
Create basis vocab root
2008-07-28 22:03:13 -05:00
Slava Pestov
a8808b7087
Non-optimizing compiler now inlow inlines some primitives, this improves bootstrap time
2008-07-07 10:39:04 -05:00
Slava Pestov
b36e06d0d6
Builtinn types now use new slot accessors; tuple slot type declaration work in progress
2008-06-28 02:36:20 -05:00
Slava Pestov
9dd5c9919f
Mandatory stack effect annotations
2008-06-08 15:32:55 -05:00
U-SLAVA-DFB8FF805\Slava
dcce702d0c
Remove pending-error machinery
2008-05-17 23:50:11 -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
0cd8e61f24
Streams fixes
2008-05-09 16:38:27 -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
15402ed1b4
core changes:
...
index* -> index-from
last-index* -> last-index-from
1 tail -> rest
1 tail-slice -> rest-slice
subset -> filter
prepose
find* -> find-from
find-last* -> find-last-from
before, after generic, < for integers
make between? work for timestamps
2008-04-25 23:12:44 -05:00
Slava Pestov
55f6636bc0
FFI string encoding conversion
2008-04-20 05:15:46 -05:00
Doug Coleman
2edd0fefc9
new -> new-sequence
...
construct-empty -> new
construct-boa -> boa
diff -> assoc-diff
union -> assoc-union
intersect -> assoc-intersect
2008-04-13 22:58:07 -05:00
Doug Coleman
30b75a797a
construct-boa -> boa
...
construct-empty -> new
2008-04-13 15:06:09 -05:00
Slava Pestov
9cc25c3eff
Fix docs
2008-04-13 03:47:51 -05:00
Slava Pestov
8bb7aafee5
Fix bootstrap error
2008-04-13 03:22:51 -05:00
Slava Pestov
a5d5dfb0df
Update duplex streams for new-slots
2008-04-13 00:21:48 -05:00
Slava Pestov
ca652dc157
Fix UI panes
2008-04-04 08:44:32 -05:00
Slava Pestov
9c31dc1164
Fix failing unit test
2008-04-04 07:39:00 -05:00
Slava Pestov
5cc78f5b39
Remove usages of delegation from core io
2008-04-04 06:21:50 -05:00
Slava Pestov
ef4046cda9
Converting code to use inheritance
2008-04-04 00:33:06 -05:00
Doug Coleman
936bd26a3a
update core/ to use ERROR:
2008-03-20 15:00:49 -05:00
Slava Pestov
e826f1fe4a
Merge branch 'master' of git://factorcode.org/git/littledan
2008-03-19 13:23:55 -05:00
Slava Pestov
23dd1f3310
Fix usage typo
2008-03-18 20:24:39 -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
Slava Pestov
32526206f1
Help fixes
2008-03-11 19:51:58 -05:00
Slava Pestov
2fa5f34a71
Byte-array-ification
2008-03-07 21:26:35 -06:00
Slava Pestov
549a7538c7
Clean up some of Dan's code after merge
2008-03-06 15:58:05 -06:00
Daniel Ehrenberg
93c4ac23a8
Encodings updates; /* */ comments in multline
2008-03-05 14:51:01 -06:00
Daniel Ehrenberg
c5eec0ba10
Merge branch 'master' of git://factorcode.org/git/factor into unicode
...
Conflicts:
core/io/files/files-tests.factor
core/io/files/files.factor
core/io/io-tests.factor
core/io/streams/c/c-tests.factor
core/io/streams/lines/lines-tests.factor
core/source-files/source-files.factor
extra/benchmark/sockets/sockets.factor
extra/http/server/templating/templating-tests.factor
extra/http/server/templating/templating.factor
extra/io/launcher/launcher.factor
extra/io/mmap/mmap-tests.factor
extra/io/unix/launcher/launcher.factor
extra/io/unix/unix-tests.factor
2008-03-04 17:51:40 -06:00
Slava Pestov
e98cd1fd59
New convention for unit tests
2008-03-01 17:00:45 -05:00
Daniel Ehrenberg
44f4aa4c69
More updates for encodings
2008-02-24 19:58:34 -06:00
Daniel Ehrenberg
4ad96fc4ea
Merge branch 'master' into unicode
...
Conflicts:
core/io/streams/c/c-tests.factor
extra/benchmark/mandel/mandel.factor
extra/benchmark/raytracer/raytracer.factor
extra/http/client/client.factor
2008-02-24 13:00:06 -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
Slava Pestov
3eba715778
Merge branch 'master' of git://factorcode.org/git/factor
2008-02-21 23:08:22 -06:00
Eduardo Cavazos
09e5564435
Use temp-file in a few tests and benchmarks
2008-02-21 22:08:51 -06:00