Commit Graph

315 Commits (c83d6ac411d27d4decf8b4ff73b56f313fe26e0f)

Author SHA1 Message Date
Slava Pestov 94292d1791 Move monotonic? unit tests to grouping 2009-01-15 15:37:30 -06:00
Slava Pestov 1f0c01183e Re-implement monotonic? without using rot 2009-01-15 15:24:46 -06:00
Doug Coleman f4cffe8a1b move iota to sequences, fix example, add unit tests, make iota's slot integers only 2009-01-10 13:05:25 -06:00
Slava Pestov 6959f445c4 Merge branch 'master' of git://factorcode.org/git/factor 2009-01-09 22:26:49 -06:00
Slava Pestov a977691d82 Add iota virtual sequence which will eventually replace integers-as-sequences 2009-01-09 21:35:49 -06:00
Doug Coleman 5ae9c7fe2f document 3each, 3map, 3map-as 2009-01-09 20:35:01 -06:00
Slava Pestov af49278d3f Add 2tri* and 2tri@ combinators, clean up (3each), and fix failing unit test for 3map 2009-01-05 18:12:34 -06:00
Slava Pestov 7b110b0bfd Move 3each, 3map from compiler.utilities to sequences 2009-01-05 17:32:08 -06:00
Samuel Tardieu 0182a3430d Allow sigma and friends to use the stack
"sigma" used to use the stack to remember the current total.
This prevented the use of quotations manipulating elements
that were expecting to be on the stack.

