Commit Graph

451 Commits (1dc65c13e7df6ac80c5ccf6b44eee4a62e61ca44)

Author SHA1 Message Date
John Benediktsson c1850f416a sequences: fix docs to use "dst" as a convention. 2012-09-19 16:45:28 -07:00
John Benediktsson 3decf30626 sequences: adding second-, third-, and fourth- unsafe words. 2012-09-19 10:33:51 -07:00
John Benediktsson 62604aeb4b sequences: bit faster binary-reduce. 2012-09-10 16:53:10 -07:00
John Benediktsson 1a86af31f1 sequences: minor formatting improvements. 2012-09-05 16:21:47 -07:00
John Benediktsson 6f66173784 sequences: faster "flip", looks at each element only once. 2012-09-05 16:02:20 -07:00
John Benediktsson e36c76cadf sequences: make nth3-unsafe simpler. 2012-09-05 10:52:44 -07:00
John Benediktsson 00a9fcbc85 sequences: faster binary-reduce. 2012-09-05 09:32:54 -07:00
John Benediktsson 5e0a3c5761 sequences: better "halves". 2012-09-04 19:57:45 -07:00
John Benediktsson b135b956a7 sequences: less bounds checking in binary-reduce. 2012-09-04 19:57:45 -07:00
John Benediktsson 629a5b7bf3 sequences: some minor performance improvements. 2012-08-30 11:33:57 -07:00
John Benediktsson 9e93cd0e13 sequences.extras: moved 2each-index to extras for now. 2012-08-09 16:36:35 -07:00
John Benediktsson 2e0b0e0262 sequences: adding 2each-index. 2012-08-08 20:08:08 -07:00
Doug Coleman 81f50d81eb sequences: Change bounds-check? to be generic on integer so that floating points can't index into sequences. Fixes #582. 2012-07-31 08:36:34 -07:00
John Benediktsson 5b1b6b6bbb sequences: improve change-nth, if nth was successful, set-nth can be unsafe. 2012-07-30 11:26:32 -07:00
John Benediktsson e00aaf4185 sequences: slightly faster sequence=. 2012-07-27 21:30:03 -07:00
John Benediktsson 9920f1d2aa sequences: minor docs fixes. 2012-07-27 21:04:37 -07:00
John Benediktsson a7fff4f192 sequences: slightly faster ?last. 2012-07-27 09:12:29 -07:00
Doug Coleman 2996ef41ff sequences: Fix tests that broke when nth could only be integers. Undo integer>fixnum in iota nth. See bug #582. 2012-07-25 22:17:24 -07:00
Doug Coleman 4a14bd407d core: Use integer>fixnum instead of >fixnum for ``nth`` and other sequence operations. Fixes #581. 2012-07-25 18:24:43 -07:00
John Benediktsson 4e72d80256 Using "same?" in more places. 2012-07-21 10:22:44 -07:00
John Benediktsson 3502c5fbc2 sequences: fix typo in docs for shorten. 2012-07-20 09:04:51 -07:00
John Benediktsson ac9fc4035f sequences: faster last / set-last. 2012-07-18 12:31:53 -07:00
John Benediktsson 936bcc48e4 sequences: prepend-as should be inlined. 2012-07-16 11:54:32 -07:00
John Benediktsson 915176822b sequences: un-inline prepend to fix "cannot call" error. 2012-05-29 15:58:19 -07:00
John Benediktsson 1a6be98c45 sequences: change prepend to return type of first sequence to match append. 2012-05-29 11:59:03 -07:00
John Benediktsson e38e9f2850 sequences: adding find-index-from. 2012-04-27 13:41:47 -07:00
John Benediktsson 8c1165cac1 cleanup some lint warnings. 2012-04-18 17:46:01 -07:00
John Benediktsson c7b6003233 sequences: fixing "Cannot apply 'call' to a run-time computed value" error in map-reduce and 2map-reduce. 2012-04-17 19:04:10 -07:00
John Benediktsson 2407ee0234 sequences: make map-reduce 5-20% faster, and 2map-reduce 3-5% faster. 2012-04-17 17:58:19 -07:00
John Benediktsson db60f6e8c9 sequences: adding a test for map-reduce. 2012-04-16 17:52:21 -07:00
Doug Coleman 3ba787b277 core/basis: trim down using lists 2011-11-30 23:15:42 -08:00
Joe Groff 1d4660c7ec random: go faster
* Use int <ref> instead of 4 >le
* Inline sequences:push-all
* Types, hints, inlines
Re: #328
2011-11-15 20:45:16 -08:00
Joe Groff 47cedd8d3d slice boa -> <slice-unsafe>
If you didn't define it, don't boa it
2011-11-09 19:22:09 -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
John Benediktsson 22e9109631 sequences: improve docs for map-sum. 2011-11-09 15:00:08 -08:00
Joe Groff 6ac8478d80 sequences: relate max, min, supremum, infimum docs
Suggested by @yac. Closes #321.
2011-11-02 13:43:06 -07:00
John Benediktsson c8732657b7 Cleanup more lint warnings. 2011-10-16 13:01:58 -07:00
John Benediktsson 378786599d Cleanup lint warnings. 2011-10-14 11:47:24 -07:00
Doug Coleman ba7a005e88 Link ?first ?second ?last from an article. 2011-10-13 15:53:31 -07:00
John Benediktsson 4baf14972f sequences: adding ?last for symmetry. 2011-10-13 13:04:24 -07:00
John Benediktsson 3207244c60 sequences: define ?first and ?second. 2011-10-13 12:53:46 -07:00
John Benediktsson 0075b6bc28 sequences: adding find-index. 2011-10-12 19:41:54 -07:00
John Benediktsson 3e20365cbe Revert "sequences: change to use tuple-hashcode algorithm, make string-hashcode work like old sequence-hashcode."
This reverts commit 7b7b0d4542.
2011-10-06 08:37:05 -07:00
John Benediktsson 7b76c26bc0 sequences: change to use tuple-hashcode algorithm, make string-hashcode work like old sequence-hashcode. 2011-10-05 19:22:50 -07:00
John Benediktsson 0fb43fb864 sequences: removing 2unclip-slice. 2011-10-02 09:26:20 -07:00
Doug Coleman c96289ef62 Fix sequences docs for change-nth stack effect and example needed using section 2011-09-21 10:09:03 -05:00
John Benediktsson a002b7aa5f sequences: adding stack effects for change-nth, map-integers, and interleave. 2011-09-19 20:49:57 -07:00
Jon Harper 58405ae6ba sequences, fix stack effect of (accumulate) 2011-08-25 00:43:37 +02:00
Slava Pestov c2aca44b4a sequences: nths should return a sequence of the same type as the original (reported by Jon Harper) 2011-01-29 00:18:36 -05:00
Keita Haga 334d0de92a sequences: surround a $example with a $examples to the if-empty word's help 2011-01-26 15:06:35 +09:00
Keita Haga 5e813eb6f2 sequences: put a period to description of trim-head-slice word 2011-01-16 09:59:27 +09:00
Keita Haga fd8bea65f6 sequences: enclose some $examples in '$examples' 2011-01-14 19:29:17 +09:00
Keita Haga d5fe4fecc1 remove useless whitespace in several documentation 2011-01-05 15:55:34 +09:00
Keita Haga 4645e409c3 sequences: fix typos in docs 2011-01-05 14:01:11 +09:00
Keita Haga c3189054d1 io.files.info.unix, sequences: few $examples and $unchecked-examples turn into $codes 2010-12-23 04:05:06 +09:00
Keita Haga dcb387630b sequences, syntax, vocabs.parser: remove useless whitespace in docs 2010-12-23 03:42:41 +09: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 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
John Benediktsson 0b47a6b959 sequences: fix typo in docs. 2010-09-10 13:22:48 -07:00
Slava Pestov 67b82a2509 sequences: remove unused 2reverse-each word 2010-05-10 00:46:29 -04:00
Slava Pestov c1a870fe72 sequences: remove stupid <flat-slice> word 2010-04-17 00:58:30 -05:00
Slava Pestov f40b313be5 sequences: 'accumulate' now outputs a sequence of the same type as its input 2010-04-14 21:51:00 -07:00
Joe Groff b9004a4fff fix up sequences help-lint 2010-03-09 20:29:44 -08:00
Joe Groff e5c2344ce4 sequences: effects of push-if and push-either were too strict 2010-03-07 21:56:40 -08:00
Joe Groff 17df15280e generalize stack effect of while, until, and produce 2010-03-05 23:01:22 -08:00
Joe Groff 85f30987e2 spray some polymorphic stack effects on kernel, math, and sequences 2010-03-05 00:21:10 -08:00
Slava Pestov 86b7ba95a8 sequences: fix help lint 2010-02-26 00:44:48 +13:00
Slava Pestov 7826543d2e sequences: add cartesian-each, cartesian-map, cartesian-product words to eliminate some duplication throughout the codebase 2010-02-25 20:54:57 +13:00
Slava Pestov e5aa02571f sequences: add suffix! to destructive sequence ops article 2010-02-25 05:57:09 +13:00
Philipp Brüschweiler caf978588b sequences: clarify some stack effect and examlpes in docs 2010-02-19 11:26:01 +01:00
Slava Pestov 220dd88a2c Update documentation for new help lint check 2010-02-19 12:31:52 +13:00
Slava Pestov f01487eb83 A few documentation fixes 2010-02-17 00:05:36 +13:00
Slava Pestov a112e52fe7 sequences: remove outdated comment 2010-02-10 16:12:02 +13:00
Slava Pestov 1a1a61549f sequences: remove a -rot usage 2010-02-10 15:44:15 +13:00
Doug Coleman a16d8db145 move sequence-hashcode-step to private 2010-01-22 16:30:22 -06:00
Doug Coleman 1519e0ba69 move (accumulate) to sequences.private 2010-01-22 15:04:13 -06:00
Doug Coleman 8c1d202b4c Rename accumulator to collector, pusher to selector 2010-01-22 15:00:53 -06:00
Slava Pestov 8836ce2581 Fix performance regression in vector ops on specialized arrays, tweak definition of <slice> and 2map-reduce to generate fewer conditionals 2010-01-19 17:48:10 +13:00
Doug Coleman 4e6a5a772f Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	core/sequences/sequences-docs.factor
2010-01-14 17:22:02 -06:00
Doug Coleman 9356da6fb3 Fix a few integers-as-sequences in docs 2010-01-14 17:20:43 -06:00
Slava Pestov e8378b3dc6 generic, sequences: update docs for iota 2010-01-15 08:23:27 +13:00
Slava Pestov df4fb4a3ee Removing integers-as-sequences 2010-01-15 07:15:33 +13:00
Slava Pestov 4cea294cfd sequences: fix map-reduce and 2map-reduce docs, reported by Ben Schlingelhof 2009-12-12 15:16:11 -05:00
Doug Coleman 26de809d57 link pusher and accumulator in docs 2009-12-07 16:26:24 -06:00
Joe Groff 67cc1c01be Merge branch 'master' into simd-cleanup 2009-11-26 16:14:46 -08:00
Slava Pestov 0612bc6177 Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Joe Groff f544982fda Merge branch 'master' of git://factorcode.org/git/factor into simd-cleanup
Conflicts:
	basis/math/vectors/simd/functor/functor.factor
