diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 0ded4f1d53..44d0fdac6f 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,26 +1,23 @@ + 0.84: -- doc mashup: - - document: parse-hook no-parse-hook - - document inference errors - - update docs for declared effects - - better doc for accumulate, link from tree - +- document: parse-hook no-parse-hook +- document inference errors +- update docs for declared effects +- better doc for accumulate, link from tree - bootstrap speedup with compiling recursives - RT_WORD should refer to XTs not word objects. -- fix contribs: boids, automata -- sometimes darcs get fails with the httpd -- gdb triggers 'mutliple i/o ops on port' error -- factorcode httpd crashed: bad file descriptor -- editor: - - better listener multi-line expression handling - - history doesn't work in a good way if you ^K the input +- better listener multi-line expression handling +- history doesn't work in a good way if you ^K the input - services do not launch if factor not running - roundoff is still not quite right with tracks - fix top level window positioning +- fix contribs: boids, automata - [ [ dup call ] dup call ] infer hangs - graphical module manager tool - see if alien calls can be made faster +- sometimes darcs get fails with the httpd +- gdb triggers 'mutliple i/o ops on port' error +- factorcode httpd crashed: bad file descriptor + 0.85: @@ -105,6 +102,7 @@ - test what is done in the case of an invalid declaration on an inline recursive - ppc64 backend +- arm backend - we need to optimize [ dup array? [ array? ] [ array? ] if ] - mac intel: struct returns from objc methods - fix compiled gc check diff --git a/contrib/math/utils.factor b/contrib/math/utils.factor index a31535fb19..ef531f9940 100644 --- a/contrib/math/utils.factor +++ b/contrib/math/utils.factor @@ -13,7 +13,7 @@ USING: errors kernel sequences math sequences-internals namespaces arrays ; gcd 1 = [ "Non-trivial divisor found" throw ] unless ; foldable -: each-bit ( n quot -- | quot: 0/1 -- ) +: each-bit ( n quot -- ) over zero? pick -1 number= or [ 2drop ] [ @@ -91,8 +91,8 @@ M: frange length ( frange -- n ) : frange-range ( frange -- range ) [ frange-step ] keep frange-length 1- * ; -M: frange nth ( n frange -- obj ) [ frange-step * ] keep frange-from + ; -M: frange nth-unsafe ( n frange -- obj ) nth ; +M: frange nth ( n frange -- obj ) + [ frange-step * ] keep frange-from + ; : nseq-swap ( a b seq -- seq ) #! swap indices a,b in seq