From: Doug Coleman Date: Thu, 30 Dec 2021 18:57:09 +0000 (-0600) Subject: factor: Move math.ranges => ranges. X-Git-Tag: 0.99~2039 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=3135def3c9e2bc581f4224160d628ef6c79a7a3f factor: Move math.ranges => ranges. Fixups will help people migrate their code. --- diff --git a/basis/bloom-filters/bloom-filters.factor b/basis/bloom-filters/bloom-filters.factor index 0a279ba8af..147e8bba44 100644 --- a/basis/bloom-filters/bloom-filters.factor +++ b/basis/bloom-filters/bloom-filters.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays bit-arrays fry kernel kernel.private layouts locals math math.functions math.order math.private -math.ranges multiline sequences sequences.private typed ; +ranges multiline sequences sequences.private typed ; IN: bloom-filters diff --git a/basis/bootstrap/assembler/ppc.32.linux.factor b/basis/bootstrap/assembler/ppc.32.linux.factor index da83cef08d..07e7055636 100644 --- a/basis/bootstrap/assembler/ppc.32.linux.factor +++ b/basis/bootstrap/assembler/ppc.32.linux.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2011 Erik Charlebois. ! See http://factorcode.org/license.txt for BSD license. -USING: parser system kernel sequences math math.ranges +USING: parser system kernel sequences math ranges cpu.ppc.assembler combinators compiler.constants bootstrap.image.private layouts namespaces ; IN: bootstrap.ppc diff --git a/basis/bootstrap/assembler/ppc.64.linux.factor b/basis/bootstrap/assembler/ppc.64.linux.factor index 9ec4d37373..670389fa69 100644 --- a/basis/bootstrap/assembler/ppc.64.linux.factor +++ b/basis/bootstrap/assembler/ppc.64.linux.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2011 Erik Charlebois. ! See http://factorcode.org/license.txt for BSD license. -USING: parser system kernel sequences math math.ranges +USING: parser system kernel sequences math ranges cpu.ppc.assembler combinators compiler.constants bootstrap.image.private layouts namespaces ; IN: bootstrap.ppc diff --git a/basis/bootstrap/assembler/ppc.factor b/basis/bootstrap/assembler/ppc.factor index 3f45aba7f6..43b978ef0b 100644 --- a/basis/bootstrap/assembler/ppc.factor +++ b/basis/bootstrap/assembler/ppc.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: bootstrap.image.private kernel kernel.private namespaces system cpu.ppc.assembler compiler.units compiler.constants math -math.private math.ranges layouts words vocabs slots.private +math.private ranges layouts words vocabs slots.private locals locals.backend generic.single.private fry sequences threads.private strings.private ; FROM: cpu.ppc.assembler => B ; diff --git a/basis/calendar/calendar-tests.factor b/basis/calendar/calendar-tests.factor index ec90ce8afb..056def163e 100644 --- a/basis/calendar/calendar-tests.factor +++ b/basis/calendar/calendar-tests.factor @@ -1,4 +1,4 @@ -USING: accessors grouping kernel math math.order math.ranges +USING: accessors grouping kernel math math.order ranges math.vectors random sequences threads tools.test ; IN: calendar diff --git a/basis/calendar/calendar.factor b/basis/calendar/calendar.factor index 53aaf3dbdb..e7caa89d32 100644 --- a/basis/calendar/calendar.factor +++ b/basis/calendar/calendar.factor @@ -4,7 +4,7 @@ USING: accessors arrays classes.tuple combinators combinators.short-circuit kernel literals math math.functions math.intervals math.order math.statistics sequences slots.syntax system vocabs vocabs.loader ; -FROM: math.ranges => [a..b) ; +FROM: ranges => [a..b) ; IN: calendar ERROR: not-in-interval value interval ; diff --git a/basis/calendar/format/format.factor b/basis/calendar/format/format.factor index 7792ae935d..9968ee7eb6 100644 --- a/basis/calendar/format/format.factor +++ b/basis/calendar/format/format.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays calendar calendar.english combinators formatting grouping io io.streams.string kernel make math -math.order math.parser math.parser.private math.ranges present +math.order math.parser math.parser.private ranges present quotations sequences splitting strings words ; IN: calendar.format diff --git a/basis/cbor/cbor-tests.factor b/basis/cbor/cbor-tests.factor index 63338db5a8..0d356f3297 100644 --- a/basis/cbor/cbor-tests.factor +++ b/basis/cbor/cbor-tests.factor @@ -1,5 +1,5 @@ USING: arrays assocs calendar cbor kernel literals locals math -math.parser math.ranges tools.test urls ; +math.parser ranges tools.test urls ; { { 0 "00" } diff --git a/basis/checksums/adler-32/adler-32.factor b/basis/checksums/adler-32/adler-32.factor index e855cdf22e..9ada46370d 100644 --- a/basis/checksums/adler-32/adler-32.factor +++ b/basis/checksums/adler-32/adler-32.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: checksums classes.singleton kernel math math.ranges +USING: checksums classes.singleton kernel math ranges math.vectors sequences ; IN: checksums.adler-32 diff --git a/basis/checksums/fnv1/fnv1.factor b/basis/checksums/fnv1/fnv1.factor index f60e97dbf4..bd6c70da56 100644 --- a/basis/checksums/fnv1/fnv1.factor +++ b/basis/checksums/fnv1/fnv1.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2009 Alaric Snell-Pym ! See http://factorcode.org/license.txt for BSD license. -USING: checksums classes.singleton kernel math math.ranges +USING: checksums classes.singleton kernel math ranges math.vectors sequences ; IN: checksums.fnv1 diff --git a/basis/checksums/murmur/murmur.factor b/basis/checksums/murmur/murmur.factor index 28576cf50b..4a849f5962 100644 --- a/basis/checksums/murmur/murmur.factor +++ b/basis/checksums/murmur/murmur.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.c-types alien.data byte-arrays checksums endian fry grouping kernel math math.bitwise -math.ranges sequences ; +ranges sequences ; IN: checksums.murmur diff --git a/basis/checksums/sha/sha.factor b/basis/checksums/sha/sha.factor index 43a3847ab1..7ce8dc851d 100644 --- a/basis/checksums/sha/sha.factor +++ b/basis/checksums/sha/sha.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien.c-types arrays checksums checksums.common combinators combinators.smart endian fry grouping kernel -kernel.private literals locals math math.bitwise math.ranges +kernel.private literals locals math math.bitwise ranges sequences sequences.generalizations sequences.private specialized-arrays ; SPECIALIZED-ARRAY: uint diff --git a/basis/checksums/superfast/superfast.factor b/basis/checksums/superfast/superfast.factor index 518ca303ab..a128b42fcd 100644 --- a/basis/checksums/superfast/superfast.factor +++ b/basis/checksums/superfast/superfast.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.c-types alien.data byte-arrays checksums combinators endian fry grouping kernel math -math.bitwise math.ranges sequences sequences.private ; +math.bitwise ranges sequences sequences.private ; IN: checksums.superfast diff --git a/basis/checksums/xxhash/xxhash.factor b/basis/checksums/xxhash/xxhash.factor index 683afee520..50e2a479de 100644 --- a/basis/checksums/xxhash/xxhash.factor +++ b/basis/checksums/xxhash/xxhash.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.c-types alien.data byte-arrays checksums combinators endian generalizations grouping kernel -locals math math.bitwise math.ranges sequences +locals math math.bitwise ranges sequences specialized-arrays ; SPECIALIZED-ARRAY: uint64_t diff --git a/basis/colors/cmyk/cmyk-tests.factor b/basis/colors/cmyk/cmyk-tests.factor index bd9894d5c1..81bb8224d8 100644 --- a/basis/colors/cmyk/cmyk-tests.factor +++ b/basis/colors/cmyk/cmyk-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.cmyk kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/hsl/hsl-tests.factor b/basis/colors/hsl/hsl-tests.factor index 09fafa6b2e..07372ac33a 100644 --- a/basis/colors/hsl/hsl-tests.factor +++ b/basis/colors/hsl/hsl-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.hsl kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/lab/lab-tests.factor b/basis/colors/lab/lab-tests.factor index 3790bd2803..75f9621ebe 100644 --- a/basis/colors/lab/lab-tests.factor +++ b/basis/colors/lab/lab-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.lab kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/lch/lch-tests.factor b/basis/colors/lch/lch-tests.factor index 6811cfbda5..8f399dc2db 100644 --- a/basis/colors/lch/lch-tests.factor +++ b/basis/colors/lch/lch-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.lch kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/luv/luv-tests.factor b/basis/colors/luv/luv-tests.factor index c47365ae2f..2a4c9404e5 100644 --- a/basis/colors/luv/luv-tests.factor +++ b/basis/colors/luv/luv-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.luv kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/ryb/ryb-tests.factor b/basis/colors/ryb/ryb-tests.factor index 18bcd3812e..c798ed8d3d 100644 --- a/basis/colors/ryb/ryb-tests.factor +++ b/basis/colors/ryb/ryb-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.ryb kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/xyy/xyy-tests.factor b/basis/colors/xyy/xyy-tests.factor index d4c0b3ac4a..d61d6ec96f 100644 --- a/basis/colors/xyy/xyy-tests.factor +++ b/basis/colors/xyy/xyy-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.xyy kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/xyz/xyz-tests.factor b/basis/colors/xyz/xyz-tests.factor index 7984859f00..fed448b198 100644 --- a/basis/colors/xyz/xyz-tests.factor +++ b/basis/colors/xyz/xyz-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.xyz kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/yiq/yiq-tests.factor b/basis/colors/yiq/yiq-tests.factor index dbb5b3f5b2..63abda1708 100644 --- a/basis/colors/yiq/yiq-tests.factor +++ b/basis/colors/yiq/yiq-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.yiq kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/colors/yuv/yuv-tests.factor b/basis/colors/yuv/yuv-tests.factor index 024e7d4528..cab48d6a05 100644 --- a/basis/colors/yuv/yuv-tests.factor +++ b/basis/colors/yuv/yuv-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: arrays colors colors.yuv kernel locals math.functions -math.ranges sequences tools.test ; +ranges sequences tools.test ; { t } [ 0.0 1.0 0.1 [| r | diff --git a/basis/compiler/cfg/dominance/dominance-tests.factor b/basis/compiler/cfg/dominance/dominance-tests.factor index 66cb3211a8..829349e967 100644 --- a/basis/compiler/cfg/dominance/dominance-tests.factor +++ b/basis/compiler/cfg/dominance/dominance-tests.factor @@ -1,6 +1,6 @@ USING: accessors arrays assocs compiler.cfg.dominance compiler.cfg.dominance.private compiler.cfg.utilities compiler.test -grouping kernel math.ranges namespaces sequences sets tools.test ; +grouping kernel ranges namespaces sequences sets tools.test ; IN: compiler.cfg.dominance.tests : test-dominance ( -- ) diff --git a/basis/compression/gzip/gzip.factor b/basis/compression/gzip/gzip.factor index daf4622834..5d8d91d8d0 100644 --- a/basis/compression/gzip/gzip.factor +++ b/basis/compression/gzip/gzip.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs bit-arrays byte-arrays combinators compression.huffman fry kernel literals locals make -math math.bits math.order math.ranges namespaces sequences +math math.bits math.order ranges namespaces sequences sequences.deep splitting vectors ; IN: compression.gzip diff --git a/basis/compression/huffman/huffman.factor b/basis/compression/huffman/huffman.factor index 7744b45870..8b6d7e2967 100644 --- a/basis/compression/huffman/huffman.factor +++ b/basis/compression/huffman/huffman.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs bit-arrays bitstreams combinators fry hashtables heaps io kernel locals math math.bits math.order -math.parser math.ranges multiline namespaces sequences sorting +math.parser ranges multiline namespaces sequences sorting vectors ; QUALIFIED-WITH: bitstreams bs IN: compression.huffman diff --git a/basis/compression/inflate/inflate.factor b/basis/compression/inflate/inflate.factor index c6f22b912b..6f6053a92f 100644 --- a/basis/compression/inflate/inflate.factor +++ b/basis/compression/inflate/inflate.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs byte-vectors combinators combinators.smart compression.huffman endian fry hashtables -kernel literals locals math math.bitwise math.order math.ranges +kernel literals locals math math.bitwise math.order ranges sequences sorting memoize combinators.short-circuit byte-arrays ; QUALIFIED-WITH: bitstreams bs IN: compression.inflate diff --git a/basis/compression/zlib/zlib.factor b/basis/compression/zlib/zlib.factor index 90a53efe57..f7318500f5 100644 --- a/basis/compression/zlib/zlib.factor +++ b/basis/compression/zlib/zlib.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.c-types alien.data alien.syntax byte-arrays byte-vectors classes.struct combinators compression.zlib.ffi continuations destructors fry kernel libc -math math.functions math.ranges sequences system ; +math math.functions ranges sequences system ; IN: compression.zlib ERROR: zlib-failed n string ; diff --git a/basis/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor index 24d09fb8b3..85f433dd78 100644 --- a/basis/cpu/ppc/ppc.factor +++ b/basis/cpu/ppc/ppc.factor @@ -6,7 +6,7 @@ compiler.cfg compiler.cfg.build-stack-frame compiler.cfg.comparisons compiler.cfg.instructions compiler.cfg.intrinsics compiler.cfg.registers compiler.cfg.stack-frame compiler.codegen compiler.codegen.fixup compiler.constants compiler.units cpu.architecture cpu.ppc.assembler fry io -kernel layouts literals locals make math math.order math.ranges memory +kernel layouts literals locals make math math.order ranges memory namespaces prettyprint sequences system vm words ; QUALIFIED-WITH: alien.c-types c FROM: cpu.ppc.assembler => B ; diff --git a/basis/db/tuples/tuples-tests.factor b/basis/db/tuples/tuples-tests.factor index b1b245b42a..ae01c13f74 100644 --- a/basis/db/tuples/tuples-tests.factor +++ b/basis/db/tuples/tuples-tests.factor @@ -2,7 +2,7 @@ ! Copyright (C) 2018 Alexander Ilin. ! See http://factorcode.org/license.txt for BSD license. USING: accessors calendar calendar.parser classes continuations -db.tester db.tuples db.types kernel math math.intervals math.ranges +db.tester db.tuples db.types kernel math math.intervals ranges namespaces random sequences sorting strings tools.test urls ; IN: db.tuples.tests diff --git a/basis/documents/documents.factor b/basis/documents/documents.factor index 4f27a03d7e..4b6aa3ee53 100644 --- a/basis/documents/documents.factor +++ b/basis/documents/documents.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2006, 2009 Slava Pestov ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays kernel math math.order math.ranges +USING: accessors arrays kernel math math.order ranges models sequences splitting ; IN: documents diff --git a/basis/endian/endian.factor b/basis/endian/endian.factor index 2c27cad62c..7038f9c548 100644 --- a/basis/endian/endian.factor +++ b/basis/endian/endian.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: alien.c-types alien.data byte-arrays combinators combinators.smart grouping hints kernel math math.bitwise -math.ranges namespaces sequences sequences.generalizations ; +ranges namespaces sequences sequences.generalizations ; IN: endian SINGLETONS: big-endian little-endian ; diff --git a/basis/escape-strings/escape-strings.factor b/basis/escape-strings/escape-strings.factor index eb0b1d4490..4c0f4b762e 100644 --- a/basis/escape-strings/escape-strings.factor +++ b/basis/escape-strings/escape-strings.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2017 John Benediktsson, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: ascii assocs checksums checksums.sha combinators fry -kernel math math.functions math.parser math.ranges +kernel math math.functions math.parser ranges math.statistics sequences sets sorting splitting strings uuid ; IN: escape-strings diff --git a/basis/fixups/fixups.factor b/basis/fixups/fixups.factor index 208e2a284f..7cb2ca79a3 100644 --- a/basis/fixups/fixups.factor +++ b/basis/fixups/fixups.factor @@ -18,14 +18,14 @@ CONSTANT: word-renames { { "string-lines" { "splitting:split-lines" "0.99" } } { "[-inf,a)" { "math.intervals:[-inf,b)" "0.99" } } { "[-inf,a]" { "math.intervals:[-inf,b]" "0.99" } } - { "(a,b)" { "math.ranges:(a..b)" "0.99" } } - { "(a,b]" { "math.ranges:(a..b]" "0.99" } } - { "[a,b)" { "math.ranges:[a..b)" "0.99" } } - { "[a,b]" { "math.ranges:[a..b]" "0.99" } } - { "[0,b)" { "math.ranges:[0..b)" "0.99" } } - { "[0,b]" { "math.ranges:[0..b]" "0.99" } } - { "[1,b)" { "math.ranges:[1..b)" "0.99" } } - { "[1,b]" { "math.ranges:[1..b]" "0.99" } } + { "(a,b)" { "ranges:(a..b)" "0.99" } } + { "(a,b]" { "ranges:(a..b]" "0.99" } } + { "[a,b)" { "ranges:[a..b)" "0.99" } } + { "[a,b]" { "ranges:[a..b]" "0.99" } } + { "[0,b)" { "ranges:[0..b)" "0.99" } } + { "[0,b]" { "ranges:[0..b]" "0.99" } } + { "[1,b)" { "ranges:[1..b)" "0.99" } } + { "[1,b]" { "ranges:[1..b]" "0.99" } } { "assoc-merge" { "assocs.extras:assoc-collect" "0.99" } } { "assoc-merge!" { "assocs.extras:assoc-collect!" "0.99" } } { "peek-from" { "modern.html:peek1-from" "0.99" } } diff --git a/basis/html/templates/chloe/chloe-docs.factor b/basis/html/templates/chloe/chloe-docs.factor index 94b0a9c7d1..02c9767b9d 100644 --- a/basis/html/templates/chloe/chloe-docs.factor +++ b/basis/html/templates/chloe/chloe-docs.factor @@ -230,7 +230,7 @@ ARTICLE: "html.templates.chloe.extend.tags.example" "Examples of custom Chloe ta $nl "Here is the " { $link POSTPONE: USING: } " form that we need for the below code to work:" { $code - "USING: combinators kernel math.parser math.ranges random" + "USING: combinators kernel math.parser ranges random" "html.templates.chloe.compiler html.templates.chloe.syntax ;" } "We write a word which extracts the relevant attributes from an XML tag:" diff --git a/basis/images/processing/processing.factor b/basis/images/processing/processing.factor index cebb6ec522..24006e2699 100644 --- a/basis/images/processing/processing.factor +++ b/basis/images/processing/processing.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays byte-arrays combinators grouping images kernel locals math math.order -math.ranges math.vectors sequences sequences.deep fry ; +ranges math.vectors sequences sequences.deep fry ; IN: images.processing : coord-matrix ( dim -- m ) diff --git a/basis/images/tessellation/tessellation-tests.factor b/basis/images/tessellation/tessellation-tests.factor index 211f5893ee..15d5060b30 100644 --- a/basis/images/tessellation/tessellation-tests.factor +++ b/basis/images/tessellation/tessellation-tests.factor @@ -1,4 +1,4 @@ -USING: images accessors kernel tools.test literals math.ranges +USING: images accessors kernel tools.test literals ranges byte-arrays ; IN: images.tessellation diff --git a/basis/logging/server/server.factor b/basis/logging/server/server.factor index 3f133e32fb..5cfae1ab20 100644 --- a/basis/logging/server/server.factor +++ b/basis/logging/server/server.factor @@ -3,7 +3,7 @@ USING: assocs calendar calendar.format combinators concurrency.messaging continuations debugger destructors init io io.directories io.encodings.utf8 io.files io.pathnames kernel -locals math math.parser math.ranges namespaces sequences +locals math math.parser ranges namespaces sequences strings threads ; IN: logging.server diff --git a/basis/math/combinatorics/combinatorics.factor b/basis/math/combinatorics/combinatorics.factor index 09a3cd3fad..72fda6cf39 100644 --- a/basis/math/combinatorics/combinatorics.factor +++ b/basis/math/combinatorics/combinatorics.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs classes.tuple combinators hints kernel kernel.private make math math.functions math.order -math.ranges sequences sequences.private sorting strings vectors ; +ranges sequences sequences.private sorting strings vectors ; IN: math.combinatorics > 1 - [ ] [ 1 + ] [ 1/2 + ] tri * * 3 / ; -M: math.ranges:range sum-of-squares +M: ranges:range sum-of-squares dup { [ step>> 1 = ] [ from>> integer? ] } 1&& [ [ from>> ] [ length>> ] bi dupd + [ sum-of-squares ] bi@ swap - @@ -33,7 +33,7 @@ M: math.ranges:range sum-of-squares GENERIC: sum-of-cubes ( seq -- x ) M: object sum-of-cubes [ 3 ^ ] map-sum ; M: iota sum-of-cubes sum sq ; -M: math.ranges:range sum-of-cubes +M: ranges:range sum-of-cubes dup { [ step>> 1 = ] [ from>> integer? ] } 1&& [ [ from>> ] [ length>> ] bi dupd + [ sum-of-cubes ] bi@ swap - @@ -51,7 +51,7 @@ M: iota sum-of-quads * * * 30 / ] [ 0 ] if ] ; -M: math.ranges:range sum-of-quads +M: ranges:range sum-of-quads dup { [ step>> 1 = ] [ from>> integer? ] } 1&& [ [ from>> ] [ length>> ] bi dupd + [ sum-of-quads ] bi@ swap - diff --git a/basis/math/vectors/simd/intrinsics/intrinsics.factor b/basis/math/vectors/simd/intrinsics/intrinsics.factor index ba5693c480..459b7dc8eb 100644 --- a/basis/math/vectors/simd/intrinsics/intrinsics.factor +++ b/basis/math/vectors/simd/intrinsics/intrinsics.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Slava Pestov, Joe Groff. ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien alien.data combinators cpu.architecture fry -grouping kernel libc locals math math.libm math.order math.ranges +grouping kernel libc locals math math.libm math.order ranges sequences sequences.cords sequences.generalizations sequences.private sequences.unrolled sequences.unrolled.private specialized-arrays vocabs ; diff --git a/basis/math/vectors/simd/simd-tests.factor b/basis/math/vectors/simd/simd-tests.factor index c137e37203..bbd972ea71 100644 --- a/basis/math/vectors/simd/simd-tests.factor +++ b/basis/math/vectors/simd/simd-tests.factor @@ -1,6 +1,6 @@ USING: accessors arrays classes compiler.test compiler.tree.debugger effects fry io kernel kernel.private math math.functions -math.private math.vectors math.vectors.simd math.ranges +math.private math.vectors math.vectors.simd ranges math.vectors.simd.private prettyprint random sequences system tools.test vocabs assocs compiler.cfg.debugger words locals combinators cpu.architecture namespaces byte-arrays alien diff --git a/basis/mime/multipart/multipart-tests.factor b/basis/mime/multipart/multipart-tests.factor index 2bf79e9b8e..78a77f95f3 100644 --- a/basis/mime/multipart/multipart-tests.factor +++ b/basis/mime/multipart/multipart-tests.factor @@ -3,7 +3,7 @@ USING: accessors assocs continuations fry http.server io io.encodings.ascii io.files io.files.temp io.files.unique io.servers io.streams.duplex io.streams.string -kernel math.ranges mime.multipart multiline namespaces random +kernel ranges mime.multipart multiline namespaces random sequences sorting strings threads tools.test ; IN: mime.multipart.tests diff --git a/basis/peg/parsers/parsers.factor b/basis/peg/parsers/parsers.factor index 861f613ee4..7543113d51 100644 --- a/basis/peg/parsers/parsers.factor +++ b/basis/peg/parsers/parsers.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2008 Chris Double, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors fry kernel literals make math math.parser -math.ranges peg peg.private sequences splitting strings unicode +ranges peg peg.private sequences splitting strings unicode vectors ; FROM: peg.search => replace ; IN: peg.parsers diff --git a/basis/persistent/hashtables/hashtables-tests.factor b/basis/persistent/hashtables/hashtables-tests.factor index 3f42003e89..c9ffab5e6c 100644 --- a/basis/persistent/hashtables/hashtables-tests.factor +++ b/basis/persistent/hashtables/hashtables-tests.factor @@ -1,6 +1,6 @@ IN: persistent.hashtables.tests USING: persistent.hashtables persistent.assocs hashtables assocs -tools.test kernel locals namespaces random math.ranges sequences fry ; +tools.test kernel locals namespaces random ranges sequences fry ; { t } [ PH{ } assoc-empty? ] unit-test diff --git a/basis/random/passwords/passwords.factor b/basis/random/passwords/passwords.factor index 61cc31c188..93b68577fd 100644 --- a/basis/random/passwords/passwords.factor +++ b/basis/random/passwords/passwords.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2019 Alexander Ilin. ! See http://factorcode.org/license.txt for BSD license. -USING: fry literals math.ranges random sequences ; +USING: fry literals ranges random sequences ; IN: random.passwords IsValidDpiAwarenessContext ] zip-with +! USE: ranges -100 1000 [a..b] [ IsValidDpiAwarenessContext ] zip-with ! [ nip 0 > ] assoc-filter keys . ! { -5 -4 -3 -2 -1 17 18 34 273 529 785 } diff --git a/core/generalizations/generalizations.factor b/core/generalizations/generalizations.factor index 9b0f70f710..b45e61ce68 100644 --- a/core/generalizations/generalizations.factor +++ b/core/generalizations/generalizations.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2009 Chris Double, Doug Coleman, Eduardo ! Cavazos, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays combinators kernel kernel.private math math.ranges +USING: arrays combinators kernel kernel.private math ranges memoize.private sequences ; IN: generalizations diff --git a/core/math/ranges/authors.txt b/core/math/ranges/authors.txt deleted file mode 100644 index f372b574ae..0000000000 --- a/core/math/ranges/authors.txt +++ /dev/null @@ -1,2 +0,0 @@ -Slava Pestov -Doug Coleman diff --git a/core/math/ranges/ranges-docs.factor b/core/math/ranges/ranges-docs.factor deleted file mode 100644 index 15ef334fc4..0000000000 --- a/core/math/ranges/ranges-docs.factor +++ /dev/null @@ -1,28 +0,0 @@ -USING: help.syntax help.markup arrays sequences ; -IN: math.ranges - -ARTICLE: "math.ranges" "Numeric ranges" -"A " { $emphasis "range" } " is a virtual sequence with real number elements " -"ranging from " { $emphasis "a" } " to " { $emphasis "b" } " by " { $emphasis "step" } ". Ascending as well as descending ranges are supported." -$nl -"The class of ranges:" -{ $subsections range } -"Creating ranges with integer end-points. The standard mathematical convention is used, where " { $snippet "(" } " or " { $snippet ")" } " denotes that the end-point itself " { $emphasis "is not" } " part of the range; " { $snippet "[" } " or " { $snippet "]" } " denotes that the end-point " { $emphasis "is" } " part of the range:" -{ $subsections - [a..b] - (a..b] - [a..b) - (a..b) - [0..b] - [1..b] - [0..b) -} -"Creating general ranges:" -{ $subsections } -"Ranges are most frequently used with sequence combinators as a means of iterating over integers. For example," -{ $code "3 10 [a..b] [ sqrt ] map" } -"Computing the factorial of 100 with a descending range:" -{ $code "100 1 [a..b] product" } -"A range can be converted into a concrete sequence using a word such as " { $link >array } ". In most cases this is unnecessary since ranges implement the sequence protocol already. It is necessary if a mutable sequence is needed, for use with words such as " { $link set-nth } " or " { $link map! } "." ; - -ABOUT: "math.ranges" diff --git a/core/math/ranges/ranges-tests.factor b/core/math/ranges/ranges-tests.factor deleted file mode 100644 index 1287ea1d01..0000000000 --- a/core/math/ranges/ranges-tests.factor +++ /dev/null @@ -1,57 +0,0 @@ -USING: arrays kernel math math.ranges sequences sets tools.test ; - -{ { } } [ 1 1 (a..b) >array ] unit-test -{ { } } [ 1 1 (a..b] >array ] unit-test -{ { } } [ 1 1 [a..b) >array ] unit-test -{ { 1 } } [ 1 1 [a..b] >array ] unit-test - -{ { } } [ 1 2 (a..b) >array ] unit-test -{ { 2 } } [ 1 2 (a..b] >array ] unit-test -{ { 1 } } [ 1 2 [a..b) >array ] unit-test -{ { 1 2 } } [ 1 2 [a..b] >array ] unit-test - -{ { } } [ 2 1 (a..b) >array ] unit-test -{ { 1 } } [ 2 1 (a..b] >array ] unit-test -{ { 2 } } [ 2 1 [a..b) >array ] unit-test -{ { 2 1 } } [ 2 1 [a..b] >array ] unit-test - -{ { 1 2 3 4 5 } } [ 1 5 1 >array ] unit-test -{ { 5 4 3 2 1 } } [ 5 1 -1 >array ] unit-test - -{ { 0 1/3 2/3 1 } } [ 0 1 1/3 >array ] unit-test -{ { 0 1/3 2/3 1 } } [ 1 0 -1/3 >array reverse ] unit-test - -{ 0 } [ 0 -1 .0001 length ] unit-test -{ 0 } [ 0 -1 .5 length ] unit-test -{ 0 } [ 0 -1 1 length ] unit-test -{ 0 } [ 0 -1 2 length ] unit-test -{ 0 } [ 0 -1 3 length ] unit-test -{ 0 } [ 0 -1 4 length ] unit-test - -{ 0 } [ 0 -2 .0001 length ] unit-test -{ 0 } [ 0 -2 1 length ] unit-test -{ 0 } [ 0 -2 2 length ] unit-test -{ 0 } [ 0 -2 3 length ] unit-test -{ 0 } [ 0 -2 4 length ] unit-test - -{ 0 } [ -1 0 -.0001 length ] unit-test -{ 0 } [ -1 0 -.5 length ] unit-test -{ 0 } [ -1 0 -1 length ] unit-test -{ 0 } [ -1 0 -2 length ] unit-test -{ 0 } [ -1 0 -3 length ] unit-test -{ 0 } [ -1 0 -4 length ] unit-test - -{ 0 } [ -2 0 -.0001 length ] unit-test -{ 0 } [ -2 0 -1 length ] unit-test -{ 0 } [ -2 0 -2 length ] unit-test -{ 0 } [ -2 0 -3 length ] unit-test -{ 0 } [ -2 0 -4 length ] unit-test - -{ 100 } [ - 1 100 [a..b] [ 2^ [1..b] ] map members length -] unit-test - -{ t } [ -10 10 1 [ sum ] [ >array sum ] bi = ] unit-test -{ t } [ -10 10 2 [ sum ] [ >array sum ] bi = ] unit-test -{ t } [ 10 -10 -1 [ sum ] [ >array sum ] bi = ] unit-test -{ t } [ 10 -10 -2 [ sum ] [ >array sum ] bi = ] unit-test diff --git a/core/math/ranges/ranges.factor b/core/math/ranges/ranges.factor deleted file mode 100644 index f834ea6834..0000000000 --- a/core/math/ranges/ranges.factor +++ /dev/null @@ -1,71 +0,0 @@ -! Copyright (C) 2008, 2010 Slava Pestov. -! See http://factorcode.org/license.txt for BSD license. -USING: accessors classes.tuple kernel math math.order sequences -sequences.private ; -IN: math.ranges - -TUPLE: range -{ from read-only } -{ length read-only } -{ step read-only } ; - - - -: ( a b step -- range ) - [ over - ] dip - [ sign/mod 0 < [ 1 + ] unless 0 max ] keep - range boa ; inline - -M: range length length>> ; inline - -M: range nth-unsafe - [ step>> * ] keep from>> + ; inline - -! We want M\ tuple hashcode, not M\ sequence hashcode here! -! sequences hashcode is O(n) in number of elements -M: range hashcode* tuple-hashcode ; - -INSTANCE: range immutable-sequence - -M: range sum [ length ] [ first ] [ last ] tri + * 2 / ; - - -1 1 ? ; inline - -: (a.. ( a b step -- a' b' step ) dup [ + ] curry 2dip ; inline - -: ..b) ( a b step -- a' b' step ) dup [ - ] curry dip ; inline - -PRIVATE> - -: [a..b] ( a b -- range ) twiddle ; inline - -: (a..b] ( a b -- range ) twiddle (a.. ; inline - -: [a..b) ( a b -- range ) twiddle ..b) ; inline - -: (a..b) ( a b -- range ) twiddle (a.. ..b) ; inline - -: [0..b] ( b -- range ) 0 swap [a..b] ; inline - -: [1..b] ( b -- range ) 1 swap [a..b] ; inline - -: [0..b) ( b -- range ) 0 swap [a..b) ; inline - -: [1..b) ( b -- range ) 1 swap [a..b) ; inline - -! backwards compatibility for new syntax -ALIAS: [a,b] [a..b] deprecated -ALIAS: (a,b] (a..b] deprecated -ALIAS: [a,b) [a..b) deprecated -ALIAS: (a,b) (a..b) deprecated -ALIAS: [0,b] [0..b] deprecated -ALIAS: [1,b] [1..b] deprecated -ALIAS: [0,b) [0..b) deprecated -ALIAS: [1,b) [1..b) deprecated diff --git a/core/math/ranges/summary.txt b/core/math/ranges/summary.txt deleted file mode 100644 index 3e5e6b9346..0000000000 --- a/core/math/ranges/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Virtual sequence consisting of a range of numbers diff --git a/core/math/ranges/tags.txt b/core/math/ranges/tags.txt deleted file mode 100644 index ede10ab61b..0000000000 --- a/core/math/ranges/tags.txt +++ /dev/null @@ -1 +0,0 @@ -math diff --git a/core/ranges/authors.txt b/core/ranges/authors.txt new file mode 100644 index 0000000000..f372b574ae --- /dev/null +++ b/core/ranges/authors.txt @@ -0,0 +1,2 @@ +Slava Pestov +Doug Coleman diff --git a/core/ranges/ranges-docs.factor b/core/ranges/ranges-docs.factor new file mode 100644 index 0000000000..b10740e814 --- /dev/null +++ b/core/ranges/ranges-docs.factor @@ -0,0 +1,28 @@ +USING: help.syntax help.markup arrays sequences ; +IN: ranges + +ARTICLE: "ranges" "Numeric ranges" +"A " { $emphasis "range" } " is a virtual sequence with real number elements " +"ranging from " { $emphasis "a" } " to " { $emphasis "b" } " by " { $emphasis "step" } ". Ascending as well as descending ranges are supported." +$nl +"The class of ranges:" +{ $subsections range } +"Creating ranges with integer end-points. The standard mathematical convention is used, where " { $snippet "(" } " or " { $snippet ")" } " denotes that the end-point itself " { $emphasis "is not" } " part of the range; " { $snippet "[" } " or " { $snippet "]" } " denotes that the end-point " { $emphasis "is" } " part of the range:" +{ $subsections + [a..b] + (a..b] + [a..b) + (a..b) + [0..b] + [1..b] + [0..b) +} +"Creating general ranges:" +{ $subsections } +"Ranges are most frequently used with sequence combinators as a means of iterating over integers. For example," +{ $code "3 10 [a..b] [ sqrt ] map" } +"Computing the factorial of 100 with a descending range:" +{ $code "100 1 [a..b] product" } +"A range can be converted into a concrete sequence using a word such as " { $link >array } ". In most cases this is unnecessary since ranges implement the sequence protocol already. It is necessary if a mutable sequence is needed, for use with words such as " { $link set-nth } " or " { $link map! } "." ; + +ABOUT: "ranges" diff --git a/core/ranges/ranges-tests.factor b/core/ranges/ranges-tests.factor new file mode 100644 index 0000000000..6d4c6055ac --- /dev/null +++ b/core/ranges/ranges-tests.factor @@ -0,0 +1,57 @@ +USING: arrays kernel math ranges sequences sets tools.test ; + +{ { } } [ 1 1 (a..b) >array ] unit-test +{ { } } [ 1 1 (a..b] >array ] unit-test +{ { } } [ 1 1 [a..b) >array ] unit-test +{ { 1 } } [ 1 1 [a..b] >array ] unit-test + +{ { } } [ 1 2 (a..b) >array ] unit-test +{ { 2 } } [ 1 2 (a..b] >array ] unit-test +{ { 1 } } [ 1 2 [a..b) >array ] unit-test +{ { 1 2 } } [ 1 2 [a..b] >array ] unit-test + +{ { } } [ 2 1 (a..b) >array ] unit-test +{ { 1 } } [ 2 1 (a..b] >array ] unit-test +{ { 2 } } [ 2 1 [a..b) >array ] unit-test +{ { 2 1 } } [ 2 1 [a..b] >array ] unit-test + +{ { 1 2 3 4 5 } } [ 1 5 1 >array ] unit-test +{ { 5 4 3 2 1 } } [ 5 1 -1 >array ] unit-test + +{ { 0 1/3 2/3 1 } } [ 0 1 1/3 >array ] unit-test +{ { 0 1/3 2/3 1 } } [ 1 0 -1/3 >array reverse ] unit-test + +{ 0 } [ 0 -1 .0001 length ] unit-test +{ 0 } [ 0 -1 .5 length ] unit-test +{ 0 } [ 0 -1 1 length ] unit-test +{ 0 } [ 0 -1 2 length ] unit-test +{ 0 } [ 0 -1 3 length ] unit-test +{ 0 } [ 0 -1 4 length ] unit-test + +{ 0 } [ 0 -2 .0001 length ] unit-test +{ 0 } [ 0 -2 1 length ] unit-test +{ 0 } [ 0 -2 2 length ] unit-test +{ 0 } [ 0 -2 3 length ] unit-test +{ 0 } [ 0 -2 4 length ] unit-test + +{ 0 } [ -1 0 -.0001 length ] unit-test +{ 0 } [ -1 0 -.5 length ] unit-test +{ 0 } [ -1 0 -1 length ] unit-test +{ 0 } [ -1 0 -2 length ] unit-test +{ 0 } [ -1 0 -3 length ] unit-test +{ 0 } [ -1 0 -4 length ] unit-test + +{ 0 } [ -2 0 -.0001 length ] unit-test +{ 0 } [ -2 0 -1 length ] unit-test +{ 0 } [ -2 0 -2 length ] unit-test +{ 0 } [ -2 0 -3 length ] unit-test +{ 0 } [ -2 0 -4 length ] unit-test + +{ 100 } [ + 1 100 [a..b] [ 2^ [1..b] ] map members length +] unit-test + +{ t } [ -10 10 1 [ sum ] [ >array sum ] bi = ] unit-test +{ t } [ -10 10 2 [ sum ] [ >array sum ] bi = ] unit-test +{ t } [ 10 -10 -1 [ sum ] [ >array sum ] bi = ] unit-test +{ t } [ 10 -10 -2 [ sum ] [ >array sum ] bi = ] unit-test diff --git a/core/ranges/ranges.factor b/core/ranges/ranges.factor new file mode 100644 index 0000000000..0373abcfe4 --- /dev/null +++ b/core/ranges/ranges.factor @@ -0,0 +1,71 @@ +! Copyright (C) 2008, 2010 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors classes.tuple kernel math math.order sequences +sequences.private ; +IN: ranges + +TUPLE: range +{ from read-only } +{ length read-only } +{ step read-only } ; + + + +: ( a b step -- range ) + [ over - ] dip + [ sign/mod 0 < [ 1 + ] unless 0 max ] keep + range boa ; inline + +M: range length length>> ; inline + +M: range nth-unsafe + [ step>> * ] keep from>> + ; inline + +! We want M\ tuple hashcode, not M\ sequence hashcode here! +! sequences hashcode is O(n) in number of elements +M: range hashcode* tuple-hashcode ; + +INSTANCE: range immutable-sequence + +M: range sum [ length ] [ first ] [ last ] tri + * 2 / ; + + -1 1 ? ; inline + +: (a.. ( a b step -- a' b' step ) dup [ + ] curry 2dip ; inline + +: ..b) ( a b step -- a' b' step ) dup [ - ] curry dip ; inline + +PRIVATE> + +: [a..b] ( a b -- range ) twiddle ; inline + +: (a..b] ( a b -- range ) twiddle (a.. ; inline + +: [a..b) ( a b -- range ) twiddle ..b) ; inline + +: (a..b) ( a b -- range ) twiddle (a.. ..b) ; inline + +: [0..b] ( b -- range ) 0 swap [a..b] ; inline + +: [1..b] ( b -- range ) 1 swap [a..b] ; inline + +: [0..b) ( b -- range ) 0 swap [a..b) ; inline + +: [1..b) ( b -- range ) 1 swap [a..b) ; inline + +! backwards compatibility for new syntax +ALIAS: [a,b] [a..b] deprecated +ALIAS: (a,b] (a..b] deprecated +ALIAS: [a,b) [a..b) deprecated +ALIAS: (a,b) (a..b) deprecated +ALIAS: [0,b] [0..b] deprecated +ALIAS: [1,b] [1..b] deprecated +ALIAS: [0,b) [0..b) deprecated +ALIAS: [1,b) [1..b) deprecated diff --git a/core/ranges/summary.txt b/core/ranges/summary.txt new file mode 100644 index 0000000000..3e5e6b9346 --- /dev/null +++ b/core/ranges/summary.txt @@ -0,0 +1 @@ +Virtual sequence consisting of a range of numbers diff --git a/core/ranges/tags.txt b/core/ranges/tags.txt new file mode 100644 index 0000000000..ede10ab61b --- /dev/null +++ b/core/ranges/tags.txt @@ -0,0 +1 @@ +math diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index 9751964825..ff4e297c78 100644 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -1279,7 +1279,7 @@ HELP: map-sum { $description "Like " { $snippet "map sum" } ", but without creating an intermediate sequence." } { $examples { $example - "USING: math math.ranges sequences prettyprint ;" + "USING: math ranges sequences prettyprint ;" "100 [1,b] [ sq ] map-sum ." "338350" } @@ -1290,7 +1290,7 @@ HELP: count { $description "Efficiently returns the number of elements that the predicate quotation matches." } { $examples { $example - "USING: math math.ranges sequences prettyprint ;" + "USING: math ranges sequences prettyprint ;" "100 [1,b] [ even? ] count ." "50" } @@ -1759,7 +1759,7 @@ ARTICLE: "sequences-integers" "Counted loops" $nl "Combinators that produce new sequences, such as " { $link map } ", will output an array if the input is an instance of " { $link } "." $nl -"More elaborate counted loops can be performed with " { $link "math.ranges" } "." ; +"More elaborate counted loops can be performed with " { $link "ranges" } "." ; ARTICLE: "sequences-if" "Control flow with sequences" "To reduce the boilerplate of checking if a sequence is empty, several combinators are provided." @@ -2085,7 +2085,7 @@ $nl "Using sequences for looping:" { $subsections "sequences-integers" - "math.ranges" + "ranges" } "Using sequences for control flow:" { $subsections "sequences-if" } diff --git a/extra/99-bottles/99-bottles.factor b/extra/99-bottles/99-bottles.factor index e05df79744..d7930273a7 100644 --- a/extra/99-bottles/99-bottles.factor +++ b/extra/99-bottles/99-bottles.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2011 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: ascii combinators combinators.smart io kernel math -math.parser math.ranges sequences splitting ; +math.parser ranges sequences splitting ; IN: 99-bottles : bottles ( n -- number string ) diff --git a/extra/alien/data/map/map-tests.factor b/extra/alien/data/map/map-tests.factor index 480e940aee..24c1f5f830 100644 --- a/extra/alien/data/map/map-tests.factor +++ b/extra/alien/data/map/map-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009, 2010 Joe Groff, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: alien.data alien.data.map fry generalizations kernel locals math.vectors -math.vectors.conversion math math.vectors.simd math.ranges sequences +math.vectors.conversion math math.vectors.simd ranges sequences specialized-arrays tools.test ; FROM: alien.c-types => uchar short int float ; SPECIALIZED-ARRAYS: int float float-4 uchar-16 ; diff --git a/extra/alien/data/map/map.factor b/extra/alien/data/map/map.factor index 4b871ce5ae..6ad8e4d516 100644 --- a/extra/alien/data/map/map.factor +++ b/extra/alien/data/map/map.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien alien.c-types alien.data alien.parser arrays byte-arrays combinators effects.parser fry generalizations grouping kernel -lexer locals macros make math math.ranges parser sequences +lexer locals macros make math ranges parser sequences sequences.generalizations sequences.private ; FROM: alien.arrays => array-length ; IN: alien.data.map diff --git a/extra/alien/fortran/fortran.factor b/extra/alien/fortran/fortran.factor index 094952d270..8300f1d708 100644 --- a/extra/alien/fortran/fortran.factor +++ b/extra/alien/fortran/fortran.factor @@ -6,7 +6,7 @@ generalizations kernel lexer macros math math.parser namespaces parser sequences sequences.generalizations splitting stack-checker vectors vocabs.parser words locals io.encodings.ascii io.encodings.string shuffle effects -math.ranges math.order sorting strings system alien.libraries ; +ranges math.order sorting strings system alien.libraries ; QUALIFIED-WITH: alien.c-types c IN: alien.fortran diff --git a/extra/audio/engine/test/test.factor b/extra/audio/engine/test/test.factor index da9a24d72e..7f761f3c40 100644 --- a/extra/audio/engine/test/test.factor +++ b/extra/audio/engine/test/test.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Joe Groff. ! See http://factorcode.org/license.txt for BSD license. USING: accessors timers audio audio.engine audio.loader calendar -destructors io kernel locals math math.functions math.ranges specialized-arrays +destructors io kernel locals math math.functions ranges specialized-arrays sequences random math.vectors ; FROM: alien.c-types => short ; SPECIALIZED-ARRAY: short diff --git a/extra/benchmark/backtrack/backtrack.factor b/extra/benchmark/backtrack/backtrack.factor index f62ca40719..4aab071b80 100644 --- a/extra/benchmark/backtrack/backtrack.factor +++ b/extra/benchmark/backtrack/backtrack.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: backtrack shuffle math math.ranges quotations locals fry +USING: backtrack shuffle math ranges quotations locals fry kernel words io memoize macros prettyprint sequences assocs combinators namespaces ; IN: benchmark.backtrack diff --git a/extra/benchmark/beust1/beust1.factor b/extra/benchmark/beust1/beust1.factor index f8545bfc7c..a90eb3dc09 100644 --- a/extra/benchmark/beust1/beust1.factor +++ b/extra/benchmark/beust1/beust1.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math.ranges math.parser sets sequences ; +USING: kernel ranges math.parser sets sequences ; IN: benchmark.beust1 : count-numbers ( max -- n ) diff --git a/extra/benchmark/beust2/beust2.factor b/extra/benchmark/beust2/beust2.factor index 732f58bab8..8080170ad9 100644 --- a/extra/benchmark/beust2/beust2.factor +++ b/extra/benchmark/beust2/beust2.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel locals math math.ranges math.parser sequences ; +USING: kernel locals math ranges math.parser sequences ; IN: benchmark.beust2 ! http://crazybob.org/BeustSequence.java.html diff --git a/extra/benchmark/binary-search/binary-search.factor b/extra/benchmark/binary-search/binary-search.factor index ddaaa2f669..1754c2f2a6 100644 --- a/extra/benchmark/binary-search/binary-search.factor +++ b/extra/benchmark/binary-search/binary-search.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: binary-search kernel literals math.primes math.ranges +USING: binary-search kernel literals math.primes ranges sequences ; IN: benchmark.binary-search diff --git a/extra/benchmark/binary-trees/binary-trees.factor b/extra/benchmark/binary-trees/binary-trees.factor index 4b117bb957..63331f3f86 100644 --- a/extra/benchmark/binary-trees/binary-trees.factor +++ b/extra/benchmark/binary-trees/binary-trees.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors kernel math math.ranges math.order math.parser +USING: accessors kernel math ranges math.order math.parser io locals sequences ; IN: benchmark.binary-trees diff --git a/extra/benchmark/combinatorics/combinatorics.factor b/extra/benchmark/combinatorics/combinatorics.factor index 272c7f6943..3581dcdc56 100644 --- a/extra/benchmark/combinatorics/combinatorics.factor +++ b/extra/benchmark/combinatorics/combinatorics.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2012 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: combinators kernel math math.combinatorics math.ranges +USING: combinators kernel math math.combinatorics ranges sequences ; IN: benchmark.combinatorics diff --git a/extra/benchmark/e-decimals/e-decimals.factor b/extra/benchmark/e-decimals/e-decimals.factor index 06682325a6..161fc84ea5 100644 --- a/extra/benchmark/e-decimals/e-decimals.factor +++ b/extra/benchmark/e-decimals/e-decimals.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: decimals kernel locals math math.combinatorics math.ranges +USING: decimals kernel locals math math.combinatorics ranges sequences ; IN: benchmark.e-decimals diff --git a/extra/benchmark/e-ratios/e-ratios.factor b/extra/benchmark/e-ratios/e-ratios.factor index 6d1e03b4d0..69e71c09e5 100644 --- a/extra/benchmark/e-ratios/e-ratios.factor +++ b/extra/benchmark/e-ratios/e-ratios.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.combinatorics math.ranges sequences ; +USING: kernel math math.combinatorics ranges sequences ; IN: benchmark.e-ratios : calculate-e-ratios ( n -- e ) diff --git a/extra/benchmark/hashtables/hashtables.factor b/extra/benchmark/hashtables/hashtables.factor index 86ae70036e..4fd605b517 100644 --- a/extra/benchmark/hashtables/hashtables.factor +++ b/extra/benchmark/hashtables/hashtables.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs combinators grouping kernel locals math -math.parser math.ranges memoize sequences ; +math.parser ranges memoize sequences ; IN: benchmark.hashtables MEMO: strings ( -- str ) diff --git a/extra/benchmark/nested-empty-loop-2/nested-empty-loop-2.factor b/extra/benchmark/nested-empty-loop-2/nested-empty-loop-2.factor index d99ca05a73..b2b555fba9 100644 --- a/extra/benchmark/nested-empty-loop-2/nested-empty-loop-2.factor +++ b/extra/benchmark/nested-empty-loop-2/nested-empty-loop-2.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges sequences locals hints ; +USING: kernel math ranges sequences locals hints ; IN: benchmark.nested-empty-loop-2 : times ( seq quot -- ) [ drop ] prepose each ; inline diff --git a/extra/benchmark/nsieve-bits/nsieve-bits.factor b/extra/benchmark/nsieve-bits/nsieve-bits.factor index dbceaf3ecd..55b3972b91 100644 --- a/extra/benchmark/nsieve-bits/nsieve-bits.factor +++ b/extra/benchmark/nsieve-bits/nsieve-bits.factor @@ -1,5 +1,5 @@ USING: math math.parser sequences sequences.private kernel -bit-arrays make io math.ranges multiline fry locals ; +bit-arrays make io ranges multiline fry locals ; IN: benchmark.nsieve-bits : clear-flags ( step i seq -- ) diff --git a/extra/benchmark/sieve/sieve.factor b/extra/benchmark/sieve/sieve.factor index b9168b3f8c..6df370439b 100644 --- a/extra/benchmark/sieve/sieve.factor +++ b/extra/benchmark/sieve/sieve.factor @@ -1,4 +1,4 @@ -USING: bit-arrays kernel locals math math.functions math.ranges +USING: bit-arrays kernel locals math math.functions ranges sequences ; IN: benchmark.sieve diff --git a/extra/benchmark/splay/splay.factor b/extra/benchmark/splay/splay.factor index 7ad9d97bc8..50f27f9779 100644 --- a/extra/benchmark/splay/splay.factor +++ b/extra/benchmark/splay/splay.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2011 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: arrays assocs kernel math.ranges random sequences sets +USING: arrays assocs kernel ranges random sequences sets sorting trees.splay ; IN: benchmark.splay diff --git a/extra/bittorrent/bittorrent.factor b/extra/bittorrent/bittorrent.factor index a4416cb475..6c1df4bd52 100644 --- a/extra/bittorrent/bittorrent.factor +++ b/extra/bittorrent/bittorrent.factor @@ -5,7 +5,7 @@ calendar checksums checksums.sha combinators destructors endian fry grouping http.client io io.encodings.binary io.files io.pathnames io.sockets io.streams.byte-array io.streams.duplex kernel literals locals make math math.bitwise math.functions -math.order math.parser math.ranges multiline namespaces +math.order math.parser ranges multiline namespaces prettyprint random sequences splitting strings timers tools.annotations ui ui.gadgets.panes ui.tools.listener urls urls.encoding ; diff --git a/extra/boyer-moore/boyer-moore.factor b/extra/boyer-moore/boyer-moore.factor index 2801262fa1..1461980fca 100644 --- a/extra/boyer-moore/boyer-moore.factor +++ b/extra/boyer-moore/boyer-moore.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2010 Dmitry Shubin. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays assocs kernel locals math math.order -math.ranges sequences sequences.private z-algorithm ; +ranges sequences sequences.private z-algorithm ; IN: boyer-moore float ; SPECIALIZED-ARRAY: float-4 diff --git a/extra/hamurabi/hamurabi.factor b/extra/hamurabi/hamurabi.factor index 876f9c3713..2bdccb7560 100644 --- a/extra/hamurabi/hamurabi.factor +++ b/extra/hamurabi/hamurabi.factor @@ -3,7 +3,7 @@ USING: accessors combinators combinators.short-circuit continuations formatting fry io kernel math math.functions -math.order math.parser math.ranges random sequences strings ; +math.order math.parser ranges random sequences strings ; IN: hamurabi diff --git a/extra/hashcash/hashcash.factor b/extra/hashcash/hashcash.factor index 017cb4bcd0..a8e597058d 100644 --- a/extra/hashcash/hashcash.factor +++ b/extra/hashcash/hashcash.factor @@ -3,7 +3,7 @@ USING: accessors byte-arrays calendar checksums checksums.openssl classes.tuple formatting io.encodings.ascii io.encodings.string kernel literals math math.functions -math.parser math.ranges present random sequences splitting ; +math.parser ranges present random sequences splitting ; IN: hashcash ! Hashcash implementation diff --git a/extra/html/entities/entities.factor b/extra/html/entities/entities.factor index b47c53e640..34cfe30c57 100644 --- a/extra/html/entities/entities.factor +++ b/extra/html/entities/entities.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: assocs combinators.short-circuit kernel make math -math.order math.parser math.ranges regexp sequences splitting +math.order math.parser ranges regexp sequences splitting strings ; IN: html.entities diff --git a/extra/id3/id3.factor b/extra/id3/id3.factor index 0c6880bf3b..7d1f68af13 100644 --- a/extra/id3/id3.factor +++ b/extra/id3/id3.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Tim Wawrzynczak, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: sequences io io.encodings.binary io.files io.pathnames -strings kernel math io.mmap accessors combinators math.ranges +strings kernel math io.mmap accessors combinators ranges unicode byte-arrays io.encodings.string io.encodings.utf16 assocs math.parser combinators.short-circuit fry namespaces combinators.smart splitting io.encodings.ascii diff --git a/extra/images/tga/tga.factor b/extra/images/tga/tga.factor index b592851db0..231e14acef 100644 --- a/extra/images/tga/tga.factor +++ b/extra/images/tga/tga.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors endian images images.loader io kernel locals math sequences io.encodings.ascii io.encodings.string -calendar math.ranges math.parser colors arrays hashtables +calendar ranges math.parser colors arrays hashtables ui.pixel-formats combinators continuations io.streams.throwing ; IN: images.tga diff --git a/extra/imap/imap-tests.factor b/extra/imap/imap-tests.factor index d9b7231c7b..976447d7a3 100644 --- a/extra/imap/imap-tests.factor +++ b/extra/imap/imap-tests.factor @@ -1,6 +1,6 @@ USING: accessors arrays assocs calendar calendar.format calendar.parser combinators continuations destructors formatting fry grouping.extras imap -imap.private io.streams.duplex kernel math math.parser math.ranges +imap.private io.streams.duplex kernel math math.parser ranges namespaces random sequences sets sorting uuid multiline splitting strings system tools.test memoize combinators.smart ; FROM: pcre => findall ; diff --git a/extra/infix/infix.factor b/extra/infix/infix.factor index 5de1ca52ea..e9850a95da 100644 --- a/extra/infix/infix.factor +++ b/extra/infix/infix.factor @@ -3,7 +3,7 @@ USING: accessors combinators combinators.short-circuit effects effects.parser fry infix.ast infix.parser kernel locals locals.parser locals.types math math.functions math.order -math.ranges multiline parser quotations sequences summary +ranges multiline parser quotations sequences summary vocabs.parser words words.constant ; IN: infix diff --git a/extra/io/streams/256color/256color.factor b/extra/io/streams/256color/256color.factor index a8b44baaae..153ed0a866 100644 --- a/extra/io/streams/256color/256color.factor +++ b/extra/io/streams/256color/256color.factor @@ -3,7 +3,7 @@ USING: accessors arrays assocs destructors environment formatting fry io io.streams.string io.styles kernel locals -math math.functions math.ranges math.vectors namespaces +math math.functions ranges math.vectors namespaces sequences sequences.extras strings strings.tables ; IN: io.streams.256color diff --git a/extra/jamshred/player/player.factor b/extra/jamshred/player/player.factor index 64bd75205e..53f3780695 100644 --- a/extra/jamshred/player/player.factor +++ b/extra/jamshred/player/player.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors colors.constants combinators jamshred.log jamshred.oint jamshred.sound jamshred.tunnel kernel locals math -math.constants math.order math.ranges math.vectors math.matrices +math.constants math.order ranges math.vectors math.matrices sequences shuffle specialized-arrays strings system ; QUALIFIED-WITH: alien.c-types c SPECIALIZED-ARRAY: c:float diff --git a/extra/jamshred/tunnel/tunnel.factor b/extra/jamshred/tunnel/tunnel.factor index 94e4d7b8b0..633b875043 100644 --- a/extra/jamshred/tunnel/tunnel.factor +++ b/extra/jamshred/tunnel/tunnel.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays colors combinators fry jamshred.oint kernel literals locals math math.constants math.matrices -math.order math.quadratic math.ranges math.vectors random +math.order math.quadratic ranges math.vectors random sequences specialized-arrays vectors ; FROM: jamshred.oint => distance ; FROM: alien.c-types => float ; diff --git a/extra/managed-server/managed-server.factor b/extra/managed-server/managed-server.factor index a8070abbbf..43c00f6f22 100644 --- a/extra/managed-server/managed-server.factor +++ b/extra/managed-server/managed-server.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors assocs calendar continuations destructors io io.encodings.binary io.servers io.sockets -io.streams.duplex fry kernel locals math math.ranges multiline +io.streams.duplex fry kernel locals math ranges multiline namespaces prettyprint random sequences sets splitting threads tools.continuations ; IN: managed-server diff --git a/extra/math/derivatives/syntax/syntax.factor b/extra/math/derivatives/syntax/syntax.factor index e639083cde..78336b15c4 100644 --- a/extra/math/derivatives/syntax/syntax.factor +++ b/extra/math/derivatives/syntax/syntax.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2009 Jason W. Merrill. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors effects kernel lexer math.ranges parser +USING: accessors effects kernel lexer ranges parser sequences words ; IN: math.derivatives.syntax diff --git a/extra/math/extras/extras-tests.factor b/extra/math/extras/extras-tests.factor index 8967451fd1..b5dbbbd9be 100644 --- a/extra/math/extras/extras-tests.factor +++ b/extra/math/extras/extras-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2012 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: arrays kernel math math.extras math.ranges sequences +USING: arrays kernel math math.extras ranges sequences tools.test ; { 7 } [ 4 2 stirling ] unit-test diff --git a/extra/math/extras/extras.factor b/extra/math/extras/extras.factor index 8b876e92b0..0c3c9c9ce6 100644 --- a/extra/math/extras/extras.factor +++ b/extra/math/extras/extras.factor @@ -5,7 +5,7 @@ USING: accessors arrays assocs assocs.extras byte-arrays combinators combinators.short-circuit compression.zlib fry grouping kernel locals math math.bitwise math.combinatorics math.constants math.functions math.order math.primes -math.primes.factors math.ranges math.ranges.private +math.primes.factors ranges ranges.private math.statistics math.vectors memoize parser random sequences sequences.extras sequences.private sets sorting sorting.extras ; diff --git a/extra/math/factorials/factorials-tests.factor b/extra/math/factorials/factorials-tests.factor index b2a06d8efa..f35f713a12 100644 --- a/extra/math/factorials/factorials-tests.factor +++ b/extra/math/factorials/factorials-tests.factor @@ -1,4 +1,4 @@ -USING: kernel math.factorials math.functions math.ranges sequences tools.test ; +USING: kernel math.factorials math.functions ranges sequences tools.test ; { 1 } [ -1 factorial ] unit-test ! not necessarily correct { 1 } [ 0 factorial ] unit-test diff --git a/extra/math/factorials/factorials.factor b/extra/math/factorials/factorials.factor index ff6272f555..c97194af80 100644 --- a/extra/math/factorials/factorials.factor +++ b/extra/math/factorials/factorials.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: combinators combinators.short-circuit fry inverse kernel -math math.functions math.primes math.ranges memoize sequences ; +math math.functions math.primes ranges memoize sequences ; IN: math.factorials diff --git a/extra/math/numerical-integration/numerical-integration.factor b/extra/math/numerical-integration/numerical-integration.factor index acc22fa2a2..27ea4530f2 100644 --- a/extra/math/numerical-integration/numerical-integration.factor +++ b/extra/math/numerical-integration/numerical-integration.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges math.vectors namespaces +USING: kernel math ranges math.vectors namespaces sequences ; IN: math.numerical-integration diff --git a/extra/math/primes/solovay-strassen/solovay-strassen.factor b/extra/math/primes/solovay-strassen/solovay-strassen.factor index 4c7d0c9db3..167baa6a45 100644 --- a/extra/math/primes/solovay-strassen/solovay-strassen.factor +++ b/extra/math/primes/solovay-strassen/solovay-strassen.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: combinators kernel locals math math.extras -math.extras.private math.functions math.ranges random sequences ; +math.extras.private math.functions ranges random sequences ; IN: math.primes.solovay-strassen diff --git a/extra/mongodb/benchmark/benchmark.factor b/extra/mongodb/benchmark/benchmark.factor index f9e6ff5526..00c09715ea 100644 --- a/extra/mongodb/benchmark/benchmark.factor +++ b/extra/mongodb/benchmark/benchmark.factor @@ -1,4 +1,4 @@ -USING: calendar math fry kernel assocs math.ranges bson.reader io.streams.byte-array +USING: calendar math fry kernel assocs ranges bson.reader io.streams.byte-array sequences formatting combinators namespaces io tools.time prettyprint io.encodings.binary accessors words mongodb.driver strings math.parser bson.writer hashtables ; diff --git a/extra/nurbs/nurbs.factor b/extra/nurbs/nurbs.factor index 0536193730..662e39cf12 100644 --- a/extra/nurbs/nurbs.factor +++ b/extra/nurbs/nurbs.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Joe Groff ! See http://factorcode.org/license.txt for BSD license USING: accessors alien.c-types grouping kernel locals math -math.order math.ranges math.vectors math.vectors.homogeneous +math.order ranges math.vectors math.vectors.homogeneous sequences specialized-arrays ; SPECIALIZED-ARRAY: alien.c-types:float IN: nurbs diff --git a/extra/pcre/pcre-tests.factor b/extra/pcre/pcre-tests.factor index abadc761c0..a7360b1087 100644 --- a/extra/pcre/pcre-tests.factor +++ b/extra/pcre/pcre-tests.factor @@ -1,5 +1,5 @@ USING: accessors arrays assocs continuations http.client kernel -literals math math.parser math.ranges pcre pcre.ffi pcre.private +literals math math.parser ranges pcre pcre.ffi pcre.private random sequences system tools.test ; QUALIFIED: regexp QUALIFIED: splitting diff --git a/extra/pdf/layout/layout.factor b/extra/pdf/layout/layout.factor index 2ec599d865..764f82ba07 100644 --- a/extra/pdf/layout/layout.factor +++ b/extra/pdf/layout/layout.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: accessors assocs calendar combinators environment fonts formatting fry io io.streams.string kernel literals locals make -math math.order math.ranges namespaces pdf.canvas pdf.values +math math.order ranges namespaces pdf.canvas pdf.values pdf.wrap sequences sequences.extras sorting splitting ui.text xml.entities ; FROM: pdf.canvas => draw-text ; diff --git a/extra/picomath/picomath-tests.factor b/extra/picomath/picomath-tests.factor index ee1f219e9c..a7c01c0eb3 100644 --- a/extra/picomath/picomath-tests.factor +++ b/extra/picomath/picomath-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2011 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: kernel literals math math.functions math.ranges picomath +USING: kernel literals math math.functions ranges picomath sequences tools.test ; IN: picomath diff --git a/extra/pong/pong.factor b/extra/pong/pong.factor index 1e8c7c990f..1ceedbe45f 100644 --- a/extra/pong/pong.factor +++ b/extra/pong/pong.factor @@ -1,6 +1,6 @@ USING: accessors arrays calendar colors.constants combinators.short-circuit fonts fry kernel literals locals math -math.order math.ranges math.vectors namespaces opengl random +math.order ranges math.vectors namespaces opengl random sequences timers ui ui.commands ui.gadgets ui.gadgets.worlds ui.gestures ui.pens.solid ui.render ui.text ; diff --git a/extra/pop3/pop3.factor b/extra/pop3/pop3.factor index 2179c44930..ed987c6324 100644 --- a/extra/pop3/pop3.factor +++ b/extra/pop3/pop3.factor @@ -3,7 +3,7 @@ USING: accessors annotations arrays assocs calendar combinators fry hashtables io io.crlf io.encodings.utf8 io.sockets io.streams.duplex io.timeouts kernel make math math.parser -math.ranges namespaces prettyprint sequences splitting +ranges namespaces prettyprint sequences splitting strings ; IN: pop3 diff --git a/extra/project-euler/001/001.factor b/extra/project-euler/001/001.factor index 1c6b100cda..920909eabd 100644 --- a/extra/project-euler/001/001.factor +++ b/extra/project-euler/001/001.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007-2009 Aaron Schaefer, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.functions math.ranges project-euler.common sequences +USING: kernel math math.functions ranges project-euler.common sequences sets ; IN: project-euler.001 diff --git a/extra/project-euler/004/004.factor b/extra/project-euler/004/004.factor index 42b33263b1..42cbc17fe4 100644 --- a/extra/project-euler/004/004.factor +++ b/extra/project-euler/004/004.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007 Aaron Schaefer, Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. -USING: hashtables kernel math math.functions math.ranges project-euler.common +USING: hashtables kernel math math.functions ranges project-euler.common sequences sorting sets ; IN: project-euler.004 diff --git a/extra/project-euler/005/005.factor b/extra/project-euler/005/005.factor index 633edbdcb5..012bf0bfa2 100644 --- a/extra/project-euler/005/005.factor +++ b/extra/project-euler/005/005.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007, 2009 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: math math.functions math.ranges project-euler.common sequences ; +USING: math math.functions ranges project-euler.common sequences ; IN: project-euler.005 ! http://projecteuler.net/index.php?section=problems&id=5 diff --git a/extra/project-euler/006/006.factor b/extra/project-euler/006/006.factor index faefb767a4..737230b4a7 100644 --- a/extra/project-euler/006/006.factor +++ b/extra/project-euler/006/006.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007, 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges sequences project-euler.common ; +USING: kernel math ranges sequences project-euler.common ; IN: project-euler.006 ! http://projecteuler.net/index.php?section=problems&id=6 diff --git a/extra/project-euler/014/014.factor b/extra/project-euler/014/014.factor index 7d901f1038..faceb179cf 100644 --- a/extra/project-euler/014/014.factor +++ b/extra/project-euler/014/014.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators.short-circuit kernel make math math.functions math.ranges +USING: combinators.short-circuit kernel make math math.functions ranges sequences project-euler.common ; IN: project-euler.014 diff --git a/extra/project-euler/017/017.factor b/extra/project-euler/017/017.factor index 2c326a4382..694e4366c1 100644 --- a/extra/project-euler/017/017.factor +++ b/extra/project-euler/017/017.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007, 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: ascii kernel math.ranges math.text.english sequences +USING: ascii kernel ranges math.text.english sequences project-euler.common ; IN: project-euler.017 diff --git a/extra/project-euler/018/018.factor b/extra/project-euler/018/018.factor index c10738887d..9590640643 100644 --- a/extra/project-euler/018/018.factor +++ b/extra/project-euler/018/018.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007 Samuel Tardieu, Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges project-euler.common sequences ; +USING: kernel math ranges project-euler.common sequences ; IN: project-euler.018 ! http://projecteuler.net/index.php?section=problems&id=18 diff --git a/extra/project-euler/019/019.factor b/extra/project-euler/019/019.factor index 6f0f00fcb2..3922156b47 100644 --- a/extra/project-euler/019/019.factor +++ b/extra/project-euler/019/019.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2007 Samuel Tardieu, Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: calendar combinators kernel math math.ranges namespaces sequences +USING: calendar combinators kernel math ranges namespaces sequences math.order project-euler.common ; IN: project-euler.019 diff --git a/extra/project-euler/021/021.factor b/extra/project-euler/021/021.factor index ef0d4191de..bf83ffe07d 100644 --- a/extra/project-euler/021/021.factor +++ b/extra/project-euler/021/021.factor @@ -1,7 +1,7 @@ ! Copyright (c) 2007 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. USING: combinators.short-circuit kernel math math.functions - math.ranges namespaces project-euler.common sequences ; + ranges namespaces project-euler.common sequences ; IN: project-euler.021 ! http://projecteuler.net/index.php?section=problems&id=21 diff --git a/extra/project-euler/023/023.factor b/extra/project-euler/023/023.factor index e001970f71..f1f5c66eed 100644 --- a/extra/project-euler/023/023.factor +++ b/extra/project-euler/023/023.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: fry kernel math math.ranges project-euler.common +USING: fry kernel math ranges project-euler.common sequences sets ; IN: project-euler.023 diff --git a/extra/project-euler/026/026.factor b/extra/project-euler/026/026.factor index efec389e18..c0aec158ab 100644 --- a/extra/project-euler/026/026.factor +++ b/extra/project-euler/026/026.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.functions math.primes math.ranges sequences project-euler.common ; +USING: kernel math math.functions math.primes ranges sequences project-euler.common ; IN: project-euler.026 ! http://projecteuler.net/index.php?section=problems&id=26 diff --git a/extra/project-euler/027/027.factor b/extra/project-euler/027/027.factor index 6dda6a502b..94abee1786 100644 --- a/extra/project-euler/027/027.factor +++ b/extra/project-euler/027/027.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.primes math.ranges project-euler.common sequences ; +USING: kernel math math.primes ranges project-euler.common sequences ; IN: project-euler.027 ! http://projecteuler.net/index.php?section=problems&id=27 diff --git a/extra/project-euler/028/028.factor b/extra/project-euler/028/028.factor index b134d369de..7ff66a1c41 100644 --- a/extra/project-euler/028/028.factor +++ b/extra/project-euler/028/028.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges sequences project-euler.common ; +USING: kernel math ranges sequences project-euler.common ; IN: project-euler.028 ! http://projecteuler.net/index.php?section=problems&id=28 diff --git a/extra/project-euler/029/029.factor b/extra/project-euler/029/029.factor index f48b58c5d7..1fc194e6ff 100644 --- a/extra/project-euler/029/029.factor +++ b/extra/project-euler/029/029.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: hashtables kernel math.functions math.ranges project-euler.common +USING: hashtables kernel math.functions ranges project-euler.common sequences sets ; IN: project-euler.029 diff --git a/extra/project-euler/030/030.factor b/extra/project-euler/030/030.factor index 6c7dbd9d87..1acd8a52b8 100644 --- a/extra/project-euler/030/030.factor +++ b/extra/project-euler/030/030.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.functions math.ranges project-euler.common sequences ; +USING: kernel math math.functions ranges project-euler.common sequences ; IN: project-euler.030 ! http://projecteuler.net/index.php?section=problems&id=30 diff --git a/extra/project-euler/032/032.factor b/extra/project-euler/032/032.factor index cc545d8bb3..f891cc5ad7 100644 --- a/extra/project-euler/032/032.factor +++ b/extra/project-euler/032/032.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.combinatorics math.functions math.parser math.ranges +USING: kernel math math.combinatorics math.functions math.parser ranges project-euler.common sequences sets ; IN: project-euler.032 diff --git a/extra/project-euler/033/033.factor b/extra/project-euler/033/033.factor index 909680d472..c12376404c 100644 --- a/extra/project-euler/033/033.factor +++ b/extra/project-euler/033/033.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges project-euler.common sequences ; +USING: kernel math ranges project-euler.common sequences ; IN: project-euler.033 ! http://projecteuler.net/index.php?section=problems&id=33 diff --git a/extra/project-euler/034/034.factor b/extra/project-euler/034/034.factor index 1a76f76ee7..293bc292e0 100644 --- a/extra/project-euler/034/034.factor +++ b/extra/project-euler/034/034.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math.ranges project-euler.common sequences ; +USING: kernel ranges project-euler.common sequences ; IN: project-euler.034 ! http://projecteuler.net/index.php?section=problems&id=34 diff --git a/extra/project-euler/036/036.factor b/extra/project-euler/036/036.factor index e6c257969e..e5a0af55cb 100644 --- a/extra/project-euler/036/036.factor +++ b/extra/project-euler/036/036.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators.short-circuit kernel math.parser math.ranges +USING: combinators.short-circuit kernel math.parser ranges project-euler.common sequences ; IN: project-euler.036 diff --git a/extra/project-euler/038/038.factor b/extra/project-euler/038/038.factor index 100f59efc2..0fee4c89d7 100644 --- a/extra/project-euler/038/038.factor +++ b/extra/project-euler/038/038.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.ranges project-euler.common sequences +USING: kernel math ranges project-euler.common sequences strings ; IN: project-euler.038 diff --git a/extra/project-euler/039/039.factor b/extra/project-euler/039/039.factor index 613e03a05c..e55fb1c668 100644 --- a/extra/project-euler/039/039.factor +++ b/extra/project-euler/039/039.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays kernel math math.ranges namespaces project-euler.common +USING: arrays kernel math ranges namespaces project-euler.common sequences sequences.extras ; IN: project-euler.039 diff --git a/extra/project-euler/043/043.factor b/extra/project-euler/043/043.factor index 79f4cfce6b..ae8e923a93 100644 --- a/extra/project-euler/043/043.factor +++ b/extra/project-euler/043/043.factor @@ -1,7 +1,7 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. USING: combinators.short-circuit kernel math math.functions math.combinatorics - math.ranges project-euler.common sequences sets sorting ; + ranges project-euler.common sequences sets sorting ; IN: project-euler.043 ! http://projecteuler.net/index.php?section=problems&id=43 diff --git a/extra/project-euler/044/044.factor b/extra/project-euler/044/044.factor index 9a2f580c89..25ead5e1c1 100644 --- a/extra/project-euler/044/044.factor +++ b/extra/project-euler/044/044.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.functions math.ranges math.order +USING: kernel math math.functions ranges math.order project-euler.common sequences layouts ; IN: project-euler.044 diff --git a/extra/project-euler/046/046.factor b/extra/project-euler/046/046.factor index e129363fa9..72e117f381 100644 --- a/extra/project-euler/046/046.factor +++ b/extra/project-euler/046/046.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.functions math.primes math.ranges +USING: kernel math math.functions math.primes ranges sequences project-euler.common math.bitwise ; IN: project-euler.046 diff --git a/extra/project-euler/047/047.factor b/extra/project-euler/047/047.factor index 3e49659382..f787c29f60 100644 --- a/extra/project-euler/047/047.factor +++ b/extra/project-euler/047/047.factor @@ -1,7 +1,7 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. USING: arrays kernel math math.primes math.primes.factors - math.ranges namespaces sequences project-euler.common ; + ranges namespaces sequences project-euler.common ; IN: project-euler.047 ! http://projecteuler.net/index.php?section=problems&id=47 diff --git a/extra/project-euler/048/048.factor b/extra/project-euler/048/048.factor index 48ad1083be..0e5a75d524 100644 --- a/extra/project-euler/048/048.factor +++ b/extra/project-euler/048/048.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel math math.functions math.ranges +USING: kernel math math.functions ranges project-euler.common sequences ; IN: project-euler.048 diff --git a/extra/project-euler/051/051.factor b/extra/project-euler/051/051.factor index 23df9f50af..514b9ca831 100644 --- a/extra/project-euler/051/051.factor +++ b/extra/project-euler/051/051.factor @@ -27,7 +27,7 @@ ! for each prime number, count the families it belongs to. When one reaches count of 8, stop, and get the smallest number by replacing * with ones. USING: assocs fry kernel math math.combinatorics math.functions -math.order math.parser math.primes math.ranges namespaces +math.order math.parser math.primes ranges namespaces project-euler.common sequences sets ; IN: project-euler.051 short uchar ; SPECIALIZED-ARRAY: uchar SPECIALIZED-ARRAY: short diff --git a/extra/tensors/demos/demos.factor b/extra/tensors/demos/demos.factor index 2192e2e139..6d1ad9b5fb 100644 --- a/extra/tensors/demos/demos.factor +++ b/extra/tensors/demos/demos.factor @@ -3,7 +3,7 @@ ! Code based on https://towardsdatascience.com/linear-regression-from-scratch-with-numpy-implementation-finally-8e617d8e274c USING: arrays accessors csv io io.encodings.utf8 kernel locals math math.parser -math.ranges math.statistics prettyprint sequences tensors ; +ranges math.statistics prettyprint sequences tensors ; IN: tensors.demos