This patch hides the counter while executing the quotation,
so that the latter can fully use the stack.
2008-12-27 21:39:32 +01:00
Slava Pestov 63fda570bf Fixing assorted compile errors and help lint warnings 2008-12-16 01:12:36 -06:00
Slava Pestov 400b2a0ccb Add declaration to from-end 2008-12-15 21:34:25 -06:00
Slava Pestov de3a4f5462 Change some dup ... swap to bi and keep 2008-12-15 21:20:32 -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 e6145c71c0 Change a -rot usage to 2dip 2008-12-10 17:26:54 -06:00
Slava Pestov 2a3db4cd23 Minor optimization to flip 2008-12-09 21:50:31 -06:00
Slava Pestov ec23584f48 Finish up O(1) byte array allocation 2008-12-09 18:17:04 -06:00
Slava Pestov d9231f3bc5 Remove unsafe string allocation, since its of dubious value 2008-12-09 17:53:00 -06:00
Slava Pestov eb79c6ab71 Fix conflict 2008-12-09 17:52:45 -06:00
Slava Pestov d1744fd67a Remove cache-nth word, nobody was using it and the semantics were broken 2008-12-07 08:51:22 -06:00
Slava Pestov 145b635eb6 More optimization intended to reduce compile time. Another 10% speedup on compiling empty PEG parser
- new map-flat combinator replaces usages of 'map flatten' in compiler
- compiler.tree.def-use.simplified uses an explicit accumulator instead of flatten
- compiler.tree.tuple-unboxing uses an explicit accumulator instead of flatten
- fix inlining regression from last time: custom inlining results would sometimes be discarded
- compiler.tree's 3each and 3map combinators rewritten to not use flip
- rewrite math.partial-dispatch without locals (purely stylistic, no performance increase)
- hand-optimize flip for common arrays-of-arrays case
- don't run escape analysis and tuple unboxing if there are no allocations in the IR
2008-12-06 11:17:19 -06:00
Slava Pestov 908644ee7a O(1) <sbuf> and new-sequence on byte-arrays (work in progress) 2008-12-05 07:28:52 -06:00
Doug Coleman fd270d8ef2 add surround and glue to sequences 2008-12-03 08:32:54 -06:00
Slava Pestov f675223873 Minor optimization in unclip-slice 2008-11-29 10:38:43 -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 dd6f9bced5 Rename (append) to append-as, (3append) to 3append-as, take them out of private 2008-11-23 01:01:04 -06:00
Slava Pestov d504d6b8de slice-errors now report the parameters to the slicing operation 2008-11-21 21:00:30 -06:00
Slava Pestov acc1dc23fa More usages of $quotation 2008-11-16 09:08:38 -06:00
Slava Pestov 9bf63b1613 New $quotation markup element 2008-11-16 09:03:30 -06:00
Slava Pestov 1d630b6cf2 Minor documentation fixes 2008-11-11 10:51:15 -06:00
Doug Coleman a71ca7242a fix typo in docs, fix load error 2008-10-19 13:34:00 -05:00
Slava Pestov adb0ada7ae Add delq, filter-here 2008-10-19 03:34:58 -05:00
Slava Pestov c19f2257f4 Fix permission bits 2008-10-02 08:34:49 -05:00
Slava Pestov 28d3654f61 Small ricing 2008-10-02 06:47:20 -05:00
Slava Pestov f5acf7e3d6 Rice 2008-09-27 17:54:44 -05:00
Slava Pestov 9a6408623b More doc fixes 2008-09-23 16:19:32 -05:00
Slava Pestov 0f284816c1 Fix docs 2008-09-19 16:37:27 -05:00
Doug Coleman 0967d85f85 document the rest of the interesting words in sequences 2008-09-17 18:38:32 -05:00
Doug Coleman affc0b4830 move some words to private, make stack effects for slices contain explicit -slice 2008-09-17 18:37:57 -05:00
Doug Coleman de68e712e9 more docs 2008-09-17 09:43:18 -05:00
Doug Coleman a946d334df add virtual sequences docs 2008-09-17 09:16:26 -05:00
Doug Coleman af9e85550e document remove-nth 2008-09-15 10:07:13 -05:00
Doug Coleman 50db52fb17 Merge branch 'master' of git://factorcode.org/git/factor 2008-09-14 09:45:46 -05:00
Doug Coleman 0aa4000c46 more docs 2008-09-14 09:45:26 -05:00
Slava Pestov 0e31b23964 Fix typo in example 2008-09-14 01:50:49 -05:00
Slava Pestov 20cc730501 Fix sequences tests 2008-09-12 18:57:34 -05:00
Slava Pestov 8d7ebc5106 Change stack effect of nths to match nth, rice bounds-check? 2008-09-12 18:08:19 -05:00
Slava Pestov 996dd6442e Add indices word 2008-09-12 16:03:47 -05:00
Slava Pestov fdff43ee00 Fix load problem 2008-09-12 11:32:40 -05:00
Slava Pestov f497c7e151 Move map-reduce combinator to core, re-implement norm-sq and v. for better performance 2008-09-12 11:29:12 -05:00
Slava Pestov 91faff92de Minor change to copy and subseq to improve type inference 2008-09-12 08:18:57 -05:00
Slava Pestov 6a1e6d3c08 Fix dispatch bug found by mnestic 2008-09-10 01:45:16 -05:00
Slava Pestov 9dfb646606 Fix conflict 2008-09-09 23:39:30 -05:00
Slava Pestov a3bbce3956 Add a couple of onlinline inline declarations 2008-09-09 23:38:40 -05:00
Doug Coleman e3b67a2b20 fix seq docs 2008-09-09 19:31:26 -05:00
Doug Coleman c2219c94b4 add more docs to sequences 2008-09-09 19:05:47 -05:00
Doug Coleman e257291883 fix teh docs 2008-09-07 19:42:41 -05:00
Slava Pestov 3e1e0cf232 Fix docs 2008-09-07 02:10:13 -05:00
Doug Coleman 1ba054f021 try out a new way to explain when-foo and unless-foo 2008-09-06 19:19:00 -05:00
Doug Coleman b1d26e100a use if/when/unless-empty, docs 2008-09-06 17:10:32 -05:00
Slava Pestov eff021be65 Add inline declaration 2008-09-05 20:10:47 -05:00
Slava Pestov bcc8483b5b Move match to basis since compiler.tree.debugger uses it, fix conflict 2008-09-05 19:48:44 -05:00
Slava Pestov 6792ff748e Move partition combinator into core 2008-09-05 19:32:19 -05:00
Slava Pestov aea0fed14c Fixing basis -> extra dependencies 2008-09-05 19:29:14 -05:00
Doug Coleman 6feefffc7a trim-slice, rename trim-right, more docs 2008-09-05 17:40:57 -05:00
Slava Pestov 110a5e5162 Change equality semantics 2008-09-02 02:02:05 -05:00
Doug Coleman bc27b82ebc new accessors in docs 2008-08-30 14:05:59 -05:00
Slava Pestov 8aa6f673aa Optimizations and load fixes 2008-08-24 03:59:37 -05:00
Slava Pestov 60dd301497 Merge branch 'master' into new_optimizer 2008-08-18 20:31:57 -05:00
Slava Pestov 95657e5742 Remove some funny retain stack usage 2008-08-18 20:13:24 -05:00
Slava Pestov 1f89f9bd86 Merge branch 'master' into new_optimizer 2008-08-18 16:44:01 -05:00
Slava Pestov 8b55b53269 Re-implement reverse to fix obscure problem 2008-08-18 16:40:50 -05:00
Slava Pestov 879e43a52b Add unit tests 2008-08-13 18:58:41 -05:00
Slava Pestov 3735f135c0 Move nths word to core 2008-08-13 18:56:41 -05:00
Slava Pestov 47376d86f8 Add 2map-into, 2change-each 2008-07-22 04:44:33 -05:00
Slava Pestov ac2bf0b87d Adding inline recursive declarations 2008-07-18 19:22:59 -05:00
Slava Pestov d0ae6bdb8f Make array length foldable 2008-07-16 16:48:09 -05:00
Slava Pestov ad87a38ab8 Refactor binary search 2008-07-15 17:16:08 -05:00
Slava Pestov e6f03f9a4e Documentation updates 2008-07-13 19:55:54 -05:00
Slava Pestov 7ca3c2a878 Various minor compiler tweaks 2008-07-12 01:08:30 -05:00
Slava Pestov 5d9c1ea0a0 Documentation updates, rename unfold to produce 2008-07-10 01:00:27 -05:00
U-SLAVA-DFB8FF805\Slava 0051a50b75 Move general shufflers and combinators into generalizations, move narray there too 2008-07-07 19:36:33 -05:00
Slava Pestov 8347710dd5 Help lint fixes 2008-07-04 02:52:27 -05:00
Slava Pestov ec4acc93c1 Fix USING: 2008-07-03 17:44:29 -05:00
Slava Pestov ef2fddb1ec Fix conflict 2008-07-03 16:46:21 -05:00
Eduardo Cavazos c16bc0a61e sequences-tests: fix 2008-07-03 15:37:07 -05:00
Eduardo Cavazos ecfe54e109 sequences-docs: fix using 2008-07-03 12:45:26 -05:00
Eduardo Cavazos e48fc10ad9 sequences-tests: sigma and count 2008-07-03 12:28:39 -05:00
Eduardo Cavazos 4977d4a224 sequences-docs: sigma and count 2008-07-03 12:25:51 -05:00
Eduardo Cavazos e815494578 sequences: add sigma and count 2008-07-03 12:24:16 -05:00
Slava Pestov aeb2b9d701 Fixing unit test failures 2008-07-02 15:57:38 -05:00
Slava Pestov f7eecc7893 Move bit-arrays and float-arrays to extra 2008-07-02 02:03:30 -05:00
Slava Pestov f7b7001f39 BOA constructors now check types 2008-06-30 01:44:58 -05:00
Slava Pestov 3b41e31584 More tuple declaration work 2008-06-29 21:37:57 -05:00
Slava Pestov 0be00f03e6 Mirrors now check sot t slot types, support type coercion for setters, instance? now infers, better transform for 'new', more efficient 'case' where keys are all wrappers 2008-06-29 02:12:44 -05:00
Slava Pestov 8f140402b3 Move short to core 2008-06-18 05:58:05 -05:00
Slava Pestov 229ad78907 Slight cleanup 2008-06-15 00:32:48 -05:00
Slava Pestov 045b657474 Move replicate into core; move selection sort into its own vocab; remove usages of and? and or? which are redundant now 2008-06-13 01:51:46 -05:00
Slava Pestov c95851e34f Bug fixes and cleanups 2008-06-11 02:58:38 -05:00
Slava Pestov 6d15e96d08 Meta data 2008-06-09 05:23:46 -05:00
Slava Pestov ec71ee0940 Bug fixes 2008-05-28 19:34:18 -05:00
Slava Pestov 5cb13132af adjoin and conjoin words added 2008-05-25 19:44:37 -05:00
Slava Pestov dc1a423f88 Document clumps 2008-05-24 21:49:48 -05:00
Eduardo Cavazos e9ee2dc654 sequences-docs: Fix typo 2008-05-19 21:28:32 -05:00
Slava Pestov c60baf1232 sift and harvest words added 2008-05-13 23:36:55 -05:00
Slava Pestov 2f44e86ee1 Doc fix 2008-05-07 02:33:02 -05:00
Doug Coleman fd531c1a31 rename butlast to but-last 2008-05-07 01:38:34 -05:00
Doug Coleman e771314833 add butlast and butlast-slice with docs 2008-05-06 12:36:32 -05:00
Slava Pestov 255a86c2df Move unclip-last-slice to sequences 2008-05-05 00:14:43 -05:00
Slava Pestov fa1938eda1 Move unclip-last to sequences 2008-05-05 00:13:17 -05:00
Doug Coleman e264537a1a reverse the arguments of diff, assoc-diff
fix lots of usings
fix help-lint
2008-04-26 02:01:06 -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 18c2f11d06 Move columns, bit-vectors, byte-vectors, float-vectors to extra 2008-04-19 22:56:28 -05:00
Slava Pestov 31a9954530 Documentation updates and cleanups 2008-04-14 05:19:26 -05:00
Doug Coleman f64d511ca6 add usings 2008-04-14 02:40:32 -05:00
Doug Coleman 4597cab824 move some words to sets
write docs for sets
started on usings..
2008-04-14 02:20:37 -05:00
Doug Coleman 83aad018ca add union word
move prune
2008-04-14 01:14:46 -05:00
Doug Coleman f80085ff0a seq-diff -> diff
seq-intersect -> intersect
2008-04-13 23:09:42 -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
Doug Coleman fafd00bae7 rename new -> new-sequence 2008-04-13 12:54:58 -05:00
Slava Pestov f7df948b06 Documentation updates 2008-04-13 09:34:27 -05:00
Slava Pestov f7f7972756 Sequence equality on slices and reversals 2008-04-07 20:07:03 -05:00
Slava Pestov 5346e1899f Working on call-next-method, and identity-tuple 2008-04-02 21:27:49 -05:00
Eduardo Cavazos e75222d039 More add and add* cleanups 2008-03-31 19:24:48 -06:00
Eduardo Cavazos 9e96befa69 Remove add and add* 2008-03-31 19:24:29 -06:00
Eduardo Cavazos 01d0ab20c6 sequences: new words: prefix and suffix 2008-03-31 15:28:21 -06:00
Slava Pestov c22af5c7a6 Rename 2apply to bi@ 2008-03-29 20:36:58 -05:00
Slava Pestov 690621ffb6 Change PREDICATE: syntax 2008-03-26 18:23:19 -05:00
Doug Coleman 936bd26a3a update core/ to use ERROR: 2008-03-20 15:00:49 -05:00
Doug Coleman d0b348591a path+, prepend 2008-03-19 19:15:43 -05:00
Slava Pestov 32526206f1 Help fixes 2008-03-11 19:51:58 -05:00
Slava Pestov dcdee4ec6f Minor core features 2008-03-11 03:30:14 -05:00
Slava Pestov e98cd1fd59 New convention for unit tests 2008-03-01 17:00:45 -05:00
Slava Pestov ed4506c0b0 Errors remember the original thread 2008-02-27 19:23:22 -06:00
Slava Pestov cc600ad54f Cleanups and fixes 2008-02-23 22:48:45 -06:00
Slava Pestov 53c1ff1cc8 Make a word inline 2008-02-14 20:27:25 -06:00
Slava Pestov e66e6d70e4 Moved dispatch to sequences.private 2008-02-11 01:19:53 -06:00
Slava Pestov bb429425e9 New split-reduce combinator 2008-02-11 00:16:30 -06:00
Slava Pestov be2c8b13d7 Rename unit-test-fails to must-fail and add must-fail-with to replace [ t ] [ [ ... ] catch ... ] unit-test idiom 2008-02-06 13:47:19 -06:00
Slava Pestov 8dd333cbb5 Fix unit tests and fix string clone 2008-02-01 16:02:02 -06:00
Slava Pestov ff55f0f4cc New \u...... syntax; io.utf8 and io.utf16 can actually use strings now 2008-02-01 15:00:02 -06:00
Slava Pestov b870bce81d Add inline declarations 2008-01-13 17:09:01 -05:00
Doug Coleman 84891e2591 pick pick -> 2over
minor cleanups
2008-01-11 12:02:44 -10:00
Slava Pestov c8360f5ae5 Rename curry* to with 2008-01-09 17:36:30 -05:00
Slava Pestov 8285eeda9a Fix conflict 2008-01-06 13:30:23 -04:00
Slava Pestov c3deb44f43 Fix circularity 2008-01-05 18:27:15 -04:00
Slava Pestov e58cbb2cda : spin swap rot ; 2007-12-29 11:36:20 -05:00
Daniel Ehrenberg 416556ce63 New hashcode function 2007-12-17 15:46:55 -05:00
Daniel Ehrenberg cd86eb8feb Sequence hashcode 2007-12-17 00:42:41 -05:00
Daniel Ehrenberg c0d2654618 Merge branch 'master' into hashcode
Conflicts:

	core/sequences/sequences.factor
