]> gitweb.factorcode.org Git - factor.git/commitdiff
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 14 Aug 2009 00:21:44 +0000 (19:21 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 14 Aug 2009 00:21:44 +0000 (19:21 -0500)
385 files changed:
basis/alarms/alarms-tests.factor
basis/alarms/alarms.factor
basis/alien/c-types/c-types-tests.factor
basis/alien/complex/complex.factor
basis/alien/complex/functor/functor-tests.factor [deleted file]
basis/alien/destructors/destructors-tests.factor [deleted file]
basis/alien/fortran/fortran.factor
basis/alien/libraries/libraries-tests.factor
basis/alien/structs/structs-tests.factor
basis/alien/syntax/syntax.factor
basis/ascii/ascii-tests.factor
basis/base64/base64.factor
basis/biassocs/biassocs-tests.factor
basis/binary-search/binary-search-tests.factor
basis/bit-arrays/bit-arrays.factor
basis/bit-sets/bit-sets-tests.factor
basis/bit-vectors/bit-vectors-tests.factor
basis/bitstreams/bitstreams-tests.factor
basis/bitstreams/bitstreams.factor
basis/bootstrap/image/image-tests.factor
basis/bootstrap/image/image.factor
basis/bootstrap/image/upload/upload.factor
basis/bootstrap/math/math.factor
basis/boxes/boxes-tests.factor
basis/byte-arrays/hex/hex.factor
basis/cache/cache-tests.factor [deleted file]
basis/cache/cache.factor
basis/cairo/cairo-tests.factor
basis/calendar/calendar.factor
basis/calendar/format/format.factor
basis/channels/examples/examples.factor
basis/checksums/fnv1/fnv1.factor
basis/checksums/md5/md5-tests.factor
basis/circular/circular-tests.factor
basis/circular/circular.factor
basis/cocoa/callbacks/callbacks.factor
basis/cocoa/cocoa-tests.factor
basis/cocoa/messages/messages.factor
basis/cocoa/plists/plists-tests.factor
basis/colors/hsv/hsv-tests.factor
basis/columns/columns-tests.factor
basis/combinators/short-circuit/smart/smart-tests.factor
basis/combinators/short-circuit/smart/smart.factor
basis/combinators/smart/smart-docs.factor
basis/combinators/smart/smart-tests.factor
basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor [deleted file]
basis/compiler/cfg/alias-analysis/alias-analysis.factor
basis/compiler/cfg/builder/builder-tests.factor
basis/compiler/cfg/cfg-tests.factor [deleted file]
basis/compiler/cfg/def-use/def-use-tests.factor
basis/compiler/cfg/dominance/dominance-tests.factor
basis/compiler/cfg/gc-checks/gc-checks-tests.factor
basis/compiler/cfg/intrinsics/allot/allot.factor
basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor
basis/compiler/cfg/linearization/linearization-tests.factor [deleted file]
basis/compiler/cfg/loop-detection/loop-detection-tests.factor
basis/compiler/cfg/optimizer/optimizer-tests.factor [deleted file]
basis/compiler/cfg/representations/preferred/preferred-tests.factor [deleted file]
basis/compiler/cfg/stacks/stacks-tests.factor [deleted file]
basis/compiler/cfg/stacks/uninitialized/uninitialized-tests.factor
basis/compiler/cfg/two-operand/two-operand-tests.factor
basis/compiler/codegen/codegen-tests.factor
basis/compiler/tests/alien.factor
basis/compiler/tests/call-effect.factor
basis/compiler/tests/float.factor
basis/compiler/tests/generic.factor
basis/compiler/tests/optimizer.factor
basis/compiler/tests/peg-regression-2.factor
basis/compiler/tests/pic-problem-1.factor
basis/compiler/tests/redefine0.factor
basis/compiler/tests/redefine15.factor
basis/compiler/tests/redefine16.factor
basis/compiler/tests/redefine17.factor
basis/compiler/tests/redefine2.factor
basis/compiler/tests/redefine3.factor
basis/compiler/tests/redefine4.factor
basis/compiler/tests/reload.factor
basis/compiler/tests/stack-trace.factor
basis/compiler/tests/tuples.factor
basis/compiler/tree/builder/builder-tests.factor
basis/compiler/tree/checker/checker-tests.factor [deleted file]
basis/compiler/tree/cleanup/cleanup-tests.factor
basis/compiler/tree/combinators/combinators-tests.factor
basis/compiler/tree/dead-code/branches/branches.factor
basis/compiler/tree/debugger/debugger-tests.factor
basis/compiler/tree/debugger/debugger.factor
basis/compiler/tree/escape-analysis/check/check-tests.factor
basis/compiler/tree/escape-analysis/escape-analysis-tests.factor
basis/compiler/tree/escape-analysis/recursive/recursive-tests.factor
basis/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor
basis/compiler/tree/normalization/normalization-tests.factor
basis/compiler/tree/optimizer/optimizer-tests.factor [deleted file]
basis/compiler/tree/propagation/call-effect/call-effect.factor
basis/compiler/tree/propagation/copy/copy-tests.factor
basis/compiler/tree/propagation/inlining/inlining.factor
basis/compiler/tree/propagation/known-words/known-words.factor
basis/compiler/tree/propagation/propagation-tests.factor
basis/compiler/tree/propagation/recursive/recursive-tests.factor
basis/compiler/tree/propagation/slots/slots.factor
basis/compiler/tree/propagation/transforms/transforms.factor
basis/compiler/tree/recursive/recursive-tests.factor
basis/compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor
basis/compression/huffman/huffman.factor
basis/compression/inflate/inflate.factor
basis/compression/lzw/lzw-tests.factor [deleted file]
basis/concurrency/combinators/combinators-tests.factor
basis/concurrency/count-downs/count-downs.factor
basis/concurrency/distributed/distributed-tests.factor
basis/concurrency/exchangers/exchangers-tests.factor
basis/concurrency/flags/flags-tests.factor
basis/concurrency/futures/futures-tests.factor
basis/concurrency/locks/locks-tests.factor
basis/concurrency/locks/locks.factor
basis/concurrency/mailboxes/mailboxes-tests.factor
basis/concurrency/mailboxes/mailboxes.factor
basis/concurrency/promises/promises-tests.factor
basis/concurrency/semaphores/semaphores.factor
basis/cords/cords-tests.factor
basis/core-foundation/numbers/numbers-tests.factor [deleted file]
basis/core-foundation/run-loop/run-loop.factor
basis/core-foundation/utilities/utilities-tests.factor [deleted file]
basis/core-graphics/types/types-tests.factor [deleted file]
basis/core-text/fonts/fonts-tests.factor [deleted file]
basis/core-text/utilities/utilities-tests.factor [deleted file]
basis/cpu/ppc/assembler/assembler-tests.factor
basis/cpu/ppc/bootstrap.factor
basis/cpu/ppc/ppc.factor
basis/cpu/x86/64/64.factor
basis/cpu/x86/bootstrap.factor
basis/cpu/x86/features/features-tests.factor
basis/cpu/x86/x86.factor
basis/db/queries/queries.factor
basis/db/tuples/tuples-tests.factor
basis/debugger/debugger-tests.factor
basis/debugger/debugger.factor
basis/debugger/unix/unix.factor
basis/definitions/icons/icons-tests.factor [deleted file]
basis/delegate/delegate-tests.factor
basis/disjoint-sets/disjoint-sets-tests.factor
basis/disjoint-sets/disjoint-sets.factor
basis/documents/documents-tests.factor
basis/documents/documents.factor
basis/documents/elements/elements.factor
basis/editors/macvim/macvim.factor
basis/eval/eval-tests.factor
basis/farkup/farkup.factor
basis/formatting/formatting-tests.factor
basis/formatting/formatting.factor
basis/fry/fry-tests.factor
basis/fry/fry.factor
basis/functors/functors-tests.factor
basis/furnace/auth/auth-tests.factor [deleted file]
basis/furnace/auth/features/edit-profile/edit-profile-tests.factor [deleted file]
basis/furnace/auth/features/recover-password/recover-password-tests.factor [deleted file]
basis/furnace/auth/features/registration/registration-tests.factor [deleted file]
basis/furnace/auth/login/login-tests.factor [deleted file]
basis/furnace/auth/login/permits/permits.factor
basis/furnace/auth/providers/assoc/assoc-tests.factor
basis/furnace/auth/providers/assoc/assoc.factor
basis/furnace/auth/providers/db/db-tests.factor
basis/furnace/db/db-tests.factor [deleted file]
basis/furnace/furnace-tests.factor
basis/furnace/sessions/sessions-tests.factor
basis/game-input/game-input-tests.factor
basis/game-input/game-input.factor
basis/game-input/iokit/iokit.factor
basis/generalizations/generalizations.factor
basis/globs/globs-tests.factor
basis/grouping/grouping.factor
basis/heaps/heaps.factor
basis/help/apropos/apropos-tests.factor
basis/help/crossref/crossref-tests.factor
basis/help/handbook/handbook-tests.factor
basis/help/help-tests.factor
basis/help/html/html-tests.factor
basis/help/vocabs/vocabs-tests.factor
basis/html/components/components-tests.factor
basis/html/forms/forms-tests.factor
basis/html/forms/forms.factor
basis/html/templates/fhtml/fhtml.factor
basis/http/client/client-tests.factor
basis/http/client/post-data/post-data-tests.factor [deleted file]
basis/http/parsers/parsers-tests.factor
basis/http/server/redirection/redirection-tests.factor
basis/http/server/static/static-tests.factor
basis/images/jpeg/jpeg.factor
basis/interval-maps/interval-maps.factor
basis/inverse/inverse-tests.factor
basis/io/backend/unix/multiplexers/select/select.factor
basis/io/backend/windows/privileges/privileges-tests.factor
basis/io/encodings/ascii/ascii.factor
basis/io/files/info/windows/windows.factor
basis/io/files/links/links.factor
basis/io/files/links/unix/unix-tests.factor
basis/io/launcher/windows/windows.factor
basis/io/monitors/recursive/recursive-tests.factor
basis/io/pipes/pipes.factor
basis/io/sockets/secure/openssl/openssl.factor
basis/lcs/lcs.factor
basis/linked-assocs/linked-assocs-tests.factor
basis/lists/lazy/lazy.factor
basis/lists/lists-tests.factor
basis/lists/lists.factor
basis/literals/literals-docs.factor
basis/locals/locals-docs.factor
basis/locals/locals-tests.factor
basis/logging/server/server.factor
basis/math/bits/bits.factor
basis/math/combinatorics/combinatorics-docs.factor
basis/math/matrices/elimination/elimination.factor
basis/math/primes/factors/factors.factor
basis/math/ratios/ratios-tests.factor
basis/memoize/memoize-tests.factor
basis/mime/multipart/multipart.factor
basis/models/arrow/arrow-tests.factor
basis/models/models.factor
basis/models/product/product-tests.factor
basis/multiline/multiline.factor
basis/opengl/gl/extensions/extensions.factor
basis/peg/parsers/parsers.factor
basis/peg/peg.factor
basis/persistent/hashtables/config/config.factor
basis/persistent/hashtables/hashtables.factor
basis/persistent/hashtables/nodes/bitmap/bitmap.factor
basis/persistent/vectors/vectors.factor
basis/porter-stemmer/porter-stemmer.factor
basis/prettyprint/prettyprint.factor
basis/prettyprint/sections/sections.factor
basis/quoted-printable/quoted-printable.factor
basis/random/dummy/dummy.factor
basis/random/mersenne-twister/mersenne-twister.factor
basis/random/random.factor
basis/regexp/ast/ast.factor
basis/regexp/compiler/compiler.factor
basis/regexp/regexp.factor
basis/sequences/complex/complex.factor
basis/serialize/serialize.factor
basis/sorting/insertion/insertion.factor
basis/splitting/monotonic/monotonic.factor
basis/stack-checker/known-words/known-words.factor
basis/suffix-arrays/suffix-arrays.factor
basis/tools/annotations/annotations-tests.factor
basis/tools/completion/completion.factor
basis/ui/backend/windows/windows.factor
basis/ui/gadgets/editors/editors.factor
basis/ui/gadgets/frames/frames.factor
basis/ui/gadgets/gadgets-tests.factor
basis/ui/gadgets/gadgets.factor
basis/ui/gadgets/line-support/line-support.factor
basis/ui/gadgets/tables/tables.factor
basis/ui/pens/gradient/gradient.factor
basis/ui/text/uniscribe/uniscribe.factor
basis/ui/tools/listener/history/history.factor
basis/ui/tools/listener/listener.factor
basis/ui/traverse/traverse.factor
basis/ui/ui.factor
basis/unicode/breaks/breaks.factor
basis/unicode/normalize/normalize-tests.factor
basis/unicode/normalize/normalize.factor
basis/unix/groups/groups.factor
basis/unix/process/process.factor
basis/unrolled-lists/unrolled-lists.factor
basis/urls/encoding/encoding.factor
basis/values/values-tests.factor
basis/vlists/vlists.factor
basis/windows/com/wrapper/wrapper.factor
basis/windows/dragdrop-listener/dragdrop-listener.factor
basis/windows/uniscribe/uniscribe.factor
basis/xml/syntax/syntax.factor
basis/xml/tokenize/tokenize.factor
basis/xmode/marker/state/state.factor
core/assocs/assocs-tests.factor
core/bootstrap/syntax-docs.factor [deleted file]
core/byte-arrays/byte-arrays-tests.factor
core/byte-vectors/byte-vectors-tests.factor
core/checksums/checksums-tests.factor [deleted file]
core/classes/builtin/builtin-tests.factor
core/classes/tuple/parser/parser-tests.factor
core/effects/effects-tests.factor
core/generic/math/math-tests.factor
core/generic/single/single-tests.factor
core/hashtables/hashtables-tests.factor
core/io/backend/backend-tests.factor
core/io/streams/memory/memory.factor
core/layouts/layouts-tests.factor
core/slots/slots-tests.factor
extra/adsoda/adsoda.factor
extra/adsoda/combinators/combinators.factor
extra/adsoda/solution2/solution2.factor
extra/annotations/annotations-tests.factor
extra/benchmark/beust2/beust2.factor
extra/benchmark/fannkuch/fannkuch.factor
extra/benchmark/fib4/fib4.factor
extra/benchmark/fib6/fib6.factor
extra/benchmark/gc1/gc1.factor
extra/benchmark/knucleotide/knucleotide.factor
extra/benchmark/mandel/colors/colors.factor
extra/benchmark/nbody/nbody.factor
extra/benchmark/nsieve-bits/nsieve-bits.factor
extra/benchmark/nsieve-bytes/nsieve-bytes.factor
extra/benchmark/nsieve/nsieve.factor
extra/benchmark/partial-sums/partial-sums.factor
extra/benchmark/recursive/recursive.factor
extra/benchmark/tuple-arrays/tuple-arrays.factor
extra/bunny/bunny.factor
extra/central/central-tests.factor
extra/coroutines/coroutines-tests.factor
extra/crypto/barrett/barrett.factor
extra/crypto/passwd-md5/passwd-md5.factor
extra/crypto/rsa/rsa.factor
extra/ctags/etags/etags.factor
extra/cursors/cursors.factor
extra/dns/misc/misc.factor
extra/dns/server/server.factor
extra/ecdsa/ecdsa.factor
extra/game-loop/game-loop.factor
extra/hashcash/hashcash.factor
extra/html/parser/analyzer/analyzer.factor
extra/id3/id3.factor
extra/irc/client/internals/internals.factor
extra/jamshred/tunnel/tunnel.factor
extra/koszul/koszul.factor
extra/math/analysis/analysis.factor
extra/math/dual/dual.factor
extra/math/finance/finance.factor
extra/math/primes/lists/lists.factor
extra/math/text/french/french.factor
extra/monads/monads-tests.factor
extra/opengl/demo-support/demo-support.factor
extra/parser-combinators/parser-combinators.factor
extra/peg-lexer/peg-lexer.factor
extra/project-euler/001/001.factor
extra/project-euler/012/012.factor
extra/project-euler/014/014.factor
extra/project-euler/022/022.factor
extra/project-euler/025/025.factor
extra/project-euler/026/026.factor
extra/project-euler/027/027.factor
extra/project-euler/030/030.factor
extra/project-euler/035/035.factor
extra/project-euler/038/038.factor
extra/project-euler/039/039.factor
extra/project-euler/040/040.factor
extra/project-euler/042/042.factor
extra/project-euler/043/043.factor
extra/project-euler/044/044.factor
extra/project-euler/045/045.factor
extra/project-euler/046/046.factor
extra/project-euler/047/047.factor
extra/project-euler/049/049.factor
extra/project-euler/050/050.factor
extra/project-euler/052/052.factor
extra/project-euler/058/058.factor
extra/project-euler/069/069.factor
extra/project-euler/075/075.factor
extra/project-euler/076/076.factor
extra/project-euler/092/092.factor
extra/project-euler/097/097.factor
extra/project-euler/099/099.factor
extra/project-euler/100/100.factor
extra/project-euler/116/116.factor
extra/project-euler/148/148.factor
extra/project-euler/150/150.factor
extra/project-euler/151/151.factor
extra/project-euler/169/169.factor
extra/project-euler/175/175.factor
extra/project-euler/186/186.factor
extra/project-euler/190/190.factor
extra/project-euler/203/203.factor
extra/project-euler/215/215.factor
extra/project-euler/ave-time/ave-time.factor
extra/project-euler/common/common.factor
extra/sequence-parser/sequence-parser.factor
extra/sequences/product/product.factor
extra/slides/slides.factor
extra/smalltalk/compiler/compiler.factor
extra/spider/spider.factor
extra/sudoku/sudoku.factor
extra/system-info/windows/nt/nt.factor
extra/terrain/terrain.factor
extra/tetris/game/game.factor
extra/tetris/tetromino/tetromino.factor
extra/trees/trees.factor
extra/ui/gadgets/lists/lists.factor
extra/wordtimer/wordtimer.factor

index 7c64680a834b297b197c73d1502de3538fcb68cd..2379e3e80d809baba9cd08424a94a6955f28c67a 100644 (file)
@@ -1,6 +1,6 @@
-IN: alarms.tests\r
 USING: alarms alarms.private kernel calendar sequences\r
 tools.test threads concurrency.count-downs ;\r
+IN: alarms.tests\r
 \r
 [ ] [\r
     1 <count-down>\r
index f9fdce806f5f606bd1ef5532e19ab42f8ac3694c..9943d39ad194a6d0efe5d356d3873afa6099ed94 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2005, 2008 Slava Pestov, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays calendar combinators generic init
-kernel math namespaces sequences heaps boxes threads
-quotations assocs math.order ;
+USING: accessors assocs boxes calendar
+combinators.short-circuit fry heaps init kernel math.order
+namespaces quotations threads ;
 IN: alarms
 
 TUPLE: alarm
@@ -21,21 +21,21 @@ SYMBOL: alarm-thread
 
 ERROR: bad-alarm-frequency frequency ;
 : check-alarm ( frequency/f -- frequency/f )
-    dup [ duration? ] [ not ] bi or [ bad-alarm-frequency ] unless ;
+    dup { [ duration? ] [ not ] } 1|| [ bad-alarm-frequency ] unless ;
 
 : <alarm> ( quot time frequency -- alarm )
     check-alarm <box> alarm boa ;
 
 : register-alarm ( alarm -- )
-    dup dup time>> alarms get-global heap-push*
-    swap entry>> >box
+    [ dup time>> alarms get-global heap-push* ]
+    [ entry>> >box ] bi
     notify-alarm-thread ;
 
 : alarm-expired? ( alarm now -- ? )
     [ time>> ] dip before=? ;
 
 : reschedule-alarm ( alarm -- )
-    dup [ swap interval>> time+ now max ] change-time register-alarm ;
+    dup '[ _ interval>> time+ now max ] change-time register-alarm ;
 
 : call-alarm ( alarm -- )
     [ entry>> box> drop ]
index ea9e881fd4d9e9c9f9a3c42c7af6c2c174e3acee..0de26aad20e2309331301c141c5c54404c37cd25 100644 (file)
@@ -1,6 +1,6 @@
-IN: alien.c-types.tests
 USING: alien alien.syntax alien.c-types kernel tools.test
 sequences system libc alien.strings io.encodings.utf8 ;
+IN: alien.c-types.tests
 
 CONSTANT: xyz 123
 
index c80ead73f0bf701d6173abf0ccd234681572713b..b0229358d1f1893b6cffc5b92fab3b34f506cb18 100644 (file)
@@ -10,4 +10,4 @@ IN: alien.complex
 ! This overrides the fact that small structures are never returned
 ! in registers on NetBSD, Linux and Solaris running on 32-bit x86.
 "complex-float" c-type t >>return-in-registers? drop
- >>
+>>
diff --git a/basis/alien/complex/functor/functor-tests.factor b/basis/alien/complex/functor/functor-tests.factor
deleted file mode 100644 (file)
index c2df22b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test alien.complex.functor ;
-IN: alien.complex.functor.tests
diff --git a/basis/alien/destructors/destructors-tests.factor b/basis/alien/destructors/destructors-tests.factor
deleted file mode 100644 (file)
index 4f43445..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test alien.destructors ;
-IN: alien.destructors.tests
index 15840dfd66d26d5c95be292b36a00fa276cecf8c..013c4d6f6a8c92a5e7fc8db76f971a492065602b 100644 (file)
@@ -357,10 +357,10 @@ M: character-type (<fortran-result>)
 
 : (shuffle-map) ( return parameters -- ret par )
     [
-        fortran-ret-type>c-type length swap "void" = [ 1+ ] unless
+        fortran-ret-type>c-type length swap "void" = [ 1 + ] unless
         letters swap head [ "ret" swap suffix ] map
     ] [
-        [ fortran-arg-type>c-type nip length 1+ ] map letters swap zip
+        [ fortran-arg-type>c-type nip length 1 + ] map letters swap zip
         [ first2 letters swap head [ "" 2sequence ] with map ] map concat
     ] bi* ;
 
index 13eb134ea9bc557865eceacdb18fec59e8619c81..f1dc228d83ed74cfa7edeca32cd6ccaf8779559d 100644 (file)
@@ -1,5 +1,5 @@
-IN: alien.libraries.tests
 USING: alien.libraries alien.syntax tools.test kernel ;
+IN: alien.libraries.tests
 
 [ f ] [ DLL" fadfasdfsada" dll-valid? ] unit-test
 
@@ -7,4 +7,4 @@ USING: alien.libraries alien.syntax tools.test kernel ;
 
 [ ] [ "doesnotexist" dlopen dlclose ] unit-test
 
-[ "fdasfsf" dll-valid? drop ] must-fail
\ No newline at end of file
+[ "fdasfsf" dll-valid? drop ] must-fail
index 231f1bd42876a1e4f842fc97e0cd5a7b816604ff..3f84377d5c8164a22e2ac4518b826d8620832132 100755 (executable)
@@ -1,6 +1,6 @@
-IN: alien.structs.tests
 USING: alien alien.syntax alien.c-types kernel tools.test
 sequences system libc words vocabs namespaces layouts ;
+IN: alien.structs.tests
 
 C-STRUCT: bar
     { "int" "x" }
index d479e6d498e5a37b46ab5326f07300c1b3d22223..b70aa3557c9f2afabc6665f7b92762914f36b397 100644 (file)
@@ -31,8 +31,10 @@ SYNTAX: C-ENUM:
     ";" parse-tokens
     [ [ create-in ] dip define-constant ] each-index ;
 
+ERROR: no-such-symbol name library ;
+
 : address-of ( name library -- value )
-    load-library dlsym [ "No such symbol" throw ] unless* ;
+    2dup load-library dlsym [ 2nip ] [ no-such-symbol ] if* ;
 
 SYNTAX: &:
     scan "c-library" get '[ _ _ address-of ] over push-all ;
index 6f39b32a0110c906865162ff2ce1895e0479df18..8551ba53efc7c6dc715b6f4f20c1ff1e2221774b 100644 (file)
@@ -10,7 +10,7 @@ IN: ascii.tests
 
 [ 4 ] [
     0 "There are Four Upper Case characters"
-    [ LETTER? [ 1+ ] when ] each
+    [ LETTER? [ 1 + ] when ] each
 ] unit-test
 
 [ t f ] [ CHAR: \s ascii? 400 ascii? ] unit-test
index 47147fa3066f90711f64dc5d6d1266f17b6c7fca..eb2c9193a374b35e61a33a2f510f4c2582eaf04e 100644 (file)
@@ -34,7 +34,7 @@ SYMBOL: column
 : write1-lines ( ch -- )
     write1
     column get [
-        1+ [ 76 = [ crlf ] when ]
+        1 + [ 76 = [ crlf ] when ]
         [ 76 mod column set ] bi
     ] when* ;
 
@@ -48,7 +48,7 @@ SYMBOL: column
 
 : encode-pad ( seq n -- )
     [ 3 0 pad-tail binary [ encode3 ] with-byte-writer ]
-    [ 1+ ] bi* head-slice 4 CHAR: = pad-tail write-lines ; inline
+    [ 1 + ] bi* head-slice 4 CHAR: = pad-tail write-lines ; inline
 
 : decode4 ( seq -- )
     [ 0 [ base64>ch swap 6 shift bitor ] reduce 3 >be ]
index f408cc82a8be1ffabd378af6814a78c11b65fa05..2ef54441e14f838a0eaac7a1dd92e95e50cdfb81 100644 (file)
@@ -1,5 +1,5 @@
-IN: biassocs.tests
 USING: biassocs assocs namespaces tools.test ;
+IN: biassocs.tests
 
 <bihash> "h" set
 
@@ -29,4 +29,4 @@ H{ { "a" "A" } { "b" "B" } } "a" set
 
 [ "A" ] [ "a" "b" get at ] unit-test
 
-[ "a" ] [ "A" "b" get value-at ] unit-test
\ No newline at end of file
+[ "a" ] [ "A" "b" get value-at ] unit-test
index 63d2697418b3c297ae78e5c894433d68059d0e67..f2ea7503f4851f8a8ac6bdb371a21237053d03ce 100644 (file)
@@ -1,5 +1,5 @@
-IN: binary-search.tests
 USING: binary-search math.order vectors kernel tools.test ;
+IN: binary-search.tests
 
 [ f ] [ 3 { } [ <=> ] with search drop ] unit-test
 [ 0 ] [ 3 { 3 } [ <=> ] with search drop ] unit-test
@@ -9,7 +9,7 @@ USING: binary-search math.order vectors kernel tools.test ;
 [ 4 ] [ 5.5 { 1 2 3 4 5 6 7 8 } [ <=> ] with search drop ] unit-test
 [ 10 ] [ 10 20 >vector [ <=> ] with search drop ] unit-test
 
-[ t ] [ "hello" { "alligrator" "cat" "fish" "hello" "ikarus" "java" } sorted-member? ] unit-test
-[ 3 ] [ "hey" { "alligrator" "cat" "fish" "hello" "ikarus" "java" } sorted-index ] unit-test
-[ f ] [ "hello" { "alligrator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
-[ f ] [ "zebra" { "alligrator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
+[ t ] [ "hello" { "alligator" "cat" "fish" "hello" "ikarus" "java" } sorted-member? ] unit-test
+[ 3 ] [ "hey" { "alligator" "cat" "fish" "hello" "ikarus" "java" } sorted-index ] unit-test
+[ f ] [ "hello" { "alligator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
+[ f ] [ "zebra" { "alligator" "cat" "fish" "ikarus" "java" } sorted-member? ] unit-test
index cdec87b61dc1f2f4a31689ea9e74fce89e560266..7aea3c458ae297b67103ac316f14ddfb371571d0 100644 (file)
@@ -91,10 +91,10 @@ SYNTAX: ?{ \ } [ >bit-array ] parse-literal ;
     dup 0 = [
         <bit-array>
     ] [
-        [ log2 1+ <bit-array> 0 ] keep
+        [ log2 1 + <bit-array> 0 ] keep
         [ dup 0 = ] [
             [ pick underlying>> pick set-alien-unsigned-1 ] keep
-            [ 1+ ] [ -8 shift ] bi*
+            [ 1 + ] [ -8 shift ] bi*
         ] until 2drop
     ] if ;
 
index e77bb43986adf1e29216ab148daccc03d7dff023..6a1366a1ea3a9956bffd889de5c2e9662d897cff 100644 (file)
@@ -1,5 +1,5 @@
-IN: bit-sets.tests
 USING: bit-sets tools.test bit-arrays ;
+IN: bit-sets.tests
 
 [ ?{ t f t f t f } ] [
     ?{ t f f f t f }
index 41efdbd0d22b491fda2eca30d89b61a5381deba0..5af44b59f7f30577e24a753a74c4565fe1f03689 100644 (file)
@@ -1,5 +1,5 @@
-IN: bit-vectors.tests\r
 USING: tools.test bit-vectors vectors sequences kernel math ;\r
+IN: bit-vectors.tests\r
 \r
 [ 0 ] [ 123 <bit-vector> length ] unit-test\r
 \r
index a5b1b43acd0995061099bdc37f5d4a341b3a817d..794faa6055fc399f5c6a092ca62872b0fc125880 100644 (file)
@@ -5,7 +5,6 @@ grouping compression.lzw multiline byte-arrays io.encodings.binary
 io.streams.byte-array ;
 IN: bitstreams.tests
 
-
 [ BIN: 1111111111 ]
 [
     B{ HEX: 0f HEX: ff HEX: ff HEX: ff } <msb0-bit-reader>
index 2aa0059542862372be8010dd7a721da64c20fec0..0eef54dc66c6ae2f6738d992c38da26d080216a1 100644 (file)
@@ -70,7 +70,7 @@ GENERIC: poke ( value n bitstream -- )
     [ get-abp + ] [ set-abp ] bi ; inline
     
 : (align) ( n m -- n' )
-    [ /mod 0 > [ 1+ ] when ] [ * ] bi ; inline
+    [ /mod 0 > [ 1 + ] when ] [ * ] bi ; inline
     
 : align ( n bitstream -- )
     [ get-abp swap (align) ] [ set-abp ] bi ; inline
index e7070d3cf2435a11297966168b0399a88dc8a28e..c5c6460041ecdf495180307b9745b4758fcf317e 100644 (file)
@@ -1,6 +1,6 @@
-IN: bootstrap.image.tests
 USING: bootstrap.image bootstrap.image.private tools.test
 kernel math ;
+IN: bootstrap.image.tests
 
 [ f ] [ { 1 2 3 } [ 1 2 3 ] eql? ] unit-test
 
index d76588e4e461c4870d0106054278a1747554a96b..38cb5c12fe1156e38278e4e7b9fd3fb320189475 100644 (file)
@@ -234,7 +234,7 @@ GENERIC: ' ( obj -- ptr )
 
 : bignum-bits ( -- n ) bootstrap-cell-bits 2 - ;
 
-: bignum-radix ( -- n ) bignum-bits 2^ 1- ;
+: bignum-radix ( -- n ) bignum-bits 2^ 1 - ;
 
 : bignum>seq ( n -- seq )
     #! n is positive or zero.
@@ -244,7 +244,7 @@ GENERIC: ' ( obj -- ptr )
 
 : emit-bignum ( n -- )
     dup dup 0 < [ neg ] when bignum>seq
-    [ nip length 1+ emit-fixnum ]
+    [ nip length 1 + emit-fixnum ]
     [ drop 0 < 1 0 ? emit ]
     [ nip emit-seq ]
     2tri ;
index d70a253e5f46a90cc3231205e2f3061b17d9636a..7f25ce9c017d7c4f934dc404d96addd525728440 100644 (file)
@@ -9,9 +9,9 @@ IN: bootstrap.image.upload
 SYMBOL: upload-images-destination
 
 : destination ( -- dest )
-  upload-images-destination get
-  "slava@factorcode.org:/var/www/factorcode.org/newsite/images/latest/"
-  or ;
+    upload-images-destination get
+    "slava@factorcode.org:/var/www/factorcode.org/newsite/images/latest/"
+    or ;
 
 : checksums ( -- temp ) "checksums.txt" temp-file ;
 
index 27b2f6b181f79f322c8185af743261099237a9f5..3bab31daeb0501ef6176113f164c73fea92e3aa1 100644 (file)
@@ -2,4 +2,4 @@ USING: vocabs vocabs.loader kernel ;
 
 "math.ratios" require
 "math.floats" require
-"math.complex" require
\ No newline at end of file
+"math.complex" require
index 71fc1c9a7b04788dbf1d781a53e60dfde27bb4c2..3bcb735217f9a79e2295c0af32c919d56bb32171 100644 (file)
@@ -1,5 +1,5 @@
-IN: boxes.tests\r
 USING: boxes namespaces tools.test accessors ;\r
+IN: boxes.tests\r
 \r
 [ ] [ <box> "b" set ] unit-test\r
 \r
index f1b9a5230334de5c4bcf701327d13c68200842f6..5c381b7db0a07253de2d4d5367d102d5fcfb945e 100644 (file)
@@ -8,4 +8,3 @@ SYNTAX: HEX{
     [ blank? not ] filter
     2 group [ hex> ] B{ } map-as
     parsed ;
-
diff --git a/basis/cache/cache-tests.factor b/basis/cache/cache-tests.factor
deleted file mode 100644 (file)
index cbf4f64..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test cache ;
-IN: cache.tests
index f16461bf450b994375afd92262db8366686a2024..3dab1acac8c8f865e5211494e2ab0978e01ad6c7 100644 (file)
@@ -38,6 +38,6 @@ PRIVATE>
 
 : purge-cache ( cache -- )
     dup max-age>> '[
-        [ nip [ 1+ ] change-age age>> _ >= ] assoc-partition
+        [ nip [ 1 + ] change-age age>> _ >= ] assoc-partition
         [ values dispose-each ] dip
-    ] change-assoc drop ;
\ No newline at end of file
+    ] change-assoc drop ;
index bf7c468774814c92e87dc29a7d5674a7dc84870a..cb19259984e0a0d9ec9ab25217c94a7422e38c6a 100644 (file)
@@ -1,8 +1,8 @@
-IN: cairo.tests
 USING: cairo tools.test math.rectangles accessors ;
+IN: cairo.tests
 
 [ { 10 20 } ] [
     { 10 20 } [
         { 0 1 } { 3 4 } <rect> fill-rect
     ] make-bitmap-image dim>>
-] unit-test
\ No newline at end of file
+] unit-test
index e9028b7841a95d6651879fb49ff8e25c5f781d72..81bcff03c1524c7bb99584909ed3a8e11b52111f 100644 (file)
@@ -52,7 +52,7 @@ CONSTANT: month-names
     }
 
 : month-name ( n -- string )
-    check-month 1- month-names nth ;
+    check-month 1 - month-names nth ;
 
 CONSTANT: month-abbreviations
     {
@@ -61,7 +61,7 @@ CONSTANT: month-abbreviations
     }
 
 : month-abbreviation ( n -- string )
-    check-month 1- month-abbreviations nth ;
+    check-month 1 - month-abbreviations nth ;
 
 CONSTANT: day-counts { 0 31 28 31 30 31 30 31 31 30 31 30 31 }
 
@@ -113,7 +113,7 @@ CONSTANT: day-abbreviations3
     100 b * d + 4800 -
     m 10 /i + m 3 +
     12 m 10 /i * -
-    e 153 m * 2 + 5 /i - 1+ ;
+    e 153 m * 2 + 5 /i - 1 + ;
 
 GENERIC: easter ( obj -- obj' )
 
@@ -196,7 +196,7 @@ M: real +year ( timestamp n -- timestamp )
     [ float>whole-part swapd days-per-year * +day swap +year ] unless-zero ;
 
 : months/years ( n -- months years )
-    12 /rem dup zero? [ drop 1- 12 ] when swap ; inline
+    12 /rem dup zero? [ drop 1 - 12 ] when swap ; inline
 
 M: integer +month ( timestamp n -- timestamp )
     [ over month>> + months/years [ >>month ] dip +year ] unless-zero ;
@@ -371,10 +371,10 @@ M: duration time-
     #! http://web.textfiles.com/computers/formulas.txt
     #! good for any date since October 15, 1582
     [
-        dup 2 <= [ [ 1- ] [ 12 + ] bi* ] when
+        dup 2 <= [ [ 1 - ] [ 12 + ] bi* ] when
         [ dup [ 4 /i + ] [ 100 /i - ] [ 400 /i + ] tri ] dip
-        [ 1+ 3 * 5 /i + ] keep 2 * +
-    ] dip 1+ + 7 mod ;
+        [ 1 + 3 * 5 /i + ] keep 2 * +
+    ] dip 1 + + 7 mod ;
 
 GENERIC: days-in-year ( obj -- n )
 
@@ -395,7 +395,7 @@ M: timestamp days-in-year ( timestamp -- n ) year>> days-in-year ;
     year leap-year? [
         year month day <date>
         year 3 1 <date>
-        after=? [ 1+ ] when
+        after=? [ 1 + ] when
     ] when ;
 
 : day-of-year ( timestamp -- n )
index a187f0c9af75abb42270d4adcb6ef077c2519780..6aa4126ff920f913ea4a7cd3e7b986793020c122 100644 (file)
@@ -68,8 +68,8 @@ M: array month. ( pair -- )
     [ (days-in-month) day-abbreviations2 " " join print ] 2tri\r
     over "   " <repetition> concat write\r
     [\r
-        [ 1+ day. ] keep\r
-        1+ + 7 mod zero? [ nl ] [ bl ] if\r
+        [ 1 + day. ] keep\r
+        1 + + 7 mod zero? [ nl ] [ bl ] if\r
     ] with each nl ;\r
 \r
 M: timestamp month. ( timestamp -- )\r
@@ -78,7 +78,7 @@ M: timestamp month. ( timestamp -- )
 GENERIC: year. ( obj -- )\r
 \r
 M: integer year. ( n -- )\r
-    12 [ 1+ 2array month. nl ] with each ;\r
+    12 [ 1 + 2array month. nl ] with each ;\r
 \r
 M: timestamp year. ( timestamp -- )\r
     year>> year. ;\r
@@ -201,7 +201,7 @@ ERROR: invalid-timestamp-format ;
         "," read-token day-abbreviations3 member? check-timestamp drop\r
         read1 CHAR: \s assert=\r
         read-sp checked-number >>day\r
-        read-sp month-abbreviations index 1+ check-timestamp >>month\r
+        read-sp month-abbreviations index 1 + check-timestamp >>month\r
         read-sp checked-number >>year\r
         ":" read-token checked-number >>hour\r
         ":" read-token checked-number >>minute\r
@@ -220,7 +220,7 @@ ERROR: invalid-timestamp-format ;
         "," read-token check-day-name\r
         read1 CHAR: \s assert=\r
         "-" read-token checked-number >>day\r
-        "-" read-token month-abbreviations index 1+ check-timestamp >>month\r
+        "-" read-token month-abbreviations index 1 + check-timestamp >>month\r
         read-sp checked-number >>year\r
         ":" read-token checked-number >>hour\r
         ":" read-token checked-number >>minute\r
@@ -233,7 +233,7 @@ ERROR: invalid-timestamp-format ;
 : (cookie-string>timestamp-2) ( -- timestamp )\r
     timestamp new\r
         read-sp check-day-name\r
-        read-sp month-abbreviations index 1+ check-timestamp >>month\r
+        read-sp month-abbreviations index 1 + check-timestamp >>month\r
         read-sp checked-number >>day\r
         ":" read-token checked-number >>hour\r
         ":" read-token checked-number >>minute\r
index 1e51fb06d8f68106bef94558503014e69635edc8..99fa41cd400e7788dc76a2046ca124f7b3d05760 100644 (file)
@@ -7,7 +7,7 @@ locals sequences ;
 IN: channels.examples
 
 : (counter) ( channel n -- )
-    [ swap to ] 2keep 1+ (counter) ;
+    [ swap to ] 2keep 1 + (counter) ;
     
 : counter ( channel -- )
     2 (counter) ;    
index f221cefef2193ebd1079f9199908d1cc27666e26..5cc6b0242572fd512a4b32fdb58306578d637b5e 100644 (file)
@@ -1,9 +1,7 @@
 ! Copyright (C) 2009 Alaric Snell-Pym
 ! See http://factorcode.org/license.txt for BSD license.
-
 USING: checksums classes.singleton kernel math math.ranges
 math.vectors sequences ;
-
 IN: checksums.fnv1
 
 SINGLETON: fnv1-32
index b7f388c0029d104adf044db5a755545ea14fecf3..730c0b851662d93fef29e13475ed6b4d56299d50 100644 (file)
@@ -1,6 +1,8 @@
+! Copyright (C) 2009 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
 USING: byte-arrays checksums checksums.md5 io.encodings.binary
 io.streams.byte-array kernel math namespaces tools.test ;
-
+IN: checksums.md5.tests 
 
 [ "d41d8cd98f00b204e9800998ecf8427e" ] [ "" >byte-array md5 checksum-bytes hex-string ] unit-test
 [ "0cc175b9c0f1b6a831c399e269772661" ] [ "a" >byte-array md5 checksum-bytes hex-string ] unit-test
index b4a9d547f2edc888bde7efce60371f3f53616502..c3c4860f953a3e51b1f219f811ec4c015f561374 100644 (file)
@@ -2,6 +2,7 @@
 ! See http;//factorcode.org/license.txt for BSD license
 USING: arrays kernel tools.test sequences sequences.private
 circular strings ;
+IN: circular.tests
 
 [ 0 ] [ { 0 1 2 3 4 } <circular> 0 swap virtual@ drop ] unit-test
 [ 2 ] [ { 0 1 2 3 4 } <circular> 2 swap virtual@ drop ] unit-test
index 9995567ec899c93f047e0f07f97343cf34d6e737..b3be4651cd627799269edbefa72ac168f97718ba 100644 (file)
@@ -51,7 +51,7 @@ PRIVATE>
 
 : push-growing-circular ( elt circular -- )
     dup full? [ push-circular ]
-    [ [ 1+ ] change-length set-last ] if ;
+    [ [ 1 + ] change-length set-last ] if ;
 
 : <growing-circular> ( capacity -- growing-circular )
     { } new-sequence 0 0 growing-circular boa ;
index 4ed9d7de67bf3f78160fa82ac012f0c9d3396d53..a798eb15ba0cee9e917d744f1ad87a8aacec9ca5 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2005, 2006 Kevin Reid.
 ! See http://factorcode.org/license.txt for BSD license.
-IN: cocoa.callbacks
 USING: assocs kernel namespaces cocoa cocoa.classes
 cocoa.subclassing debugger ;
+IN: cocoa.callbacks
 
 SYMBOL: callbacks
 
index 4b5af2e39d3ce533aa8b24b0a7512df388b15edc..c657a5e6e896c82cc63cb5ffa0428e97c56b2c3c 100644 (file)
@@ -1,7 +1,7 @@
-IN: cocoa.tests
 USING: cocoa cocoa.messages cocoa.subclassing cocoa.types
 compiler kernel namespaces cocoa.classes tools.test memory
 compiler.units math core-graphics.types ;
+IN: cocoa.tests
 
 CLASS: {
     { +superclass+ "NSObject" }
index a3fa788f209986f9edb9d92b9fd63d0fcab7fa15..9da285f34c157980de5d51d3a57f3d4275467019 100644 (file)
@@ -172,7 +172,7 @@ ERROR: no-objc-type name ;
     [ ] [ no-objc-type ] ?if ;
 
 : (parse-objc-type) ( i string -- ctype )
-    [ [ 1+ ] dip ] [ nth ] 2bi {
+    [ [ 1 + ] dip ] [ nth ] 2bi {
         { [ dup "rnNoORV" member? ] [ drop (parse-objc-type) ] }
         { [ dup CHAR: ^ = ] [ 3drop "void*" ] }
         { [ dup CHAR: { = ] [ drop objc-struct-type ] }
index 4f74cd850acd65bd523dba682a8f8ec2e96f416d..e5d7dfd2399403a09201b54bff1cb3625bae6c2c 100644 (file)
@@ -1,7 +1,7 @@
-IN: cocoa.plists.tests
 USING: tools.test cocoa.plists colors kernel hashtables
 core-foundation.utilities core-foundation destructors
 assocs cocoa.enumeration ;
+IN: cocoa.plists.tests
 
 [
     [ V{ } ] [ H{ } >cf &CFRelease [ ] NSFastEnumeration-map ] unit-test
@@ -37,4 +37,4 @@ assocs cocoa.enumeration ;
     [ 3.5 ] [
         3.5 >cf &CFRelease plist>
     ] unit-test
-] with-destructors
\ No newline at end of file
+] with-destructors
index a825cacda8d2526a1e3707feccf2c1f5bbbe2582..278906ce0ea3b3ea2c27fc4eedd7075def8df3cd 100644 (file)
@@ -1,5 +1,5 @@
-IN: colors.hsv.tests
 USING: accessors kernel colors colors.hsv tools.test math ;
+IN: colors.hsv.tests
 
 : hsv>rgb ( h s v -- r g b )
     [ 360 * ] 2dip
@@ -25,4 +25,4 @@ USING: accessors kernel colors colors.hsv tools.test math ;
 [ 5/6 5/36 5/6 ] [ 5/6 5/6 5/6 hsv>rgb ] unit-test
 [ 1/6 0 1/6 ] [ 5/6 1 1/6 hsv>rgb ] unit-test
 
-[ 0.5 ] [ 180 0.1 0.2 0.5 <hsva> alpha>> ] unit-test
\ No newline at end of file
+[ 0.5 ] [ 180 0.1 0.2 0.5 <hsva> alpha>> ] unit-test
index 657b9e0a25b286b02beeedb512fadba230602ead..a53f5c11853fa3c9d0fdf7c22b6bfffcfee455d3 100644 (file)
@@ -1,5 +1,5 @@
-IN: columns.tests
 USING: columns sequences kernel namespaces arrays tools.test math ;
+IN: columns.tests
 
 ! Columns
 { { 1 2 3 } { 4 5 6 } { 7 8 9 } } [ clone ] map "seq" set
index 7ec4a0e6572a0818a39fcabc623d425e9f9957d5..c8cf8ffc1bb3afc37a2845421e52426e61359f7d 100644 (file)
@@ -1,32 +1,18 @@
-
 USING: kernel math tools.test combinators.short-circuit.smart ;
-
 IN: combinators.short-circuit.smart.tests
 
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-: must-be-t ( in -- ) [ t ] swap unit-test ;
-: must-be-f ( in -- ) [ f ] swap unit-test ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[       { [ 1 ] [ 2 ] [ 3 ] }          &&  3 = ] must-be-t
-[ 3     { [ 0 > ] [ odd? ] [ 2 + ] }    &&  5 = ] must-be-t
-[ 10 20 { [ + 0 > ] [ - even? ] [ + ] } && 30 = ] must-be-t
-
-[       { [ 1 ] [ f ] [ 3 ] } &&  3 = ]          must-be-f
-[ 3     { [ 0 > ] [ even? ] [ 2 + ] } && ]       must-be-f
-[ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } && 30 = ] must-be-f
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-[ { [ 10 0 < ] [ f ] [ "factor" ] } || "factor" = ] must-be-t
+[ t ] [       { [ 1 ] [ 2 ] [ 3 ] }          &&  3 = ] unit-test
+[ t ] [ 3     { [ 0 > ] [ odd? ] [ 2 + ] }    &&  5 = ] unit-test
+[ t ] [ 10 20 { [ + 0 > ] [ - even? ] [ + ] } && 30 = ] unit-test
 
-[ 10 { [ odd? ] [ 100 > ] [ 1 + ] } || 11 = ]       must-be-t
+[ f ] [       { [ 1 ] [ f ] [ 3 ] } &&  3 = ]          unit-test
+[ f ] [ 3     { [ 0 > ] [ even? ] [ 2 + ] } && ]       unit-test
+[ f ] [ 10 20 { [ + 0 > ] [ - odd? ] [ + ] } && 30 = ] unit-test
 
-[ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } || 30 = ]  must-be-t
+[ t ] [ { [ 10 0 < ] [ f ] [ "factor" ] } || "factor" = ] unit-test
 
-[ { [ 10 0 < ] [ f ] [ 0 1 = ] } || ] must-be-f
+[ t ] [ 10 { [ odd? ] [ 100 > ] [ 1 + ] } || 11 = ]       unit-test
 
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+[ t ] [ 10 20 { [ + odd? ] [ + 100 > ] [ + ] } || 30 = ]  unit-test
 
+[ f ] [ { [ 10 0 < ] [ f ] [ 0 1 = ] } || ] unit-test
index b80e7294d15e064c926a36a09ff732c2cb1eaebe..7264a07917a1867fd933efc750f96ec5240741f5 100644 (file)
@@ -1,13 +1,15 @@
-USING: kernel sequences math stack-checker effects accessors macros
-fry combinators.short-circuit ;
+USING: kernel sequences math stack-checker effects accessors
+macros fry combinators.short-circuit ;
 IN: combinators.short-circuit.smart
 
 <PRIVATE
 
+ERROR: cannot-determine-arity ;
+
 : arity ( quots -- n )
     first infer
-    dup terminated?>> [ "Cannot determine arity" throw ] when
-    effect-height neg 1+ ;
+    dup terminated?>> [ cannot-determine-arity ] when
+    effect-height neg 1 + ;
 
 PRIVATE>
 
index d8ee89ef2d5d7ecea076936d5973261a09760f85..59b65d91cd2128f62497af370d46b4e31df4f894 100644 (file)
@@ -28,7 +28,7 @@ HELP: output>array
     { $example
         <" USING: combinators combinators.smart math prettyprint ;
 9 [
-    { [ 1- ] [ 1+ ] [ sq ] } cleave
+    { [ 1 - ] [ 1 + ] [ sq ] } cleave
 ] output>array .">
     "{ 8 10 81 }"
     }
@@ -71,7 +71,7 @@ HELP: sum-outputs
 { $examples
     { $example
         "USING: combinators.smart kernel math prettyprint ;"
-        "10 [ [ 1- ] [ 1+ ] bi ] sum-outputs ."
+        "10 [ [ 1 - ] [ 1 + ] bi ] sum-outputs ."
         "20"
     }
 } ;
index a18ef1f3b8804f69cefa6a3525e5904833e5474e..399b4dc36fe35feaf226288c2944ea555094265c 100644 (file)
@@ -4,7 +4,7 @@ USING: tools.test combinators.smart math kernel accessors ;
 IN: combinators.smart.tests
 
 : test-bi ( -- 9 11 )
-    10 [ 1- ] [ 1+ ] bi ;
+    10 [ 1 - ] [ 1 + ] bi ;
 
 [ [ test-bi ] output>array ] must-infer
 [ { 9 11 } ] [ [ test-bi ] output>array ] unit-test
@@ -46,4 +46,4 @@ IN: combinators.smart.tests
 
 [ { { 1 2 } { 3 4 } } ] [ nested-smart-combo-test ] unit-test
 
-[ 14 ] [ [ 1 2 3 ] [ sq ] [ + ] map-reduce-outputs ] unit-test
\ No newline at end of file
+[ 14 ] [ [ 1 2 3 ] [ sq ] [ + ] map-reduce-outputs ] unit-test
diff --git a/basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor b/basis/compiler/cfg/alias-analysis/alias-analysis-tests.factor
deleted file mode 100644 (file)
index 79165f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-IN: compiler.cfg.alias-analysis.tests
index c3d2deeb023ae31fadbab1d43a880e8422fb83f9..526df79cb3018abd7eadfe5e6063d503eae4a48a 100644 (file)
@@ -144,7 +144,7 @@ ERROR: vreg-has-no-slots vreg ;
 SYMBOL: ac-counter
 
 : next-ac ( -- n )
-    ac-counter [ dup 1+ ] change ;
+    ac-counter [ dup 1 + ] change ;
 
 ! Alias class for objects which are loaded from the data stack
 ! or other object slots. We pessimistically assume that they
@@ -285,4 +285,4 @@ M: insn eliminate-dead-stores* ;
     eliminate-dead-stores ;
 
 : alias-analysis ( cfg -- cfg' )
-    [ alias-analysis-step ] local-optimization ;
\ No newline at end of file
+    [ alias-analysis-step ] local-optimization ;
index 09f670ac54c4b574c05d55fa4d92afa3030d8702..b2f25fdeb18ec7092ca3712cc33ae764196f0f6b 100644 (file)
@@ -1,4 +1,3 @@
-IN: compiler.cfg.builder.tests
 USING: tools.test kernel sequences words sequences.private fry
 prettyprint alien alien.accessors math.private compiler.tree.builder
 compiler.tree.optimizer compiler.cfg.builder compiler.cfg.debugger
@@ -6,6 +5,7 @@ compiler.cfg.optimizer compiler.cfg.predecessors compiler.cfg.checker
 compiler.cfg arrays locals byte-arrays kernel.private math
 slots.private vectors sbufs strings math.partial-dispatch
 strings.private ;
+IN: compiler.cfg.builder.tests
 
 ! Just ensure that various CFGs build correctly.
 : unit-test-cfg ( quot -- )
diff --git a/basis/compiler/cfg/cfg-tests.factor b/basis/compiler/cfg/cfg-tests.factor
deleted file mode 100644 (file)
index e69de29..0000000
index 21978d0f9bed79dc5521748166766be58d4be21a..a4f0819397bfe701d6e39a23dbf02bf0f3ba4196 100644 (file)
@@ -8,6 +8,7 @@ compiler.cfg
 compiler.cfg.debugger
 compiler.cfg.instructions
 compiler.cfg.registers ;
+IN: compiler.cfg.def-use.tests
 
 V{
     T{ ##peek f 0 D 0 }
index 81d573a4e21a2a141999867fd5af6a6acd1111b3..b24e51abfb923942597b7bebd95c9c96c81575e6 100644 (file)
@@ -1,7 +1,7 @@
-IN: compiler.cfg.dominance.tests
 USING: tools.test sequences vectors namespaces kernel accessors assocs sets
 math.ranges arrays compiler.cfg compiler.cfg.dominance compiler.cfg.debugger
 compiler.cfg.predecessors ;
+IN: compiler.cfg.dominance.tests
 
 : test-dominance ( -- )
     cfg new 0 get >>entry
index 9059713e2176aebddf56cc6c7dfe8566005091e4..5580de9a478b1af64839ea6ac40aca7431b31845 100644 (file)
@@ -1,8 +1,8 @@
-IN: compiler.cfg.gc-checks.tests
 USING: compiler.cfg.gc-checks compiler.cfg.debugger
 compiler.cfg.registers compiler.cfg.instructions compiler.cfg
 compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
 namespaces accessors sequences ;
+IN: compiler.cfg.gc-checks.tests
 
 : test-gc-checks ( -- )
     H{ } clone representations set
@@ -23,4 +23,4 @@ V{
 
 [ ] [ test-gc-checks ] unit-test
 
-[ V{ D 0 D 2 } ] [ 1 get instructions>> first uninitialized-locs>> ] unit-test
\ No newline at end of file
+[ V{ D 0 D 2 } ] [ 1 get instructions>> first uninitialized-locs>> ] unit-test
index 8afd9f80ca29fcedb989bdedfdeeddb5afdf12d9..d4aa2750c002ccab82d6314da37591ac24539dc0 100644 (file)
@@ -8,11 +8,11 @@ compiler.cfg.utilities compiler.cfg.builder.blocks ;
 IN: compiler.cfg.intrinsics.allot
 
 : ##set-slots ( regs obj class -- )
-    '[ _ swap 1+ _ tag-number ##set-slot-imm ] each-index ;
+    '[ _ swap 1 + _ tag-number ##set-slot-imm ] each-index ;
 
 : emit-simple-allot ( node -- )
     [ in-d>> length ] [ node-output-infos first class>> ] bi
-    [ drop ds-load ] [ [ 1+ cells ] dip ^^allot ] [ nip ] 2tri
+    [ drop ds-load ] [ [ 1 + cells ] dip ^^allot ] [ nip ] 2tri
     [ ##set-slots ] [ [ drop ] [ ds-push ] [ drop ] tri* ] 3bi ;
 
 : tuple-slot-regs ( layout -- vregs )
index b1a8223026014da2e9b642d5d36946e663c49b3d..47c1f0ae76e673c6bc0b211708494cd933bf33e7 100644 (file)
@@ -1,9 +1,9 @@
-IN: compiler.cfg.linear-scan.resolve.tests
 USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
 accessors
 compiler.cfg
 compiler.cfg.instructions cpu.architecture make sequences
 compiler.cfg.linear-scan.allocation.state ;
+IN: compiler.cfg.linear-scan.resolve.tests
 
 [
     {
@@ -64,4 +64,4 @@ H{ } clone spill-temps set
             T{ _reload { dst 0 } { rep int-rep } { n 8 } }
         }
     } member?
-] unit-test
\ No newline at end of file
+] unit-test
diff --git a/basis/compiler/cfg/linearization/linearization-tests.factor b/basis/compiler/cfg/linearization/linearization-tests.factor
deleted file mode 100644 (file)
index fe8b4fd..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: compiler.cfg.linearization.tests
-USING: compiler.cfg.linearization tools.test ;
-
-
index d525f91ed3e7822883c88a4d2107fa82b5c09c84..80203c65e4b8a3b841554721acb77511bb2bb8bb 100644 (file)
@@ -1,8 +1,8 @@
-IN: compiler.cfg.loop-detection.tests
 USING: compiler.cfg compiler.cfg.loop-detection
 compiler.cfg.predecessors
 compiler.cfg.debugger
 tools.test kernel namespaces accessors ;
+IN: compiler.cfg.loop-detection.tests
 
 V{ } 0 test-bb
 V{ } 1 test-bb
diff --git a/basis/compiler/cfg/optimizer/optimizer-tests.factor b/basis/compiler/cfg/optimizer/optimizer-tests.factor
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/basis/compiler/cfg/representations/preferred/preferred-tests.factor b/basis/compiler/cfg/representations/preferred/preferred-tests.factor
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/basis/compiler/cfg/stacks/stacks-tests.factor b/basis/compiler/cfg/stacks/stacks-tests.factor
deleted file mode 100644 (file)
index e69de29..0000000
index 9c8a41f2c4fba5abac216484b4ec713d1f11d9b5..61c3cd67d1ffc5a309b1026d22867c74c37d47bb 100644 (file)
@@ -1,8 +1,8 @@
-IN: compiler.cfg.stacks.uninitialized.tests
 USING: compiler.cfg.stacks.uninitialized compiler.cfg.debugger
 compiler.cfg.registers compiler.cfg.instructions compiler.cfg
 compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
 namespaces accessors sequences ;
+IN: compiler.cfg.stacks.uninitialized.tests
 
 : test-uninitialized ( -- )
     cfg new 0 get >>entry
index 2e26151d04127f2cb8174838d783d3a9a5cfce01..09d88a29598c676fe569f66f3eac837821ee239a 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.cfg.two-operand.tests
 USING: kernel compiler.cfg.two-operand compiler.cfg.instructions
 compiler.cfg.registers cpu.architecture namespaces tools.test ;
+IN: compiler.cfg.two-operand.tests
 
 3 vreg-counter set-global
 
index 9c3817bad626457085bd64a8656a02cddb28e4b2..225577d0b949b9feb8db8a7d9ef9fe4d5973ffd2 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.codegen.tests
 USING: compiler.codegen.fixup tools.test cpu.architecture math kernel make
 compiler.constants ;
+IN: compiler.codegen.tests
 
 [ ] [ [ ] with-fixup drop ] unit-test
 [ ] [ [ \ + %call ] with-fixup drop ] unit-test
index 91215baf19dc401c35328ee9da5a1c0d7e9c110a..e3c5dee91746a6d2e3802d68f93d52a556173a25 100755 (executable)
@@ -395,7 +395,7 @@ FUNCTION: ulonglong ffi_test_38 ( ulonglong x, ulonglong y ) ;
 
 : callback-9 ( -- callback )
     "int" { "int" "int" "int" } "cdecl" [
-        + + 1+
+        + + 1 +
     ] alien-callback ;
 
 FUNCTION: void ffi_test_36_point_5 ( ) ;
@@ -599,4 +599,4 @@ FUNCTION: short ffi_test_48 ( bool-field-test x ) ;
 [ 123 ] [
     "bool-field-test" <c-object> 123 over set-bool-field-test-parents
     ffi_test_48
-] unit-test
\ No newline at end of file
+] unit-test
index a9fd313d646eddffcc0e87c04417a76c136432f4..f90897bc9bd34c4e1b5e682972f0cdc702838c43 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.call-effect
 USING: tools.test combinators generic.single sequences kernel ;
+IN: compiler.tests.call-effect
 
 : execute-ic-test ( a b -- c ) execute( a -- c ) ;
 
@@ -11,4 +11,4 @@ USING: tools.test combinators generic.single sequences kernel ;
 [ ] [ [ ] call-test ] unit-test
 [ ] [ f [ drop ] curry call-test ] unit-test
 [ ] [ [ ] [ ] compose call-test ] unit-test
-[ [ 1 2 3 ] call-test ] [ wrong-values? ] must-fail-with
\ No newline at end of file
+[ [ 1 2 3 ] call-test ] [ wrong-values? ] must-fail-with
index 7074b73845e46aacafbf77d71d5844840d33cd6f..138437543e8b15f782933e066114d9e253af67e5 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.tests.float
 USING: compiler.units compiler kernel kernel.private memory math
 math.private tools.test math.floats.private ;
+IN: compiler.tests.float
 
 [ 5.0 ] [ [ 5.0 ] compile-call gc gc gc ] unit-test
 [ 2.0 3.0 ] [ 3.0 [ 2.0 swap ] compile-call ] unit-test
index 6b0ef2d4393d859b8107c1747071c3ab831cb947..30392f159844204da9c0c565c8fc12c4b215b13d 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.generic
 USING: tools.test math kernel compiler.units definitions ;
+IN: compiler.tests.generic
 
 GENERIC: bad ( -- )
 M: integer bad ;
@@ -8,4 +8,4 @@ M: object bad ;
 [ 0 bad ] must-fail
 [ "" bad ] must-fail
 
-[ ] [ [ \ bad forget ] with-compilation-unit ] unit-test
\ No newline at end of file
+[ ] [ [ \ bad forget ] with-compilation-unit ] unit-test
index 20fcff84409f6261e724ab91ceede9e04e9275b9..9cd6cfaef2b6da4d371fd6d48b16eda905088285 100644 (file)
@@ -100,7 +100,7 @@ GENERIC: void-generic ( obj -- * )
 
 ! regression
 : branch-fold-regression-0 ( m -- n )
-    t [ ] [ 1+ branch-fold-regression-0 ] if ; inline recursive
+    t [ ] [ 1 + branch-fold-regression-0 ] if ; inline recursive
 
 : branch-fold-regression-1 ( -- m )
     10 branch-fold-regression-0 ;
@@ -348,12 +348,12 @@ TUPLE: some-tuple x ;
 
 [ T{ some-tuple f [ 3 ] } ] [ 3 allot-regression ] unit-test
 
-[ 1 ] [ B{ 0 0 0 0 } [ 0 alien-signed-4 1+ ] compile-call ] unit-test
-[ 1 ] [ B{ 0 0 0 0 } [ 0 alien-unsigned-4 1+ ] compile-call ] unit-test
-[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-signed-8 1+ ] compile-call ] unit-test
-[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-unsigned-8 1+ ] compile-call ] unit-test
-[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-signed-cell 1+ ] compile-call ] unit-test
-[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-unsigned-cell 1+ ] compile-call ] unit-test
+[ 1 ] [ B{ 0 0 0 0 } [ 0 alien-signed-4 1 + ] compile-call ] unit-test
+[ 1 ] [ B{ 0 0 0 0 } [ 0 alien-unsigned-4 1 + ] compile-call ] unit-test
+[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-signed-8 1 + ] compile-call ] unit-test
+[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-unsigned-8 1 + ] compile-call ] unit-test
+[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-signed-cell 1 + ] compile-call ] unit-test
+[ 1 ] [ B{ 0 0 0 0 0 0 0 0 } [ 0 alien-unsigned-cell 1 + ] compile-call ] unit-test
 
 : deep-find-test ( seq -- ? ) [ 5 = ] deep-find ;
 
@@ -382,7 +382,7 @@ DEFER: loop-bbb
 ! Type inference issue
 [ 4 3 ] [
     1 >bignum 2 >bignum
-    [ { bignum integer } declare [ shift ] keep 1+ ] compile-call
+    [ { bignum integer } declare [ shift ] keep 1 + ] compile-call
 ] unit-test
 
 : broken-declaration ( -- ) \ + declare ;
@@ -422,4 +422,4 @@ M: object bad-dispatch-position-test* ;
         \ bad-dispatch-position-test forget
         \ bad-dispatch-position-test* forget
     ] with-compilation-unit
-] unit-test
\ No newline at end of file
+] unit-test
index 7929d9e6f6c13b6f211fad969f604d419d725e34..cae57e5bd9a3914b6745ba6c8f114a6a6cbc25bc 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.peg-regression-2
 USING: peg.ebnf strings tools.test ;
+IN: compiler.tests.peg-regression-2
 
 GENERIC: <times> ( times -- term' )
 M: string <times> ;
index 4adf0b36b93dd04dff53d3f62a662844df2b9be5..4da83f53e4a0b9d50d167fd30b8ccb4a6f2b6565 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.pic-problem-1
 USING: kernel sequences prettyprint memory tools.test ;
+IN: compiler.tests.pic-problem-1
 
 TUPLE: x ;
 
@@ -11,4 +11,4 @@ INSTANCE: x sequence
 
 CONSTANT: blah T{ x }
 
-[ T{ x } ] [ blah ] unit-test
\ No newline at end of file
+[ T{ x } ] [ blah ] unit-test
index 3d7a05a74b8ae274403f5bd29ced99fd9ea5b4c9..4de6d952c8fce6156067fc8e2c929aff49314614 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.tests.redefine0
 USING: tools.test eval compiler compiler.errors compiler.units definitions kernel math
 namespaces macros assocs ;
+IN: compiler.tests.redefine0
 
 ! Test ripple-up behavior
 : test-1 ( -- a ) 3 ;
index 33aa080bacb4955fa4762323b865f6cb8a6fde8f..54066c690d41f4c8244ef4df35ad0e4a39565e48 100644 (file)
@@ -11,7 +11,7 @@ DEFER: word-1
 
 : word-3 ( a -- b ) 1 + ;
 
-: word-4 ( a -- b c ) 0 swap word-3 swap 1+ ;
+: word-4 ( a -- b c ) 0 swap word-3 swap 1 + ;
 
 [ 1 1 ] [ 0 word-4 ] unit-test
 
index 3bef30f9f1bc15b6d06e5684ee9154f05e8f5b90..ac879a7c75799b23477dfa9f4acb0c3ed0a3c7ba 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.tests.redefine16
 USING: eval tools.test definitions words compiler.units
 quotations stack-checker ;
+IN: compiler.tests.redefine16
 
 [ ] [ [ "blah" "compiler.tests.redefine16" lookup forget ] with-compilation-unit ] unit-test
 
index 4ed3e36f4dff23466dd753671e35239451e8d627..5a1c33ad27849ddfdb0a3677b2001665672c8a99 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.tests.redefine17
 USING: tools.test classes.mixin compiler.units arrays kernel.private
 strings sequences vocabs definitions kernel ;
+IN: compiler.tests.redefine17
 
 << "compiler.tests.redefine17" words forget-all >>
 
index 9112a1e1afb439bf6b173e236785a9a19555ae4d..b6a46fc0df520487bc11dc67848303eb95e1a5f5 100644 (file)
@@ -1,7 +1,7 @@
-IN: compiler.tests.redefine2
 USING: compiler compiler.units tools.test math parser kernel
 sequences sequences.private classes.mixin generic definitions
 arrays words assocs eval words.symbol ;
+IN: compiler.tests.redefine2
 
 DEFER: redefine2-test
 
index 0a5eb8457918921af36e133abc398780af86ddca..38842696d7cc5539e2a61617892bec5482d4ea43 100644 (file)
@@ -1,7 +1,7 @@
-IN: compiler.tests.redefine3
 USING: accessors compiler compiler.units tools.test math parser
 kernel sequences sequences.private classes.mixin generic
 definitions arrays words assocs eval ;
+IN: compiler.tests.redefine3
 
 GENERIC: sheeple ( obj -- x )
 
index 2320f64af60a6da4ddbad5d66cd2795bd803a198..cc74e5a783c03ffeaa7470f9f8373b33b0c9fe46 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.redefine4
 USING: io.streams.string kernel tools.test eval ;
+IN: compiler.tests.redefine4
 
 : declaration-test-1 ( -- a ) 3 ; flushable
 
index 62c7c31bc2bd3975a6750ec2f4209d0659aedcaf..3bbfca876b175a1750a9df61b3dea1fe2467d78b 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.reload
 USE: vocabs.loader
+IN: compiler.tests.reload
 
 ! "parser" reload
 ! "sequences" reload
index 1cb11571ef7fa833712c08c55f4cc96d646b6f52..a160272b2118f20b894c8e614406bcf9cd82b2f3 100755 (executable)
@@ -1,7 +1,7 @@
-IN: compiler.tests.stack-trace
 USING: compiler tools.test namespaces sequences
 kernel.private kernel math continuations continuations.private
 words splitting grouping sorting accessors ;
+IN: compiler.tests.stack-trace
 
 : symbolic-stack-trace ( -- newseq )
     error-continuation get call>> callstack>array
index fc249d99db30fa1b36b6fa33df68d1954a451928..3d6301249f41ee44be25b1eb97f9e08450b4f94d 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tests.tuples
 USING: kernel tools.test compiler.units compiler ;
+IN: compiler.tests.tuples
 
 TUPLE: color red green blue ;
 
index f3a2b99db623fe223c07f70277a92e4e5e421fe5..8359334550aa904d89ada27c877336ac15342ba9 100755 (executable)
@@ -1,6 +1,6 @@
-IN: compiler.tree.builder.tests
 USING: compiler.tree.builder tools.test sequences kernel
 compiler.tree stack-checker stack-checker.errors ;
+IN: compiler.tree.builder.tests
 
 : inline-recursive ( -- ) inline-recursive ; inline recursive
 
diff --git a/basis/compiler/tree/checker/checker-tests.factor b/basis/compiler/tree/checker/checker-tests.factor
deleted file mode 100644 (file)
index d9591e7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: compiler.tree.checker.tests
-USING: compiler.tree.checker tools.test ;
-
-
index 228a4e3efb003bc8a46008189364b03bfc80d85f..bc8a7b0765092a6139d122bb9d2b16eb33d6f94a 100755 (executable)
@@ -1,4 +1,3 @@
-IN: compiler.tree.cleanup.tests
 USING: tools.test kernel.private kernel arrays sequences
 math.private math generic words quotations alien alien.c-types
 strings sbufs sequences.private slots.private combinators
@@ -17,6 +16,7 @@ compiler.tree.propagation
 compiler.tree.propagation.info
 compiler.tree.checker
 compiler.tree.debugger ;
+IN: compiler.tree.cleanup.tests
 
 [ t ] [ [ [ 1 ] [ 2 ] if ] cleaned-up-tree [ #if? ] contains-node? ] unit-test
 
@@ -88,7 +88,7 @@ M: object xyz ;
     2over dup xyz drop >= [
         3drop
     ] [
-        [ swap [ call 1+ ] dip ] keep (i-repeat)
+        [ swap [ call 1 + ] dip ] keep (i-repeat)
     ] if ; inline recursive
 
 : i-repeat ( n quot -- ) [ { integer } declare ] dip 0 -rot (i-repeat) ; inline
@@ -543,4 +543,4 @@ cell-bits 32 = [
         [ 12 swap nth ] keep
         14 ndrop
     ] cleaned-up-tree nodes>quot
-] unit-test
\ No newline at end of file
+] unit-test
index d012b5f6583f50dcc5fa519ef199cab1161d117b..305ba5b2b50687ef5724fe67cbf356bcfcb1d29f 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tree.combinators.tests
 USING: compiler.tree.combinators tools.test kernel ;
+IN: compiler.tree.combinators.tests
 
 { 1 0 } [ [ drop ] each-node ] must-infer-as
 { 1 1 } [ [ ] map-nodes ] must-infer-as
index fd1b2d5adb4cbfe7b1208ae410356a6a69932c1d..f09593824eb1babe838684bdaf56cd83e000d92a 100644 (file)
@@ -3,8 +3,7 @@
 USING: sequences namespaces kernel accessors assocs sets fry
 arrays combinators columns stack-checker.backend
 stack-checker.branches compiler.tree compiler.tree.combinators
-compiler.tree.dead-code.liveness compiler.tree.dead-code.simple
-;
+compiler.tree.dead-code.liveness compiler.tree.dead-code.simple ;
 IN: compiler.tree.dead-code.branches
 
 M: #if mark-live-values* look-at-inputs ;
index 9bacd51be14eb8c731d2b165118910447b002d62..3cdbbf594436217af2d7447fc348b856cd63f9ce 100644 (file)
@@ -1,5 +1,5 @@
-IN: compiler.tree.debugger.tests
 USING: compiler.tree.debugger tools.test sorting sequences io math.order ;
+IN: compiler.tree.debugger.tests
 
 [ [ <=> ] sort ] optimized.
-[ <reversed> [ print ] each ] optimizer-report.
\ No newline at end of file
+[ <reversed> [ print ] each ] optimizer-report.
index 6f313320d036fe7e97b440a9e198d17c57cd9985..a99e547b31f1affef730e3843c902660e2ea3fb9 100644 (file)
@@ -154,7 +154,7 @@ SYMBOL: node-count
         H{ } clone intrinsics-called set
 
         0 swap [
-            [ 1+ ] dip
+            [ 1 + ] dip
             dup #call? [
                 word>> {
                     { [ dup "intrinsic" word-prop ] [ intrinsics-called ] }
index 075e20eb23c987157f79ecd4c801ebeb6dea9e4e..bd91dd53e889bd9c74e7dfdc865b473becdaad3f 100644 (file)
@@ -1,7 +1,7 @@
-IN: compiler.tree.escape-analysis.check.tests
 USING: compiler.tree.escape-analysis.check tools.test accessors kernel
 kernel.private math compiler.tree.builder compiler.tree.normalization
 compiler.tree.propagation compiler.tree.cleanup ;
+IN: compiler.tree.escape-analysis.check.tests
 
 : test-checker ( quot -- ? )
     build-tree normalize propagate cleanup run-escape-analysis? ;
@@ -24,4 +24,4 @@ compiler.tree.propagation compiler.tree.cleanup ;
 [ f ] [
     [ swap 1 2 ? ]
     test-checker
-] unit-test
\ No newline at end of file
+] unit-test
index be6b2863f0991b0384e11b69a0d1675fe37b9a9c..debb66b8d42044589aee98489e6d00b849b95a39 100644 (file)
@@ -1,4 +1,3 @@
-IN: compiler.tree.escape-analysis.tests
 USING: compiler.tree.escape-analysis
 compiler.tree.escape-analysis.allocations compiler.tree.builder
 compiler.tree.recursive compiler.tree.normalization
@@ -10,11 +9,12 @@ classes.tuple namespaces
 compiler.tree.propagation.info stack-checker.errors
 compiler.tree.checker
 kernel.private vectors ;
+IN: compiler.tree.escape-analysis.tests
 
 GENERIC: count-unboxed-allocations* ( m node -- n )
 
 : (count-unboxed-allocations) ( m node -- n )
-    out-d>> first escaping-allocation? [ 1+ ] unless ;
+    out-d>> first escaping-allocation? [ 1 + ] unless ;
 
 M: #call count-unboxed-allocations*
     dup immutable-tuple-boa?
@@ -25,7 +25,7 @@ M: #push count-unboxed-allocations*
     [ (count-unboxed-allocations) ] [ drop ] if ;
 
 M: #introduce count-unboxed-allocations*
-    out-d>> [ escaping-allocation? [ 1+ ] unless ] each ;
+    out-d>> [ escaping-allocation? [ 1 + ] unless ] each ;
 
 M: node count-unboxed-allocations* drop ;
 
@@ -212,10 +212,10 @@ C: <ro-box> ro-box
     dup i>> 1 <= [
         drop 1 <ro-box>
     ] [
-        i>> 1- <ro-box>
+        i>> 1 - <ro-box>
         dup tuple-fib
         swap
-        i>> 1- <ro-box>
+        i>> 1 - <ro-box>
         tuple-fib
         swap i>> swap i>> + <ro-box>
     ] if ; inline recursive
@@ -225,7 +225,7 @@ C: <ro-box> ro-box
 [ 3 ] [ [ <ro-box> tuple-fib ] count-unboxed-allocations ] unit-test
 
 : tuple-fib' ( m -- n )
-    dup 1 <= [ 1- tuple-fib' i>> ] when <ro-box> ; inline recursive
+    dup 1 <= [ 1 - tuple-fib' i>> ] when <ro-box> ; inline recursive
 
 [ 0 ] [ [ tuple-fib' ] count-unboxed-allocations ] unit-test
 
@@ -233,10 +233,10 @@ C: <ro-box> ro-box
     dup i>> 1 <= [
         drop 1 <ro-box>
     ] [
-        i>> 1- <ro-box>
+        i>> 1 - <ro-box>
         dup bad-tuple-fib-1
         swap
-        i>> 1- <ro-box>
+        i>> 1 - <ro-box>
         bad-tuple-fib-1 dup .
         swap i>> swap i>> + <ro-box>
     ] if ; inline recursive
@@ -248,10 +248,10 @@ C: <ro-box> ro-box
     dup i>> 1 <= [
         drop 1 <ro-box>
     ] [
-        i>> 1- <ro-box>
+        i>> 1 - <ro-box>
         dup bad-tuple-fib-2
         swap
-        i>> 1- <ro-box>
+        i>> 1 - <ro-box>
         bad-tuple-fib-2
         swap i>> swap i>> + <ro-box>
     ] if ; inline recursive
@@ -262,9 +262,9 @@ C: <ro-box> ro-box
     dup 1 <= [
         drop 1 <ro-box>
     ] [
-        1- dup tuple-fib-2
+        1 - dup tuple-fib-2
         swap
-        1- tuple-fib-2
+        1 - tuple-fib-2
         swap i>> swap i>> + <ro-box>
     ] if ; inline recursive
 
@@ -274,9 +274,9 @@ C: <ro-box> ro-box
     dup 1 <= [
         drop 1 <ro-box>
     ] [
-        1- dup tuple-fib-3
+        1 - dup tuple-fib-3
         swap
-        1- tuple-fib-3 dup .
+        1 - tuple-fib-3 dup .
         swap i>> swap i>> + <ro-box>
     ] if ; inline recursive
 
@@ -286,9 +286,9 @@ C: <ro-box> ro-box
     dup 1 <= [
         drop 1 <ro-box>
     ] [
-        1- dup bad-tuple-fib-3
+        1 - dup bad-tuple-fib-3
         swap
-        1- bad-tuple-fib-3
+        1 - bad-tuple-fib-3
         2drop f
     ] if ; inline recursive
 
@@ -344,4 +344,4 @@ TUPLE: empty-tuple ;
 [ 0 ] [
     [ { vector } declare length>> ]
     count-unboxed-allocations
-] unit-test
\ No newline at end of file
+] unit-test
index 033d5b01ccaddf0aa9e295362b6d8fe69a2dfd0a..c26f3ddefc02a26a7f779ed1c69aea5829d04649 100644 (file)
@@ -1,7 +1,7 @@
-IN: compiler.tree.escape-analysis.recursive.tests
 USING: kernel tools.test namespaces sequences
 compiler.tree.escape-analysis.recursive
 compiler.tree.escape-analysis.allocations ;
+IN: compiler.tree.escape-analysis.recursive.tests
 
 H{ } clone allocations set
 <escaping-values> escaping-values set
index a9415adbd706db161bbf87d092dcce989762a1d3..7d40bf3fc16c7ee123646c0fbeef2e710cfc9362 100644 (file)
@@ -1,12 +1,12 @@
 ! Copyright (C) 2008, 2009 Slava Pestov, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-IN: compiler.tree.modular-arithmetic.tests
 USING: kernel kernel.private tools.test math math.partial-dispatch
 math.private accessors slots.private sequences sequences.private strings sbufs
 compiler.tree.builder
 compiler.tree.normalization
 compiler.tree.debugger
 alien.accessors layouts combinators byte-arrays ;
+IN: compiler.tree.modular-arithmetic.tests
 
 : test-modular-arithmetic ( quot -- quot' )
     cleaned-up-tree nodes>quot ;
@@ -175,4 +175,4 @@ cell {
 [ t ] [
     [ 0 10 <byte-array> 10 [ 1 pick 0 + >fixnum pick set-nth-unsafe [ 1 + >fixnum ] dip ] times ]
     { >fixnum } inlined?
-] unit-test
\ No newline at end of file
+] unit-test
index 3b4574effe4b1751e91e2ff52c5e0363f06b97c3..19669c22399e4493081616ff771674301b8d78bb 100644 (file)
@@ -1,10 +1,10 @@
-IN: compiler.tree.normalization.tests
 USING: compiler.tree.builder compiler.tree.recursive
 compiler.tree.normalization
 compiler.tree.normalization.introductions
 compiler.tree.normalization.renaming
 compiler.tree compiler.tree.checker
 sequences accessors tools.test kernel math ;
+IN: compiler.tree.normalization.tests
 
 [ 3 ] [ [ 3drop 1 2 3 ] build-tree count-introductions ] unit-test
 
diff --git a/basis/compiler/tree/optimizer/optimizer-tests.factor b/basis/compiler/tree/optimizer/optimizer-tests.factor
deleted file mode 100644 (file)
index 5d05947..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-USING: compiler.tree.optimizer tools.test ;
-IN: compiler.tree.optimizer.tests
-
-
index ec2a4b1ece4edbaae8f3aee9a26c870c7ed347a5..a667ea727f69cfc371f3ced4ba3e6cb0511a0f25 100644 (file)
@@ -35,7 +35,7 @@ M: +unknown+ curry-effect ;
 
 M: effect curry-effect
     [ in>> length ] [ out>> length ] [ terminated?>> ] tri
-    pick 0 = [ [ 1+ ] dip ] [ [ 1- ] 2dip ] if
+    pick 0 = [ [ 1 + ] dip ] [ [ 1 - ] 2dip ] if
     effect boa ;
 
 M: curry cached-effect
index a99c2a2447c7a83a225ff33c54dacb4baf6eb708..b546e56e4ba2462746d1b7b694f9589f0563b6f7 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.tree.propagation.copy.tests
 USING: compiler.tree.propagation.copy tools.test namespaces kernel
 assocs ;
+IN: compiler.tree.propagation.copy.tests
 
 H{ } clone copies set
 
index ef1326c81f02422cdbbf7b20cd7a0e1efc9e54cd..8f8c0773aaf6e71f473f90d5cd8b94875177afbd 100755 (executable)
@@ -19,7 +19,7 @@ IN: compiler.tree.propagation.inlining
 SYMBOL: node-count
 
 : count-nodes ( nodes -- n )
-    0 swap [ drop 1+ ] each-node ;
+    0 swap [ drop 1 + ] each-node ;
 
 : compute-node-count ( nodes -- ) count-nodes node-count set ;
 
index 8c4e81f41d8007398bf15eda9d73073b620b4364..7c684f5b7f6892daa3eba9aa90d3be27523498a4 100644 (file)
@@ -240,11 +240,11 @@ generic-comparison-ops [
     dup name>> {
         {
             [ "alien-signed-" ?head ]
-            [ string>number 8 * 1- 2^ dup neg swap 1- [a,b] ]
+            [ string>number 8 * 1 - 2^ dup neg swap 1 - [a,b] ]
         }
         {
             [ "alien-unsigned-" ?head ]
-            [ string>number 8 * 2^ 1- 0 swap [a,b] ]
+            [ string>number 8 * 2^ 1 - 0 swap [a,b] ]
         }
     } cond
     [ fits-in-fixnum? fixnum integer ? ] keep <class/interval-info>
index 59631d04c67c6b20b19673c741263fee9af69b33..eb9591c40cc96751b4824ed0891032d01769a1bd 100644 (file)
@@ -278,11 +278,11 @@ IN: compiler.tree.propagation.tests
 ] unit-test
 
 [ V{ fixnum } ] [
-    [ >fixnum dup 100 < [ 1+ ] [ "Oops" throw ] if ] final-classes
+    [ >fixnum dup 100 < [ 1 + ] [ "Oops" throw ] if ] final-classes
 ] unit-test
 
 [ V{ -1 } ] [
-    [ 0 dup 100 < not [ 1+ ] [ 1- ] if ] final-literals
+    [ 0 dup 100 < not [ 1 + ] [ 1 - ] if ] final-literals
 ] unit-test
 
 [ V{ 2 } ] [
@@ -472,7 +472,7 @@ TUPLE: mixed-mutable-immutable { x integer } { y sequence read-only } ;
 ] unit-test
 
 : recursive-test-4 ( i n -- )
-    2dup < [ [ 1+ ] dip recursive-test-4 ] [ 2drop ] if ; inline recursive
+    2dup < [ [ 1 + ] dip recursive-test-4 ] [ 2drop ] if ; inline recursive
 
 [ ] [ [ recursive-test-4 ] final-info drop ] unit-test
 
@@ -487,7 +487,7 @@ TUPLE: mixed-mutable-immutable { x integer } { y sequence read-only } ;
 [ V{ integer } ] [ [ { fixnum } declare recursive-test-6 ] final-classes ] unit-test
 
 : recursive-test-7 ( a -- b )
-    dup 10 < [ 1+ recursive-test-7 ] when ; inline recursive
+    dup 10 < [ 1 + recursive-test-7 ] when ; inline recursive
 
 [ V{ fixnum } ] [ [ 0 recursive-test-7 ] final-classes ] unit-test
 
@@ -645,7 +645,7 @@ MIXIN: empty-mixin
 ] unit-test
   
 [ V{ bignum } ] [
-    [ { bignum } declare dup 1- bitxor ] final-classes
+    [ { bignum } declare dup 1 - bitxor ] final-classes
 ] unit-test
 
 [ V{ bignum integer } ] [
@@ -685,7 +685,7 @@ MIXIN: empty-mixin
 
 TUPLE: littledan-1 { a read-only } ;
 
-: (littledan-1-test) ( a -- ) a>> 1+ littledan-1 boa (littledan-1-test) ; inline recursive
+: (littledan-1-test) ( a -- ) a>> 1 + littledan-1 boa (littledan-1-test) ; inline recursive
 
 : littledan-1-test ( -- ) 0 littledan-1 boa (littledan-1-test) ; inline
 
@@ -702,7 +702,7 @@ TUPLE: littledan-2 { from read-only } { to read-only } ;
 [ ] [ [ littledan-2-test ] final-classes drop ] unit-test
 
 : (littledan-3-test) ( x -- )
-    length 1+ f <array> (littledan-3-test) ; inline recursive
+    length 1 + f <array> (littledan-3-test) ; inline recursive
 
 : littledan-3-test ( -- )
     0 f <array> (littledan-3-test) ; inline
@@ -711,7 +711,7 @@ TUPLE: littledan-2 { from read-only } { to read-only } ;
 
 [ V{ 0 } ] [ [ { } length ] final-literals ] unit-test
 
-[ V{ 1 } ] [ [ { } length 1+ f <array> length ] final-literals ] unit-test
+[ V{ 1 } ] [ [ { } length 1 + f <array> length ] final-literals ] unit-test
 
 ! generalize-counter is not tight enough
 [ V{ fixnum } ] [ [ 0 10 [ 1 + >fixnum ] times ] final-classes ] unit-test
index db427d34af51e6aced5b03e345e49d250d46a019..974bb584eba38b70b82bb59611e59a34908626ae 100644 (file)
@@ -1,6 +1,6 @@
-IN: compiler.tree.propagation.recursive.tests
 USING: tools.test compiler.tree.propagation.recursive
 math.intervals kernel math literals layouts ;
+IN: compiler.tree.propagation.recursive.tests
 
 [ T{ interval f { 0 t } { 1/0. t } } ] [
     T{ interval f { 1 t } { 1 t } }
index 86114772f752a4e185881d349a8bae89637dc0fd..4996729ded72a235de05968f5931dd8f8fbf8674 100644 (file)
@@ -63,5 +63,5 @@ UNION: fixed-length-sequence array byte-array string ;
         { [ over 0 = ] [ 2drop fixnum <class-info> ] }
         { [ 2dup length-accessor? ] [ nip length>> ] }
         { [ dup literal?>> ] [ literal>> literal-info-slot ] }
-        [ [ 1- ] [ slots>> ] bi* ?nth ]
+        [ [ 1 - ] [ slots>> ] bi* ?nth ]
     } cond [ object-info ] unless* ;
index 3fd7af0324a7d74d7eee65aa33909ed86c956167..d6c107b74beb2733491bf3f43476a3d3ed921256 100644 (file)
@@ -20,7 +20,7 @@ IN: compiler.tree.propagation.transforms
 
 : rem-custom-inlining ( #call -- quot/f )
     second value-info literal>> dup integer?
-    [ power-of-2? [ 1- bitand ] f ? ] [ drop f ] if ;
+    [ power-of-2? [ 1 - bitand ] f ? ] [ drop f ] if ;
 
 {
     mod-integer-integer
@@ -162,7 +162,7 @@ CONSTANT: lookup-table-at-max 256
     } 1&& ;
 
 : lookup-table-seq ( assoc -- table )
-    [ keys supremum 1+ ] keep '[ _ at ] { } map-as ;
+    [ keys supremum 1 + ] keep '[ _ at ] { } map-as ;
 
 : lookup-table-quot ( seq -- newquot )
     lookup-table-seq
index 81570848055f8daee4b548eee4252b20cb6262c5..a1cbf15438e2d5ebe0e6ab80c76f166c2634614d 100644 (file)
@@ -1,10 +1,10 @@
-IN: compiler.tree.recursive.tests
 USING: tools.test kernel combinators.short-circuit math sequences accessors
 compiler.tree
 compiler.tree.builder
 compiler.tree.combinators
 compiler.tree.recursive
 compiler.tree.recursive.private ;
+IN: compiler.tree.recursive.tests
 
 [ { f f f f } ] [ f { f t f f } (tail-calls) ] unit-test
 [ { f f f t } ] [ t { f t f f } (tail-calls) ] unit-test
@@ -30,7 +30,7 @@ compiler.tree.recursive.private ;
     ] curry contains-node? ;
 
 : loop-test-1 ( a -- )
-    dup [ 1+ loop-test-1 ] [ drop ] if ; inline recursive
+    dup [ 1 + loop-test-1 ] [ drop ] if ; inline recursive
                           
 [ t ] [
     [ loop-test-1 ] build-tree analyze-recursive
@@ -53,7 +53,7 @@ compiler.tree.recursive.private ;
 ] unit-test
 
 : loop-test-2 ( a b -- a' )
-    dup [ 1+ loop-test-2 1- ] [ drop ] if ; inline recursive
+    dup [ 1+ loop-test-2 1 - ] [ drop ] if ; inline recursive
 
 [ t ] [
     [ loop-test-2 ] build-tree analyze-recursive
@@ -198,4 +198,4 @@ DEFER: b4
 [ t ] [ [ b4 ] build-tree analyze-recursive \ a4 label-is-loop? ] unit-test
 [ t ] [ [ b4 ] build-tree analyze-recursive \ b4 label-is-not-loop? ] unit-test
 [ t ] [ [ a4 ] build-tree analyze-recursive \ a4 label-is-not-loop? ] unit-test
-[ t ] [ [ a4 ] build-tree analyze-recursive \ b4 label-is-loop? ] unit-test
\ No newline at end of file
+[ t ] [ [ a4 ] build-tree analyze-recursive \ b4 label-is-loop? ] unit-test
index a96fc0501d3e15c5a76187d75dd73eaaa33b2eca..d73368867d0a25706ab5e3813dd99b85db7a176c 100644 (file)
@@ -1,4 +1,3 @@
-IN: compiler.tree.tuple-unboxing.tests
 USING: tools.test compiler.tree
 compiler.tree.builder compiler.tree.recursive
 compiler.tree.normalization compiler.tree.propagation
@@ -7,6 +6,7 @@ compiler.tree.tuple-unboxing compiler.tree.checker
 compiler.tree.def-use kernel accessors sequences math
 math.private sorting math.order binary-search sequences.private
 slots.private ;
+IN: compiler.tree.tuple-unboxing.tests
 
 : test-unboxing ( quot -- )
     build-tree
index 9ece36e6cd8f87572bb45eb2b984affc3128cb56..2df4dce916a5f5807f54540bb4349188fac608c3 100755 (executable)
@@ -17,8 +17,8 @@ TUPLE: huffman-code
     { code } ;\r
 \r
 : <huffman-code> ( -- code ) 0 0 0 huffman-code boa ;\r
-: next-size ( code -- ) [ 1+ ] change-size [ 2 * ] change-code drop ;\r
-: next-code ( code -- ) [ 1+ ] change-code drop ;\r
+: next-size ( code -- ) [ 1 + ] change-size [ 2 * ] change-code drop ;\r
+: next-code ( code -- ) [ 1 + ] change-code drop ;\r
 \r
 :: all-patterns ( huff n -- seq )\r
     n log2 huff size>> - :> free-bits\r
index 05ec94a794daa8c79f4b9322d6028987fcd23b8c..ff38f94c68a236521540f498c56656f86049ac2c 100644 (file)
@@ -64,7 +64,7 @@ CONSTANT: clen-shuffle { 16 17 18 0 8 7 9 6 10 5 11 4 12 3 13 2 14 1 15 }
         k swap - dup k! 0 >
     ] 
     [ ] produce swap suffix
-    { } [ dup array? [ dup first 16 = ] [ f ] if [ [ unclip-last ] [ second 1+ swap <repetition> append ] bi* ] [ suffix ] if ] reduce
+    { } [ dup array? [ dup first 16 = ] [ f ] if [ [ unclip-last ] [ second 1 + swap <repetition> append ] bi* ] [ suffix ] if ] reduce
     [ dup array? [ second 0 <repetition> ] [ 1array ] if ] map concat
     nip swap cut 2array [ [ length>> [0,b) ] [ ] bi get-table ] map ;
     
@@ -91,14 +91,14 @@ CONSTANT: dist-table
     }
 
 : nth* ( n seq -- elt )
-    [ length 1- swap - ] [ nth ] bi ;
+    [ length 1 - swap - ] [ nth ] bi ;
 
 :: inflate-lz77 ( seq -- bytes )
     1000 <byte-vector> :> bytes
     seq
     [
         dup array?
-        [ first2 '[ _ 1- bytes nth* bytes push ] times ]
+        [ first2 '[ _ 1 - bytes nth* bytes push ] times ]
         [ bytes push ] if
     ] each 
     bytes ;
diff --git a/basis/compression/lzw/lzw-tests.factor b/basis/compression/lzw/lzw-tests.factor
deleted file mode 100644 (file)
index 698e35d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: accessors tools.test compression.lzw ;
-IN: compression.lzw.tests
index 1c2dea2d79ce62305457be3cb4b306316eb5591c..d3f3229171bb279522c8d01d0e6c869d62a00077 100644 (file)
@@ -1,7 +1,7 @@
-IN: concurrency.combinators.tests\r
 USING: concurrency.combinators tools.test random kernel math \r
 concurrency.mailboxes threads sequences accessors arrays\r
 math.parser ;\r
+IN: concurrency.combinators.tests\r
 \r
 [ [ drop ] parallel-each ] must-infer\r
 { 2 0 } [ [ 2drop ] 2parallel-each ] must-infer-as\r
@@ -49,7 +49,7 @@ math.parser ;
 \r
 [ "1a" "4b" "3c" ] [\r
     2\r
-    { [ 1- ] [ sq ] [ 1+ ] } parallel-cleave\r
+    { [ 1 - ] [ sq ] [ 1 + ] } parallel-cleave\r
     [ number>string ] 3 parallel-napply\r
     { [ "a" append ] [ "b" append ] [ "c" append ] } parallel-spread\r
 ] unit-test\r
index d79cfbf1c91b9863801cd9dcc03eec2cae4634d0..d88fcef6093199984a386ee9f6e7df170852b7e4 100644 (file)
@@ -23,7 +23,7 @@ ERROR: count-down-already-done ;
 : count-down ( count-down -- )\r
     dup n>> dup zero?\r
     [ count-down-already-done ]\r
-    [ 1- >>n count-down-check ] if ;\r
+    [ 1 - >>n count-down-check ] if ;\r
 \r
 : await-timeout ( count-down timeout -- )\r
     [ promise>> ] dip ?promise-timeout ?linked t assert= ;\r
index 6c0d882cacfd56f93fc1f4f2fede094b20fcac5f..b2a28519260ee4ed1ec7b98e39fadfc5605f7bae 100644 (file)
@@ -1,9 +1,9 @@
-IN: concurrency.distributed.tests
 USING: tools.test concurrency.distributed kernel io.files
 io.files.temp io.directories arrays io.sockets system
 combinators threads math sequences concurrency.messaging
 continuations accessors prettyprint ;
 FROM: concurrency.messaging => receive send ;
+IN: concurrency.distributed.tests
 
 : test-node ( -- addrspec )
     {
index 7ec9db8ad96a21ea1748828c3e4af477817ccd8b..a8214cf42f2301a5712a034df555f20053c3bbf3 100644 (file)
@@ -1,8 +1,8 @@
-IN: concurrency.exchangers.tests\r
 USING: tools.test concurrency.exchangers\r
 concurrency.count-downs concurrency.promises locals kernel\r
 threads ;\r
 FROM: sequences => 3append ;\r
+IN: concurrency.exchangers.tests\r
 \r
 :: exchanger-test ( -- string )\r
     [let |\r
index 05ff74b03f27236dcf436e2e74aef8688ba07aa3..4fc00b71dd74df1c5c604b7d0703bc6c38b384a1 100644 (file)
@@ -1,6 +1,6 @@
-IN: concurrency.flags.tests\r
 USING: tools.test concurrency.flags concurrency.combinators\r
 kernel threads locals accessors calendar ;\r
+IN: concurrency.flags.tests\r
 \r
 :: flag-test-1 ( -- val )\r
     [let | f [ <flag> ] |\r
index 208a72f820ebfe6e218e4a2349d14483c9663a33..07466e5ffdec0cdee9c7065263681d809eae36f8 100644 (file)
@@ -1,5 +1,5 @@
-IN: concurrency.futures.tests\r
 USING: concurrency.futures kernel tools.test threads ;\r
+IN: concurrency.futures.tests\r
 \r
 [ 50 ] [\r
     [ 50 ] future ?future\r
index 8f82aa88baa997c56780e6b51e6b17117a7fa71f..f199876fd0c5d360c564debc1439724130f1ec08 100644 (file)
@@ -1,7 +1,7 @@
-IN: concurrency.locks.tests\r
 USING: tools.test concurrency.locks concurrency.count-downs\r
 concurrency.messaging concurrency.mailboxes locals kernel\r
 threads sequences calendar accessors ;\r
+IN: concurrency.locks.tests\r
 \r
 :: lock-test-0 ( -- v )\r
     [let | v [ V{ } clone ]\r
index 0094f3323d709d26f22850b02ee2a206ab12a537..18cd86fa53470dcaf00944a203f86482871e3e56 100644 (file)
@@ -57,7 +57,7 @@ TUPLE: rw-lock readers writers reader# writer ;
 <PRIVATE\r
 \r
 : add-reader ( lock -- )\r
-    [ 1+ ] change-reader# drop ;\r
+    [ 1 + ] change-reader# drop ;\r
 \r
 : acquire-read-lock ( lock timeout -- )\r
     over writer>>\r
@@ -68,7 +68,7 @@ TUPLE: rw-lock readers writers reader# writer ;
     writers>> notify-1 ;\r
 \r
 : remove-reader ( lock -- )\r
-    [ 1- ] change-reader# drop ;\r
+    [ 1 - ] change-reader# drop ;\r
 \r
 : release-read-lock ( lock -- )\r
     dup remove-reader\r
index 81e54f18078d907f7740ec97dafd371140eaf837..56d579d6c71cd987a10ebb8ccd22f7fb77ef7c4a 100644 (file)
@@ -1,7 +1,7 @@
-IN: concurrency.mailboxes.tests\r
 USING: concurrency.mailboxes concurrency.count-downs concurrency.conditions\r
 vectors sequences threads tools.test math kernel strings namespaces\r
 continuations calendar destructors ;\r
+IN: concurrency.mailboxes.tests\r
 \r
 { 1 1 } [ [ integer? ] mailbox-get? ] must-infer-as\r
 \r
@@ -86,4 +86,4 @@ continuations calendar destructors ;
 [\r
     <mailbox> 1 seconds mailbox-get-timeout\r
 ] [ wait-timeout? ] must-fail-with\r
-    
\ No newline at end of file
+    \r
index 200adb14aea9148793785c66458504ce70e6e8e7..419277647d778d7679ff74f765ae59de6b2af94f 100755 (executable)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2005, 2008 Chris Double, Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-IN: concurrency.mailboxes\r
 USING: dlists deques threads sequences continuations\r
 destructors namespaces math quotations words kernel\r
 arrays assocs init system concurrency.conditions accessors\r
 debugger debugger.threads locals fry ;\r
+IN: concurrency.mailboxes\r
 \r
 TUPLE: mailbox threads data disposed ;\r
 \r
index 36fe4ef907244b481b449b01cd7aafa38432d68c..353f4a69b7cd62d58b64bab270e4c925d2c5cb66 100644 (file)
@@ -1,6 +1,6 @@
-IN: concurrency.promises.tests\r
 USING: vectors concurrency.promises kernel threads sequences\r
 tools.test ;\r
+IN: concurrency.promises.tests\r
 \r
 [ V{ 50 50 50 } ] [\r
     0 <vector>\r
index 59518f4c8d7320d449f092345d519a24ad322048..dcd0ed9a2c8c31e07f9f52d80b3d6a9ae993affd 100644 (file)
@@ -21,13 +21,13 @@ M: negative-count-semaphore summary
 : acquire-timeout ( semaphore timeout -- )\r
     over count>> zero?\r
     [ dupd wait-to-acquire ] [ drop ] if\r
-    [ 1- ] change-count drop ;\r
+    [ 1 - ] change-count drop ;\r
 \r
 : acquire ( semaphore -- )\r
     f acquire-timeout ;\r
 \r
 : release ( semaphore -- )\r
-    [ 1+ ] change-count\r
+    [ 1 + ] change-count\r
     threads>> notify-1 ;\r
 \r
 :: with-semaphore-timeout ( semaphore timeout quot -- )\r
index 0058c8f07a6c59045d92bbc3ff2d835579df1ae2..898e4e51c804fc4a94b91e2072842115a406366a 100644 (file)
@@ -1,5 +1,5 @@
-IN: cords.tests
 USING: cords strings tools.test kernel sequences ;
+IN: cords.tests
 
 [ "hello world" ] [ "hello" " world" cord-append dup like ] unit-test
 [ "hello world" ] [ { "he" "llo" " world" } cord-concat dup like ] unit-test
diff --git a/basis/core-foundation/numbers/numbers-tests.factor b/basis/core-foundation/numbers/numbers-tests.factor
deleted file mode 100644 (file)
index 1c50f2d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test core-foundation.numbers ;
-IN: core-foundation.numbers.tests
index a63a3ea6747af3ca3be40ab72fb4b2c5fa61c3c8..6446eacd08045d3cf91e9e485a0f5c8a22ad3829 100644 (file)
@@ -103,7 +103,7 @@ TUPLE: run-loop fds sources timers ;
 : (reset-timer) ( timer counter -- )
     yield {
         { [ dup 0 = ] [ now ((reset-timer)) ] }
-        { [ run-queue deque-empty? not ] [ 1- (reset-timer) ] }
+        { [ run-queue deque-empty? not ] [ 1 - (reset-timer) ] }
         { [ sleep-queue heap-empty? ] [ 5 minutes hence ((reset-timer)) ] }
         [ sleep-queue heap-peek nip micros>timestamp ((reset-timer)) ]
     } cond ;
diff --git a/basis/core-foundation/utilities/utilities-tests.factor b/basis/core-foundation/utilities/utilities-tests.factor
deleted file mode 100644 (file)
index fb3deb2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test core-foundation.utilities ;
-IN: core-foundation.utilities.tests
diff --git a/basis/core-graphics/types/types-tests.factor b/basis/core-graphics/types/types-tests.factor
deleted file mode 100644 (file)
index d3b081f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test core-graphics.types ;
-IN: core-graphics.types.tests
diff --git a/basis/core-text/fonts/fonts-tests.factor b/basis/core-text/fonts/fonts-tests.factor
deleted file mode 100644 (file)
index 45fa2bc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test core-text.fonts ;
-IN: core-text.fonts.tests
diff --git a/basis/core-text/utilities/utilities-tests.factor b/basis/core-text/utilities/utilities-tests.factor
deleted file mode 100644 (file)
index 65914a3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test core-text.utilities ;
-IN: core-text.utilities.tests
index 23b1d1e6f422d343529def975ec841d74aaee96d..6ee1c84558d8e15d16269c0d04592cf766376fca 100644 (file)
@@ -1,7 +1,7 @@
-IN: cpu.ppc.assembler.tests
 USING: cpu.ppc.assembler tools.test arrays kernel namespaces
 make vocabs sequences ;
 FROM: cpu.ppc.assembler => B ;
+IN: cpu.ppc.assembler.tests
 
 : test-assembler ( expected quot -- )
     [ 1array ] [ [ B{ } make ] curry ] bi* unit-test ;
index cbb914121ea2eb02444ca70340235d3a2c7c7fdc..c63372fa3f8d36358ccb838409637197929c0351 100644 (file)
@@ -226,7 +226,7 @@ CONSTANT: rs-reg 14
     ! key = class\r
     5 4 MR\r
     ! key &= cache.length - 1\r
-    5 5 mega-cache-size get 1- bootstrap-cell * ANDI\r
+    5 5 mega-cache-size get 1 - bootstrap-cell * ANDI\r
     ! cache += array-start-offset\r
     3 3 array-start-offset ADDI\r
     ! cache += key\r
index dfcb68dfc1c974d7906e70cb90b7f078ecfe6f16..a169982445848870581b6883b1df12cd535bdada 100644 (file)
@@ -217,7 +217,7 @@ M:: ppc %integer>bignum ( dst src temp -- )
         temp dst 1 bignum@ STW
         ! Compute sign
         temp src MR
-        temp temp cell-bits 1- SRAWI
+        temp temp cell-bits 1 - SRAWI
         temp temp 1 ANDI
         ! Store sign
         temp dst 2 bignum@ STW
index aeca1accce2715ccbb2b16b65e0259bc157759d6..7c832fe66c27b5be9638ea52fbd0edf4d5229bb3 100644 (file)
@@ -131,7 +131,7 @@ M:: x86.64 %box ( n rep func -- )
 M: x86.64 %box-long-long ( n func -- )
     [ int-rep ] dip %box ;
 
-: box-struct-field@ ( i -- operand ) 1+ cells param@ ;
+: box-struct-field@ ( i -- operand ) 1 + cells param@ ;
 
 : %box-struct-field ( c-type i -- )
     box-struct-field@ swap c-type-rep reg-class-of {
index 6363f17e48053eebdd0973b00735a9eb0f8cacc7..0dafc3d9c4d1cf5f84d08e8832673917a6d0b63c 100644 (file)
@@ -226,7 +226,7 @@ big-endian off
     temp2 temp1 MOV
     bootstrap-cell 8 = [ temp2 1 SHL ] when
     ! key &= cache.length - 1
-    temp2 mega-cache-size get 1- bootstrap-cell * AND
+    temp2 mega-cache-size get 1 - bootstrap-cell * AND
     ! cache += array-start-offset
     temp0 array-start-offset ADD
     ! cache += key
@@ -496,7 +496,7 @@ big-endian off
     ! make a copy
     mod-arg div-arg MOV
     ! sign-extend
-    mod-arg bootstrap-cell-bits 1- SAR
+    mod-arg bootstrap-cell-bits 1 - SAR
     ! divide
     temp3 IDIV ;
 
index 69847cacfa6166b1325ed80a3c6b884790dac225..680e6559959dff4a0bf5867fecdcddb5e9d07925 100644 (file)
@@ -1,7 +1,7 @@
-IN: cpu.x86.features.tests
 USING: cpu.x86.features tools.test kernel sequences math system ;
+IN: cpu.x86.features.tests
 
 cpu x86? [
     [ t ] [ sse2? { t f } member? ] unit-test
     [ t ] [ [ 10000 [ ] times ] count-instructions integer? ] unit-test
-] when
\ No newline at end of file
+] when
index d8fa1fae7edbd4dbe6494e5e99c38ea464984dbe..a6c958083cbc95a71dc098561264a13c972f23f9 100644 (file)
@@ -162,7 +162,7 @@ M:: x86 %integer>bignum ( dst src temp -- )
         dst 3 bignum@ src MOV
         ! Compute sign
         temp src MOV
-        temp cell-bits 1- SAR
+        temp cell-bits 1 - SAR
         temp 1 AND
         ! Store sign
         dst 2 bignum@ temp MOV
index c4aa47d383b3a1281ff091887449bb6e6ad39be6..e9aa01feb4bb9568486c4a9b37268c247664311d 100755 (executable)
@@ -75,7 +75,7 @@ M: db-connection <update-tuple-statement> ( class -- statement )
 M: random-id-generator eval-generator ( singleton -- obj )
     drop
     system-random-generator get [
-        63 [ random-bits ] keep 1- set-bit
+        63 [ random-bits ] keep 1 - set-bit
     ] with-random ;
 
 : interval-comparison ( ? str -- str )
index 6bf8dd3075ffe24b1146605be0d17e36645b9fa8..7f109d80e03a9736286ede656991e80a9dbc5909 100644 (file)
@@ -469,7 +469,7 @@ TUPLE: bignum-test id m n o ;
     } define-persistent
     [ bignum-test drop-table ] ignore-errors
     [ ] [ bignum-test ensure-table ] unit-test
-    [ ] [ 63 2^ 1- dup dup <bignum-test> insert-tuple ] unit-test ;
+    [ ] [ 63 2^ 1 - dup dup <bignum-test> insert-tuple ] unit-test ;
 
     ! sqlite only
     ! [ T{ bignum-test f 1
index 08f84d9335b566ac3fc3c28897ed08cfc3876372..6800c83a9ca4a0df0cfa87f6c3e351fcc46083f4 100644 (file)
@@ -1,7 +1,7 @@
-IN: debugger.tests\r
 USING: debugger kernel continuations tools.test ;\r
+IN: debugger.tests\r
 \r
 [ ] [ [ drop ] [ error. ] recover ] unit-test\r
 \r
 [ f ] [ { } vm-error? ] unit-test\r
-[ f ] [ { "A" "B" } vm-error? ] unit-test
\ No newline at end of file
+[ f ] [ { "A" "B" } vm-error? ] unit-test\r
index 6c0985ce06d5a8d816faf78b23c4699b7d6efbc7..ce9496291c6ff94a4bfeb9b188087b8a48ec1006 100644 (file)
@@ -36,7 +36,7 @@ M: string error. print ;
     error-continuation get name>> assoc-stack ;
 
 : :res ( n -- * )
-    1- restarts get-global nth f restarts set-global restart ;
+    1 - restarts get-global nth f restarts set-global restart ;
 
 : :1 ( -- * ) 1 :res ;
 : :2 ( -- * ) 2 :res ;
@@ -44,7 +44,7 @@ M: string error. print ;
 
 : restart. ( restart n -- )
     [
-        1+ dup 3 <= [ ":" % # "    " % ] [ # " :res  " % ] if
+        1 + dup 3 <= [ ":" % # "    " % ] [ # " :res  " % ] if
         name>> %
     ] "" make print ;
 
@@ -92,7 +92,7 @@ HOOK: signal-error. os ( obj -- )
 
 : array-size-error. ( obj -- )
     "Invalid array size: " write dup third .
-    "Maximum: " write fourth 1- . ;
+    "Maximum: " write fourth 1 - . ;
 
 : c-string-error. ( obj -- )
     "Cannot convert to C string: " write third . ;
index 212908b2fdb0f315fd8b64ba964986d86e1eefe8..1eb916487cce6b223bcc21465a958ee441d0f750 100644 (file)
@@ -13,7 +13,7 @@ CONSTANT: signal-names
     "SIGUSR1" "SIGUSR2"
 }
 
-: signal-name ( n -- str/f ) 1- signal-names ?nth ;
+: signal-name ( n -- str/f ) 1 - signal-names ?nth ;
 
 : signal-name. ( n -- )
     signal-name [ " (" ")" surround write ] when* ;
diff --git a/basis/definitions/icons/icons-tests.factor b/basis/definitions/icons/icons-tests.factor
deleted file mode 100644 (file)
index 47e106f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test definitions.icons ;
-IN: definitions.icons.tests
index 9f9aca87029a07b2fa7cb994d3e86c4ee7d04213..d9581152e1014c3f2998b396667af2f5141daca4 100644 (file)
@@ -55,8 +55,8 @@ PROTOCOL: beta three ;
 
 TUPLE: hey value ;
 C: <hey> hey
-CONSULT: alpha hey value>> 1+ ;
-CONSULT: beta hey value>> 1- ;
+CONSULT: alpha hey value>> 1 + ;
+CONSULT: beta hey value>> 1 - ;
 
 [ 2 ] [ 1 <hey> one ] unit-test
 [ 2 ] [ 1 <hey> two ] unit-test
index 74746f1a3adffd950e20a4079cc5a35a0c6777c6..cb9233343e7b37daf781a3992bd227896d461665 100644 (file)
@@ -1,5 +1,5 @@
-IN: disjoint-sets.testes
 USING: tools.test disjoint-sets namespaces slots.private ;
+IN: disjoint-sets.testes
 
 SYMBOL: +blah+
 -405534154 +blah+ 1 set-slot
index 80ab2f58bf4a0ae467bc18db6d8e940d500acd0e..05df13f07347d20ef427e2a876d8463f0502a83a 100644 (file)
@@ -30,7 +30,7 @@ TUPLE: disjoint-set
     ranks>> at ; inline
 
 : inc-rank ( a disjoint-set -- )
-    ranks>> [ 1+ ] change-at ; inline
+    ranks>> [ 1 + ] change-at ; inline
 
 : representative? ( a disjoint-set -- ? )
     dupd parent = ; inline
index 9f7f25c56ea23d7a912ece51dac2b6e85124545e..41d93c889ec4acf9c5f32b56f85f4a7f53337014 100644 (file)
@@ -1,6 +1,6 @@
-IN: documents.tests
 USING: documents documents.private accessors sequences
 namespaces tools.test make arrays kernel fry ;
+IN: documents.tests
 
 ! Tests
 
index cc2466053b8718f80b1c382990f863c796186435..b05c86c36556a7bdca5bff8e6d5aef42a5649099 100644 (file)
@@ -45,7 +45,7 @@ TUPLE: document < model locs undos redos inside-undo? ;
     [ drop ] [ doc-line length ] 2bi 2array ;
 
 : doc-lines ( from to document -- slice )
-    [ 1+ ] [ value>> ] bi* <slice> ;
+    [ 1 + ] [ value>> ] bi* <slice> ;
 
 : start-on-line ( from line# document -- n1 )
     drop over first =
@@ -67,7 +67,7 @@ TUPLE: document < model locs undos redos inside-undo? ;
     [ start-on-line ] [ end-on-line ] bi-curry bi-curry bi* ;
 
 : last-line# ( document -- line )
-    value>> length 1- ;
+    value>> length 1 - ;
 
 CONSTANT: doc-start { 0 0 }
 
@@ -84,7 +84,7 @@ CONSTANT: doc-start { 0 0 }
         over length 1 = [
             nip first2
         ] [
-            first swap length 1- + 0
+            first swap length 1 - + 0
         ] if
     ] dip last length + 2array ;
 
@@ -92,7 +92,7 @@ CONSTANT: doc-start { 0 0 }
     0 swap [ append ] change-nth ;
 
 : append-last ( str seq -- )
-    [ length 1- ] keep [ prepend ] change-nth ;
+    [ length 1 - ] keep [ prepend ] change-nth ;
 
 : loc-col/str ( loc document -- str col )
     [ first2 swap ] dip nth swap ;
@@ -103,7 +103,7 @@ CONSTANT: doc-start { 0 0 }
 
 : (set-doc-range) ( doc-lines from to lines -- changed-lines )
     [ prepare-insert ] 3keep
-    [ [ first ] bi@ 1+ ] dip
+    [ [ first ] bi@ 1 + ] dip
     replace-slice ;
 
 : entire-doc ( document -- start end document )
index 0776f8f1583dabea37e170842920d022786020d8..7ba3cb8a6eddf866f6a61e69d461c911f616958a 100644 (file)
@@ -23,14 +23,14 @@ SINGLETON: char-elt
 : prev ( loc document quot: ( loc document -- loc ) -- loc )
     {
         { [ pick { 0 0 } = ] [ 2drop ] }
-        { [ pick second zero? ] [ drop [ first 1- ] dip line-end ] }
+        { [ pick second zero? ] [ drop [ first 1 - ] dip line-end ] }
         [ call ]
     } cond ; inline
 
 : next ( loc document quot: ( loc document -- loc ) -- loc )
     {
         { [ 2over doc-end = ] [ 2drop ] }
-        { [ 2over line-end? ] [ 2drop first 1+ 0 2array ] }
+        { [ 2over line-end? ] [ 2drop first 1 + 0 2array ] }
         [ call ]
     } cond ; inline
 
@@ -73,7 +73,7 @@ SINGLETON: one-word-elt
 
 M: one-word-elt prev-elt
     drop
-    [ [ 1- ] dip f prev-word ] modify-col ;
+    [ [ 1 - ] dip f prev-word ] modify-col ;
 
 M: one-word-elt next-elt
     drop
@@ -90,7 +90,7 @@ SINGLETON: word-elt
 
 M: word-elt prev-elt
     drop
-    [ [ [ 1- ] dip blank-at? prev-word ] modify-col ]
+    [ [ [ 1 - ] dip blank-at? prev-word ] modify-col ]
     prev ;
 
 M: word-elt next-elt
index c178207e49dc85b4a3c544a9af9d95938dfc60d1..6dcf724e8ee9840065f74d9319d357bff7e220c7 100644 (file)
@@ -1,6 +1,5 @@
 USING: definitions io.launcher kernel math math.parser parser
 namespaces prettyprint editors make ;
-
 IN: editors.macvim
 
 : macvim ( file line -- )
index d27e66119346609f0fc9ef1a4d83488c2ed52967..09c7533b285e2def0e58f91208be90a210a42275 100644 (file)
@@ -1,5 +1,5 @@
-IN: eval.tests
 USING: eval tools.test ;
+IN: eval.tests
 
 [ 4 ] [ "USE: math 2 2 +" eval( -- result ) ] unit-test
 [ "USE: math 2 2 +" eval( -- ) ] must-fail
index 4acd1eeab81dcc3d2cc373b9d20b7189bbb405a0..2a1ac85de06312fffc8e526f6433ff24fc95d9fe 100644 (file)
@@ -50,7 +50,7 @@ DEFER: (parse-paragraph)
     parse-paragraph paragraph boa ;
 
 : cut-half-slice ( string i -- before after-slice )
-    [ head ] [ 1+ short tail-slice ] 2bi ;
+    [ head ] [ 1 + short tail-slice ] 2bi ;
 
 : find-cut ( string quot -- before after delimiter )
     dupd find
index c56372f023d19f337a388bd84217541c9465f91f..5710ceb985d582607ebd2f0c56cb671b584686ba 100644 (file)
@@ -1,8 +1,6 @@
 ! Copyright (C) 2008 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
-
 USING: calendar kernel formatting tools.test ;
-
 IN: formatting.tests
 
 [ "%s" printf ] must-infer 
index 55ebdf1442d6073c73984c767c6a69dfec241947..1b1bc8c2afb5cce2ccab3a9ba5e44c1eaced9056 100644 (file)
@@ -1,11 +1,9 @@
 ! Copyright (C) 2008 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
-
 USING: accessors arrays assocs calendar combinators fry kernel
 generalizations io io.streams.string macros math math.functions
 math.parser peg.ebnf quotations sequences splitting strings
 unicode.categories unicode.case vectors combinators.smart ;
-
 IN: formatting
 
 <PRIVATE
@@ -16,10 +14,10 @@ IN: formatting
 : fix-sign ( string -- string )
     dup CHAR: 0 swap index 0 = 
       [ dup 0 swap [ [ CHAR: 0 = not ] keep digit? and ] find-from
-         [ dup 1- rot dup [ nth ] dip swap
+         [ dup 1 - rot dup [ nth ] dip swap
             {
-               { CHAR: - [ [ 1- ] dip remove-nth "-" prepend ] }
-               { CHAR: + [ [ 1- ] dip remove-nth "+" prepend ] }
+               { CHAR: - [ [ 1 - ] dip remove-nth "-" prepend ] }
+               { CHAR: + [ [ 1 - ] dip remove-nth "+" prepend ] }
                [ drop swap drop ] 
             } case 
          ] [ drop ] if
@@ -39,8 +37,8 @@ IN: formatting
         abs 0 swap
         [ dup [ 10.0 >= ] [ 1.0 < ] bi or ]
         [ dup 10.0 >=
-          [ 10.0 / [ 1+ ] dip ]
-          [ 10.0 * [ 1- ] dip ] if
+          [ 10.0 / [ 1 + ] dip ]
+          [ 10.0 * [ 1 - ] dip ] if
         ] while 
      ] keep 0 < [ neg ] when ;
 
index 88ecae66addbb2dc29f8c7bed661c822dea6f44d..549db25e09e96e76639dbfe6fa44e411c98968b7 100644 (file)
@@ -1,6 +1,6 @@
-IN: fry.tests
 USING: fry tools.test math prettyprint kernel io arrays
 sequences eval accessors ;
+IN: fry.tests
 
 [ [ 3 + ] ] [ 3 '[ _ + ] ] unit-test
 
index ecb5cbf856deab274f0ce41af75e89b88c02b207..fd029cc329f8c61551ca0149e7ed1b1787398c99 100644 (file)
@@ -42,7 +42,7 @@ GENERIC: deep-fry ( obj -- )
     check-fry
     [ [ deep-fry ] each ] [ ] make
     [ dup \ @ = [ drop [ _ call ] ] [ 1array ] if ] map concat
-    { _ } split [ spread>quot ] [ length 1- ] bi ;
+    { _ } split [ spread>quot ] [ length 1 - ] bi ;
 
 PRIVATE>
 
index 03bd21e58c379e60c5e3c5510cc0d0f59633c821..a21313312bbb173e8bd38731e4fa0cd38bd91684 100644 (file)
@@ -1,6 +1,6 @@
-IN: functors.tests
 USING: functors tools.test math words kernel multiline parser
 io.streams.string generic ;
+IN: functors.tests
 
 <<
 
diff --git a/basis/furnace/auth/auth-tests.factor b/basis/furnace/auth/auth-tests.factor
deleted file mode 100644 (file)
index 54c32e7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USING: furnace.auth tools.test ;
-IN: furnace.auth.tests
-
diff --git a/basis/furnace/auth/features/edit-profile/edit-profile-tests.factor b/basis/furnace/auth/features/edit-profile/edit-profile-tests.factor
deleted file mode 100644 (file)
index 996047e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: furnace.auth.features.edit-profile.tests
-USING: tools.test furnace.auth.features.edit-profile ;
-
-
diff --git a/basis/furnace/auth/features/recover-password/recover-password-tests.factor b/basis/furnace/auth/features/recover-password/recover-password-tests.factor
deleted file mode 100644 (file)
index 313b8ef..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: furnace.auth.features.recover-password
-USING: tools.test furnace.auth.features.recover-password ;
-
-
diff --git a/basis/furnace/auth/features/registration/registration-tests.factor b/basis/furnace/auth/features/registration/registration-tests.factor
deleted file mode 100644 (file)
index 42acda4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: furnace.auth.features.registration.tests
-USING: tools.test furnace.auth.features.registration ;
-
-
diff --git a/basis/furnace/auth/login/login-tests.factor b/basis/furnace/auth/login/login-tests.factor
deleted file mode 100644 (file)
index aabd0c5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: furnace.auth.login.tests\r
-USING: tools.test furnace.auth.login ;\r
-\r
-\r
index 1a9784f1478d011b152d942c8b14f16ff3bb1044..c6a037cea17a86dd7fd57ce52890d7cb35fc4094 100644 (file)
@@ -1,6 +1,5 @@
 USING: accessors namespaces kernel combinators.short-circuit
 db.tuples db.types furnace.auth furnace.sessions furnace.cache ;
-
 IN: furnace.auth.login.permits
 
 TUPLE: permit < server-state session uid ;
index 8fe1dd4dd4c5d678ea7e1c640f7a030e34fd4307..44a20e7ae39688857fc8bae7f6b8b90a65d42a8c 100644 (file)
@@ -1,7 +1,7 @@
-IN: furnace.auth.providers.assoc.tests\r
 USING: furnace.actions furnace.auth furnace.auth.providers \r
 furnace.auth.providers.assoc furnace.auth.login\r
 tools.test namespaces accessors kernel ;\r
+IN: furnace.auth.providers.assoc.tests\r
 \r
 <action> "Test" <login-realm>\r
     <users-in-memory> >>users\r
index f5a79d701bc21d9d6a99d7ea3c2db8bda96aaf9d..a7a48307c999eb6f3c265d114320f303e8d3a330 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-IN: furnace.auth.providers.assoc\r
 USING: accessors assocs kernel furnace.auth.providers ;\r
+IN: furnace.auth.providers.assoc\r
 \r
 TUPLE: users-in-memory assoc ;\r
 \r
index de7650d9ef2da9accdeb6ce1343084de475f2552..f23a4a852730508aedff03b7b58568d49c368440 100644 (file)
@@ -1,4 +1,3 @@
-IN: furnace.auth.providers.db.tests\r
 USING: furnace.actions\r
 furnace.auth\r
 furnace.auth.login\r
@@ -6,6 +5,7 @@ furnace.auth.providers
 furnace.auth.providers.db tools.test\r
 namespaces db db.sqlite db.tuples continuations\r
 io.files io.files.temp io.directories accessors kernel ;\r
+IN: furnace.auth.providers.db.tests\r
 \r
 <action> "test" <login-realm> realm set\r
 \r
diff --git a/basis/furnace/db/db-tests.factor b/basis/furnace/db/db-tests.factor
deleted file mode 100644 (file)
index 15698d8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: furnace.db.tests
-USING: tools.test furnace.db ;
-
-
index 1d5aa43c7b18c99b3f1a0719d3da20c60a36becd..6fe2633031ae934eda8f2700f726371347b014d3 100644 (file)
@@ -1,7 +1,8 @@
-IN: furnace.tests
 USING: http http.server.dispatchers http.server.responses
 http.server furnace furnace.utilities tools.test kernel
 namespaces accessors io.streams.string urls xml.writer ;
+IN: furnace.tests
+
 TUPLE: funny-dispatcher < dispatcher ;
 
 : <funny-dispatcher> ( -- dispatcher ) funny-dispatcher new-dispatcher ;
index 392d43e89b355240c217170c9a00457faed32650..49311ee8913bf563666116577eadf14fab6f50fe 100644 (file)
@@ -1,10 +1,10 @@
-IN: furnace.sessions.tests\r
 USING: tools.test http furnace.sessions furnace.actions\r
 http.server http.server.responses math namespaces make kernel\r
 accessors io.sockets io.servers.connection prettyprint\r
 io.streams.string io.files io.files.temp io.directories\r
 splitting destructors sequences db db.tuples db.sqlite\r
 continuations urls math.parser furnace furnace.utilities ;\r
+IN: furnace.sessions.tests\r
 \r
 : with-session ( session quot -- )\r
     [\r
@@ -19,7 +19,7 @@ M: foo init-session* drop 0 "x" sset ;
 \r
 M: foo call-responder*\r
     2drop\r
-    "x" [ 1+ ] schange\r
+    "x" [ 1 + ] schange\r
     "x" sget number>string "text/html" <content> ;\r
 \r
 : url-responder-mock-test ( -- string )\r
@@ -73,7 +73,7 @@ M: foo call-responder*
 \r
         [ 9 ] [ "x" sget sq ] unit-test\r
 \r
-        [ ] [ "x" [ 1- ] schange ] unit-test\r
+        [ ] [ "x" [ 1 - ] schange ] unit-test\r
 \r
         [ 4 ] [ "x" sget sq ] unit-test\r
 \r
index 3cce0da575fd1cf890d9363e987ec61e7cb0f361..10f3b5d7f59eb8840e615a89aa416bb968e9b194 100644 (file)
@@ -1,8 +1,9 @@
+USING: ui game-input tools.test kernel system threads calendar
+combinators.short-circuit ;
 IN: game-input.tests
-USING: ui game-input tools.test kernel system threads calendar ;
 
-os windows? os macosx? or [
+os { [ windows? ] [ macosx? ] } 1|| [
     [ ] [ open-game-input ] unit-test
     [ ] [ 1 seconds sleep ] unit-test
     [ ] [ close-game-input ] unit-test
-] when
\ No newline at end of file
+] when
index 922906df483ffac80a4d7a029433b9c20a3c84c9..c21b900d8cf437d3a14d1262985c2a13b8aa9360 100755 (executable)
@@ -45,12 +45,12 @@ ERROR: game-input-not-open ;
     game-input-opened? [
         (open-game-input) 
     ] unless
-    game-input-opened [ 1+ ] change-global
+    game-input-opened [ 1 + ] change-global
     reset-mouse ;
 : close-game-input ( -- )
     game-input-opened [
         dup zero? [ game-input-not-open ] when
-        1-
+        1 -
     ] change-global
     game-input-opened? [
         (close-game-input) 
index 92c0c7173ae6b9d6948f307437e0c48379e42622..71d547ad29ed7521f7ac1c78678a524ea117cc9f 100755 (executable)
@@ -153,7 +153,7 @@ CONSTANT: pov-values
     IOHIDValueGetIntegerValue pov-values ?nth [ pov-neutral ] unless* ;
 
 : record-button ( state hid-value element -- )
-    [ buttons>> ] [ button-value ] [ IOHIDElementGetUsage 1- ] tri* rot set-nth ;
+    [ buttons>> ] [ button-value ] [ IOHIDElementGetUsage 1 - ] tri* rot set-nth ;
 
 : record-controller ( controller-state value -- )
     dup IOHIDValueGetElement {
index abcbd54cab9072969c2868419ac94abcab47510e..e7b3ee82525da5f74b974e6526d5290fd880039b 100644 (file)
@@ -24,20 +24,20 @@ MACRO: narray ( n -- )
     '[ _ { } nsequence ] ;
 
 MACRO: nsum ( n -- )
-    1- [ + ] n*quot ;
+    1 - [ + ] n*quot ;
 
 MACRO: firstn-unsafe ( n -- )
     [ '[ [ _ ] dip nth-unsafe ] ] map '[ _ cleave ] ;
 
 MACRO: firstn ( n -- )
     dup zero? [ drop [ drop ] ] [
-        [ 1- swap bounds-check 2drop ]
+        [ 1 - swap bounds-check 2drop ]
         [ firstn-unsafe ]
         bi-curry '[ _ _ bi ]
     ] if ;
 
 MACRO: npick ( n -- )
-    1- [ dup ] [ '[ _ dip swap ] ] repeat ;
+    1 - [ dup ] [ '[ _ dip swap ] ] repeat ;
 
 MACRO: nover ( n -- )
     dup 1 + '[ _ npick ] n*quot ;
@@ -46,10 +46,10 @@ MACRO: ndup ( n -- )
     dup '[ _ npick ] n*quot ;
 
 MACRO: nrot ( n -- )
-    1- [ ] [ '[ _ dip swap ] ] repeat ;
+    1 - [ ] [ '[ _ dip swap ] ] repeat ;
 
 MACRO: -nrot ( n -- )
-    1- [ ] [ '[ swap _ dip ] ] repeat ;
+    1 - [ ] [ '[ swap _ dip ] ] repeat ;
 
 MACRO: ndrop ( n -- )
     [ drop ] n*quot ;
@@ -91,7 +91,7 @@ MACRO: napply ( quot n -- )
     swap <repetition> spread>quot ;
 
 MACRO: mnswap ( m n -- )
-    1+ '[ _ -nrot ] swap '[ _ _ napply ] ;
+    1 + '[ _ -nrot ] swap '[ _ _ napply ] ;
 
 MACRO: nweave ( n -- )
     [ dup <reversed> [ '[ _ _ mnswap ] ] with map ] keep
index 45eb27ea62e338c433fa1abf82dcfcec8e311e7c..bdc0623d5413eb591589a8f35420f59b8c356d26 100644 (file)
@@ -1,5 +1,5 @@
-IN: globs.tests
 USING: tools.test globs ;
+IN: globs.tests
 
 [ f ] [ "abd" "fdf" glob-matches? ] unit-test
 [ f ] [ "fdsafas" "?" glob-matches? ] unit-test
index ec13e3a75083fe3e34c42c59d3e5e71007d75d4c..f68760a4e18e881d08d80507edd2223a90a7d99d 100644 (file)
@@ -35,7 +35,7 @@ M: slice-chunking nth-unsafe group@ slice boa ;
 TUPLE: abstract-groups < chunking-seq ;
 
 M: abstract-groups length
-    [ seq>> length ] [ n>> ] bi [ + 1- ] keep /i ;
+    [ seq>> length ] [ n>> ] bi [ + 1 - ] keep /i ;
 
 M: abstract-groups set-length
     [ n>> * ] [ seq>> ] bi set-length ;
@@ -46,10 +46,10 @@ M: abstract-groups group@
 TUPLE: abstract-clumps < chunking-seq ;
 
 M: abstract-clumps length
-    [ seq>> length ] [ n>> ] bi - 1+ ;
+    [ seq>> length ] [ n>> ] bi - 1 + ;
 
 M: abstract-clumps set-length
-    [ n>> + 1- ] [ seq>> ] bi set-length ;
+    [ n>> + 1 - ] [ seq>> ] bi set-length ;
 
 M: abstract-clumps group@
     [ n>> over + ] [ seq>> ] bi ;
@@ -100,4 +100,4 @@ INSTANCE: sliced-clumps slice-chunking
 
 : all-equal? ( seq -- ? ) [ = ] monotonic? ;
 
-: all-eq? ( seq -- ? ) [ eq? ] monotonic? ;
\ No newline at end of file
+: all-eq? ( seq -- ? ) [ eq? ] monotonic? ;
index 32ed10d8f26f6c4b043fafb83da462c746916ff5..677daca69de52e85006fbfe78c9b4388248614f2 100644 (file)
@@ -46,7 +46,7 @@ M: heap heap-size ( heap -- n )
 
 : right ( n -- m ) 1 shift 2 + ; inline
 
-: up ( n -- m ) 1- 2/ ; inline
+: up ( n -- m ) 1 - 2/ ; inline
 
 : data-nth ( n heap -- entry )
     data>> nth-unsafe ; inline
@@ -164,7 +164,7 @@ M: bad-heap-delete summary
 
 M: heap heap-delete ( entry heap -- )
     [ entry>index ] keep
-    2dup heap-size 1- = [
+    2dup heap-size 1 - = [
         nip data-pop*
     ] [
         [ nip data-pop ] 2keep
index 3dbda475de891b421c2a795709c018e5faca622e..6fa4217522590af3b737a37b80ebdb20848a8533 100644 (file)
@@ -1,4 +1,4 @@
-IN: help.apropos.tests
 USING: help.apropos tools.test ;
+IN: help.apropos.tests
 
 [ ] [ "swp" apropos ] unit-test
index 95d4612cbed90b31ca9a781605973ed7c8c31afd..4022d3bd382a2ac8ccb5fcea0d24cf8f4d50e170 100644 (file)
@@ -1,7 +1,7 @@
-IN: help.crossref.tests
 USING: help.crossref help.topics help.markup tools.test words
 definitions assocs sequences kernel namespaces parser arrays
 io.streams.string continuations debugger compiler.units eval ;
+IN: help.crossref.tests
 
 [ ] [
     "IN: help.crossref.tests USING: help.syntax help.markup ; : foo ( -- ) ; HELP: foo \"foo is great\" ; ARTICLE: \"foo\" \"Foo\" { $subsection foo } ;" eval( -- )
index 240ce672400d3a0bd451546d88d576674638625f..709d56c5d61712dfe97476118a81e259fcc1fcb4 100644 (file)
@@ -1,5 +1,5 @@
-IN: help.handbook.tests
 USING: help tools.test ;
+IN: help.handbook.tests
 
 [ ] [ "article-index" print-topic ] unit-test
 [ ] [ "primitive-index" print-topic ] unit-test
index e09127835977c3e1ad57387c26f2ffa5582b092b..d8c5a32f3dbd17dfd7ba76a97f2ab4f209aaf270 100644 (file)
@@ -1,6 +1,6 @@
-IN: help.tests
 USING: tools.test help kernel ;
+IN: help.tests
 
 [ 3 throw ] must-fail
 [ ] [ :help ] unit-test
-[ ] [ f print-topic ] unit-test
\ No newline at end of file
+[ ] [ f print-topic ] unit-test
index 3ba336be0bff6604596047d2f27dd96c74e04109..90ff6c110faefadb101325f9f3dc773942534d3a 100644 (file)
@@ -1,6 +1,6 @@
-IN: help.html.tests
 USING: help.html tools.test help.topics kernel ;
+IN: help.html.tests
 
 [ ] [ "xml" >link help>html drop ] unit-test
 
-[ "article-foobar.html" ] [ "foobar" >link topic>filename ] unit-test
\ No newline at end of file
+[ "article-foobar.html" ] [ "foobar" >link topic>filename ] unit-test
index f03e0b33370ae571e62f42fac670a9ae396e516e..5637dd92f450d549426c25107c78a28d0c041355 100644 (file)
@@ -1,5 +1,5 @@
-IN: help.vocabs.tests
 USING: help.vocabs tools.test help.markup help vocabs ;
+IN: help.vocabs.tests
 
 [ ] [ { $vocab "scratchpad" } print-content ] unit-test
-[ ] [ "classes" vocab print-topic ] unit-test
\ No newline at end of file
+[ ] [ "classes" vocab print-topic ] unit-test
index c901e35e3e8262cdefeaa359f77425cdd76627d2..d1d43c762cc7d27ef34c6ef0478185db0d55c156 100644 (file)
@@ -1,9 +1,9 @@
-IN: html.components.tests
 USING: tools.test kernel io.streams.string
 io.streams.null accessors inspector html.streams
 html.components html.forms namespaces
 xml.writer ;
 FROM: html.components => inspector ;
+IN: html.components.tests
 
 [ ] [ begin-form ] unit-test
 
index 006a435cf0e8b54243a5ca7d503a5ecb36aa7084..b1596e9aa677c4dccdfdd4e595ac4d34a060a7b5 100644 (file)
@@ -1,7 +1,7 @@
-IN: html.forms.tests
 USING: kernel sequences tools.test assocs html.forms validators accessors
 namespaces ;
 FROM: html.forms => values ;
+IN: html.forms.tests
 
 : with-validation ( quot -- messages )
     [
index cc8b4f0a1595cc36566fae4b4dc08b5f2e1a5cd0..5cf318bcafd0c7b003b9377e78d42124e28e8bd9 100644 (file)
@@ -44,7 +44,7 @@ M: form clone
     [ value ] dip '[
         [
             form [ clone ] change
-            1+ "index" set-value
+            1 + "index" set-value
             "value" set-value
             @
         ] with-scope
@@ -54,7 +54,7 @@ M: form clone
     [ value ] dip '[
         [
             begin-form
-            1+ "index" set-value
+            1 + "index" set-value
             from-object
             @
         ] with-scope
index ceb2e72478d964cf5f3444f0fb6e33ff44489889..a98a21f177c2ca6ebdbaa4daf3e89a201220bec3 100644 (file)
@@ -17,7 +17,7 @@ TUPLE: template-lexer < lexer ;
 M: template-lexer skip-word
     [
         {
-            { [ 2dup nth CHAR: " = ] [ drop 1+ ] }
+            { [ 2dup nth CHAR: " = ] [ drop 1 + ] }
             { [ 2dup swap tail-slice "%>" head? ] [ drop 2 + ] }
             [ f skip ]
         } cond
index c391b417a932eaab87c5f3d6bf94009928eb4cda..7a7fcffc741d5a838971d0a9a4e4018a8cbf0209 100644 (file)
@@ -1,5 +1,6 @@
 USING: http.client http.client.private http tools.test
 namespaces urls ;
+IN: http.client.tests
 
 [ "localhost" f ] [ "localhost" parse-host ] unit-test
 [ "localhost" 8888 ] [ "localhost:8888" parse-host ] unit-test
diff --git a/basis/http/client/post-data/post-data-tests.factor b/basis/http/client/post-data/post-data-tests.factor
deleted file mode 100644 (file)
index 2704ce1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-! Copyright (C) 2009 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test http.client.post-data ;
-IN: http.client.post-data.tests
index f87ed47f00811a6c647a1ddf2934bee03ee9b4b5..f8c3b836a6e7d0eb4f7590ab81c22eddc49d1253 100644 (file)
@@ -1,5 +1,5 @@
-IN: http.parsers.tests
 USING: http http.parsers tools.test ;
+IN: http.parsers.tests
 
 [ { } ] [ "" parse-cookie ] unit-test
 [ { } ] [ "" parse-set-cookie ] unit-test
@@ -13,4 +13,4 @@ unit-test
 
 [ { T{ cookie { name "__s" } { value "12345567" } } } ]
 [ "__s=12345567;" parse-cookie ]
-unit-test
\ No newline at end of file
+unit-test
index 72ff111db93ae2185987cee4270d1796cec90d78..d502de75b0e6d9779c9fee15d24af513cf0db190 100644 (file)
@@ -1,6 +1,6 @@
-IN: http.server.redirection.tests
 USING: http http.server.redirection urls accessors
 namespaces tools.test present kernel ;
+IN: http.server.redirection.tests
 
 [
     <request>
index d54be036984af493cb4b6db4239cca7c5abf16ae..185b0eb36194c016d12646e51b064212f432ad8a 100644 (file)
@@ -1,4 +1,4 @@
-IN: http.server.static.tests
 USING: http.server.static tools.test xml.writer ;
+IN: http.server.static.tests
 
-[ ] [ "resource:basis" directory>html write-xml ] unit-test
\ No newline at end of file
+[ ] [ "resource:basis" directory>html write-xml ] unit-test
index ca3ea8d2b456ca28988641537f1a29309938cd60..ec7a70b656eac61db3567a8e1d06a65126780b64 100644 (file)
@@ -229,8 +229,8 @@ MEMO: dct-matrix-blas ( -- m ) dct-matrix >float-blas-matrix ;
     ] with each^2 ;
 
 : sign-extend ( bits v -- v' )
-    swap [ ] [ 1- 2^ < ] 2bi
-    [ -1 swap shift 1+ + ] [ drop ] if ;
+    swap [ ] [ 1 - 2^ < ] 2bi
+    [ -1 swap shift 1 + + ] [ drop ] if ;
 
 : read1-jpeg-dc ( decoder -- dc )
     [ read1-huff dup ] [ bs>> bs:read ] bi sign-extend ;
@@ -245,7 +245,7 @@ MEMO: dct-matrix-blas ( -- m ) dct-matrix >float-blas-matrix ;
     0 :> k!
     [
         color ac-huff-table>> read1-jpeg-ac
-        [ first 1+ k + k! ] [ second k coefs set-nth ] [ ] tri
+        [ first 1 + k + k! ] [ second k coefs set-nth ] [ ] tri
         { 0 0 } = not
         k 63 < and
     ] loop
index b94266282cf057ee19d048bb79d14bf8adfe6bfd..e9130a3c40c6b82828c11fe52c6da85b82afe8d6 100644 (file)
@@ -58,7 +58,7 @@ PRIVATE>
     [\r
         alist sort-keys unclip swap [ [ first dup ] [ second ] bi ] dip\r
         [| oldkey oldval key val | ! Underneath is start\r
-            oldkey 1+ key =\r
+            oldkey 1 + key =\r
             oldval val = and\r
             [ oldkey 2array oldval 2array , key ] unless\r
             key val\r
index 51ab6f27d9782e6b2eb04d28e285f25ff057fbfa..571957cf4c9d23465b243229526793cfd4d20ee0 100644 (file)
@@ -21,7 +21,7 @@ C: <foo> foo
 
 : something ( array -- num )
     {
-        { [ dup 1+ 2array ] [ 3 * ] }
+        { [ dup 1 + 2array ] [ 3 * ] }
         { [ 3array ] [ + + ] }
     } switch ;
 
@@ -92,5 +92,5 @@ TUPLE: funny-tuple ;
 
 [ ] [ [ <funny-tuple> ] [undo] drop ] unit-test
 
-[ 0 ] [ { 1 2 } [ [ 1+ 2 ] { } output>sequence ] undo ] unit-test
-[ { 0 1 } ] [ 1 2 [ [ [ 1+ ] bi@ ] input<sequence ] undo ] unit-test
+[ 0 ] [ { 1 2 } [ [ 1 + 2 ] { } output>sequence ] undo ] unit-test
+[ { 0 1 } ] [ 1 2 [ [ [ 1 + ] bi@ ] input<sequence ] undo ] unit-test
index 7d0acb4140a3f8d0ceeaba0542febb14d22d3028..8022ed34e223f899cb302486d63efa795b3e2368 100644 (file)
@@ -40,7 +40,7 @@ TUPLE: select-mx < mx read-fdset write-fdset ;
     dup assoc-empty? [ drop 0 ] [ keys supremum ] if ;
 
 : num-fds ( mx -- n )
-    [ reads>> max-fd ] [ writes>> max-fd ] bi max 1+ ;
+    [ reads>> max-fd ] [ writes>> max-fd ] bi max 1 + ;
 
 : init-fdsets ( mx -- nfds read write except )
     [ num-fds ]
index 7237651b8003345be1f0049a554ab06a00f39bdd..a66b2aad7a00b50f288539863309356e0ac6d798 100755 (executable)
@@ -1,4 +1,4 @@
-IN: io.backend.windows.privileges.tests\r
 USING: io.backend.windows.privileges tools.test ;\r
+IN: io.backend.windows.privileges.tests\r
 \r
 [ [ ] with-privileges ] must-infer\r
index 1654cb8b833a17d39a9c206c0df59ba9f35fccb0..16132ca810d814299bcc184c12637776130d56cf 100644 (file)
@@ -5,7 +5,7 @@ IN: io.encodings.ascii
 
 <PRIVATE
 : encode-if< ( char stream encoding max -- )
-    nip 1- pick < [ encode-error ] [ stream-write1 ] if ; inline
+    nip 1 - pick < [ encode-error ] [ stream-write1 ] if ; inline
 
 : decode-if< ( stream encoding max -- character )
     nip swap stream-read1 dup
@@ -19,4 +19,4 @@ M: ascii encode-char
     128 encode-if< ;
 
 M: ascii decode-char
-    128 decode-if< ;
\ No newline at end of file
+    128 decode-if< ;
index 88e1547b7b2bbc2c5ab0ad89a6994a4cecd5108e..38165e4267819d36c9e61c546afa7dc2aa0a1601 100755 (executable)
@@ -109,11 +109,11 @@ M: windows link-info ( path -- info )
     file-info ;
 
 : volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
-    MAX_PATH 1+ [ <byte-array> ] keep
+    MAX_PATH 1 + [ <byte-array> ] keep
     "DWORD" <c-object>
     "DWORD" <c-object>
     "DWORD" <c-object>
-    MAX_PATH 1+ [ <byte-array> ] keep
+    MAX_PATH 1 + [ <byte-array> ] keep
     [ GetVolumeInformation win32-error=0/f ] 7 nkeep
     drop 5 nrot drop
     [ utf16n alien>string ] 4 ndip
@@ -165,13 +165,13 @@ M: winnt file-system-info ( path -- file-system-info )
     ] if ;
 
 : find-first-volume ( -- string handle )
-    MAX_PATH 1+ [ <byte-array> ] keep
+    MAX_PATH 1 + [ <byte-array> ] keep
     dupd
     FindFirstVolume dup win32-error=0/f
     [ utf16n alien>string ] dip ;
 
 : find-next-volume ( handle -- string/f )
-    MAX_PATH 1+ [ <byte-array> tuck ] keep
+    MAX_PATH 1 + [ <byte-array> tuck ] keep
     FindNextVolume 0 = [
         GetLastError ERROR_NO_MORE_FILES =
         [ drop f ] [ win32-error-string throw ] if
index 7aec916c72086977809a0e4f6a8a6e97acdd62bf..38bcc86cc6b00fbb8a9cae6a46ddf075d9ea13e2 100644 (file)
@@ -28,7 +28,7 @@ ERROR: too-many-symlinks path n ;
 : (follow-links) ( n path -- path' )
     over 0 = [ symlink-depth get too-many-symlinks ] when
     dup link-info type>> +symbolic-link+ =
-    [ [ 1- ] [ follow-link ] bi* (follow-links) ]
+    [ [ 1 - ] [ follow-link ] bi* (follow-links) ]
     [ nip ] if ; inline recursive
 
 PRIVATE>
index dd5eb5c8d912872e97baaa47d0744147fe767133..ef7d778abe7ae439b2ce4c35e6a81bc66b92b15c 100644 (file)
@@ -4,7 +4,7 @@ io.pathnames namespaces ;
 IN: io.files.links.unix.tests
 
 : make-test-links ( n path -- )
-    [ '[ [ 1+ ] keep [ number>string _ prepend ] bi@ make-link ] each ]
+    [ '[ [ 1 + ] keep [ number>string _ prepend ] bi@ make-link ] each ]
     [ [ number>string ] dip prepend touch-file ] 2bi ; inline
 
 [ t ] [
index 7de6c25a135fb3b8de86994167ceb0817f59910c..d17cd1ff805965297df3a60c50185c9cc693ad3a 100755 (executable)
@@ -47,7 +47,7 @@ TUPLE: CreateProcess-args
 
 : count-trailing-backslashes ( str n -- str n )
     [ "\\" ?tail ] dip swap [
-        1+ count-trailing-backslashes
+        1 + count-trailing-backslashes
     ] when ;
 
 : fix-trailing-backslashes ( str -- str' )
index db8e02ae73881f739156f3ed6e9f612096dbc02a..7329e73a8007bfb9c14b1e4ac7f43134dae82909 100644 (file)
@@ -14,13 +14,13 @@ SYMBOL: dummy-monitor-disposed
 TUPLE: dummy-monitor < monitor ;
 
 M: dummy-monitor dispose
-    drop dummy-monitor-disposed get [ 1+ ] change-i drop ;
+    drop dummy-monitor-disposed get [ 1 + ] change-i drop ;
 
 M: mock-io-backend (monitor)
     nip
     over exists? [
         dummy-monitor new-monitor
-        dummy-monitor-created get [ 1+ ] change-i drop
+        dummy-monitor-created get [ 1 + ] change-i drop
     ] [
         "Does not exist" throw
     ] if ;
index c15663b0319c714e5ebaa09552b37d1f1a3a2f8c..8d747086a7b1a32f7367e0388f14c4ec4b856980 100644 (file)
@@ -47,7 +47,7 @@ M: callable run-pipeline-element
 PRIVATE>
 
 : run-pipeline ( seq -- results )
-    [ length dup zero? [ drop { } ] [ 1- <pipes> ] if ] keep
+    [ length dup zero? [ drop { } ] [ 1 - <pipes> ] if ] keep
     [
         [ [ first in>> ] [ second out>> ] bi ] dip
         run-pipeline-element
index e72b267c04849acfb2d0f2a90e6e6281dc7b54f4..07246354e3e98871ecb01acd14ecd76cc52240a9 100644 (file)
@@ -36,7 +36,7 @@ TUPLE: openssl-context < secure-context aliens sessions ;
         password [ B{ 0 } password! ] unless
 
         [let | len [ password strlen ] |
-            buf password len 1+ size min memcpy
+            buf password len 1 + size min memcpy
             len
         ]
     ] alien-callback ;
index ab4fbd60bb9fdbdf2c7b2daa5ab7768f18b3a950..aabd4bbafcd6e84d55d4dbb7e008e197b30ecf0d 100644 (file)
@@ -5,18 +5,18 @@ IN: lcs
 \r
 <PRIVATE\r
 : levenshtein-step ( insert delete change same? -- next )\r
-    0 1 ? + [ [ 1+ ] bi@ ] dip min min ;\r
+    0 1 ? + [ [ 1 + ] bi@ ] dip min min ;\r
 \r
 : lcs-step ( insert delete change same? -- next )\r
     1 -1/0. ? + max max ; ! -1/0. is -inf (float)\r
 \r
 :: loop-step ( i j matrix old new step -- )\r
-    i j 1+ matrix nth nth ! insertion\r
-    i 1+ j matrix nth nth ! deletion\r
+    i j 1 + matrix nth nth ! insertion\r
+    i 1 + j matrix nth nth ! deletion\r
     i j matrix nth nth ! replace/retain\r
     i old nth j new nth = ! same?\r
     step call\r
-    i 1+ j 1+ matrix nth set-nth ; inline\r
+    i 1 + j 1 + matrix nth set-nth ; inline\r
 \r
 : lcs-initialize ( |str1| |str2| -- matrix )\r
     [ drop 0 <array> ] with map ;\r
@@ -25,7 +25,7 @@ IN: lcs
     [ [ + ] curry map ] with map ;\r
 \r
 :: run-lcs ( old new init step -- matrix )\r
-    [let | matrix [ old length 1+ new length 1+ init call ] |\r
+    [let | matrix [ old length 1 + new length 1 + init call ] |\r
         old length [| i |\r
             new length\r
             [| j | i j matrix old new step loop-step ] each\r
@@ -44,14 +44,14 @@ TUPLE: insert item ;
 TUPLE: trace-state old new table i j ;\r
 \r
 : old-nth ( state -- elt )\r
-    [ i>> 1- ] [ old>> ] bi nth ;\r
+    [ i>> 1 - ] [ old>> ] bi nth ;\r
 \r
 : new-nth ( state -- elt )\r
-    [ j>> 1- ] [ new>> ] bi nth ;\r
+    [ j>> 1 - ] [ new>> ] bi nth ;\r
 \r
 : top-beats-side? ( state -- ? )\r
-    [ [ i>> ] [ j>> 1- ] [ table>> ] tri nth nth ]\r
-    [ [ i>> 1- ] [ j>> ] [ table>> ] tri nth nth ] bi > ;\r
+    [ [ i>> ] [ j>> 1 - ] [ table>> ] tri nth nth ]\r
+    [ [ i>> 1 - ] [ j>> ] [ table>> ] tri nth nth ] bi > ;\r
 \r
 : retained? ( state -- ? )\r
     {\r
@@ -61,7 +61,7 @@ TUPLE: trace-state old new table i j ;
 \r
 : do-retain ( state -- state )\r
     dup old-nth retain boa ,\r
-    [ 1- ] change-i [ 1- ] change-j ;\r
+    [ 1 - ] change-i [ 1 - ] change-j ;\r
 \r
 : inserted? ( state -- ? )\r
     {\r
@@ -70,7 +70,7 @@ TUPLE: trace-state old new table i j ;
     } 1&& ;\r
 \r
 : do-insert ( state -- state )\r
-    dup new-nth insert boa , [ 1- ] change-j ;\r
+    dup new-nth insert boa , [ 1 - ] change-j ;\r
 \r
 : deleted? ( state -- ? )\r
     {\r
@@ -79,7 +79,7 @@ TUPLE: trace-state old new table i j ;
     } 1&& ;\r
 \r
 : do-delete ( state -- state )\r
-    dup old-nth delete boa , [ 1- ] change-i ;\r
+    dup old-nth delete boa , [ 1 - ] change-i ;\r
 \r
 : (trace-diff) ( state -- )\r
     {\r
@@ -90,7 +90,7 @@ TUPLE: trace-state old new table i j ;
     } cond ;\r
 \r
 : trace-diff ( old new table -- diff )\r
-    [ ] [ first length 1- ] [ length 1- ] tri trace-state boa\r
+    [ ] [ first length 1 - ] [ length 1 - ] tri trace-state boa\r
     [ (trace-diff) ] { } make reverse ;\r
 PRIVATE>\r
 \r
index 5030e93abc955492392a6f5b6e813ec4b2153257..603b04e895e0d6df74e15cb5180b86f3cc58dde8 100644 (file)
@@ -50,8 +50,8 @@ IN: linked-assocs.test
 
 { 9 } [
     <linked-hash>
-    { [ 3 * ] [ 1- ] }          "first"   pick set-at
-    { [ [ 1- ] bi@ ] [ 2 / ] }  "second"  pick set-at
+    { [ 3 * ] [ 1 - ] }          "first"   pick set-at
+    { [ [ 1 - ] bi@ ] [ 2 / ] }  "second"  pick set-at
     4 6 pick values [ first call ] each
     + swap values <reversed> [ second call ] each
 ] unit-test
@@ -62,4 +62,4 @@ IN: linked-assocs.test
     2 "by" pick set-at
     3 "cx" pick set-at
     >alist
-] unit-test
\ No newline at end of file
+] unit-test
index bde26e2fb9cff2fa06cf4b09f5a371bdb2b0d46d..7b386e9c819ea1acfc93988b97227fcfb8666355 100644 (file)
@@ -97,7 +97,7 @@ M: lazy-take car ( lazy-take -- car )
     cons>> car ;
 
 M: lazy-take cdr ( lazy-take -- cdr )
-    [ n>> 1- ] keep
+    [ n>> 1 - ] keep
     cons>> cdr ltake ;
 
 M: lazy-take nil? ( lazy-take -- ? )
@@ -191,7 +191,7 @@ TUPLE: lazy-from-by n quot ;
 C: lfrom-by lazy-from-by
 
 : lfrom ( n -- list )
-    [ 1+ ] lfrom-by ;
+    [ 1 + ] lfrom-by ;
 
 M: lazy-from-by car ( lazy-from-by -- car )
     n>> ;
@@ -235,7 +235,7 @@ M: sequence-cons car ( sequence-cons -- car )
     [ index>> ] [ seq>> nth ] bi ;
 
 M: sequence-cons cdr ( sequence-cons -- cdr )
-    [ index>> 1+ ] [ seq>> sequence-tail>list ] bi ;
+    [ index>> 1 + ] [ seq>> sequence-tail>list ] bi ;
 
 M: sequence-cons nil? ( sequence-cons -- ? )
     drop f ;
index e34a719c57835a25ebfd610bcd719cd59c53fe2c..d2f969cddc62236632ef8a848959d65f25b38517 100644 (file)
@@ -24,7 +24,7 @@ IN: lists.tests
 ] unit-test
     
 { T{ cons f 2 T{ cons f 3 T{ cons f 4 T{ cons f 5 +nil+ } } } } } [
-    { 1 2 3 4 } sequence>list [ 1+ ] lmap
+    { 1 2 3 4 } sequence>list [ 1 + ] lmap
 ] unit-test
     
 { 15 } [
index 0eedb808891605748f2857c2d0c1d4bb9d4dcad0..ddf1ab91098e2e7abab454a4424775fbc4af404b 100644 (file)
@@ -71,7 +71,7 @@ PRIVATE>
     ] if ; inline recursive
 
 : llength ( list -- n )
-    0 [ drop 1+ ] foldl ;
+    0 [ drop 1 + ] foldl ;
 
 : lreverse ( list -- newlist )    
     nil [ swap cons ] foldl ;
index 9ec8e30133f5df95d918eaabc0a965e2d59f2943..1caa4b746fa59947e0822cac7c88b0ee020a4bf9 100644 (file)
@@ -38,7 +38,7 @@ USING: kernel literals math prettyprint ;
 IN: scratchpad
 
 << CONSTANT: five 5 >>
-{ $[ five dup 1+ dup 2 + ] } .
+{ $[ five dup 1 + dup 2 + ] } .
     "> "{ 5 6 8 }" }
 
 } ;
@@ -69,7 +69,7 @@ USE: literals
 IN: scratchpad
 
 CONSTANT: five 5
-{ $ five $[ five dup 1+ dup 2 + ] } .
+{ $ five $[ five dup 1 + dup 2 + ] } .
     "> "{ 5 5 6 8 }" }
 { $subsection POSTPONE: $ }
 { $subsection POSTPONE: $[ }
index b1f0b6ca1732b3d59b6092d32b665c1d04d08ea2..0f94e0591a675fcf4448fbd6d1e762fc2d8ed7e2 100644 (file)
@@ -175,8 +175,8 @@ $nl
 { $code
     ":: counter ( -- )"
     "    [let | value! [ 0 ] |"
-    "        [ value 1+ dup value! ]"
-    "        [ value 1- dup value! ] ] ;"
+    "        [ value 1 + dup value! ]"
+    "        [ value 1 - dup value! ] ] ;"
 }
 "Mutable bindings are implemented in a manner similar to the ML language; each mutable binding is actually an immutable binding of a mutable cell (in Factor's case, a 1-element array); reading the binding automatically dereferences the array, and writing to the binding stores into the array."
 $nl
index 414b2da45c96cfb049bc3ce9ebb9ec8ff72bfb54..63b6d68feb3a4131eb5ed4415711ad754c67c48a 100644 (file)
@@ -199,23 +199,23 @@ DEFER: xyzzy
 [ 5 ] [ 10 xyzzy ] unit-test
 
 :: let*-test-1 ( a -- b )
-    [let* | b [ a 1+ ]
-            c [ b 1+ ] |
+    [let* | b [ a 1 + ]
+            c [ b 1 + ] |
         a b c 3array ] ;
 
 [ { 1 2 3 } ] [ 1 let*-test-1 ] unit-test
 
 :: let*-test-2 ( a -- b )
-    [let* | b [ a 1+ ]
-            c! [ b 1+ ] |
+    [let* | b [ a 1 + ]
+            c! [ b 1 + ] |
         a b c 3array ] ;
 
 [ { 1 2 3 } ] [ 1 let*-test-2 ] unit-test
 
 :: let*-test-3 ( a -- b )
-    [let* | b [ a 1+ ]
-            c! [ b 1+ ] |
-        c 1+ c!  a b c 3array ] ;
+    [let* | b [ a 1 + ]
+            c! [ b 1 + ] |
+        c 1 + c!  a b c 3array ] ;
 
 [ { 1 2 4 } ] [ 1 let*-test-3 ] unit-test
 
@@ -502,7 +502,7 @@ M:: integer lambda-method-forget-test ( a -- b ) a ;
 
 [ 3 ] [ 3 [| | :> a! a ] call ] unit-test
 
-[ 3 ] [ 2 [| | :> a! a 1+ a! a ] call ] unit-test
+[ 3 ] [ 2 [| | :> a! a 1 + a! a ] call ] unit-test
 
 :: wlet-&&-test ( a -- ? )
     [wlet | is-integer? [ a integer? ]
index 8374ab421bd214dfcd4ea71c0ee3b8815a923bd4..848ad5d40e8d160b8001d780c4ff3e7b189b5e74 100644 (file)
@@ -74,7 +74,7 @@ CONSTANT: keep-logs 10
     over exists? [ move-file ] [ 2drop ] if ;\r
 \r
 : advance-log ( path n -- )\r
-    [ 1- log# ] 2keep log# ?move-file ;\r
+    [ 1 - log# ] 2keep log# ?move-file ;\r
 \r
 : rotate-log ( service -- )\r
     dup close-log\r
index 27a9a23ca30baae4799547cbf038e0d53a537ddd..e469140ff423a0ea710eced35f54da536f74e684 100644 (file)
@@ -16,4 +16,4 @@ M: bits nth-unsafe number>> swap bit? ;
 INSTANCE: bits immutable-sequence
 
 : unbits ( seq -- number )
-    <reversed> 0 [ [ 1 shift ] dip [ 1+ ] when ] reduce ;
+    <reversed> 0 [ [ 1 shift ] dip [ 1 + ] when ] reduce ;
index 041539c9815c2aaa82611688731e7f0df1ae3239..0e0b7ae1677f007e24a1680502aed5fada88b3d1 100644 (file)
@@ -28,7 +28,7 @@ HELP: nCk
 HELP: permutation
 { $values { "n" "a non-negative integer" } { "seq" sequence } { "seq" sequence } }
 { $description "Outputs the " { $snippet "nth" } " lexicographical permutation of " { $snippet "seq" } "." }
-{ $notes "Permutations are 0-based and a bounds error will be thrown if " { $snippet "n" } " is larger than " { $snippet "seq length factorial 1-" } "." }
+{ $notes "Permutations are 0-based and a bounds error will be thrown if " { $snippet "n" } " is larger than " { $snippet "seq length factorial 1 -" } "." }
 { $examples
     { $example "USING: math.combinatorics prettyprint ;"
         "1 3 permutation ." "{ 0 2 1 }" }
index 0368dd5286195caa96654af970d00a8ee14f78b3..8411447aac3a183e1ba7b99558b3770c32146a03 100755 (executable)
@@ -50,7 +50,7 @@ SYMBOL: matrix
 : do-row ( exchange-with row# -- )
     [ exchange-rows ] keep
     [ first-col ] keep
-    dup 1+ rows-from clear-col ;
+    dup 1 + rows-from clear-col ;
 
 : find-row ( row# quot -- i elt )
     [ rows-from ] dip find ; inline
@@ -60,8 +60,8 @@ SYMBOL: matrix
 
 : (echelon) ( col# row# -- )
     over cols < over rows < and [
-        2dup pivot-row [ over do-row 1+ ] when*
-        [ 1+ ] dip (echelon)
+        2dup pivot-row [ over do-row 1 + ] when*
+        [ 1 + ] dip (echelon)
     ] [
         2drop
     ] if ;
index 439d55ee8d405a2e947eff19c3067d8fd151aa66..da1c36196bef0b2649c45961340ce77634c331c5 100644 (file)
@@ -8,7 +8,7 @@ IN: math.primes.factors
 
 : count-factor ( n d -- n' c )
     [ 1 ] 2dip [ /i ] keep
-    [ dupd /mod zero? ] curry [ nip [ 1+ ] dip ] while drop
+    [ dupd /mod zero? ] curry [ nip [ 1 + ] dip ] while drop
     swap ;
 
 : write-factor ( n d -- n' d' )
@@ -39,7 +39,7 @@ PRIVATE>
 : totient ( n -- t )
     {
         { [ dup 2 < ] [ drop 0 ] }
-        [ dup unique-factors [ 1 [ 1- * ] reduce ] [ product ] bi / * ]
+        [ dup unique-factors [ 1 [ 1 - * ] reduce ] [ product ] bi / * ]
     } cond ; foldable
 
 : divisors ( n -- seq )
index c01e7377b2fcc118109eda1af6df6affcf240f04..8124fcdd24610f39670c5af67cbe9d51ba753bb1 100644 (file)
@@ -78,8 +78,8 @@ unit-test
 [ 3 ] [ 10/3 truncate ] unit-test
 [ -3 ] [ -10/3 truncate ] unit-test
 
-[ -1/2 ] [ 1/2 1- ] unit-test
-[ 3/2 ] [ 1/2 1+ ] unit-test
+[ -1/2 ] [ 1/2 1 - ] unit-test
+[ 3/2 ] [ 1/2 1 + ] unit-test
 
 [ 1.0 ] [ 0.5 1/2 + ] unit-test
 [ 1.0 ] [ 1/2 0.5 + ] unit-test
index d82abe5b07aefbcd8b48e01ddea62b2c16b34ad7..771c11c1300f34105d88b81a596c024f8469a122 100644 (file)
@@ -9,7 +9,7 @@ MEMO: fib ( m -- n )
 
 [ 89 ] [ 10 fib ] unit-test
 
-[ "USING: kernel math memoize generalizations ; IN: memoize.tests MEMO: x ( a b c d e -- f g h i j ) [ 1+ ] 4 ndip ;" eval( -- ) ] must-fail
+[ "USING: kernel math memoize generalizations ; IN: memoize.tests MEMO: x ( a b c d e -- f g h i j ) [ 1 + ] 4 ndip ;" eval( -- ) ] must-fail
 
 MEMO: see-test ( a -- b ) reverse ;
 
index 0cf7556bcd01513f23472bd3f5082cca7bb969c8..1d56c59fc0ee28d74ecb897abccc0973b7e0abf1 100755 (executable)
@@ -46,7 +46,7 @@ ERROR: end-of-stream multipart ;
     dup bytes>> length 256 < [ fill-bytes ] when ;
 
 : split-bytes ( bytes separator -- leftover-bytes safe-to-dump )
-    dupd [ length ] bi@ 1- - short cut-slice swap ;
+    dupd [ length ] bi@ 1 - - short cut-slice swap ;
 
 : dump-until-separator ( multipart -- multipart )
     dup
index 6984e0e750a11658448cde4baedf07497f7f2fc4..d7900f1dbd5e32ab5b534b35ad9dfd8e73eda488 100644 (file)
@@ -4,7 +4,7 @@ IN: models.arrow.tests
 \r
 3 <model> "x" set\r
 "x" get [ 2 * ] <arrow> dup "z" set\r
-[ 1+ ] <arrow> "y" set\r
+[ 1 + ] <arrow> "y" set\r
 [ ] [ "y" get activate-model ] unit-test\r
 [ t ] [ "z" get "x" get connections>> memq? ] unit-test\r
 [ 7 ] [ "y" get value>> ] unit-test\r
index 19b478eaf9b696da29bbd6e4b0bb1cef2794c57a..27504bc0fa769d7e9b014aa6c9a424f286abbee2 100644 (file)
@@ -32,10 +32,10 @@ GENERIC: model-activated ( model -- )
 M: model model-activated drop ;
 
 : ref-model ( model -- n )
-    [ 1+ ] change-ref ref>> ;
+    [ 1 + ] change-ref ref>> ;
 
 : unref-model ( model -- n )
-    [ 1- ] change-ref ref>> ;
+    [ 1 - ] change-ref ref>> ;
 
 : activate-model ( model -- )
     dup ref-model 1 = [
index 84ac738126b973af1b9be33aba8b556d1a246af2..f52dc8a3b0a3c29f887936acf2cc9c4a121a694c 100644 (file)
@@ -24,7 +24,7 @@ IN: models.product.tests
 \r
 TUPLE: an-observer { i integer } ;\r
 \r
-M: an-observer model-changed nip [ 1+ ] change-i drop ;\r
+M: an-observer model-changed nip [ 1 + ] change-i drop ;\r
 \r
 [ 1 0 ] [\r
     [let* | m1 [ 1 <model> ]\r
@@ -42,4 +42,4 @@ M: an-observer model-changed nip [ 1+ ] change-i drop ;
         o1 i>>\r
         o2 i>>\r
     ]\r
-] unit-test
\ No newline at end of file
+] unit-test\r
index 2e8f8eb4c497d1fb9252ee15b1b554f2d6645a6f..c0d109e3c5a0e4286f0e018a1072f5c3f6b13913 100644 (file)
@@ -44,7 +44,7 @@ PRIVATE>
 : parse-multiline-string ( end-text -- str )
     [
         lexer get
-        [ 1+ swap (parse-multiline-string) ]
+        [ 1 + swap (parse-multiline-string) ]
         change-column drop
     ] "" make ;
 
index 9aa4ee429d869ab3882277ad943e3fb819e082fe..6292a683e3066d4e44d928cff397ceb2a27018c5 100644 (file)
@@ -25,7 +25,7 @@ reset-gl-function-number-counter
 
 : gl-function-number ( -- n )
     +gl-function-number-counter+ get-global
-    dup 1+ +gl-function-number-counter+ set-global ;
+    dup 1 + +gl-function-number-counter+ set-global ;
 
 : gl-function-pointer ( names n -- funptr )
     gl-function-context 2array dup +gl-function-pointers+ get-global at
index 93f407681e04f418c2ea02c979984cba7b482a28..850b585190646384904f7ec17f1785f7c593dc61 100644 (file)
@@ -51,7 +51,7 @@ PRIVATE>
   dup zero? [
     2drop epsilon
   ] [
-    [ exactly-n ] [ 1- at-most-n ] 2bi 2choice
+    [ exactly-n ] [ 1 - at-most-n ] 2bi 2choice
   ] if ;
 
 : at-least-n ( parser n -- parser' )
index 12e6d59fc01885484737f7ea572688b851df947d..42530151be51f01aa13303e5908f513c3ee5a4c9 100644 (file)
@@ -329,7 +329,7 @@ SYMBOL: id
 : next-id ( -- n )
   #! Return the next unique id for a parser
   id get-global [
-    dup 1+ id set-global
+    dup 1 + id set-global
   ] [
     1 id set-global 0
   ] if* ;
index a761e2d327707a67680c260094a8c7fc21221bc2..cb2abd801568773df3bcb066be453b4ef2d678dc 100644 (file)
@@ -4,5 +4,5 @@ USING: layouts kernel parser math ;
 IN: persistent.hashtables.config
 
 : radix-bits ( -- n ) << cell 4 = 4 5 ? parsed >> ; foldable
-: radix-mask ( -- n ) radix-bits 2^ 1- ; foldable
-: full-bitmap-mask ( -- n ) radix-bits 2^ 2^ 1- ; inline
+: radix-mask ( -- n ) radix-bits 2^ 1 - ; foldable
+: full-bitmap-mask ( -- n ) radix-bits 2^ 2^ 1 - ; inline
index 67886312c67379383fd7504e7e36178fc2ea5c7b..0179216e62a7acc1f0a474e613695316dac56150 100644 (file)
@@ -33,7 +33,7 @@ M: persistent-hash pluck-at
     {
         { [ 2dup root>> eq? ] [ nip ] }
         { [ over not ] [ 2drop T{ persistent-hash } ] }
-        [ count>> 1- persistent-hash boa ]
+        [ count>> 1 - persistent-hash boa ]
     } cond ;
 
 M: persistent-hash >alist [ root>> >alist% ] { } make ;
index f231043274839d171ee0bf6ed39bea0fc357a621..4c764eba9331d2bbdfeeb407e41758b054a51ccd 100644 (file)
@@ -7,7 +7,7 @@ persistent.hashtables.config
 persistent.hashtables.nodes ;
 IN: persistent.hashtables.nodes.bitmap
 
-: index ( bit bitmap -- n ) [ 1- ] dip bitand bit-count ; inline
+: index ( bit bitmap -- n ) [ 1 - ] dip bitand bit-count ; inline
 
 M:: bitmap-node (entry-at) ( key hashcode bitmap-node -- entry )
     [let* | shift [ bitmap-node shift>> ]
index 5927171aa3b3d13e54301d65bf104e8226f5bd39..2527959f325f0317cd6540a0c3ab2a625e45f2fe 100644 (file)
@@ -55,13 +55,13 @@ M: persistent-vector nth-unsafe
     [ 1array ] dip node boa ;
 
 : 2node ( first second -- node )
-    [ 2array ] [ drop level>> 1+ ] 2bi node boa ;
+    [ 2array ] [ drop level>> 1 + ] 2bi node boa ;
 
 : new-child ( new-child node -- node' expansion/f )
     dup full? [ tuck level>> 1node ] [ node-add f ] if ;
 
 : new-last ( val seq -- seq' )
-    [ length 1- ] keep new-nth ;
+    [ length 1 - ] keep new-nth ;
 
 : node-set-last ( child node -- node' )
     clone [ new-last ] change-children ;
@@ -86,7 +86,7 @@ M: persistent-vector ppush ( val pvec -- pvec' )
     clone
     dup tail>> full?
     [ ppush-new-tail ] [ ppush-tail ] if
-    [ 1+ ] change-count ;
+    [ 1 + ] change-count ;
 
 : node-set-nth ( val i node -- node' )
     clone [ new-nth ] change-children ;
@@ -166,7 +166,7 @@ M: persistent-vector ppop ( pvec -- pvec' )
                 clone
                 dup tail>> children>> length 1 >
                 [ ppop-tail ] [ ppop-new-tail ] if
-            ] dip 1- >>count
+            ] dip 1 - >>count
         ]
     } case ;
 
index 4765df10d74f9501407abacfcf89145353c8b38b..2e1a47b9512d50b75f68667c123483d1a3e84407 100644 (file)
@@ -7,7 +7,7 @@ IN: porter-stemmer
     ] [
         CHAR: y = [
             over zero?
-            [ 2drop t ] [ [ 1- ] dip consonant? not ] if
+            [ 2drop t ] [ [ 1 - ] dip consonant? not ] if
         ] [
             2drop t
         ] if
@@ -15,18 +15,18 @@ IN: porter-stemmer
 
 : skip-vowels ( i str -- i str )
     2dup bounds-check? [
-        2dup consonant? [ [ 1+ ] dip skip-vowels ] unless
+        2dup consonant? [ [ 1 + ] dip skip-vowels ] unless
     ] when ;
 
 : skip-consonants ( i str -- i str )
     2dup bounds-check? [
-        2dup consonant? [ [ 1+ ] dip skip-consonants ] when
+        2dup consonant? [ [ 1 + ] dip skip-consonants ] when
     ] when ;
 
 : (consonant-seq) ( n i str -- n )
     skip-vowels
     2dup bounds-check? [
-        [ 1+ ] [ 1+ ] [ ] tri* skip-consonants [ 1+ ] dip
+        [ 1 + ] [ 1 + ] [ ] tri* skip-consonants [ 1 + ] dip
         (consonant-seq)
     ] [
         2drop
@@ -42,7 +42,7 @@ IN: porter-stemmer
     over 1 < [
         2drop f
     ] [
-        2dup nth [ over 1- over nth ] dip = [
+        2dup nth [ over 1 - over nth ] dip = [
             consonant?
         ] [
             2drop f
@@ -92,7 +92,7 @@ IN: porter-stemmer
         { [ "bl" ?tail ] [ "ble" append ] }
         { [ "iz" ?tail ] [ "ize" append ] }
         {
-            [ dup length 1- over double-consonant? ]
+            [ dup length 1 - over double-consonant? ]
             [ dup "lsz" last-is? [ but-last-slice ] unless ]
         }
         {
@@ -206,7 +206,7 @@ IN: porter-stemmer
 : ll->l ( str -- newstr )
     {
         { [ dup last CHAR: l = not ] [ ] }
-        { [ dup length 1- over double-consonant? not ] [ ] }
+        { [ dup length 1 - over double-consonant? not ] [ ] }
         { [ dup consonant-seq 1 > ] [ but-last-slice ] }
         [ ]
     } cond ;
index 99913a803abaaa5788df469c15b6c38743759458..718de7e84c38174525ce4f0e5cf8bebf1607d798 100644 (file)
@@ -73,7 +73,7 @@ SYMBOL: ->
 
 : remove-breakpoints ( quot pos -- quot' )
     over quotation? [
-        1+ cut [ (remove-breakpoints) ] bi@
+        1 + cut [ (remove-breakpoints) ] bi@
         [ -> ] glue 
     ] [
         drop
@@ -109,4 +109,4 @@ SYMBOL: pprint-string-cells?
                 ] each
             ] with-row
         ] each
-    ] tabular-output nl ;
\ No newline at end of file
+    ] tabular-output nl ;
index 0e0c7afb82ad0041c9a4e370f665dfeabed0f2e0..040b6d8f7c23723f365e04e8bc002d56bb364cb7 100644 (file)
@@ -44,7 +44,7 @@ TUPLE: pprinter last-newline line-count indent ;
         line-limit? [
             "..." write pprinter get return
         ] when
-        pprinter get [ 1+ ] change-line-count drop
+        pprinter get [ 1 + ] change-line-count drop
         nl do-indent
     ] if ;
 
@@ -209,7 +209,7 @@ M: block short-section ( block -- )
 TUPLE: text < section string ;
 
 : <text> ( string style -- text )
-    over length 1+ \ text new-section
+    over length 1 + \ text new-section
         swap >>style
         swap >>string ;
 
@@ -310,8 +310,8 @@ SYMBOL: next
 : group-flow ( seq -- newseq )
     [
         dup length [
-            2dup 1- swap ?nth prev set
-            2dup 1+ swap ?nth next set
+            2dup 1 - swap ?nth prev set
+            2dup 1 + swap ?nth next set
             swap nth dup split-before dup , split-after
         ] with each
     ] { } make { t } split harvest ;
index e82789ccbf3602893a7dcafcd26b2d825e669323..53af3a5178ab5655cb47e6342a7ef453a4d40465 100644 (file)
@@ -29,7 +29,7 @@ IN: quoted-printable
 
 : take-some ( seqs -- seqs seq )
     0 over [ length + dup 76 >= ] find drop nip
-    [ 1- cut-slice swap ] [ f swap ] if* concat ;
+    [ 1 - cut-slice swap ] [ f swap ] if* concat ;
 
 : divide-lines ( strings -- strings )
     [ dup ] [ take-some ] produce nip ;
index dadf93fd439f09593663e2459c89f8352a0ce483..e6661dc07886eab2d5ff393f23712bc98908e8b7 100644 (file)
@@ -8,4 +8,4 @@ M: random-dummy seed-random ( seed obj -- )
     (>>i) ;
 
 M: random-dummy random-32* ( obj -- r )
-    [ dup 1+ ] change-i drop ;
+    [ dup 1 + ] change-i drop ;
index a02abbb8ac8262d03dd51e933070f0d724955cc0..966c5b2e608e7801fbd9598f6064a519d10bfd23 100644 (file)
@@ -17,7 +17,7 @@ CONSTANT: a uint-array{ 0 HEX: 9908b0df }
 
 : y ( n seq -- y )
     [ nth-unsafe 31 mask-bit ]
-    [ [ 1+ ] [ nth-unsafe ] bi* 31 bits ] 2bi bitor ; inline
+    [ [ 1 + ] [ nth-unsafe ] bi* 31 bits ] 2bi bitor ; inline
 
 : mt[k] ( offset n seq -- )
     [
@@ -30,16 +30,16 @@ CONSTANT: a uint-array{ 0 HEX: 9908b0df }
     [
         seq>>
         [ [ n m - ] dip '[ [ m ] dip _ mt[k] ] each ]
-        [ [ m 1- ] dip '[ [ m n - ] [ n m - + ] bi* _ mt[k] ] each ]
+        [ [ m 1 - ] dip '[ [ m n - ] [ n m - + ] bi* _ mt[k] ] each ]
         bi
     ] [ 0 >>i drop ] bi ; inline
 
 : init-mt-formula ( i seq -- f(seq[i]) )
-    dupd nth dup -30 shift bitxor 1812433253 * + 1+ 32 bits ; inline
+    dupd nth dup -30 shift bitxor 1812433253 * + 1 + 32 bits ; inline
 
 : init-mt-rest ( seq -- )
-    n 1- swap '[
-        _ [ init-mt-formula ] [ [ 1+ ] dip set-nth ] 2bi
+    n 1 - swap '[
+        _ [ init-mt-formula ] [ [ 1 + ] dip set-nth ] 2bi
     ] each ; inline
 
 : init-mt-seq ( seed -- seq )
@@ -67,7 +67,7 @@ M: mersenne-twister seed-random ( mt seed -- )
 M: mersenne-twister random-32* ( mt -- r )
     [ next-index ]
     [ seq>> nth-unsafe mt-temper ]
-    [ [ 1+ ] change-i drop ] tri ;
+    [ [ 1 + ] change-i drop ] tri ;
 
 [
     [ 32 random-bits ] with-system-random
index 1962857d573181a1da1b5a2a3291d2825a8ae8cb..4c94e87928cebe5acaa9efe2e959207c1f42d45f 100755 (executable)
@@ -39,7 +39,7 @@ M: f random-32* ( obj -- * ) no-random-number-generator ;
 <PRIVATE
 
 : random-integer ( n -- n' )
-    dup log2 7 + 8 /i 1+
+    dup log2 7 + 8 /i 1 +
     [ random-bytes >byte-array byte-array>bignum ]
     [ 3 shift 2^ ] bi / * >integer ;
 
@@ -57,7 +57,7 @@ PRIVATE>
 
 : randomize ( seq -- seq )
     dup length [ dup 1 > ]
-    [ [ iota random ] [ 1- ] bi [ pick exchange ] keep ]
+    [ [ iota random ] [ 1 - ] bi [ pick exchange ] keep ]
     while drop ;
 
 : delete-random ( seq -- elt )
index 2916ef7c32be08352ba6ed3836443e663e37b8a3..90ab3342f2ea0eda65f26eae9184f126ebefb4d8 100644 (file)
@@ -56,7 +56,7 @@ M: at-least <times>
 : to-times ( term n -- ast )
     dup zero?
     [ 2drop epsilon ]
-    [ dupd 1- to-times 2array <concatenation> <maybe> ]
+    [ dupd 1 - to-times 2array <concatenation> <maybe> ]
     if ;
 
 M: from-to <times>
index 548273486589cfbcbcc22a96a020be4c4542fd1b..d8940bb829a3afc70848194901b8a795d36d8999 100644 (file)
@@ -35,13 +35,13 @@ M: $ question>quot
     drop [ { [ length = ] [ ?nth "\r\n" member? ] } 2|| ] ;
 
 M: ^ question>quot
-    drop [ { [ drop zero? ] [ [ 1- ] dip ?nth "\r\n" member? ] } 2|| ] ;
+    drop [ { [ drop zero? ] [ [ 1 - ] dip ?nth "\r\n" member? ] } 2|| ] ;
 
 M: $unix question>quot
     drop [ { [ length = ] [ ?nth CHAR: \n = ] } 2|| ] ;
 
 M: ^unix question>quot
-    drop [ { [ drop zero? ] [ [ 1- ] dip ?nth CHAR: \n = ] } 2|| ] ;
+    drop [ { [ drop zero? ] [ [ 1 - ] dip ?nth CHAR: \n = ] } 2|| ] ;
 
 M: word-break question>quot
     drop [ word-break-at? ] ;
index 21439640fe18f6934606946006062c301265ab14..4318986813d5eeaf3b9eca90b163112e823ac0cd 100644 (file)
@@ -25,7 +25,7 @@ M: lookahead question>quot ! Returns ( index string -- ? )
 M: lookbehind question>quot ! Returns ( index string -- ? )
     term>> <reversed-option>
     ast>dfa dfa>reverse-shortest-word
-    '[ [ 1- ] dip f _ execute ] ;
+    '[ [ 1 - ] dip f _ execute ] ;
 
 : check-string ( string -- string )
     ! Make this configurable
@@ -53,12 +53,12 @@ PRIVATE>
 :: (next-match) ( i string regexp quot: ( i string regexp -- j ) reverse? -- i start end ? )
     i string regexp quot call dup [| j |
         j i j
-        reverse? [ swap [ 1+ ] bi@ ] when
+        reverse? [ swap [ 1 + ] bi@ ] when
         string
     ] [ drop f f f f ] if ; inline
 
 : search-range ( i string reverse? -- seq )
-    [ drop dup 1+ -1 ] [ length 1 ] if range boa ; inline
+    [ drop dup 1 + -1 ] [ length 1 ] if range boa ; inline
 
 :: next-match ( i string regexp quot: ( i string regexp -- j ) reverse? -- i start end ? )
     f f f f
@@ -93,7 +93,7 @@ PRIVATE>
     [ subseq ] map-matches ;
 
 : count-matches ( string regexp -- n )
-    [ 0 ] 2dip [ 3drop 1+ ] each-match ;
+    [ 0 ] 2dip [ 3drop 1 + ] each-match ;
 
 <PRIVATE
 
@@ -192,7 +192,7 @@ PRIVATE>
     dup skip-blank [
         [ index-from ] 2keep
         [ swapd subseq ]
-        [ 2drop 1+ ] 3bi
+        [ 2drop 1 + ] 3bi
     ] change-lexer-column ;
 
 : parse-noblank-token ( lexer -- str/f )
@@ -220,4 +220,4 @@ USING: vocabs vocabs.loader ;
 
 "prettyprint" vocab [
     "regexp.prettyprint" require
-] when
\ No newline at end of file
+] when
index 93f9727f75db1edc772a8d2c5b3e66029198dce8..730689eb4ff46f8de5e253b6c7c06a5893b4a520 100644 (file)
@@ -18,8 +18,8 @@ PRIVATE>
 M: complex-sequence length
     seq>> length -1 shift ;
 M: complex-sequence nth-unsafe
-    complex@ [ nth-unsafe ] [ [ 1+ ] dip nth-unsafe ] 2bi rect> ;
+    complex@ [ nth-unsafe ] [ [ 1 + ] dip nth-unsafe ] 2bi rect> ;
 M: complex-sequence set-nth-unsafe
     complex@
     [ [ real-part      ] [    ] [ ] tri* set-nth-unsafe ]
-    [ [ imaginary-part ] [ 1+ ] [ ] tri* set-nth-unsafe ] 3bi ;
+    [ [ imaginary-part ] [ 1 + ] [ ] tri* set-nth-unsafe ] 3bi ;
index da154444c1fcfe41e1f7abd79c0d25c0f9100991..2b4294bda4ca9250643d255b26c24be28945bcc5 100644 (file)
@@ -51,7 +51,7 @@ M: id equal? over id? [ [ obj>> ] bi@ eq? ] [ 2drop f ] if ;
         dup HEX: 7e <= [
             HEX: 80 bitor write1
         ] [
-            dup log2 8 /i 1+ 
+            dup log2 8 /i 1 
             dup HEX: 7f >= [
                 HEX: ff write1
                 dup serialize-cell
index 8bc12e270441894929fa3300274244e8ca190181..78b1493920cca026cde6aa54b8e9085f3e5cb462 100644 (file)
@@ -4,9 +4,9 @@ IN: sorting.insertion
 <PRIVATE
 :: insert ( seq quot: ( elt -- elt' ) n -- )
     n zero? [
-        n n 1- [ seq nth quot call ] bi@ >= [
-            n n 1- seq exchange
-            seq quot n 1- insert
+        n n 1 - [ seq nth quot call ] bi@ >= [
+            n n 1 - seq exchange
+            seq quot n 1 - insert
         ] unless
     ] unless ; inline recursive
 PRIVATE>
index 3dec6130de5a3e83b747cbeeff0a078e10d52294..3641345a3ebd2bd9179e1224d9e8df1dbf69d146 100644 (file)
@@ -29,10 +29,10 @@ PRIVATE>
             [ length ] [ ] [ <circular> 1 over change-circular-start ] tri
             [ @ not [ , ] [ drop ] if ] 3each
         ] { } make
-        dup empty? [ over length 1- prefix ] when -1 prefix 2 clump
+        dup empty? [ over length 1 - prefix ] when -1 prefix 2 clump
         swap
     ] dip
-    '[ first2 [ 1+ ] bi@ _ _ boa ] map ; inline
+    '[ first2 [ 1 + ] bi@ _ _ boa ] map ; inline
 
 PRIVATE>
 
index 59aeb97d82c84fa1796e7f4fc7c466e166ece24f..0edbe5e53dc87a5e0a22f6223cd1bd6051bd962c 100644 (file)
@@ -153,7 +153,7 @@ M: bad-executable summary
 
 : infer-<tuple-boa> ( -- )
     \ <tuple-boa>
-    peek-d literal value>> second 1+ { tuple } <effect>
+    peek-d literal value>> second 1 + { tuple } <effect>
     apply-word/effect ;
 
 \ <tuple-boa> [ infer-<tuple-boa> ] "special" set-word-prop
index f4bd56348130f88a8b2a3c74ca7d13ef9892075d..931cb36ea949b8c394164e3e85d9bbdaa34b09bb 100755 (executable)
@@ -17,7 +17,7 @@ IN: suffix-arrays
 
 : from-to ( index begin suffix-array -- from/f to/f )
     swap '[ _ head? not ]
-    [ find-last-from drop dup [ 1+ ] when ]
+    [ find-last-from drop dup [ 1 + ] when ]
     [ find-from drop ] 3bi ;
 
 : <funky-slice> ( from/f to/f seq -- slice )
index 79aef90bead4b36f435a93d3fa973337b245315e..c21e9e0c60ea9b90244de909042d0c0b79054af4 100644 (file)
@@ -10,7 +10,7 @@ IN: tools.annotations.tests
 ! erg's bug
 GENERIC: some-generic ( a -- b )
 
-M: integer some-generic 1+ ;
+M: integer some-generic 1 + ;
 
 [ 4 ] [ 3 some-generic ] unit-test
 
@@ -18,7 +18,7 @@ M: integer some-generic 1+ ;
 
 [ 4 ] [ 3 some-generic ] unit-test
 
-[ ] [ "IN: tools.annotations.tests USE: math M: integer some-generic 1- ;" eval( -- ) ] unit-test
+[ ] [ "IN: tools.annotations.tests USE: math M: integer some-generic 1 - ;" eval( -- ) ] unit-test
 
 [ 2 ] [ 3 some-generic ] unit-test
 
@@ -59,4 +59,4 @@ M: object my-generic ;
 : some-code ( -- )
     f my-generic drop ;
 
-[ ] [ some-code ] unit-test
\ No newline at end of file
+[ ] [ some-code ] unit-test
index fb664c495c35f5e5553b0d465d58e79c5eca4d32..7b9c8b43bc167bdcbc8a099934e12035d384ebd7 100644 (file)
@@ -9,7 +9,7 @@ IN: tools.completion
 :: (fuzzy) ( accum i full ch -- accum i full ? )
     ch i full index-from [
         :> i i accum push
-        accum i 1+ full t
+        accum i 1 + full t
     ] [
         f -1 full f
     ] if* ;
@@ -23,7 +23,7 @@ IN: tools.completion
         [
             2dup number=
             [ drop ] [ nip V{ } clone pick push ] if
-            1+
+            1 +
         ] keep pick last push
     ] each ;
 
@@ -33,9 +33,9 @@ IN: tools.completion
 : score-1 ( i full -- n )
     {
         { [ over zero? ] [ 2drop 10 ] }
-        { [ 2dup length 1- number= ] [ 2drop 4 ] }
-        { [ 2dup [ 1- ] dip nth Letter? not ] [ 2drop 10 ] }
-        { [ 2dup [ 1+ ] dip nth Letter? not ] [ 2drop 4 ] }
+        { [ 2dup length 1 - number= ] [ 2drop 4 ] }
+        { [ 2dup [ 1 - ] dip nth Letter? not ] [ 2drop 10 ] }
+        { [ 2dup [ 1 + ] dip nth Letter? not ] [ 2drop 4 ] }
         [ 2drop 1 ]
     } cond ;
 
index 03a86fe25f6f46bedaf86484700b11f6dcd7f644..f23989a1e264876164e63cced6eaefc00cc4e7c5 100755 (executable)
@@ -202,7 +202,7 @@ PRIVATE>
     lf>crlf [
         utf16n string>alien
         EmptyClipboard win32-error=0/f
-        GMEM_MOVEABLE over length 1+ GlobalAlloc
+        GMEM_MOVEABLE over length 1 + GlobalAlloc
             dup win32-error=0/f
     
         dup GlobalLock dup win32-error=0/f
index aa2b9ca58c58a18541aea7fa2693e24950feaa9e..b1b82a054235513845001cbdbad6801ec7a28e8a 100755 (executable)
@@ -495,7 +495,7 @@ TUPLE: multiline-editor < editor ;
 
 <PRIVATE
 
-: page-elt ( editor -- editor element ) dup visible-lines 1- <page-elt> ;
+: page-elt ( editor -- editor element ) dup visible-lines 1 - <page-elt> ;
 
 PRIVATE>
 
@@ -526,7 +526,7 @@ PRIVATE>
 
 : this-line-and-next ( document line -- start end )
     [ nip 0 swap 2array ]
-    [ [ nip 1+ ] [ 1+ swap doc-line length ] 2bi 2array ]
+    [ [ nip 1 + ] [ 1 + swap doc-line length ] 2bi 2array ]
     2bi ;
 
 : last-line? ( document line -- ? )
index 34f46865187081aebe5bcfcbb54538174574da7f..168fb4bb114473387077718b3f9978ce70d1f821 100644 (file)
@@ -23,7 +23,7 @@ M: glue pref-dim* drop { 0 0 } ;
     [ '[ [ dim>> ] [ gap>> ] [ filled-cell>> ] tri _ tri@ ] dip ] dip call ; inline
 
 : available-space ( pref-dim gap dims -- avail )
-    length 1+ * [-] ; inline
+    length 1 + * [-] ; inline
 
 : -center) ( pref-dim gap filled-cell dims -- )
     [ nip available-space ] 2keep [ remove-nth sum [-] ] 2keep set-nth ; inline
@@ -46,4 +46,4 @@ M: frame layout*
     [ <frame-grid> ] dip new-grid ; inline
 
 : <frame> ( cols rows -- frame )
-    frame new-frame ;
\ No newline at end of file
+    frame new-frame ;
index ade5c8101ebae19ba6f2145adace76f9a15e72e7..d7f77d9e549301c9bd19ce58b763ac47165eda80 100644 (file)
@@ -78,10 +78,10 @@ TUPLE: mock-gadget < gadget graft-called ungraft-called ;
     mock-gadget new 0 >>graft-called 0 >>ungraft-called ;
 
 M: mock-gadget graft*
-    [ 1+ ] change-graft-called drop ;
+    [ 1 + ] change-graft-called drop ;
 
 M: mock-gadget ungraft*
-    [ 1+ ] change-ungraft-called drop ;
+    [ 1 + ] change-ungraft-called drop ;
 
 ! We can't print to output-stream here because that might be a pane
 ! stream, and our graft-queue rebinding here would be captured
@@ -122,7 +122,7 @@ M: mock-gadget ungraft*
         3 [
             <mock-gadget> over <model> >>model
             "g" get over add-gadget drop
-            swap 1+ number>string set
+            swap 1 + number>string set
         ] each ;
 
     : status-flags ( -- seq )
index 029501258421f9f2467e2dbdfa5c83951799826b..26d0fee2e30fee83b7d27f4c6205c1db25191e66 100644 (file)
@@ -395,4 +395,4 @@ M: f request-focus-on 2drop ;
 
 USING: vocabs vocabs.loader ;
 
-"prettyprint" vocab [ "ui.gadgets.prettyprint" require ] when
\ No newline at end of file
+"prettyprint" vocab [ "ui.gadgets.prettyprint" require ] when
index b9fe10c530b83e71ce1265a1f8edb8a255d57732..3292e3e6c5621292dda37ef5dd10d87f8c982286 100644 (file)
@@ -28,10 +28,10 @@ M: line-gadget line-height font>> font-metrics height>> ceiling ;
 : line>y ( n gadget -- y ) line-height * >integer ;
 
 : validate-line ( m gadget -- n )
-    control-value [ drop f ] [ length 1- min 0 max ] if-empty ;
+    control-value [ drop f ] [ length 1 - min 0 max ] if-empty ;
 
 : valid-line? ( n gadget -- ? )
-    control-value length 1- 0 swap between? ;
+    control-value length 1 - 0 swap between? ;
 
 : visible-line ( gadget quot -- n )
     '[
@@ -43,7 +43,7 @@ M: line-gadget line-height font>> font-metrics height>> ceiling ;
     [ loc>> ] visible-line ;
 
 : last-visible-line ( gadget -- n )
-    [ [ loc>> ] [ dim>> ] bi v+ ] visible-line 1+ ;
+    [ [ loc>> ] [ dim>> ] bi v+ ] visible-line 1 + ;
 
 : each-slice-index ( from to seq quot -- )
     [ [ <slice> ] [ drop [a,b) ] 3bi ] dip 2each ; inline
@@ -85,4 +85,4 @@ M: line-gadget pref-viewport-dim
     2bi 2array ;
 
 : visible-lines ( gadget -- n )
-    [ visible-dim second ] [ line-height ] bi /i ;
\ No newline at end of file
+    [ visible-dim second ] [ line-height ] bi /i ;
index 504427827fb447f371e829494a99fda4f07f02a7..ccc5550adb41132dafee9f53e3c2155cbc97142b 100644 (file)
@@ -413,10 +413,10 @@ PRIVATE>
     0 select-row ;
 
 : last-row ( table -- )
-    dup control-value length 1- select-row ;
+    dup control-value length 1 - select-row ;
 
 : prev/next-page ( table n -- )
-    over visible-lines 1- * prev/next-row ;
+    over visible-lines 1 - * prev/next-row ;
 
 : previous-page ( table -- )
     -1 prev/next-page ;
@@ -503,4 +503,4 @@ M: table viewport-column-header
     dup renderer>> column-titles
     [ <column-headers> ] [ drop f ] if ;
 
-PRIVATE>
\ No newline at end of file
+PRIVATE>
index 485015b898fb35cfd5467bdace3ebead38f693f5..042e2d34466ca7310f36e65a50246991ebbcbb78 100644 (file)
@@ -14,7 +14,7 @@ TUPLE: gradient < caching-pen colors last-vertices last-colors ;
 
 :: gradient-vertices ( direction dim colors -- seq )
     direction dim v* dim over v- swap
-    colors length dup 1- v/n [ v*n ] with map
+    colors length dup 1 - v/n [ v*n ] with map
     swap [ over v+ 2array ] curry map
     concat concat >float-array ;
 
@@ -43,4 +43,4 @@ M: gradient draw-interior
         [ colors>> draw-gradient ]
     } cleave ;
 
-M: gradient pen-background 2drop transparent ;
\ No newline at end of file
+M: gradient pen-background 2drop transparent ;
index d56da86b866ff72d3632d5a0b1e4bfb58cdc271c..d5e836044bd4a48d30613d83d2964f5c81e99d01 100755 (executable)
@@ -25,7 +25,7 @@ M: uniscribe-renderer draw-string ( font string -- )
 \r
 M: uniscribe-renderer x>offset ( x font string -- n )\r
     [ 2drop 0 ] [\r
-        cached-script-string x>line-offset 0 = [ 1+ ] unless\r
+        cached-script-string x>line-offset 0 = [ 1 + ] unless\r
     ] if-empty ;\r
 \r
 M: uniscribe-renderer offset>x ( n font string -- x )\r
index 5e03ab21ad1242cb545377df63ceb509172d0ed8..dae9e26dc8df7bdbfb2c28096721556a67d5b0c0 100644 (file)
@@ -10,7 +10,7 @@ TUPLE: history document elements index ;
     V{ } clone 0 history boa ;
 
 : history-add ( history -- input )
-    dup elements>> length 1+ >>index
+    dup elements>> length 1 + >>index
     [ document>> doc-string [ <input> ] [ empty? ] bi ] keep
     '[ [ _ elements>> push ] keep ] unless ;
 
@@ -32,7 +32,7 @@ TUPLE: history document elements index ;
     [ set-doc-string ] [ clear-undo drop ] 2bi ;
 
 : change-history-index ( history i -- )
-    over elements>> length 1-
+    over elements>> length 1 -
     '[ _ + _ min 0 max ] change-index drop ;
 
 : history-recall ( history i -- )
index e34e354a874f9851b8e12b3fc8dc59fd3c9d2584..4b9a4a1ef37644e511755bea9d4e4bdbf98755fd 100644 (file)
@@ -170,7 +170,7 @@ M: interactor stream-read1
 M: interactor dispose drop ;
 
 : go-to-error ( interactor error -- )
-    [ line>> 1- ] [ column>> ] bi 2array
+    [ line>> 1 - ] [ column>> ] bi 2array
     over set-caret
     mark>caret ;
 
@@ -444,4 +444,4 @@ M: listener-gadget graft*
     [ call-next-method ] [ restart-listener ] bi ;
 
 M: listener-gadget ungraft*
-    [ com-end ] [ call-next-method ] bi ;
\ No newline at end of file
+    [ com-end ] [ call-next-method ] bi ;
index 9df084210dfdacea63ab361169543653f64ac0d6..11c2a48a2a5408900b03b538f9390eae9f4a36bb 100644 (file)
@@ -35,7 +35,7 @@ TUPLE: node value children ;
         ] [
             [
                 [ traverse-step traverse-from-path ]
-                [ tuck children>> swap first 1+ tail-slice % ] 2bi
+                [ tuck children>> swap first 1 + tail-slice % ] 2bi
             ] make-node
         ] if
     ] if ;
@@ -44,7 +44,7 @@ TUPLE: node value children ;
     traverse-step traverse-from-path ;
 
 : (traverse-middle) ( frompath topath gadget -- )
-    [ first 1+ ] [ first ] [ children>> ] tri* <slice> % ;
+    [ first 1 + ] [ first ] [ children>> ] tri* <slice> % ;
 
 : traverse-post ( topath gadget -- )
     traverse-step traverse-to-path ;
@@ -94,4 +94,4 @@ M: array leaves* '[ _ leaves* ] each ;
 
 M: gadget leaves* conjoin ;
 
-: leaves ( tree -- assoc ) H{ } clone [ leaves* ] keep ;
\ No newline at end of file
+: leaves ( tree -- assoc ) H{ } clone [ leaves* ] keep ;
index 2486e701c0cec64c26cffb529785dc88575fdcfa..aa3c549cf0e2fdeb7c98a25592d8a31184809766 100644 (file)
@@ -26,7 +26,7 @@ SYMBOL: windows
     #! etc.
     swap 2array windows get-global push
     windows get-global dup length 1 >
-    [ [ length 1- dup 1- ] keep exchange ] [ drop ] if ;
+    [ [ length 1 - dup 1 - ] keep exchange ] [ drop ] if ;
 
 : unregister-window ( handle -- )
     windows [ [ first = not ] with filter ] change-global ;
index ed96842c41ad0f58d1c2e900c8b31ed451ff55c4..7c7b8a1f50771499672eb752680021570141ccd4 100644 (file)
@@ -93,7 +93,7 @@ PRIVATE>
 : first-grapheme ( str -- i )
     unclip-slice grapheme-class over
     [ grapheme-class [ nip ] [ grapheme-break? ] 2bi ] find drop
-    nip swap length or 1+ ;
+    nip swap length or 1 + ;
 
 : first-grapheme-from ( start str -- i )
     over tail-slice first-grapheme + ;
@@ -192,13 +192,13 @@ to: word-table
     swap [ format/extended? not ] find-from drop ;
 
 : walk-up ( str i -- j )
-    dupd 1+ (walk-up) [ 1+ (walk-up) ] [ drop f ] if* ;
+    dupd 1 + (walk-up) [ 1 + (walk-up) ] [ drop f ] if* ;
 
 : (walk-down) ( str i -- j )
     swap [ format/extended? not ] find-last-from drop ;
 
 : walk-down ( str i -- j )
-    dupd (walk-down) [ 1- (walk-down) ] [ drop f ] if* ;
+    dupd (walk-down) [ 1 - (walk-down) ] [ drop f ] if* ;
 
 : word-break? ( str i table-entry -- ? )
     {
@@ -226,7 +226,7 @@ PRIVATE>
 : first-word ( str -- i )
     [ unclip-slice word-break-prop over <enum> ] keep
     '[ swap _ word-break-next ] assoc-find 2drop
-    nip swap length or 1+ ;
+    nip swap length or 1 + ;
 
 : >words ( str -- words )
     [ first-word ] >pieces ;
@@ -234,7 +234,7 @@ PRIVATE>
 <PRIVATE
 
 : nth-next ( i str -- str[i-1] str[i] )
-    [ [ 1- ] keep ] dip '[ _ nth ] bi@ ;
+    [ [ 1 - ] keep ] dip '[ _ nth ] bi@ ;
 
 PRIVATE>
 
index cea880c0b08b5885e575da6475c3c017f4fe9f16..ff2c808fdef7e8bb24507c4798ff7e316a70474e 100644 (file)
@@ -27,7 +27,7 @@ IN: unicode.normalize.tests
 :: assert= ( test spec quot -- )
     spec [
         [
-            [ 1- test nth ] bi@
+            [ 1 - test nth ] bi@
             [ 1quotation ] [ quot curry ] bi* unit-test
         ] with each
     ] assoc-each ;
index aca96a56942c315303dc84afd4c52a9061883c7c..b1cba0751187d2787b8b91f98711dae0d6108364 100644 (file)
@@ -108,7 +108,7 @@ HINTS: string-append string string ;
 ! Normalization -- Composition
 
 : initial-medial? ( str i -- ? )
-    { [ swap nth initial? ] [ 1+ swap ?nth medial? ] } 2&& ;
+    { [ swap nth initial? ] [ 1 + swap ?nth medial? ] } 2&& ;
 
 : --final? ( str i -- ? )
     2 + swap ?nth final? ;
@@ -124,7 +124,7 @@ HINTS: string-append string string ;
 : compose-jamo ( str i -- str i )
     2dup initial-medial? [
         2dup --final? [ imf, ] [ im, ] if
-    ] [ 2dup swap nth , 1+ ] if ;
+    ] [ 2dup swap nth , 1 + ] if ;
 
 : pass-combining ( str -- str i )
     dup [ non-starter? not ] find drop
@@ -136,7 +136,7 @@ TUPLE: compose-state i str char after last-class ;
 : get-str ( state i -- ch )
     swap [ i>> + ] [ str>> ] bi ?nth ; inline
 : current ( state -- ch ) 0 get-str ; inline
-: to ( state -- state ) [ 1+ ] change-i ; inline
+: to ( state -- state ) [ 1 + ] change-i ; inline
 : push-after ( ch state -- state ) [ ?push ] change-after ; inline
 
 :: try-compose ( state new-char current-class -- state )
@@ -177,8 +177,8 @@ DEFER: compose-iter
 :: (compose) ( str i -- )
     i str ?nth [
         dup jamo? [ drop str i compose-jamo ] [
-            i 1+ str ?nth combining-class
-            [ str i 1+ compose-combining ] [ , str i 1+ ] if
+            i 1 + str ?nth combining-class
+            [ str i 1 + compose-combining ] [ , str i 1 + ] if
         ] if (compose)
     ] when* ; inline recursive
 
index 91feae6471cd624ed53efef94e066a62fb944802..eba0e4976f40e7927e61ae7c02e76e15752b48b4 100644 (file)
@@ -64,7 +64,7 @@ PRIVATE>
     #! first group is -1337, legacy unix code
     -1337 NGROUPS_MAX [ 4 * <byte-array> ] keep
     <int> [ getgrouplist io-error ] 2keep
-    [ 4 tail-slice ] [ *int 1- ] bi* >groups ;
+    [ 4 tail-slice ] [ *int 1 - ] bi* >groups ;
 
 PRIVATE>
     
index da8b1e63e3f11f7eafacc778486c0aed12238f05..131d8dda5dc681488a36296ed79400f63dcd6009 100644 (file)
@@ -80,7 +80,7 @@ CONSTANT: WNOWAIT    HEX: 1000000
     HEX: ff00 bitand -8 shift ; inline
 
 : WIFSIGNALED ( status -- ? )
-    HEX: 7f bitand 1+ -1 shift 0 > ; inline
+    HEX: 7f bitand 1 + -1 shift 0 > ; inline
 
 : WCOREFLAG ( -- value )
     HEX: 80 ; inline
index bd4a2c1114b01d759a335b7e002826a8d331fd81..9e2c9539c6ecfa2362efbbc7892a1aee165e2cd6 100644 (file)
@@ -45,7 +45,7 @@ M: unrolled-list clear-deque
 : <front-node> ( elt front -- node )
     [
         unroll-factor 0 <array>
-        [ unroll-factor 1- swap set-nth ] keep f
+        [ unroll-factor 1 - swap set-nth ] keep f
     ] dip [ node boa dup ] keep
     dup [ (>>prev) ] [ 2drop ] if ; inline
 
@@ -55,12 +55,12 @@ M: unrolled-list clear-deque
     ] [ dup front>> >>back ] if* drop ; inline
 
 : push-front/new ( elt list -- )
-    unroll-factor 1- >>front-pos
+    unroll-factor 1 - >>front-pos
     [ <front-node> ] change-front
     normalize-back ; inline
 
 : push-front/existing ( elt list front -- )
-    [ [ 1- ] change-front-pos ] dip
+    [ [ 1 - ] change-front-pos ] dip
     [ front-pos>> ] [ data>> ] bi* set-nth-unsafe ; inline
 
 M: unrolled-list push-front*
@@ -81,12 +81,12 @@ M: unrolled-list peek-front
 
 : pop-front/existing ( list front -- )
     [ dup front-pos>> ] [ data>> ] bi* [ 0 ] 2dip set-nth-unsafe
-    [ 1+ ] change-front-pos
+    [ 1 + ] change-front-pos
     drop ; inline
 
 M: unrolled-list pop-front*
     dup front>> [ empty-unrolled-list ] unless*
-    over front-pos>> unroll-factor 1- eq?
+    over front-pos>> unroll-factor 1 - eq?
     [ pop-front/new ] [ pop-front/existing ] if ;
 
 : <back-node> ( elt back -- node )
@@ -106,8 +106,8 @@ M: unrolled-list pop-front*
     normalize-front ; inline
 
 : push-back/existing ( elt list back -- )
-    [ [ 1+ ] change-back-pos ] dip
-    [ back-pos>> 1- ] [ data>> ] bi* set-nth-unsafe ; inline
+    [ [ 1 + ] change-back-pos ] dip
+    [ back-pos>> 1 - ] [ data>> ] bi* set-nth-unsafe ; inline
 
 M: unrolled-list push-back*
     dup [ back>> ] [ back-pos>> unroll-factor eq? not ] bi
@@ -116,7 +116,7 @@ M: unrolled-list push-back*
 
 M: unrolled-list peek-back
     dup back>>
-    [ [ back-pos>> 1- ] dip data>> nth-unsafe ]
+    [ [ back-pos>> 1 - ] dip data>> nth-unsafe ]
     [ empty-unrolled-list ]
     if* ;
 
@@ -126,7 +126,7 @@ M: unrolled-list peek-back
     dup back>> [ normalize-front ] [ f >>front drop ] if ; inline
 
 : pop-back/existing ( list back -- )
-    [ [ 1- ] change-back-pos ] dip
+    [ [ 1 - ] change-back-pos ] dip
     [ dup back-pos>> ] [ data>> ] bi* [ 0 ] 2dip set-nth-unsafe
     drop ; inline
 
index 8e11dec431fbd2688094d00f7b7c25344d08efb5..f87c21d2ffbdd9e6acb167388d2f6c833d7c1a37 100644 (file)
@@ -57,7 +57,7 @@ PRIVATE>
     2dup length 2 - >= [
         2drop
     ] [
-        [ 1+ dup 2 + ] dip subseq  hex> [ , ] when*
+        [ 1 + dup 2 + ] dip subseq  hex> [ , ] when*
     ] if ;
 
 : url-decode-% ( index str -- index str )
@@ -70,7 +70,7 @@ PRIVATE>
         2dup nth dup CHAR: % = [
             drop url-decode-% [ 3 + ] dip
         ] [
-            , [ 1+ ] dip
+            , [ 1 + ] dip
         ] if url-decode-iter
     ] if ;
 
index 6ad5e7dee61fc74310d750798da49404a154e375..74c63e3d8f23558608ca8386a1c1b3753d5fd486 100644 (file)
@@ -5,5 +5,5 @@ VALUE: foo
 [ f ] [ foo ] unit-test\r
 [ ] [ 3 to: foo ] unit-test\r
 [ 3 ] [ foo ] unit-test\r
-[ ] [ \ foo [ 1+ ] change-value ] unit-test\r
+[ ] [ \ foo [ 1 + ] change-value ] unit-test\r
 [ 4 ] [ foo ] unit-test\r
index ae106cbf93b9dfbb3ce2ada86972815320dfaac2..79870b483f35561109d46d7061123456f1920f3e 100644 (file)
@@ -28,13 +28,13 @@ PRIVATE>
 M: vlist ppush
     >vlist<
     2dup length = [ unshare ] unless
-    [ [ 1+ swap ] dip push ] keep vlist boa ;
+    [ [ 1 + swap ] dip push ] keep vlist boa ;
 
 ERROR: empty-vlist-error ;
 
 M: vlist ppop
     [ empty-vlist-error ]
-    [ [ length>> 1- ] [ vector>> ] bi vlist boa ] if-empty ;
+    [ [ length>> 1 - ] [ vector>> ] bi vlist boa ] if-empty ;
 
 M: vlist clone
     [ length>> ] [ vector>> >vector ] bi vlist boa ;
@@ -65,7 +65,7 @@ M: valist assoc-size vlist>> length 2/ ;
 : valist-at ( key i array -- value ? )
     over 0 >= [
         3dup nth-unsafe = [
-            [ 1+ ] dip nth-unsafe nip t
+            [ 1 + ] dip nth-unsafe nip t
         ] [
             [ 2 - ] dip valist-at
         ] if
index 9d52378da912855bfbb39619b611fe53d83d7deb..beac4b6c27397c5a13b13c634946dd8a0a57f839 100755 (executable)
@@ -28,7 +28,7 @@ unless
 "windows.com.wrapper.callbacks" create-vocab drop
 
 : (next-vtbl-counter) ( -- n )
-    +vtbl-counter+ [ 1+ dup ] change ;
+    +vtbl-counter+ [ 1 + dup ] change ;
 
 : com-unwrap ( wrapped -- object )
     +wrapped-objects+ get-global at*
@@ -59,7 +59,7 @@ unless
 : (make-add-ref) ( interfaces -- quot )
     length "void*" heap-size * '[
         _
-        [ alien-unsigned-4 1+ dup ]
+        [ alien-unsigned-4 1 + dup ]
         [ set-alien-unsigned-4 ]
         2bi
     ] ;
@@ -68,7 +68,7 @@ unless
     length "void*" heap-size * '[
         _
         [ drop ]
-        [ alien-unsigned-4 1- dup ]
+        [ alien-unsigned-4 1 - dup ]
         [ set-alien-unsigned-4 ]
         2tri
         dup 0 = [ swap (free-wrapped-object) ] [ nip ] if
@@ -101,7 +101,7 @@ unless
     "windows.com.wrapper.callbacks" create ;
 
 : (finish-thunk) ( param-count thunk quot -- thunked-quot )
-    [ [ drop [ ] ] [ swap 1- '[ _ _ ndip ] ] if-empty ]
+    [ [ drop [ ] ] [ swap 1 - '[ _ _ ndip ] ] if-empty ]
     dip compose ;
 
 : (make-interface-callbacks) ( interface-name quots iunknown-methods n -- words )
index 4543aa703a0188db1a0bde7bdfb4ca19ffcb9656..e9c4930b6402d986189b7ac06b9d99c7f0d8e7f2 100644 (file)
@@ -7,7 +7,7 @@ IN: windows.dragdrop-listener
 : filenames-from-hdrop ( hdrop -- filenames )\r
     dup HEX: FFFFFFFF f 0 DragQueryFile ! get count of files\r
     [\r
-        2dup f 0 DragQueryFile 1+ ! get size of filename buffer\r
+        2dup f 0 DragQueryFile 1 + ! get size of filename buffer\r
         dup "WCHAR" <c-array>\r
         [ swap DragQueryFile drop ] keep\r
         alien>u16-string\r
index feb0bef7a8ab7dd06c204a058107992f93250fd2..7c5c26c2da82733a2be5afc9cc7232ebe5a5f999 100755 (executable)
@@ -12,7 +12,7 @@ TUPLE: script-string font string metrics ssa size image disposed ;
 : line-offset>x ( n script-string -- x )
     2dup string>> length = [
         ssa>> ! ssa
-        swap 1- ! icp
+        swap 1 - ! icp
         TRUE ! fTrailing
     ] [
         ssa>>
index 7561d674820f7ff7fe7918ef0522bac0e9eafa28..5b2a0bcfb4d3dc2223dd82117cda190c497a83a5 100644 (file)
@@ -140,7 +140,7 @@ MACRO: interpolate-xml ( xml -- quot )
 : number<-> ( doc -- dup )
     0 over [
         dup var>> [
-            over >>var [ 1+ ] dip
+            over >>var [ 1 + ] dip
         ] unless drop
     ] each-interpolated drop ;
 
index 052cab15c29beffd273859ecf2828b96f8e50659..b0dbdf22ac83036076b8271eb0dfc3322a9c2fee 100644 (file)
@@ -13,7 +13,7 @@ IN: xml.tokenize
         swap
         [ version-1.0?>> over text? not ]
         [ check>> ] bi and [
-            spot get [ 1+ ] change-column drop
+            spot get [ 1 + ] change-column drop
             disallowed-char
         ] [ drop ] if
     ] [ drop ] if* ;
@@ -23,7 +23,7 @@ HINTS: assure-good-char { spot fixnum } ;
 : record ( spot char -- spot )
     over char>> [
         CHAR: \n =
-        [ [ 1+ ] change-line -1 ] [ dup column>> 1+ ] if
+        [ [ 1 + ] change-line -1 ] [ dup column>> 1 + ] if
         >>column
     ] [ drop ] if ;
 
@@ -91,7 +91,7 @@ HINTS: next* { spot } ;
 : take-string ( match -- string )
     dup length <circular-string>
     spot get '[ 2dup _ string-matches? ] take-until nip
-    dup length rot length 1- - head
+    dup length rot length 1 - - head
     get-char [ missing-close ] unless next ;
 
 : expect ( string -- )
index 44d3a0285e41a040723c821896cdfb23e16d12c5..3e7e697baa80d3c36fe48be39121454a0b376589 100644 (file)
@@ -28,7 +28,7 @@ SYMBOLS: line last-offset position context
 
 : next-token, ( len id -- )
     [ position get 2dup + ] dip token,
-    position get + dup 1- position set last-offset set ;
+    position get + dup 1 - position set last-offset set ;
 
 : push-context ( rules -- )
     context [ <line-context> ] change ;
index 3c5ac31d23e2d94c0a2f31b9202e0b8d10c0db59..9e36f9f00cc6cbbe2ff28de7bc8a818cc934313f 100644 (file)
@@ -1,7 +1,7 @@
-IN: assocs.tests
 USING: kernel math namespaces make tools.test vectors sequences
 sequences.private hashtables io prettyprint assocs
 continuations specialized-arrays.double ;
+IN: assocs.tests
 
 [ t ] [ H{ } dup assoc-subset? ] unit-test
 [ f ] [ H{ { 1 3 } } H{ } assoc-subset? ] unit-test
@@ -149,4 +149,4 @@ unit-test
         H{ { 1 3 } { 2 5 } }
         H{ { 1 7 } { 5 6 } }
     } assoc-refine
-] unit-test
\ No newline at end of file
+] unit-test
diff --git a/core/bootstrap/syntax-docs.factor b/core/bootstrap/syntax-docs.factor
deleted file mode 100644 (file)
index e69de29..0000000
index 1c3e4d3bdfdc4ca3755f0b1402e66e04a0e19cd4..a23e4ecd745fc3222fb8f9e82258b34e8c10ba44 100644 (file)
@@ -1,5 +1,5 @@
-IN: byte-arrays.tests\r
 USING: tools.test byte-arrays sequences kernel ;\r
+IN: byte-arrays.tests\r
 \r
 [ 6 B{ 1 2 3 } ] [\r
     6 B{ 1 2 3 } resize-byte-array\r
@@ -10,4 +10,4 @@ USING: tools.test byte-arrays sequences kernel ;
 \r
 [ -10 B{ } resize-byte-array ] must-fail\r
 \r
-[ B{ 123 } ] [ 123 1byte-array ] unit-test
\ No newline at end of file
+[ B{ 123 } ] [ 123 1byte-array ] unit-test\r
index bd7510c95f632cb8b90e77702429dbc7626815a0..fdf4ab6aca99c6c4600a20d76ae80abbf36d5b14 100644 (file)
@@ -1,6 +1,6 @@
-IN: byte-vectors.tests\r
 USING: tools.test byte-vectors vectors sequences kernel\r
 prettyprint ;\r
+IN: byte-vectors.tests\r
 \r
 [ 0 ] [ 123 <byte-vector> length ] unit-test\r
 \r
diff --git a/core/checksums/checksums-tests.factor b/core/checksums/checksums-tests.factor
deleted file mode 100644 (file)
index 8ba09d8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-IN: checksums.tests
-USING: checksums tools.test ;
-
index 6f990d0d62d6dcdf4b8a76601fd38c0dc0e594df..c6ce302c269ed71556c9ea16bccdb642af7a1d74 100755 (executable)
@@ -1,5 +1,5 @@
-IN: classes.builtin.tests
 USING: tools.test words sequences kernel memory accessors ;
+IN: classes.builtin.tests
 
 [ f ] [
     [ word? ] instances
index 72457ff97431fcd9099d0867bc9e137dd9b3a0cb..4ee31936a99733fb72fd8dac0502d8dad0e78c8a 100644 (file)
@@ -1,7 +1,7 @@
-IN: classes.tuple.parser.tests
 USING: accessors classes.tuple.parser lexer words classes
 sequences math kernel slots tools.test parser compiler.units
 arrays classes.tuple eval multiline ;
+IN: classes.tuple.parser.tests
 
 TUPLE: test-1 ;
 
@@ -141,4 +141,4 @@ TUPLE: parsing-corner-case x ;
         "USE: classes.tuple.parser.tests T{ parsing-corner-case {"
         "    x 3 }"
     } "\n" join eval( -- tuple )
-] [ error>> unexpected-eof? ] must-fail-with
\ No newline at end of file
+] [ error>> unexpected-eof? ] must-fail-with
index 3eb92738595188d03b661e890ee1829df316e6b8..37d4fd1195d0b72bf2992b0d04475268d33f86ea 100644 (file)
@@ -1,5 +1,5 @@
-IN: effects.tests
 USING: effects tools.test prettyprint accessors sequences ;
+IN: effects.tests
 
 [ t ] [ 1 1 <effect> 2 2 <effect> effect<= ] unit-test
 [ f ] [ 1 0 <effect> 2 2 <effect> effect<= ] unit-test
@@ -22,4 +22,4 @@ USING: effects tools.test prettyprint accessors sequences ;
 
 [ t ] [ (( -- )) (( -- )) compose-effects (( -- )) effect= ] unit-test
 [ t ] [ (( -- * )) (( -- )) compose-effects (( -- * )) effect= ] unit-test
-[ t ] [ (( -- )) (( -- * )) compose-effects (( -- * )) effect= ] unit-test
\ No newline at end of file
+[ t ] [ (( -- )) (( -- * )) compose-effects (( -- * )) effect= ] unit-test
index 51e122431cfcffbc3b5b2bd5b775d421bbbb0778..2279fd019cf5c9d4680583ee9b1c6ef1d93b11ca 100644 (file)
@@ -1,5 +1,5 @@
-IN: generic.math.tests
 USING: generic.math math tools.test kernel ;
+IN: generic.math.tests
 
 ! Test math-combination
 [ [ [ >float ] dip ] ] [ \ real \ float math-upgrade ] unit-test
index 61ae4e1ba1090db669be21602f03af8ebc88ac22..f59268b770312caa7566d8bfe88a4d5adf969753 100644 (file)
@@ -1,10 +1,10 @@
-IN: generic.single.tests
 USING: tools.test math math.functions math.constants generic.standard
 generic.single strings sequences arrays kernel accessors words
 specialized-arrays.double byte-arrays bit-arrays parser namespaces
 make quotations stack-checker vectors growable hashtables sbufs
 prettyprint byte-vectors bit-vectors specialized-vectors.double
 definitions generic sets graphs assocs grouping see eval ;
+IN: generic.single.tests
 
 GENERIC: lo-tag-test ( obj -- obj' )
 
@@ -279,4 +279,4 @@ M: growable call-next-hooker call-next-method "growable " prepend ;
 ! Corner case
 [ "IN: generic.single.tests GENERIC# broken-generic# -1 ( a -- b )" eval( -- ) ]
 [ error>> bad-dispatch-position? ]
-must-fail-with
\ No newline at end of file
+must-fail-with
index 004b543c7f879936e1f255204e423ff10240fb0e..54e58c0282729653e990cf8052d7fab3c3bcd66f 100644 (file)
@@ -1,7 +1,7 @@
-IN: hashtables.tests
 USING: kernel math namespaces make tools.test vectors sequences
 sequences.private hashtables io prettyprint assocs
 continuations ;
+IN: hashtables.tests
 
 [ f ] [ "hi" V{ 1 2 3 } at ] unit-test
 
@@ -178,4 +178,4 @@ H{ } "x" set
 [ 1 ] [ 2 "h" get at ] unit-test
 
 ! Random test case
-[ "A" ] [ 100 [ dup ] H{ } map>assoc 32 over delete-at "A" 32 pick set-at 32 swap at ] unit-test
\ No newline at end of file
+[ "A" ] [ 100 [ dup ] H{ } map>assoc 32 over delete-at "A" 32 pick set-at 32 swap at ] unit-test
index c3d7e8e89bf3f7b55205d3c45507c640b9dbea6a..7d668eeab117578d28cdd06843fd9bbbd928a009 100644 (file)
@@ -1,4 +1,4 @@
-IN: io.backend.tests
 USING: tools.test io.backend kernel ;
+IN: io.backend.tests
 
 [ ] [ "a" normalize-path drop ] unit-test
index ad5453af6174eae2dc7b41127d2f212c01574d8e..e7b4338388c49a1ab22ed3a634299697aa915080 100644 (file)
@@ -12,4 +12,4 @@ M: memory-stream stream-element-type drop +byte+ ;
 
 M: memory-stream stream-read1
     [ [ alien>> ] [ index>> ] bi alien-unsigned-1 ]
-    [ [ 1+ ] change-index drop ] bi ;
+    [ [ 1 + ] change-index drop ] bi ;
index b0c5d8cfda69a13d7582b0c50aa35fc4df0b2e09..5a39f2462742afb8e2e93f04dad2242032aa61a9 100644 (file)
@@ -1,5 +1,5 @@
-IN: system.tests\r
 USING: layouts math tools.test ;\r
+IN: system.tests\r
 \r
 [ t ] [ cell integer? ] unit-test\r
 [ t ] [ bootstrap-cell integer? ] unit-test\r
index 1365e815242efa192f49d02f131fb66f8c9371ab..81251d728fd75b755461b811116641fb2a314b97 100644 (file)
@@ -1,6 +1,6 @@
-IN: slots.tests
 USING: math accessors slots strings generic.single kernel
 tools.test generic words parser eval math.functions ;
+IN: slots.tests
 
 TUPLE: r/w-test foo ;
 
index c659e109ce3715d9f99f2184d935b47c633a7999..cc09ad52813e4df2fbabc61f431e77f168549c54 100755 (executable)
@@ -57,7 +57,7 @@ t to: remove-hidden-solids?
 \r
 : with-pv ( i quot -- ) [ swap >pv call ] with-scope  ; inline\r
 \r
-: dimension ( array -- x )      length 1- ; inline \r
+: dimension ( array -- x )      length 1 - ; inline \r
 : change-last ( seq quot -- ) \r
     [ [ dimension ] keep ] dip change-nth  ; inline\r
 \r
@@ -99,7 +99,7 @@ TUPLE: light name { direction array } color ;
 : point-inside-or-on-halfspace? ( halfspace v -- ? ) \r
     position-point VERY-SMALL-NUM neg > ;\r
 : project-vector (  seq -- seq )     \r
-    pv> [ head ] [ 1+  tail ] 2bi append ; \r
+    pv> [ head ] [ 1 +  tail ] 2bi append ; \r
 : get-intersection ( matrice -- seq )     \r
     [ 1 tail* ] map     flip first ;\r
 \r
@@ -336,7 +336,7 @@ TUPLE: solid dimension silhouettes
 : compute-adjacencies ( solid -- solid )\r
     dup dimension>> [ >= ] curry \r
     [ keep swap ] curry MAX-FACE-PER-CORNER swap\r
-    [ [ test-faces-combinaisons ] 2keep 1- ] while drop ;\r
+    [ [ test-faces-combinaisons ] 2keep 1 - ] while drop ;\r
 \r
 : find-adjacencies ( solid -- solid ) \r
     erase-old-adjacencies   \r
@@ -435,7 +435,7 @@ TUPLE: space name dimension solids ambient-color lights ;
     [ [ non-empty-solid? ] filter ] change-solids ;\r
 \r
 : projected-space ( space solids -- space ) \r
-   swap dimension>> 1-  <space>    \r
+   swap dimension>> 1 -  <space>    \r
    swap >>dimension    swap  >>solids ;\r
 \r
 : get-silhouette ( solid -- silhouette )    \r
index 4e4bbff72d57d8d3135263d8951e9d4ec19d6e42..d00eebc9763497ba1bced13f7d38161774874bdc 100755 (executable)
@@ -13,7 +13,7 @@ IN: adsoda.combinators
 !        { [ dup 0 = ] [ 2drop { { } } ] }\r
 !        { [ over empty? ] [ 2drop { } ] }\r
 !        { [ t ] [ \r
-!            [ [ 1- (combinations) ] [ drop first ] 2bi prefix-each ]\r
+!            [ [ 1 - (combinations) ] [ drop first ] 2bi prefix-each ]\r
 !            [ (combinations) ] 2bi append\r
 !        ] }\r
 !    } cond ;\r
@@ -26,7 +26,7 @@ IN: adsoda.combinators
         { [ over 1 = ] [ 3drop columnize ] }\r
         { [ over 0 = ] [ 2drop 2drop { } ] }\r
         { [ 2dup < ] [ 2drop [ 1 cut ] dip  \r
-                         [ 1- among [ append ] with map  ] \r
+                         [ 1 - among [ append ] with map  ] \r
                          [ among append ] 2bi\r
                        ] }\r
         { [ 2dup = ] [ 3drop 1array ] }\r
index 3e0648128de9746937e1e4b4a87b6f33212693be..fa73120df364a11d1c3421971cc3768b85d0119a 100755 (executable)
@@ -66,7 +66,7 @@ SYMBOL: matrix
 : do-row ( exchange-with row# -- )\r
     [ exchange-rows ] keep\r
     [ first-col ] keep\r
-    dup 1+ rows-from clear-col ;\r
+    dup 1 + rows-from clear-col ;\r
 \r
 : find-row ( row# quot -- i elt )\r
     [ rows-from ] dip find ; inline\r
@@ -76,8 +76,8 @@ SYMBOL: matrix
 \r
 : (echelon) ( col# row# -- )\r
     over cols < over rows < and [\r
-        2dup pivot-row [ over do-row 1+ ] when*\r
-        [ 1+ ] dip (echelon)\r
+        2dup pivot-row [ over do-row 1 + ] when*\r
+        [ 1 + ] dip (echelon)\r
     ] [\r
         2drop\r
     ] if ;\r
index d5a13e48d8988756b4e11a36a11b13d53c2929ff..48fd281c6cdf8c37b670c1fd8be2d772f1ae794b 100644 (file)
@@ -10,7 +10,7 @@ IN: annotations.tests
 
 : four ( -- x )
     !BROKEN this code is broken
-    2 2 + 1+ ;
+    2 2 + 1 + ;
 
 : five ( -- x )
     !TODO return 5
index 6b3fd41575fbc58ef6d70da405ccfbc895016f1c..14ebcb1c5b4e50bfbda653b63b6928af992f14a5 100755 (executable)
@@ -15,7 +15,7 @@ IN: benchmark.beust2
                     remaining 1 <= [
                         listener call f
                     ] [
-                        remaining 1-
+                        remaining 1 -
                         0
                         value' 10 *
                         used mask bitor
@@ -29,12 +29,12 @@ IN: benchmark.beust2
     ] any? ; inline recursive
 
 :: count-numbers ( max listener -- )
-    10 iota [ 1+ 1 1 0 max listener (count-numbers) ] any? drop ;
+    10 iota [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ;
     inline
 
 :: beust ( -- )
     [let | i! [ 0 ] |
-        5000000000 [ i 1+ i! ] count-numbers
+        5000000000 [ i 1 + i! ] count-numbers
         i number>string " unique numbers." append print
     ] ;
 
index a69c53852deab7ad5e91b56d2e0d154940fb2abf..63e635f3de4ccbe8444d173203dcf8a2d403c356 100644 (file)
@@ -7,7 +7,7 @@ IN: benchmark.fannkuch
 : count ( quot: ( -- ? ) -- n )
     #! Call quot until it returns false, return number of times
     #! it was true
-    [ 0 ] dip '[ _ dip swap [ [ 1+ ] when ] keep ] loop ; inline
+    [ 0 ] dip '[ _ dip swap [ [ 1 + ] when ] keep ] loop ; inline
 
 : count-flips ( perm -- flip# )
     '[
@@ -19,12 +19,12 @@ IN: benchmark.fannkuch
     [ CHAR: 0 + write1 ] each nl ; inline
 
 : fannkuch-step ( counter max-flips perm -- counter max-flips )
-    pick 30 < [ [ 1+ ] [ ] [ dup write-permutation ] tri* ] when
+    pick 30 < [ [ 1 + ] [ ] [ dup write-permutation ] tri* ] when
     count-flips max ; inline
 
 : fannkuch ( n -- )
     [
-        [ 0 0 ] dip [ 1+ ] B{ } map-as
+        [ 0 0 ] dip [ 1 + ] B{ } map-as
         [ fannkuch-step ] each-permutation nip
     ] keep
     "Pfannkuchen(" write pprint ") = " write . ;
index c988e5722e6c693762f0e3bf648bf13c12fb5215..fa49503797be993608ee5981de72145f4dde6009 100644 (file)
@@ -9,10 +9,10 @@ C: <box> box
     dup i>> 1 <= [
         drop 1 <box>
     ] [
-        i>> 1- <box>
+        i>> 1 - <box>
         dup tuple-fib
         swap
-        i>> 1- <box>
+        i>> 1 - <box>
         tuple-fib
         swap i>> swap i>> + <box>
     ] if ; inline recursive
index f81b6a21a2f09a40b3cd6e6f197ad31afdcc1d7f..70ce97597467861d18a4ce93aace175e4ace965e 100755 (executable)
@@ -1,10 +1,10 @@
-IN: benchmark.fib6\r
 USING: math kernel alien ;\r
+IN: benchmark.fib6\r
 \r
 : fib ( x -- y )\r
     "int" { "int" } "cdecl" [\r
         dup 1 <= [ drop 1 ] [\r
-            1- dup fib swap 1- fib +\r
+            1 - dup fib swap 1- fib +\r
         ] if\r
     ] alien-callback\r
     "int" { "int" } "cdecl" alien-indirect ;\r
index d201a08ecf79d7e4ddab211871e5390191966220..8b0a3e6a432ee95b70e0b499867980b194bdde14 100644 (file)
@@ -3,6 +3,6 @@
 USING: math sequences kernel ;
 IN: benchmark.gc1
 
-: gc1 ( -- ) 6000000 [ >bignum 1+ ] map drop ;
+: gc1 ( -- ) 6000000 [ >bignum 1 + ] map drop ;
 
-MAIN: gc1
\ No newline at end of file
+MAIN: gc1
index 99b0ee15f4ea60ecc616e8f55210903469748ccb..fb4f17cca5c768615975aa03451108ebf4bea86a 100644 (file)
@@ -23,12 +23,12 @@ IN: benchmark.knucleotide
 : tally ( x exemplar -- b )
     clone tuck
     [
-      [ [ 1+ ] [ 1 ] if* ] change-at
+      [ [ 1 + ] [ 1 ] if* ] change-at
     ] curry each ;
 
 : small-groups ( x n -- b )
     swap
-    [ length swap - 1+ ] 2keep
+    [ length swap - 1 + ] 2keep
     [ [ over + ] dip subseq ] 2curry map ;
 
 : handle-table ( inputs n -- )
index 9e0f2472e27c4c8563cb51d95c0287ab20bf070b..0300538ce101d0f9d3b07df6039a1fc47ccc3345 100644 (file)
@@ -12,7 +12,7 @@ CONSTANT: val 0.85
 
 : <color-map> ( nb-cols -- map )
     dup [
-        360 * swap 1+ / sat val
+        360 * swap 1 + / sat val
         1 <hsva> >rgba scale-rgb
     ] with map ;
 
index f72ceb46297301bfe24e933a6d0f89e11b2491c6..983da8882176f1a7697d8fea8cdd6746c6599740 100644 (file)
@@ -59,7 +59,7 @@ TUPLE: nbody-system { bodies array read-only } ;
 :: each-pair ( bodies pair-quot: ( other-body body -- ) each-quot: ( body -- ) -- )
     bodies [| body i |
         body each-quot call
-        bodies i 1+ tail-slice [
+        bodies i 1 + tail-slice [
             body pair-quot call
         ] each
     ] each-index ; inline
index 246a962a55b554e00e8b4b1e239a4dbb222162c1..9ccc2d8616171bf851e298534d39dc7d7635b400 100644 (file)
@@ -1,6 +1,6 @@
-IN: benchmark.nsieve-bits
 USING: math math.parser sequences sequences.private kernel
 bit-arrays make io ;
+IN: benchmark.nsieve-bits
 
 : clear-flags ( step i seq -- )
     2dup length >= [
@@ -13,14 +13,14 @@ bit-arrays make io ;
     2dup length < [
         2dup nth-unsafe [
             over dup 2 * pick clear-flags
-            rot 1+ -rot ! increment count
-        ] when [ 1+ ] dip (nsieve-bits)
+            rot 1 + -rot ! increment count
+        ] when [ 1 + ] dip (nsieve-bits)
     ] [
         2drop
     ] if ; inline recursive
 
 : nsieve-bits ( m -- count )
-    0 2 rot 1+ <bit-array> dup set-bits (nsieve-bits) ;
+    0 2 rot 1 + <bit-array> dup set-bits (nsieve-bits) ;
 
 : nsieve-bits. ( m -- )
     [ "Primes up to " % dup # " " % nsieve-bits # ] "" make
@@ -28,7 +28,7 @@ bit-arrays make io ;
 
 : nsieve-bits-main ( n -- )
     dup 2^ 10000 * nsieve-bits.
-    dup 1- 2^ 10000 * nsieve-bits.
+    dup 1 - 2^ 10000 * nsieve-bits.
     2 - 2^ 10000 * nsieve-bits. ;
 
 : nsieve-bits-main* ( -- ) 11 nsieve-bits-main ;
index bbeccf750b3fca290c370e98b9901cb377752cd4..15c0f9ee0b1dc0670c933152d1a5274fcef9759b 100644 (file)
@@ -13,14 +13,14 @@ byte-arrays make io ;
     2dup length < [
         2dup nth-unsafe 0 > [
             over dup 2 * pick clear-flags
-            rot 1+ -rot ! increment count
-        ] when [ 1+ ] dip (nsieve)
+            rot 1 + -rot ! increment count
+        ] when [ 1 + ] dip (nsieve)
     ] [
         2drop
     ] if ; inline recursive
 
 : nsieve ( m -- count )
-    0 2 rot 1+ <byte-array> dup [ drop 1 ] change-each (nsieve) ;
+    0 2 rot 1 + <byte-array> dup [ drop 1 ] change-each (nsieve) ;
 
 : nsieve. ( m -- )
     [ "Primes up to " % dup # " " % nsieve # ] "" make print ;
index 6fbc144e8078ba76573de611446d0560cda9893e..646c98f3a4214f2da60b9e0b06fecb31676d0b7c 100644 (file)
@@ -1,6 +1,6 @@
-IN: benchmark.nsieve
 USING: math math.parser sequences sequences.private kernel
 arrays make io ;
+IN: benchmark.nsieve
 
 : clear-flags ( step i seq -- )
     2dup length >= [
@@ -13,14 +13,14 @@ arrays make io ;
     2dup length < [
         2dup nth-unsafe [
             over dup 2 * pick clear-flags
-            rot 1+ -rot ! increment count
-        ] when [ 1+ ] dip (nsieve)
+            rot 1 + -rot ! increment count
+        ] when [ 1 + ] dip (nsieve)
     ] [
         2drop
     ] if ; inline recursive
 
 : nsieve ( m -- count )
-    0 2 rot 1+ t <array> (nsieve) ;
+    0 2 rot 1 + t <array> (nsieve) ;
 
 : nsieve. ( m -- )
     [ "Primes up to " % dup # " " % nsieve # ] "" make print ;
index 7c7c68b12d741a7e87a48ca32bed0139cb26d918..023f5de5c24d8b21ba88629225294ef6fff92a38 100644 (file)
@@ -5,21 +5,21 @@ combinators hints fry namespaces sequences ;
 IN: benchmark.partial-sums
 
 ! Helper words
-: summing-integers ( n quot -- y ) [ 0.0 ] 2dip '[ 1+ @ + ] each ; inline
+: summing-integers ( n quot -- y ) [ 0.0 ] 2dip '[ 1 + @ + ] each ; inline
 : summing-floats ( n quot -- y ) '[ >float @ ] summing-integers ; inline
 : cube ( x -- y ) dup dup * * ; inline
-: -1^ ( n -- -1/1 ) 2 mod 2 * 1- ; inline
+: -1^ ( n -- -1/1 ) 2 mod 2 * 1 - ; inline
 
 ! The functions
-: 2/3^k ( n -- y ) [ 2.0 3.0 / swap 1- ^ ] summing-floats ; inline
+: 2/3^k ( n -- y ) [ 2.0 3.0 / swap 1 - ^ ] summing-floats ; inline
 : k^-0.5 ( n -- y ) [ -0.5 ^ ] summing-floats ; inline
-: 1/k(k+1) ( n -- y ) [ dup 1+ * recip ] summing-floats ; inline
+: 1/k(k+1) ( n -- y ) [ dup 1 + * recip ] summing-floats ; inline
 : flint-hills ( n -- y ) [ [ cube ] [ sin sq ] bi * recip ] summing-floats ; inline
 : cookson-hills ( n -- y ) [ [ cube ] [ cos sq ] bi * recip ] summing-floats ; inline
 : harmonic ( n -- y ) [ recip ] summing-floats ; inline
 : riemann-zeta ( n -- y ) [ sq recip ] summing-floats ; inline
 : alternating-harmonic ( n -- y ) [ [ -1^ ] keep /f ] summing-integers ; inline
-: gregory ( n -- y ) [ [ -1^ ] [ 2.0 * 1- ] bi / ] summing-integers ; inline
+: gregory ( n -- y ) [ [ -1^ ] [ 2.0 * 1 - ] bi / ] summing-integers ; inline
 
 : partial-sums ( n -- results )
     [
index 128ec571f2293d7969554199a0de008947b15cd7..219c73ae0aa62a32ead0bf410b281e45cffe2be0 100755 (executable)
@@ -7,18 +7,18 @@ IN: benchmark.recursive
 
 : ack ( m n -- x )
     {
-        { [ over zero? ] [ nip 1+ ] }
-        { [ dup zero? ] [ drop 1- 1 ack ] }
-        [ [ drop 1- ] [ 1- ack ] 2bi ack ]
+        { [ over zero? ] [ nip 1 + ] }
+        { [ dup zero? ] [ drop 1 - 1 ack ] }
+        [ [ drop 1 - ] [ 1 - ack ] 2bi ack ]
     } cond ; inline recursive
 
 : tak ( x y z -- t )
     2over <= [
         2nip
     ] [
-        [  rot 1- -rot tak ]
-        [ -rot 1- -rot tak ]
-        [      1- -rot tak ]
+        [  rot 1 - -rot tak ]
+        [ -rot 1 - -rot tak ]
+        [      1 - -rot tak ]
         3tri
         tak
     ] if ; inline recursive
@@ -26,7 +26,7 @@ IN: benchmark.recursive
 : recursive ( n -- )
     [ 3 swap ack . flush ]
     [ 27.0 + fib . flush ]
-    [ 1- [ 3 * ] [ 2 * ] [ ] tri tak . flush ] tri
+    [ 1 - [ 3 * ] [ 2 * ] [ ] tri tak . flush ] tri
     3 fib . flush
     3.0 2.0 1.0 tak . flush ;
 
index 483311d4f4c9d7fed812fc892ef89c0213b33036..bd9a7139b3c3511214088df988538e4e61a6d289 100644 (file)
@@ -11,10 +11,10 @@ TUPLE-ARRAY: point
 : tuple-array-benchmark ( -- )
     100 [
         drop 5000 <point-array> [
-            [ 1+ ] change-x
-            [ 1- ] change-y
-            [ 1+ 2 / ] change-z
+            [ 1 + ] change-x
+            [ 1 - ] change-y
+            [ 1 + 2 / ] change-z
         ] map [ z>> ] sigma
     ] sigma . ;
 
-MAIN: tuple-array-benchmark
\ No newline at end of file
+MAIN: tuple-array-benchmark
index 620f737fe3783ddff6ea7750f7542a84d9aacfbf..b7400c4acb53e054c7497d95dd2d451b8cc41848 100755 (executable)
@@ -11,7 +11,7 @@ TUPLE: bunny-world < demo-world model-triangles geom draw-seq draw-n ;
 
 : next-draw ( gadget -- )
     dup [ draw-seq>> ] [ draw-n>> ] bi
-    1+ swap length mod
+    1 + swap length mod
     >>draw-n relayout-1 ;
 
 : make-draws ( gadget -- draw-seq )
index 3dbcbf32fcc76ce09f45a0f6fa1d910caad51ef5..17c5ee901f75620f4fedb45295d674af34ea7c97 100644 (file)
@@ -9,11 +9,11 @@ CENTRAL: test-central
 TUPLE: test-disp-cent value disposed ;
 
 ! A phony destructor that adds 1 to the value so we can make sure it got called.
-M: test-disp-cent dispose* dup value>> 1+ >>value drop ;
+M: test-disp-cent dispose* dup value>> 1 + >>value drop ;
 
 DISPOSABLE-CENTRAL: t-d-c
 
 : test-t-d-c ( -- n )
     test-disp-cent new 3 >>value [ t-d-c ] with-t-d-c value>> ;
 
-[ 4 ] [ test-t-d-c ] unit-test
\ No newline at end of file
+[ 4 ] [ test-t-d-c ] unit-test
index f4ac97354dc65bfd8ece9054fbe43448094020db..90e88f64fb27e8cc33e6ab8a100aae535efc5002 100644 (file)
@@ -7,7 +7,7 @@ USING: coroutines kernel sequences prettyprint tools.test math ;
   [ drop 1 coyield* 2 coyield* 3 coterminate ] cocreate ;
 
 : test2 ( -- co )
-  [ 1+ coyield* ] cocreate ;
+  [ 1 + coyield* ] cocreate ;
 
 test1 dup *coresume . dup *coresume . dup *coresume . dup *coresume 2drop
 [ test2 42 over coresume . dup *coresume . drop ] must-fail
@@ -18,4 +18,4 @@ test1 dup *coresume . dup *coresume . dup *coresume . dup *coresume 2drop
 
 { "c" "b" "a" } [ test3 { "a" "b" "c" } over coresume [ dup *coresume [ *coresume ] dip ] dip ] unit-test
 
-{ 4+2/3 } [ [ 1+ coyield 2 * coyield 3 / coreset ] cocreate 1 5 [ over coresume ] times nip ] unit-test
\ No newline at end of file
+{ 4+2/3 } [ [ 1 + coyield 2 * coyield 3 / coreset ] cocreate 1 5 [ over coresume ] times nip ] unit-test
index 9d5c65aa94da179f01580122d64af8dadcccc793..10f99058b5e51140026e97b3b037f55824425ddd 100644 (file)
@@ -6,5 +6,5 @@ IN: crypto.barrett
 : barrett-mu ( n size -- mu )
     #! Calculates Barrett's reduction parameter mu
     #! size = word size in bits (8, 16, 32, 64, ...)
-    [ [ log2 1+ ] [ / 2 * ] bi* ]
+    [ [ log2 1 + ] [ / 2 * ] bi* ]
     [ 2^ rot ^ swap /i ] 2bi ;
index 286a313fda10376b80d77f717b572ab35beebe0f..30650c1e401daa806ef75eeb5e84cf6631359f9c 100644 (file)
@@ -11,7 +11,7 @@ IN: crypto.passwd-md5
     "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" nth ; inline
 
 : to64 ( v n -- string )
-    [ [ -6 shift ] [ 6 2^ 1- bitand lookup-table ] bi ]
+    [ [ -6 shift ] [ 6 2^ 1 - bitand lookup-table ] bi ]
     replicate nip ; inline
 
 PRIVATE>
index f4ef4687b5b98a2c1b60b9094be7540eb57116ce..917e98a6ee52cc7f251e7abf19a99ee737de90e4 100644 (file)
@@ -26,7 +26,7 @@ CONSTANT: public-key 65537
 : modulus-phi ( numbits -- n phi ) 
     #! Loop until phi is not divisible by the public key.
     dup rsa-primes [ * ] 2keep
-    [ 1- ] bi@ *
+    [ 1 - ] bi@ *
     dup public-key gcd nip 1 = [
         rot drop
     ] [
index 40c0b791cfd43ca4a72b200e2bac21c530b46115..615b38daf6d94ea1ca57f4349405707432e2f141 100644 (file)
@@ -29,7 +29,7 @@ IN: ctags.etags
   H{ } clone swap [ swap [ etag-add ] keep ] each ;
 
 : lines>bytes ( seq n -- bytes )
-  head 0 [ length 1+ + ] reduce ;
+  head 0 [ length 1 + + ] reduce ;
 
 : file>lines ( path -- lines )
   ascii file-lines ;
@@ -40,7 +40,7 @@ IN: ctags.etags
     1 HEX: 7f <string> %
     second dup number>string %
     1 CHAR: , <string> %
-    1- lines>bytes number>string %
+    1 - lines>bytes number>string %
   ] "" make ;
 
 : etag-length ( vector -- n )
@@ -72,4 +72,4 @@ IN: ctags.etags
   [ etag-strings ] dip ascii set-file-lines ; 
 
 : etags ( path -- )
-  [ (ctags) sort-values etag-hash >alist ] dip etags-write ;
\ No newline at end of file
+  [ (ctags) sort-values etag-hash >alist ] dip etags-write ;
index dc08656f7e578dae3b220cd93a005fb2c6b08962..77defb081d952a977e2a11f73ed1e183ed7ebb1f 100644 (file)
@@ -68,7 +68,7 @@ M: from-sequence cursor-get-unsafe
     >from-sequence< nth-unsafe ;
 
 M: from-sequence cursor-advance
-    [ 1+ ] change-n drop ;
+    [ 1 + ] change-n drop ;
 
 : >input ( seq -- cursor )
     0 from-sequence boa ; inline
index af080f61ebb25a60bdc76b8c07b24018820a16b7..72f553c0f773daecd69fd6705937977fc250075f 100644 (file)
@@ -16,7 +16,7 @@ IN: dns.misc
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: cdr-name ( name -- name ) dup CHAR: . index 1+ tail ;
+: cdr-name ( name -- name ) dup CHAR: . index 1 + tail ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
index 644533d3a235d75df09aeef4709bd593619a7f23..773fe31ea6a1c1ddc53ccf896aea12b1155afe52 100644 (file)
@@ -120,7 +120,7 @@ DEFER: query->rrs
 ! have-delegates?
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: cdr-name ( name -- name ) dup CHAR: . index 1+ tail ;
+: cdr-name ( name -- name ) dup CHAR: . index 1 + tail ;
 
 : is-soa? ( name -- ? ) SOA IN query boa matching-rrs empty? not ;
 
index d76b93a4d78af2a3dcf527a8b2101bdafc99d62a..1000bb9d71c9bcaac5401d1fbc6354e09ca032a0 100644 (file)
@@ -57,7 +57,7 @@ PRIVATE>
     KEY EC_KEY_get0_public_key dup 
     [| PUB |
         KEY EC_KEY_get0_group :> GROUP
-        GROUP EC_GROUP_get_degree bits>bytes 1+ :> LEN
+        GROUP EC_GROUP_get_degree bits>bytes 1 + :> LEN
         LEN <byte-array> :> BIN
         GROUP PUB POINT_CONVERSION_COMPRESSED BIN LEN f
         EC_POINT_point2oct ssl-error
@@ -72,4 +72,4 @@ PRIVATE>
     LEN *uint SIG resize ;
 
 : ecdsa-verify ( dgst sig -- ? )
-    ec-key-handle [ 0 -rot [ dup length ] bi@ ] dip ECDSA_verify 0 > ;
\ No newline at end of file
+    ec-key-handle [ 0 -rot [ dup length ] bi@ ] dip ECDSA_verify 0 > ;
index 5fe3d85e02a32d9ab3072188c23d0fbb44c20197..5f78c6770cadcfbadc2dc70b4584377fb18eff52 100644 (file)
@@ -41,21 +41,21 @@ TUPLE: game-loop-error game-loop error ;
 <PRIVATE
 
 : redraw ( loop -- )
-    [ 1+ ] change-frame-number
+    [ 1 + ] change-frame-number
     [ tick-slice ] [ delegate>> ] bi draw* ;
 
 : tick ( loop -- )
     delegate>> tick* ;
 
 : increment-tick ( loop -- )
-    [ 1+ ] change-tick-number
+    [ 1 + ] change-tick-number
     dup tick-length>> [ + ] curry change-last-tick
     drop ;
 
 : ?tick ( loop count -- )
     [ millis >>last-tick drop ] [
         over [ since-last-tick ] [ tick-length>> ] bi >=
-        [ [ drop increment-tick ] [ drop tick ] [ 1- ?tick ] 2tri ]
+        [ [ drop increment-tick ] [ drop tick ] [ 1 - ?tick ] 2tri ]
         [ 2drop ] if
     ] if-zero ;
 
index a77ebf2577071e2d6cd12ab9b43a131a12697175..2f94f3f2d695924bb3fb87e98546f0bdf6bbcadc 100755 (executable)
@@ -69,7 +69,7 @@ M: hashcash string>>
 
 : (mint) ( tuple counter -- tuple ) 
     2dup set-suffix checksummed-bits pick 
-    valid-guess? [ drop ] [ 1+ (mint) ] if ;
+    valid-guess? [ drop ] [ 1 + (mint) ] if ;
 
 PRIVATE>
 
index 02b45ee9396c57d407f49f052138ea69cefbeed1..d206ae5f45110a4901429b911f5ef8cc7aada0f8 100755 (executable)
@@ -16,7 +16,7 @@ TUPLE: link attributes clickable ;
 
 : find-nth ( seq quot n -- i elt )
     [ <enum> >alist ] 2dip -rot
-    '[ _ [ second @ ] find-from rot drop swap 1+ ]
+    '[ _ [ second @ ] find-from rot drop swap 1 + ]
     [ f 0 ] 2dip times drop first2 ; inline
 
 : find-first-name ( vector string -- i/f tag/f )
@@ -29,7 +29,7 @@ TUPLE: link attributes clickable ;
 : find-between* ( vector i/f tag/f -- vector )
     over integer? [
         [ tail-slice ] [ name>> ] bi*
-        dupd find-matching-close drop dup [ 1+ ] when
+        dupd find-matching-close drop dup [ 1 + ] when
         [ head ] [ first ] if*
     ] [
         3drop V{ } clone
index 6d9b778ee8d1f2ba08bc5f818149d233230dcab4..38aa291a3aff4afa9afdd7bfbabf70a65a4ac001 100644 (file)
@@ -104,7 +104,7 @@ CONSTANT: id3v1+-offset $[ 128 227 + ]
     0 [ [ 7 shift ] dip bitor ] reduce ;
 
 : synchsafe>seq ( n -- seq )
-    dup 1+ log2 1+ 7 / ceiling
+    dup 1 + log2 1 + 7 / ceiling
     [ [ -7 shift ] keep HEX: 7f bitand  ] replicate nip reverse ;
 
 : filter-text-data ( data -- filtered )
index b065dfe2f0b22168193b7f6014c50b90e0805853..6ce851e7dd0137a758e981bb637189db1d8b0e73 100644 (file)
@@ -10,7 +10,7 @@ IN: irc.client.internals
 : do-connect ( server port quot: ( host port -- stream ) attempts -- stream/f )
     dup 0 > [
         [ drop call( host port -- stream ) ]
-        [ drop 15 sleep 1- do-connect ]
+        [ drop 15 sleep 1 - do-connect ]
         recover
     ] [ 2drop 2drop f ] if ;
 
index 986574ee9148c847dc74fae2b047ed5136a3c0e9..ac5be9df2e18b8630ed65dd01e95e6397ad9c6a0 100644 (file)
@@ -13,7 +13,7 @@ TUPLE: segment < oint number color radius ;
 C: <segment> segment
 
 : segment-number++ ( segment -- )
-    [ number>> 1+ ] keep (>>number) ;
+    [ number>> 1 + ] keep (>>number) ;
 
 : clamp-length ( n seq -- n' )
     0 swap length clamp ;
@@ -31,7 +31,7 @@ CONSTANT: random-rotation-angle $[ pi 20 / ]
 
 : (random-segments) ( segments n -- segments )
     dup 0 > [
-        [ dup last random-segment over push ] dip 1- (random-segments)
+        [ dup last random-segment over push ] dip 1 - (random-segments)
     ] [ drop ] if ;
 
 CONSTANT: default-segment-radius 1
@@ -78,7 +78,7 @@ CONSTANT: default-segment-radius 1
     rot dup length swap <slice> find-nearest-segment ;
 
 : nearest-segment-backward ( segments oint start -- segment )
-    swapd 1+ 0 spin <slice> <reversed> find-nearest-segment ;
+    swapd 1 + 0 spin <slice> <reversed> find-nearest-segment ;
 
 : nearest-segment ( segments oint start-segment -- segment )
     #! find the segment nearest to 'oint', and return it.
@@ -91,10 +91,10 @@ CONSTANT: default-segment-radius 1
     over clamp-length swap nth ;
 
 : next-segment ( segments current-segment -- segment )
-    number>> 1+ get-segment ;
+    number>> 1 + get-segment ;
 
 : previous-segment ( segments current-segment -- segment )
-    number>> 1- get-segment ;
+    number>> 1 - get-segment ;
 
 : heading-segment ( segments current-segment heading -- segment )
     #! the next segment on the given heading
index 1ecd56d416d2df77e1fa02023eebe02cd7f304d9..59efec1c02302124c896aa0956fc71e538470e8b 100755 (executable)
@@ -75,7 +75,7 @@ SYMBOL: terms
 
 : inversions ( seq -- n )
     0 swap [ length ] keep [
-        [ nth ] 2keep swap 1+ tail-slice (inversions) +
+        [ nth ] 2keep swap 1 + tail-slice (inversions) +
     ] curry each ;
 
 : duplicates? ( seq -- ? )
@@ -141,7 +141,7 @@ DEFER: (d)
 
 ! Computing a basis
 : graded ( seq -- seq )
-    dup 0 [ length max ] reduce 1+ [ V{ } clone ] replicate
+    dup 0 [ length max ] reduce 1 + [ V{ } clone ] replicate
     [ dup length pick nth push ] reduce ;
 
 : nth-basis-elt ( generators n -- elt )
@@ -176,7 +176,7 @@ DEFER: (d)
 ! Graded by degree
 : (graded-ker/im-d) ( n seq -- null/rank )
     #! d: C(n) ---> C(n+1)
-    [ ?nth ] [ [ 1+ ] dip ?nth ] 2bi
+    [ ?nth ] [ [ 1 + ] dip ?nth ] 2bi
     dim-im/ker-d ;
 
 : graded-ker/im-d ( graded-basis -- seq )
@@ -240,7 +240,7 @@ DEFER: (d)
     ] if ;
 
 : graded-triple ( seq n -- triple )
-    3 [ 1- + ] with map swap [ ?nth ] curry map ;
+    3 [ 1 - + ] with map swap [ ?nth ] curry map ;
 
 : graded-triples ( seq -- triples )
     dup length [ graded-triple ] with map ;
index 16a45fc691fce9400b5b44387391475aa5fc264b..39d6450ba0cffc20d317b4e4608f473964bf746c 100755 (executable)
@@ -117,5 +117,5 @@ PRIVATE>
 : stirling-fact ( n -- fact )
     [ pi 2 * * sqrt ]
     [ [ e / ] keep ^ ]
-    [ 12 * recip 1+ ] tri * * ;
+    [ 12 * recip 1 + ] tri * * ;
 
index 3e0e5437b4bff5491f635499f7db2ce05d865b19..55789778af26ad7f1dc7eaecf978f44c1bf6a95e 100644 (file)
@@ -45,7 +45,7 @@ MACRO: duals>nweave ( n -- )
 MACRO: chain-rule ( word -- e )
     [ input-length '[ _ duals>nweave ] ]
     [ "derivative" word-prop ]
-    [ input-length 1+ '[ _ nspread ] ]
+    [ input-length 1 + '[ _ nspread ] ]
     tri
     '[ [ @ _ @ ] sum-outputs ] ;
 
@@ -80,4 +80,4 @@ MACRO: dual-op ( word -- )
 
 ! Specialize math functions to operate on dual numbers.
 [ all-words [ "derivative" word-prop ] filter
-    [ define-dual ] each ] with-compilation-unit
\ No newline at end of file
+    [ define-dual ] each ] with-compilation-unit
index 4823e358b007137783752f7258d3998eb9727daa..5954b08c9b3649331aafe2c0d666dc73c6defd7b 100644 (file)
@@ -7,10 +7,10 @@ IN: math.finance
 <PRIVATE
 
 : weighted ( x y a -- z )
-    tuck [ * ] [ 1- neg * ] 2bi* + ;
+    tuck [ * ] [ 1 - neg * ] 2bi* + ;
 
 : a ( n -- a )
-    1+ 2 swap / ;
+    1 + 2 swap / ;
 
 PRIVATE>
 
index 13f314f6bae8778bff5a470cbea7a099b5f3f7c7..c2733058b3c4ed6cbcf1aa8368fdbafb0aca5a65 100644 (file)
@@ -6,4 +6,4 @@ IN: math.primes.lists
 : lprimes ( -- list ) 2 [ next-prime ] lfrom-by ;
 
 : lprimes-from ( n -- list )
-    dup 3 < [ drop lprimes ] [ 1- next-prime [ next-prime ] lfrom-by ] if ;
+    dup 3 < [ drop lprimes ] [ 1 - next-prime [ next-prime ] lfrom-by ] if ;
index 46e326b7e77184929e3d7cc1bab8146e9b9fb2a4..8d313b91970f4fcc3dfe4eba2fa4417e7bf8879f 100644 (file)
@@ -73,7 +73,7 @@ MEMO: units ( -- seq ) ! up to 10^99
     } cond ;
 
 : over-1000000 ( n -- str )
-    3 digit-groups [ 1+ units nth n-units ] map-index sift
+    3 digit-groups [ 1 + units nth n-units ] map-index sift
     reverse " " join ;
 
 : decompose ( n -- str ) 1000000 /mod [ over-1000000 ] dip complete ;
index 0f1eb8edda53fcf203689f1d7640ecf212b4e903..5504633bb636fdac67bc5007f3c930467c142776 100644 (file)
@@ -78,7 +78,7 @@ IN: monads.tests
 ] unit-test
 
 LAZY: nats-from ( n -- list )
-    dup 1+ nats-from cons ;
+    dup 1 + nats-from cons ;
 
 : nats ( -- list ) 0 nats-from ;
 
index e627a745cdc5fa13f5fc4abb1b8f89e9edac5398..2c7258bb68e1b7aca591eae5ba6b259a2a081763 100755 (executable)
@@ -3,7 +3,7 @@ namespaces opengl opengl.gl sequences ui ui.gadgets ui.gestures
 ui.gadgets.worlds ui.render accessors combinators literals ;
 IN: opengl.demo-support
 
-CONSTANT: FOV $[ 2.0 sqrt 1+ ]
+CONSTANT: FOV $[ 2.0 sqrt 1 + ]
 CONSTANT: MOUSE-MOTION-SCALE 0.5
 CONSTANT: KEY-ROTATE-STEP 10.0
 
index 814821fba963888825ea4cf53ed9b1d38539ea4d..7a73561e56fbbdfaf2c1f436ef95ce570d0c2110 100755 (executable)
@@ -339,7 +339,7 @@ LAZY: surrounded-by ( parser start end -- parser' )
         2drop epsilon
     ] [
         2dup exactly-n
-        -rot 1- at-most-n <|>
+        -rot 1 - at-most-n <|>
     ] if ;
 
 : at-least-n ( parser n -- parser' )
index eff0043ac373a9adcffc51ec78dd9aceb21ffc9e..dcde55c91ada82f2a6c696b928ebb2d58549a219 100644 (file)
@@ -11,8 +11,8 @@ CONSULT: assoc-protocol lex-hash hash>> ;
 
 :: prepare-pos ( v i -- c l )
     [let | n [ i v head-slice ] |
-           v CHAR: \n n last-index -1 or 1+ -
-           n [ CHAR: \n = ] count 1+
+           v CHAR: \n n last-index -1 or 1 + -
+           n [ CHAR: \n = ] count 1 +
     ] ;
       
 : store-pos ( v a -- )
@@ -25,12 +25,12 @@ M: lex-hash set-at
         [ swap hash>> set-at ]
     } case ;
 
-:: at-pos ( t l c -- p ) t l head-slice [ length ] map sum l 1- + c + ;
+:: at-pos ( t l c -- p ) t l head-slice [ length ] map sum l 1 - + c + ;
 
 M: lex-hash at*
     swap {
       { input [ drop lexer get text>> "\n" join t ] }
-      { pos [ drop lexer get [ text>> ] [ line>> 1- ] [ column>> 1+ ] tri at-pos t ] }
+      { pos [ drop lexer get [ text>> ] [ line>> 1 - ] [ column>> 1 + ] tri at-pos t ] }
       [ swap hash>> at* ]
     } case ;
 
@@ -61,4 +61,4 @@ space = " " | "\n" | "\t"
 spaces = space* => [[ drop ignore ]]
 chunk = (!(space) .)+ => [[ >string ]]
 expr = spaces chunk
-;EBNF
\ No newline at end of file
+;EBNF
index 204527418b2828de68ede1571adb1a49cdaf6111..d59b9103449c5832c57fc9770bc35693764afa3e 100644 (file)
@@ -23,7 +23,7 @@ IN: project-euler.001
 <PRIVATE
 
 : sum-divisible-by ( target n -- m )
-    [ /i dup 1+ * ] keep * 2 /i ;
+    [ /i dup 1 + * ] keep * 2 /i ;
 
 PRIVATE>
 
index d2679f6309eade32c9880dc7bbb410cf5f388a07..223404b9d6888579994421db040eb36aa40aba1c 100644 (file)
@@ -34,7 +34,7 @@ IN: project-euler.012
 ! --------
 
 : euler012 ( -- answer )
-    8 [ dup nth-triangle tau* 500 < ] [ 1+ ] while nth-triangle ;
+    8 [ dup nth-triangle tau* 500 < ] [ 1 + ] while nth-triangle ;
 
 ! [ euler012 ] 10 ave-time
 ! 6573 ms ave run time - 346.27 SD (10 trials)
index b0305d5c3941daeb3154244dc6677e7e34068e90..49680177d525fb57bb69218141e32e270b1ab91c 100644 (file)
@@ -36,7 +36,7 @@ IN: project-euler.014
 <PRIVATE
 
 : next-collatz ( n -- n )
-    dup even? [ 2 / ] [ 3 * 1+ ] if ;
+    dup even? [ 2 / ] [ 3 * 1 + ] if ;
 
 : longest ( seq seq -- seq )
     2dup [ length ] bi@ > [ drop ] [ nip ] if ;
@@ -59,7 +59,7 @@ PRIVATE>
 <PRIVATE
 
 : worth-calculating? ( n -- ? )
-    1- 3 { [ divisor? ] [ / even? ] } 2&& ;
+    1 - 3 { [ divisor? ] [ / even? ] } 2&& ;
 
 PRIVATE>
 
index 1b675d41c47333ff9171c85a652ae12ca873b70a..b548591b5e3ba6eff89a05315a6afd883169bfc0 100644 (file)
@@ -32,7 +32,7 @@ IN: project-euler.022
     ascii file-contents [ quotable? ] filter "," split ;
 
 : name-scores ( seq -- seq )
-    [ 1+ swap alpha-value * ] map-index ;
+    [ 1 + swap alpha-value * ] map-index ;
 
 PRIVATE>
 
index 5dfe7b9f56343ea334886858a2fe2a6d42f1d826..e381e323d15f3fa61b586d675d2c06585a585f98 100644 (file)
@@ -44,7 +44,7 @@ MEMO: fib ( m -- n )
 <PRIVATE
 
 : (digit-fib) ( n term -- term )
-    2dup fib number>string length > [ 1+ (digit-fib) ] [ nip ] if ;
+    2dup fib number>string length > [ 1 + (digit-fib) ] [ nip ] if ;
 
 : digit-fib ( n -- term )
     1 (digit-fib) ;
@@ -68,7 +68,7 @@ PRIVATE>
 <PRIVATE
 
 : digit-fib* ( n -- term )
-    1- 5 log10 2 / + phi log10 / ceiling >integer ;
+    1 - 5 log10 2 / + phi log10 / ceiling >integer ;
 
 PRIVATE>
 
index 8e0cf37fa2724b6ad466989052747d93c0d6812e..4f4466c3952a73523430f43b12542f05898f5736 100644 (file)
@@ -37,7 +37,7 @@ IN: project-euler.026
     1 1000 (a,b) [ prime? ] filter [ 1 swap / ] map ;
 
 : (mult-order) ( n a m -- k )
-    3dup ^ swap mod 1 = [ 2nip ] [ 1+ (mult-order) ] if ;
+    3dup ^ swap mod 1 = [ 2nip ] [ 1 + (mult-order) ] if ;
 
 PRIVATE>
 
index f7bffbf66587d55452c1015796e34c44d7953c46..f97d8e9e0ddd700dc6b2b339a817d980c0d36908 100644 (file)
@@ -53,7 +53,7 @@ IN: project-euler.027
     dup sq -rot * + + ;
 
 : (consecutive-primes) ( b a n -- m )
-    3dup quadratic prime? [ 1+ (consecutive-primes) ] [ 2nip ] if ;
+    3dup quadratic prime? [ 1 + (consecutive-primes) ] [ 2nip ] if ;
 
 : consecutive-primes ( a b -- m )
     swap 0 (consecutive-primes) ;
index 2a75336a0d4c3c9e9ac8b45cea2d2f53a9217648..b689df50bbd9e2d1c2979c3bd534885fcb9e867f 100644 (file)
@@ -38,7 +38,7 @@ IN: project-euler.030
 PRIVATE>
 
 : euler030 ( -- answer )
-    325537 [0,b) [ dup sum-fifth-powers = ] filter sum 1- ;
+    325537 [0,b) [ dup sum-fifth-powers = ] filter sum 1 - ;
 
 ! [ euler030 ] 100 ave-time
 ! 1700 ms ave run time - 64.84 SD (100 trials)
index 378461842312e15d9f4815690281e5abc03e6c8a..7d98de62b1bb26a7825e75ff71a91d79cae19f29 100755 (executable)
@@ -39,13 +39,13 @@ IN: project-euler.035
 : (circular?) ( seq n -- ? )
     dup 0 > [
         2dup rotate 10 digits>integer
-        prime? [ 1- (circular?) ] [ 2drop f ] if
+        prime? [ 1 - (circular?) ] [ 2drop f ] if
     ] [
         2drop t
     ] if ;
 
 : circular? ( seq -- ? )
-    dup length 1- (circular?) ;
+    dup length 1 - (circular?) ;
 
 PRIVATE>
 
index 3c6e2eac0275d365a452b4b816344c4f2b841984..dd700510824ab3afd782d663a73accaf6e116a10 100755 (executable)
@@ -39,7 +39,7 @@ IN: project-euler.038
     pick length 8 > [
         2drop 10 digits>integer
     ] [
-        [ * number>digits over push-all ] 2keep 1+ (concat-product)
+        [ * number>digits over push-all ] 2keep 1 + (concat-product)
     ] if ;
 
 : concat-product ( n -- m )
index dee3f9804c15dde9c4ebd4d579c82e513297b71d..1ad163d5070293ac853692077250587c14eac831 100755 (executable)
@@ -37,8 +37,8 @@ SYMBOL: p-count
     p-count get length ;
 
 : adjust-p-count ( n -- )
-    max-p 1- over <range> p-count get
-    [ [ 1+ ] change-nth ] curry each ;
+    max-p 1 - over <range> p-count get
+    [ [ 1 + ] change-nth ] curry each ;
 
 : (count-perimeters) ( seq -- )
     dup sum max-p < [
index 86fb34629e03ba974b1ff85eb7eb975638d86306..a60714357ea2578dc36f4b460ebfda2cfcfb9b3a 100755 (executable)
@@ -28,7 +28,7 @@ IN: project-euler.040
 
 : (concat-upto) ( n limit str -- str )
     2dup length > [
-        pick number>string over push-all rot 1+ -rot (concat-upto)
+        pick number>string over push-all rot 1 + -rot (concat-upto)
     ] [
         2nip
     ] if ;
@@ -37,7 +37,7 @@ IN: project-euler.040
     SBUF" " clone 1 -rot (concat-upto) ;
 
 : nth-integer ( n str -- m )
-    [ 1- ] dip nth 1string string>number ;
+    [ 1 - ] dip nth 1string string>number ;
 
 PRIVATE>
 
index 8c74cc9b312a0ee67e23d2714f0e59b7cb850a34..e531ba848f303b5b66cfbea2ed09f7e549d380c6 100644 (file)
@@ -35,7 +35,7 @@ IN: project-euler.042
 
 : (triangle-upto) ( limit n -- )
     2dup nth-triangle > [
-        dup nth-triangle , 1+ (triangle-upto)
+        dup nth-triangle , 1 + (triangle-upto)
     ] [
         2drop
     ] if ;
@@ -61,7 +61,7 @@ PRIVATE>
 <PRIVATE
 
 : triangle? ( n -- ? )
-    8 * 1+ sqrt 1- 2 / 1 mod zero? ;
+    8 * 1 + sqrt 1 - 2 / 1 mod zero? ;
 
 PRIVATE>
 
index 75241499e11fc90387fd3944d4ec2c3b68f33fd4..bea7313abd214ede4d5c55c6761f8d97464620f6 100644 (file)
@@ -36,7 +36,7 @@ IN: project-euler.043
 <PRIVATE
 
 : subseq-divisible? ( n index seq -- ? )
-    [ 1- dup 3 + ] dip subseq 10 digits>integer swap divisor? ;
+    [ 1 - dup 3 + ] dip subseq 10 digits>integer swap divisor? ;
 
 : interesting? ( seq -- ? )
     {
index 8fc979e8bcf3257627b4d07723c69be91aa24afd..4c2306c480cf1e59958d26aaf03818d8af077103 100644 (file)
@@ -29,7 +29,7 @@ IN: project-euler.044
 <PRIVATE
 
 : nth-pentagonal ( n -- seq )
-    dup 3 * 1- * 2 / ;
+    dup 3 * 1 - * 2 / ;
 
 : sum-and-diff? ( m n -- ? )
     [ + ] [ - ] 2bi [ pentagonal? ] bi@ and ;
index 939b8416bb3b9083f0c7e5509d82aba37c02fb0e..8b0db1a32e4584c2b045ddc2505a0622e79a85fa 100644 (file)
@@ -28,7 +28,7 @@ IN: project-euler.045
 <PRIVATE
 
 : nth-hexagonal ( n -- m )
-    dup 2 * 1- * ;
+    dup 2 * 1 - * ;
 
 DEFER: next-solution
 
@@ -36,7 +36,7 @@ DEFER: next-solution
     dup pentagonal? [ nip ] [ drop next-solution ] if ;
 
 : next-solution ( n -- m )
-    1+ dup nth-hexagonal (next-solution) ;
+    1 + dup nth-hexagonal (next-solution) ;
 
 PRIVATE>
 
index 0aa9eafe58017297ca159ffff4a694490c7ec8db..13e39c815cecce611d3583f73864d79a65ee1d2f 100755 (executable)
@@ -37,7 +37,7 @@ IN: project-euler.046
     dup perfect-squares [ 2 * - ] with map [ prime? ] any? ;
 
 : next-odd-composite ( n -- m )
-    dup odd? [ 2 + ] [ 1+ ] if dup prime? [ next-odd-composite ] when ;
+    dup odd? [ 2 + ] [ 1 + ] if dup prime? [ next-odd-composite ] when ;
 
 : disprove-conjecture ( n -- m )
     dup fits-conjecture? [ next-odd-composite disprove-conjecture ] when ;
index e251045cd4d324970f692564e36237ba4cd031e4..e7b585bf0d5b030edf1216c6c9fd49fc66178e5c 100644 (file)
@@ -36,8 +36,8 @@ IN: project-euler.047
         swap - nip
     ] [
         dup prime? [ [ drop 0 ] 2dip ] [
-            2dup unique-factors length = [ [ 1+ ] 2dip ] [ [ drop 0 ] 2dip ] if
-        ] if 1+ (consecutive)
+            2dup unique-factors length = [ [ 1 + ] 2dip ] [ [ drop 0 ] 2dip ] if
+        ] if 1 + (consecutive)
     ] if ;
 
 : consecutive ( goal test -- n )
@@ -69,10 +69,10 @@ SYMBOL: sieve
     sieve get nth 0 = ;
 
 : multiples ( n -- seq )
-    sieve get length 1- over <range> ;
+    sieve get length 1 - over <range> ;
 
 : increment-counts ( n -- )
-     multiples [ sieve get [ 1+ ] change-nth ] each ;
+     multiples [ sieve get [ 1 + ] change-nth ] each ;
 
 : prime-tau-upto ( limit -- seq )
     dup initialize-sieve 2 swap [a,b) [
index 9ecf942ef669a88ee1a0b073cbf0f24e121edd85..8b6f635ee4bb5c932c65ae2a4fde0b7a70b47390 100644 (file)
@@ -27,7 +27,7 @@ IN: project-euler.049
 
 : count-digits ( n -- byte-array )
     10 <byte-array> [
-        '[ 10 /mod _ [ 1+ ] change-nth dup 0 > ] loop drop
+        '[ 10 /mod _ [ 1 + ] change-nth dup 0 > ] loop drop
     ] keep ;
 
 HINTS: count-digits fixnum ;
index 0c5b288b658c0424304553755b1d68b9a5b2fce1..6176ac81d2f3765db1376916b1eb5478e8324737 100644 (file)
@@ -66,7 +66,7 @@ IN: project-euler.050
     2dup [ first ] bi@ > [ drop ] [ nip ] if ;
 
 : continue? ( pair seq -- ? )
-    [ first ] [ length 1- ] bi* < ;
+    [ first ] [ length 1 - ] bi* < ;
 
 : (find-longest) ( best seq limit -- best )
     [ longest-prime longest ] 2keep 2over continue? [
index c25b1adcc073c3c7e2cdbd100af456307bc58bc9..037cc87288420e13ab0823aaaef63ba22287663d 100644 (file)
@@ -24,7 +24,7 @@ IN: project-euler.052
 <PRIVATE
 
 : map-nx ( n x -- seq )
-    [ 1+ * ] with map ; inline
+    [ 1 + * ] with map ; inline
 
 : all-same-digits? ( seq -- ? )
     [ number>digits natural-sort ] map all-equal? ;
@@ -35,9 +35,9 @@ IN: project-euler.052
 : next-all-same ( x n -- n )
     dup candidate? [
         2dup swap map-nx all-same-digits?
-        [ nip ] [ 1+ next-all-same ] if
+        [ nip ] [ 1 + next-all-same ] if
     ] [
-        1+ next-all-same
+        1 + next-all-same
     ] if ;
 
 PRIVATE>
index 133175f2a87d9328891787e2c3509d901c848f15..6edf2ad22a47ea80169fa4ca7108acd430247b2c 100644 (file)
@@ -43,13 +43,13 @@ CONSTANT: PERCENT_PRIME 0.1
 !    (n-2)² + 4(n-1) = odd squares, no need to calculate
 
 : prime-corners ( n -- m )
-    3 [1,b] swap '[ _ [ 1- * ] keep 2 - sq + prime? ] count ;
+    3 [1,b] swap '[ _ [ 1 - * ] keep 2 - sq + prime? ] count ;
 
 : total-corners ( n -- m )
-    1- 2 * ; foldable
+    1 - 2 * ; foldable
 
 : ratio-below? ( count length -- ? )
-    total-corners 1+ / PERCENT_PRIME < ;
+    total-corners 1 + / PERCENT_PRIME < ;
 
 : next-layer ( count length -- count' length' )
     2 + [ prime-corners + ] keep ;
index 3a59d665224ba24c13d67a1a6f9169bd6f01b68c..5094dcd674df0fd1f2544c6a59f95a38b9f508be 100644 (file)
@@ -70,7 +70,7 @@ PRIVATE>
     } cond product ;
 
 : primorial-upto ( limit -- m )
-    1 swap '[ dup primorial _ <= ] [ 1+ dup primorial ] produce
+    1 swap '[ dup primorial _ <= ] [ 1 + dup primorial ] produce
     nip penultimate ;
 
 PRIVATE>
index 5f54d8508e89683d64e352b1fdab0b8034877c8f..7285078bcf0cb19c481e1f92eeeaca978479526e 100755 (executable)
@@ -50,8 +50,8 @@ SYMBOL: p-count
     p-count get length ;
 
 : adjust-p-count ( n -- )
-    max-p 1- over <range> p-count get
-    [ [ 1+ ] change-nth ] curry each ;
+    max-p 1 - over <range> p-count get
+    [ [ 1 + ] change-nth ] curry each ;
 
 : (count-perimeters) ( seq -- )
     dup sum max-p < [
index e6ed9035d2b72e1fd702003551d77b247ff7718d..8615a272ae1cfd7e3bd042d8ea95aeb15a711675 100644 (file)
@@ -35,7 +35,7 @@ IN: project-euler.076
     over zero? [
         3drop
     ] [
-        [ [ 1-  2array ] dip at     ]
+        [ [ 1 -  2array ] dip at     ]
         [ [ use 2array ] dip at +   ]
         [ [     2array ] dip set-at ] 3tri
     ] if ;
@@ -46,7 +46,7 @@ IN: project-euler.076
 : (euler076) ( n -- m )
     dup init
     [ [ ways ] curry each-subproblem ]
-    [ [ dup 2array ] dip at 1- ] 2bi ;
+    [ [ dup 2array ] dip at 1 - ] 2bi ;
 
 PRIVATE>
 
index 4901eae3428af4eb4f058a563b862d90a2d4a1b5..9f22460b3cb69cf34eb392e53490f9e2a033ece9 100644 (file)
@@ -38,7 +38,7 @@ IN: project-euler.092
     567 [1,b] [ chain-ending ] map ;
 
 : fast-chain-ending ( seq n -- m )
-    dup 567 > [ next-link ] when 1- swap nth ;
+    dup 567 > [ next-link ] when 1 - swap nth ;
 
 PRIVATE>
 
index a8895c215a0113e8c700825ba0ca7363fc6e5fcb..35c3629035d1593753f6edf349d63f9bf284d733 100644 (file)
@@ -23,7 +23,7 @@ IN: project-euler.097
 ! --------
 
 : euler097 ( -- answer )
-     2 7830457 10 10 ^ ^mod 28433 * 10 10 ^ mod 1+ ;
+     2 7830457 10 10 ^ ^mod 28433 * 10 10 ^ mod 1 + ;
 
 ! [ euler097 ] 100 ave-time
 ! 0 ms ave run timen - 0.22 SD (100 trials)
index 30bf52bebbf56867f719417d4965e4bdbbc99baf..36fe7783fe398384853c4c7d5183929eb89c3484 100644 (file)
@@ -39,7 +39,7 @@ IN: project-euler.099
     flip first2 swap [ log ] map v* ;
 
 : solve ( seq -- index )
-    simplify [ supremum ] keep index 1+ ;
+    simplify [ supremum ] keep index 1 + ;
 
 PRIVATE>
 
index 6f05eb7120846adb2a05fdcb1ad2ab95aa018bf5..72584d833ec842bc4eca1d5e7ea344ba224e2981 100644 (file)
@@ -25,7 +25,7 @@ IN: project-euler.100
 
 : euler100 ( -- answer )
     1 1
-    [ dup dup 1- * 2 * 10 24 ^ <= ]
+    [ dup dup 1 - * 2 * 10 24 ^ <= ]
     [ tuck 6 * swap - 2 - ] while nip ;
 
 ! TODO: solution needs generalization
index 2766322323c6e8573f9698436371515a3baf9675..43eb30c9f691490721c17c3bf37004d4c69b1c29 100644 (file)
@@ -38,13 +38,13 @@ IN: project-euler.116
 <PRIVATE
 
 : nth* ( n seq -- elt/0 )
-    [ length swap - 1- ] keep ?nth 0 or ;
+    [ length swap - 1 - ] keep ?nth 0 or ;
 
 : next ( colortile seq -- )
      [ nth* ] [ last + ] [ push ] tri ;
 
 : ways ( length colortile -- permutations )
-    V{ 1 } clone [ [ next ] 2curry times ] keep last 1- ;
+    V{ 1 } clone [ [ next ] 2curry times ] keep last 1 - ;
 
 : (euler116) ( length -- permutations )
     3 [1,b] [ ways ] with sigma ;
index 582e103e56538a67579b1e680b6cef9ea2b0ec28..a75e65218350af7a051c881d383ea9bbfbb66dc7 100644 (file)
@@ -32,13 +32,13 @@ IN: project-euler.148
 <PRIVATE
 
 : sum-1toN ( n -- sum )
-    dup 1+ * 2/ ; inline
+    dup 1 + * 2/ ; inline
 
 : >base7 ( x -- y )
     [ dup 0 > ] [ 7 /mod ] produce nip ;
 
 : (use-digit) ( prev x index -- next )
-    [ [ 1+ * ] [ sum-1toN 7 sum-1toN ] bi ] dip ^ * + ;
+    [ [ 1 + * ] [ sum-1toN 7 sum-1toN ] bi ] dip ^ * + ;
 
 : (euler148) ( x -- y )
     >base7 0 [ (use-digit) ] reduce-index ;
index eeb4b0c315eb82420b8db813dd3c1d1ddacf650b..a54b7d1db0faa147fd98c6b2a82ba21efaa163b8 100644 (file)
@@ -56,10 +56,10 @@ IN: project-euler.150
 :: (euler150) ( m -- n )
     [let | table [ sums-triangle ] |
         m [| x |
-            x 1+ [| y |
+            x 1 + [| y |
                 m x - [0,b) [| z |
                     x z + table nth-unsafe
-                    [ y z + 1+ swap nth-unsafe ]
+                    [ y z + 1 + swap nth-unsafe ]
                     [ y        swap nth-unsafe ] bi -
                 ] map partial-sum-infimum
             ] map-infimum
index 708fe9849e7c474ef5cd614f4321e8fb79d035e5..ccdb76d80e05ca679f5b464c27b6adf5bb9fd396 100644 (file)
@@ -42,8 +42,8 @@ SYMBOL: table
         <=>
         {
             { +lt+ [ ] }
-            { +eq+ [ 1- ] }
-            { +gt+ [ 1+ ] }
+            { +eq+ [ 1 - ] }
+            { +gt+ [ 1 + ] }
         } case
     ] curry map-index ;
 
@@ -59,9 +59,9 @@ DEFER: (euler151)
 : (euler151) ( x -- y )
     table get [ {
         { { 0 0 0 1 } [ 0 ] }
-        { { 0 0 1 0 } [ { 0 0 0 1 } (euler151) 1+ ] }
-        { { 0 1 0 0 } [ { 0 0 1 1 } (euler151) 1+ ] }
-        { { 1 0 0 0 } [ { 0 1 1 1 } (euler151) 1+ ] }
+        { { 0 0 1 0 } [ { 0 0 0 1 } (euler151) 1 + ] }
+        { { 0 1 0 0 } [ { 0 0 1 1 } (euler151) 1 + ] }
+        { { 1 0 0 0 } [ { 0 1 1 1 } (euler151) 1 + ] }
         [ [ dup length [ pick-sheet ] with map sum ] [ sum ] bi / ]
      } case ] cache ;
 
index 5f0b853f0db998207cbe1d9787bdd85fc4cc7bef..efd1c8ee60494ccb678dd5e03ddbc2b82853d38a 100644 (file)
@@ -30,7 +30,7 @@ MEMO: fn ( n -- x )
     {
         { [ dup 2 < ]  [ drop 1 ] }
         { [ dup odd? ] [ 2/ fn ] }
-        [ 2/ [ fn ] [ 1- fn ] bi + ]
+        [ 2/ [ fn ] [ 1 - fn ] bi + ]
     } cond ;
 
 : euler169 ( -- result )
index c99d670808a905f51d6b908a755dd440859b85fd..3473d9327c8dfd4180506326f72ced70ad69f2de 100644 (file)
@@ -42,7 +42,7 @@ IN: project-euler.175
 
 : compute ( vec ratio -- )
     {
-        { [ dup integer? ] [ 1- 0 add-bits ] }
+        { [ dup integer? ] [ 1 - 0 add-bits ] }
         { [ dup 1 < ] [ 1 over - / dupd compute 1 1 add-bits ] }
         [ [ 1 mod compute ] 2keep >integer 0 add-bits ]
     } cond ;
index a9e62ec3a90033659b83aff90487b0b1afc466a0..ed4f03dda1aabc8a3a13e5004234bc20260b1b77 100644 (file)
@@ -58,7 +58,7 @@ IN: project-euler.186
         pick [ next ] [ next ] bi
         [ = ] [
             pick equate
-            [ 1+ ] dip
+            [ 1 + ] dip
         ] 2unless? (p186)
     ] [
         drop nip
index ec52af041524405c6a4c95eaff8b9a1b021d9185..19ff2c253ca6f5520454d3c523507d116a981950 100644 (file)
@@ -43,7 +43,7 @@ IN: project-euler.190
 PRIVATE>
 
 :: P_m ( m -- P_m )
-    m [1,b] [| i | 2 i * m 1+ / i ^ ] PI ;
+    m [1,b] [| i | 2 i * m 1 + / i ^ ] PI ;
 
 : euler190 ( -- answer )
     2 15 [a,b] [ P_m truncate ] sigma ;
index 2f165f654889b1106d473334feddb20098738a75..806098b865ebea4754e88b3c9be2226377870306 100644 (file)
@@ -45,7 +45,7 @@ IN: project-euler.203
     [ 0 prefix ] [ 0 suffix ] bi [ + ] 2map ;
 
 : generate ( n -- seq )
-    1- { 1 } [ (generate) ] iterate concat prune ;
+    1 - { 1 } [ (generate) ] iterate concat prune ;
 
 : squarefree ( n -- ? )
     factors all-unique? ;
index 30c42cc4be2b5855a56d90556b903f1497db8d58..1006b7a4cf25de71ce0ca2d96a8af19b4fbd32e1 100644 (file)
@@ -72,14 +72,14 @@ M: end h2 dup failure? [ <failure> <block> ] unless ;
 
 : first-row ( n -- t )
     [ <failure> <success> <failure> ] dip
-    1- [| a b c | b c <block> a b ] times 2drop ;
+    1 - [| a b c | b c <block> a b ] times 2drop ;
 
 GENERIC: total ( t -- n )
 M: block total [ total ] dup choice + ;
 M: end   total ways>> ;
 
 : solve ( width height -- ways )
-    [ first-row ] dip 1- [ next-row ] times total ;
+    [ first-row ] dip 1 - [ next-row ] times total ;
 
 PRIVATE>
 
index 6c555f92b570e832bedc103fe3d7727d87dc89e0..dc521d4d70f0bd2520877b2f3c684439ace125f0 100644 (file)
@@ -14,7 +14,7 @@ IN: project-euler.ave-time
             '[ _ gc benchmark 1000 / , ] tuck
             '[ _ _ with-datastack drop ]
         ]
-        [ 1- ] tri* swap times call
+        [ 1 - ] tri* swap times call
     ] { } make ; inline
 
 : ave-time ( quot n -- )
index c97c6f1a950a3901e8391ea659f0d94fa665e9b2..4119f8205cc2adf4e736abdd7dd4d7ab42be6615 100644 (file)
@@ -39,7 +39,7 @@ IN: project-euler.common
 <PRIVATE
 
 : max-children ( seq -- seq )
-    [ dup length 1- [ nth-pair max , ] with each ] { } make ;
+    [ dup length 1 - [ nth-pair max , ] with each ] { } make ;
 
 ! Propagate one row into the upper one
 : propagate ( bottom top -- newtop )
@@ -57,7 +57,7 @@ IN: project-euler.common
 PRIVATE>
 
 : alpha-value ( str -- n )
-    >lower [ CHAR: a - 1+ ] sigma ;
+    >lower [ CHAR: a - 1 + ] sigma ;
 
 : cartesian-product ( seq1 seq2 -- seq1xseq2 )
     [ [ 2array ] with map ] curry map concat ;
@@ -76,13 +76,13 @@ PRIVATE>
     [ dup 0 = not ] [ 10 /mod ] produce reverse nip ;
 
 : number-length ( n -- m )
-    log10 floor 1+ >integer ;
+    log10 floor 1 + >integer ;
 
 : nth-prime ( n -- n )
-    1- lprimes lnth ;
+    1 - lprimes lnth ;
 
 : nth-triangle ( n -- n )
-    dup 1+ * 2 / ;
+    dup 1 + * 2 / ;
 
 : palindrome? ( n -- ? )
     number>string dup reverse = ;
@@ -91,7 +91,7 @@ PRIVATE>
     number>string natural-sort >string "123456789" = ;
 
 : pentagonal? ( n -- ? )
-    dup 0 > [ 24 * 1+ sqrt 1+ 6 / 1 mod zero? ] [ drop f ] if ;
+    dup 0 > [ 24 * 1 + sqrt 1 + 6 / 1 mod zero? ] [ drop f ] if ;
 
 : penultimate ( seq -- elt )
     dup length 2 - swap nth ;
@@ -119,11 +119,11 @@ PRIVATE>
 
 ! The divisor function, counts the number of divisors
 : tau ( m -- n )
-    group-factors flip second 1 [ 1+ * ] reduce ;
+    group-factors flip second 1 [ 1 + * ] reduce ;
 
 ! Optimized brute-force, is often faster than prime factorization
 : tau* ( m -- n )
-    factor-2s dup [ 1+ ]
+    factor-2s dup [ 1 + ]
     [ perfect-square? -1 0 ? ]
     [ dup sqrt >fixnum [1,b] ] tri* [
         dupd divisor? [ [ 2 + ] dip ] when
index 0a6f3ef0db493b12fa646d01f4e58ca6a30c3e5e..d14a77057f9bdb75988168b98aff8906da5b6314 100644 (file)
@@ -88,7 +88,7 @@ TUPLE: sequence-parser sequence n ;
     ] take-until :> found
     growing sequence sequence= [
         found dup length
-        growing length 1- - head
+        growing length 1 - - head
         sequence-parser [ growing length - 1 + ] change-n drop
         ! sequence-parser advance drop
     ] [
index 665d43f0cd00ed646f236778158ec6bf41dbfbcd..9291fad3c080d3cfea1d41dda1273503d3729ecb 100644 (file)
@@ -23,11 +23,11 @@ M: product-sequence length lengths>> product ;
     [ lengths>> ns ] [ nip sequences>> ] 2bi ;
 
 :: (carry-n) ( ns lengths i -- )
-    ns length i 1+ = [
+    ns length i 1 + = [
         i ns nth i lengths nth = [
             0 i ns set-nth
-            i 1+ ns [ 1+ ] change-nth
-            ns lengths i 1+ (carry-n)
+            i 1 + ns [ 1 + ] change-nth
+            ns lengths i 1 + (carry-n)
         ] when
     ] unless ;
 
@@ -35,7 +35,7 @@ M: product-sequence length lengths>> product ;
     0 (carry-n) ;
     
 : product-iter ( ns lengths -- )
-    [ 0 over [ 1+ ] change-nth ] dip carry-ns ;
+    [ 0 over [ 1 + ] change-nth ] dip carry-ns ;
 
 : start-product-iter ( sequence-product -- ns lengths )
     [ [ drop 0 ] map ] [ [ length ] map ] bi ;
@@ -57,7 +57,7 @@ M: product-sequence nth
     0 :> i!
     sequences [ length ] [ * ] map-reduce sequences
     [| result |
-        sequences [ quot call i result set-nth i 1+ i! ] product-each
+        sequences [ quot call i result set-nth i 1 + i! ] product-each
         result
     ] new-like ; inline
 
index 29367a2b2bfd8a9382196da075073c38a8fcb571..32ceb3b677cce28f676438adbd24756bc00630c3 100755 (executable)
@@ -90,7 +90,7 @@ TUPLE: slides < book ;
     [ first3 ] dip head 3array ;
 
 : strip-tease ( data -- seq )
-    dup third length 1- [
+    dup third length 1 - [
         2 + (strip-tease)
     ] with map ;
 
index 2eeee306925bb4db811a6466b71ea0b07a9f735a..0c1a5c07d17d21e0073ddfb824ea2a84b309966b 100644 (file)
@@ -123,7 +123,7 @@ M: ast-block compile-ast
     [ lexenv self>> suffix ] dip <lambda> ;
 
 : compile-method-body ( lexenv block -- quot )
-    [ [ (compile-method-body) ] [ arguments>> length 1+ ] bi ] 2keep
+    [ [ (compile-method-body) ] [ arguments>> length 1 + ] bi ] 2keep
     make-return ;
 
 : compile-method ( lexenv ast-method -- )
@@ -154,4 +154,4 @@ M: ast-foreign compile-ast
 
 : compile-smalltalk ( statement -- quot )
     [ empty-lexenv ] dip [ compile-sequence nip 0 ]
-    2keep make-return ;
\ No newline at end of file
+    2keep make-return ;
index 17e91473c3795df9be7dfd2f75f0705b1a1873b4..9d3aa6c65127d81da8138263dfac7d04770777b4 100644 (file)
@@ -52,10 +52,10 @@ fetched-in parsed-html links processed-in fetched-at ;
     [ host>> = ] with partition ;
 
 : add-spidered ( spider spider-result -- )
-    [ [ 1+ ] change-count ] dip
+    [ [ 1 + ] change-count ] dip
     2dup [ spidered>> ] [ dup url>> ] bi* rot set-at
     [ filter-base-links ] 2keep
-    depth>> 1+ swap
+    depth>> 1 + swap
     [ add-nonmatching ]
     [ tuck [ apply-filters ] 2dip add-todo ] 2bi ;
 
index 1554d3df209431765d47ca2f3abbae2e700e3e6d..555f1e632a580b489131907d0b7d5259a597074f 100755 (executable)
@@ -25,7 +25,7 @@ SYMBOL: board
 DEFER: search
 
 : assume ( n x y -- )
-    [ >board ] 2keep [ [ 1+ ] dip search ] 2keep f>board ;
+    [ >board ] 2keep [ [ 1 + ] dip search ] 2keep f>board ;
 
 : attempt ( n x y -- )
     {
@@ -35,7 +35,7 @@ DEFER: search
         [ assume ]
     } cond ;
 
-: solve ( x y -- ) 9 [ 1+ 2over attempt ] each 2drop ;
+: solve ( x y -- ) 9 [ 1 + 2over attempt ] each 2drop ;
 
 : board. ( board -- )
     standard-table-style [
@@ -59,9 +59,9 @@ DEFER: search
 
 : search ( x y -- )
     {
-        { [ over 9 = ] [ [ drop 0 ] dip 1+ search ] }
+        { [ over 9 = ] [ [ drop 0 ] dip 1 + search ] }
         { [ over 0 = over 9 = and ] [ 2drop solution. ] }
-        { [ 2dup board> ] [ [ 1+ ] dip search ] }
+        { [ 2dup board> ] [ [ 1 + ] dip search ] }
         [ solve ]
     } cond ;
 
index 5be2dc89e2fbbc96f120901d512f5c58e0c9abaa..3e0cffe71db55aeccd965b842c65547e54e60313 100755 (executable)
@@ -36,7 +36,7 @@ M: winnt available-virtual-mem ( -- n )
     memory-status MEMORYSTATUSEX-ullAvailVirtual ;
 
 : computer-name ( -- string )
-    MAX_COMPUTERNAME_LENGTH 1+
+    MAX_COMPUTERNAME_LENGTH 1 +
     [ <byte-array> dup ] keep <uint>
     GetComputerName win32-error=0/f alien>native-string ;
  
index 42aa7e903a00b27c89761e27d54c32e415181237..4304ba343206ac53c048eba985549e189e79e0c6 100644 (file)
@@ -11,7 +11,7 @@ math.affine-transforms noise ui.gestures combinators.short-circuit
 destructors grid-meshes ;
 IN: terrain
 
-CONSTANT: FOV $[ 2.0 sqrt 1+ ]
+CONSTANT: FOV $[ 2.0 sqrt 1 + ]
 CONSTANT: NEAR-PLANE $[ 1.0 1024.0 / ]
 CONSTANT: FAR-PLANE 2.0
 CONSTANT: PLAYER-START-LOCATION { 0.5 0.51 0.5 }
index 00b5bb6c410a8d16d59f19eb47da80b56154b1de..e1b5867f64ed684ae5095036171bd144b60da824 100644 (file)
@@ -32,10 +32,10 @@ CONSTANT: default-height 20
     [ not ] change-paused? drop ;
 
 : level>> ( tetris -- level )
-    rows>> 1+ 10 / ceiling ;
+    rows>> 1 + 10 / ceiling ;
 
 : update-interval ( tetris -- interval )
-    level>> 1- 60 * 1000 swap - ;
+    level>> 1 - 60 * 1000 swap - ;
 
 : add-block ( tetris block -- )
     over board>> spin current-piece tetromino>> colour>> set-block ;
@@ -57,7 +57,7 @@ CONSTANT: default-height 20
         { 2 [ 100 ] }
         { 3 [ 300 ] }
         { 4 [ 1200 ] }
-    } case swap 1+ * ;
+    } case swap 1 + * ;
 
 : add-score ( tetris n-rows -- tetris )
     over level>> swap rows-score swap [ + ] change-score ;
index 68f8e85a4a19f1c2771d623633234b21c18da3b2..510daaec41085c5a6dde36b96cbcf11f5535b38d 100644 (file)
@@ -104,7 +104,7 @@ SYMBOL: tetrominoes
     tetrominoes get random ;
 
 : blocks-max ( blocks quot -- max )
-    map [ 1+ ] [ max ] map-reduce ; inline
+    map [ 1 + ] [ max ] map-reduce ; inline
 
 : blocks-width ( blocks -- width )
     [ first ] blocks-max ;
index 4efea6ae427944efe9b40b90a9236ee549ec3e84..62f4d8fce4ba9367bd7af9c1018e8e0a7be9ed37 100755 (executable)
@@ -41,9 +41,9 @@ CONSTANT: right 1
 
 : go-left? ( -- ? ) current-side get left eq? ;
 
-: inc-count ( tree -- ) [ 1+ ] change-count drop ;
+: inc-count ( tree -- ) [ 1 + ] change-count drop ;
 
-: dec-count ( tree -- ) [ 1- ] change-count drop ;
+: dec-count ( tree -- ) [ 1 - ] change-count drop ;
 
 : node-link@ ( node ? -- node )
     go-left? xor [ left>> ] [ right>> ] if ;
index 5ff5bb38791e46072eb91a8969bc9aa3428899c3..8730c0acc48330bd553edc4d7a93b3f2125c7dd1 100644 (file)
@@ -23,7 +23,7 @@ TUPLE: list < pack index presenter color hook ;
         list-theme ;
 
 : calc-bounded-index ( n list -- m )
-    control-value length 1- min 0 max ;
+    control-value length 1 - min 0 max ;
 
 : bound-index ( list -- )
     dup index>> over calc-bounded-index >>index drop ;
@@ -83,10 +83,10 @@ M: list focusable-child* drop t ;
     ] if ;
 
 : select-previous ( list -- )
-    [ index>> 1- ] keep select-index ;
+    [ index>> 1 - ] keep select-index ;
 
 : select-next ( list -- )
-    [ index>> 1+ ] keep select-index ;
+    [ index>> 1 + ] keep select-index ;
 
 : invoke-value-action ( list -- )
     dup list-empty? [
index e02701b6909674772ca6b92b514c929f25f18ffb..abf6a536578fb4372d21e6a7a529a98f7141ce97 100644 (file)
@@ -14,7 +14,7 @@ SYMBOL: *calling*
   *wordtimes* get-global [ drop { 0 0 } ] cache first2 ;
 
 : update-times ( utime current-utime current-numinvokes -- utime' invokes' )
-  rot [ + ] curry [ 1+ ] bi* ;
+  rot [ + ] curry [ 1 + ] bi* ;
 
 : register-time ( utime word -- )
   name>>