2009-11-14 21:02:39 -06:00
Slava Pestov 8dd8d70500 sequences: inline a couple of words 2009-11-13 03:01:28 -06:00
Philipp Brüschweiler 8163c47b4a sequences: rename virtual-seq to virtual-exemplar 2009-11-07 00:06:26 +01:00
Joe Groff e0ba0c5539 genericize vector ops 2009-11-02 14:21:19 -06:00
Joe Groff 3774c72591 rearrange destructive sequence ops docs 2009-10-31 16:53:39 -05:00
Joe Groff d55a3a3445 remove useless slot types from copy-state 2009-10-30 22:01:51 -05:00
Joe Groff 3af3536404 clean up copy implementation for real 2009-10-30 19:39:46 -05:00
Joe Groff 70ffa003ec eliminate roll/-roll from core 2009-10-30 13:36:15 -05:00
Joe Groff 1cf45abf06 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-30 00:42:37 -05:00
Joe Groff 09e76591b1 start cleaning up internal implementation of copy (needs more work) 2009-10-30 00:42:21 -05:00
Joe Groff 3cf641a87c remove inaccurate comment from sequences docs example 2009-10-29 15:34:38 -05:00
Doug Coleman 1d12a6707d sigma -> map-sum 2009-10-29 14:34:04 -05:00
Doug Coleman 1738fb7c5e link a word in docs 2009-10-28 16:17:08 -05:00
Doug Coleman 3e9593d3c0 add a unit test for accumulate! 2009-10-28 16:12:43 -05:00
Doug Coleman def951ce9b add accumulate! for joe 2009-10-28 16:10:05 -05:00
Doug Coleman 93de179c2f over push -> suffix!, over push-all -> append! 2009-10-28 15:29:01 -05:00
Doug Coleman bd13e018dd memq? -> member-eq?, sorted-memq? -> sorted-member-eq? 2009-10-28 15:02:00 -05:00
Doug Coleman 1476cdb974 reverse-here -> reverse! 2009-10-28 14:40:15 -05:00
Doug Coleman b0e3c7a1fc add docs for append! and suffix! 2009-10-28 13:48:16 -05:00
Doug Coleman 7ce4b746e5 parsed -> suffix!, add append! 2009-10-28 13:38:27 -05:00
Slava Pestov 299b5b0f6c filter-here -> filter! 2009-10-28 00:44:05 -05:00
Slava Pestov 50f5c3d116 remq -> remove-eq, delq -> remove-eq! 2009-10-28 00:23:08 -05:00
Slava Pestov 951e3e9c83 delete-nth -> remove-nth! 2009-10-27 23:41:57 -05:00
Slava Pestov f5a0a8b6e1 delete -> remove! 2009-10-27 23:25:35 -05:00
Slava Pestov 08e7d25dc5 change-each -> map!, deep-change-each -> deep-map! 2009-10-27 22:32:56 -05:00
Joe Groff 5caa118e40 make first2, first3, first4 inline 2009-10-26 17:30:37 -05:00
Joe Groff e31ed3eda4 add filter-as to sequences 2009-10-22 17:37:20 -05:00
Joe Groff ba5429e772 fix sequences bootstrap 2009-10-22 14:53:16 -05:00
Joe Groff fdea9b09f2 change produce-as so it uses an intermediate vector of a type appropriate to the destination type 2009-10-22 14:35:27 -05:00
Doug Coleman 0d4b9132d7 fix a bunch of typos in docs 2009-10-21 17:40:43 -05:00
Doug Coleman 67167cf9ea Merge branch 'docs' of git://github.com/klazuka/factor into klazuka
Conflicts:
	basis/math/vectors/vectors-docs.factor