2007-12-17 00:20:03 -05:00
Daniel Ehrenberg c726962a7a Fixing insufficient safety in flip and M: column virtual@ 2007-12-15 16:20:32 -05:00
Daniel Ehrenberg 9b0a6093ce New hashcode function 2007-11-23 23:54:56 -05:00
Slava Pestov a1bdbd7143 Remove debug message 2007-11-21 19:20:22 -05:00
Slava Pestov 48026c7d8d Improve sequence hash algorithm 2007-11-21 03:13:23 -05:00
Slava Pestov 613cdb9429 Documentation updates 2007-11-04 18:05:49 -05:00
Slava Pestov dfeb154bb1 Change unfold word 2007-11-04 17:32:01 -05:00
Slava Pestov de0808320e Fix ltrim/rtrim, get extra/ to load after number tower changes 2007-10-21 17:37:50 -04:00
U-SLAVA-FB3999113\Slava 024cf03a1b Resolve conflict 2007-10-21 15:28:35 -04:00
Slava Pestov 1d8bd74d0f new unfold word 2007-10-16 04:15:16 -04:00
U-SLAVA-FB3999113\Slava 8b54248c50 Get core unit tests to pass without number tower 2007-10-14 21:13:42 -04:00
U-SLAVA-FB3999113\Slava e9b42fa635 Move more math stuff to extra/, get compiler to work without ratios/complex numbers 2007-10-14 20:38:23 -04:00
Slava Pestov 4192413861 Change cut stack effect 2007-10-12 16:30:36 -04:00
Slava Pestov 31e59f2098 check-slice inline 2007-09-28 17:06:16 -04:00
Slava Pestov 1e676eb2b9 Change check-slice 2007-09-25 21:09:46 -04:00
Slava Pestov a96457cecc Initial import 2007-09-20 18:09:08 -04:00