2009-10-02 15:58:45 -05:00
Keith Lazuka 405e5d015b docs: change $subsection to $subsections 2009-10-02 12:15:48 -04:00
Slava Pestov 56a4b323ef sequences: add accumulate-as and document insert-nth 2009-10-01 23:13:33 -05:00
Keith Lazuka bea4aa7662 docs: updated some docs to use new markup 2009-09-22 15:22:34 -04:00
Slava Pestov 924ccca457 sequences: privacy please 2009-09-08 16:25:41 -05:00
Doug Coleman b9eb3a791f deprecating nth for integers is annoying 2009-09-08 14:18:26 -05:00
Jon Harper 1c97d33854 Fix documentation errors 2009-09-06 19:00:03 +09:00
Joe Groff d26735c98f mark integer sequence methods as deprecated 2009-08-29 10:29:41 -05:00
Doug Coleman bea1e3732e revert replicate change again...the world is not ready 2009-08-23 01:00:46 -04:00
Doug Coleman 3dce2eda19 use iota in replicate 2009-08-22 21:00:18 -04:00
Doug Coleman 7b7f22fae2 Revert "use iota in replicate"
This reverts commit 88d1f0d78a.
2009-08-22 20:59:56 -04:00
Doug Coleman 87a6e9cb31 use iota in replicate 2009-08-22 20:59:36 -04:00
Doug Coleman a6c7e9d9d4 use iota in a couple of places 2009-08-22 20:56:16 -04:00
Slava Pestov 030b1b816c Add inline declarations for various assorted methods 2009-08-17 22:32:21 -05:00
Doug Coleman 2f125eeb93 fix docs 2009-08-15 14:02:18 -05:00
Doug Coleman 7c92ab1ea5 move if-zero etc to math, remove 1-/1+ from math 2009-08-14 14:27:23 -05:00
Doug Coleman 686b3e348e use ERROR: in several places instead of throwing strings 2009-08-11 23:09:02 -05:00
Doug Coleman 02becc26fc add docs for if-zero etc, add docs for 10^ 2009-08-11 18:45:01 -05:00
Doug Coleman 14ef1649d4 add if-zero/when-zero/unless-zero to core/ and update usages 2009-08-11 17:59:40 -05:00
Slava Pestov 07ea78df57 sequences: map, 2map, 3map use new map-integers combinator; last two no longer depend on integers-as-sequences 2009-08-03 13:30:55 -05:00
Doug Coleman eb61ffc56d use itoa in more places 2009-08-02 18:18:31 -05:00
Slava Pestov 4359a10259 sequences: add declaration so that array-flip compiles better 2009-07-28 21:33:12 -05:00
Slava Pestov f1683f9fcf Move set-last from circular.private to sequences 2009-07-28 11:51:47 -05:00
Doug Coleman 990b1e1249 Merge branch 'master' of git://factorcode.org/git/factor 2009-07-24 18:12:24 -05:00
Doug Coleman 6451ed542d document a word in sequences 2009-07-24 18:10:53 -05:00
Slava Pestov 5336d71750 sequences: update docs a bit 2009-07-24 18:05:23 -05:00
Slava Pestov 3b244d5d41 compiler.cfg.value-numbering: fix ##compare and ##compare-branch rewrites 2009-07-13 12:33:58 -05:00
Slava Pestov 37241c5eee sequences: fix replicate example 2009-07-07 15:12:21 -05:00
Slava Pestov ef6634337d Oops: interleave-step is bi* 2009-06-16 14:05:39 -05:00
Slava Pestov 92b436d7fb interleave: allow the 'between' quot to access the stack 2009-06-15 16:07:39 -05:00
Slava Pestov 75276855ae sequences: change implementation of interleave 2009-06-14 18:22:31 -05:00
Slava Pestov dd61b59937 sequences: update each-index and map-index to not depend on integers-as-sequences 2009-06-14 18:10:24 -05:00
Doug Coleman 04c6e07678 unassociate last with pop/pop* in docs 2009-05-25 17:03:32 -05:00
Doug Coleman 407377fc98 rename peek -> last and update all usages 2009-05-25 16:38:33 -05:00