From fb6df472a208339cca3758f5bd47221bcb691f65 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 14 May 2009 16:54:16 -0500 Subject: [PATCH] Cleaning up USING: lists for new strict semantics --- basis/alien/c-types/c-types.factor | 10 +++++----- basis/bootstrap/compiler/compiler.factor | 9 +++++---- basis/bootstrap/image/image.factor | 2 +- basis/calendar/format/format.factor | 2 +- basis/compiler/cfg/rpo/rpo.factor | 2 +- basis/compiler/compiler.factor | 2 +- basis/compiler/tree/debugger/debugger.factor | 1 + basis/compiler/tree/def-use/def-use.factor | 2 +- .../tree/normalization/normalization.factor | 2 +- basis/compiler/tree/propagation/nodes/nodes.factor | 2 +- basis/concurrency/messaging/messaging-docs.factor | 2 +- basis/documents/documents.factor | 1 + basis/editors/editors.factor | 2 +- basis/environment/unix/unix.factor | 3 +-- basis/help/cookbook/cookbook.factor | 2 +- basis/http/client/client-docs.factor | 2 +- basis/http/client/client.factor | 2 +- basis/http/parsers/parsers.factor | 2 +- basis/images/tesselation/tesselation.factor | 2 +- basis/io/buffers/buffers.factor | 2 +- basis/io/launcher/unix/unix.factor | 5 +---- basis/io/sockets/secure/unix/unix.factor | 1 + basis/io/sockets/sockets.factor | 13 ++++++------- basis/io/sockets/unix/unix.factor | 12 ++++++------ basis/logging/server/server.factor | 8 ++++---- basis/models/range/range.factor | 1 + basis/opengl/textures/textures.factor | 2 +- basis/peg/ebnf/ebnf.factor | 8 +++++--- basis/peg/peg.factor | 2 +- basis/prettyprint/prettyprint-docs.factor | 2 +- .../random/mersenne-twister/mersenne-twister.factor | 2 -- basis/random/random.factor | 2 -- basis/stack-checker/inlining/inlining.factor | 2 +- basis/stack-checker/known-words/known-words.factor | 4 ++-- basis/stack-checker/transforms/transforms.factor | 2 +- basis/ui/commands/commands.factor | 2 +- basis/ui/gadgets/buttons/buttons.factor | 1 + basis/ui/gadgets/editors/editors.factor | 2 +- basis/ui/gadgets/gadgets.factor | 2 +- basis/ui/gadgets/glass/glass.factor | 1 + basis/ui/gadgets/menus/menus.factor | 2 +- basis/ui/gadgets/panes/panes.factor | 1 + basis/ui/gadgets/tables/tables.factor | 2 +- basis/ui/tools/browser/browser.factor | 11 ++++++----- basis/ui/tools/browser/popups/popups.factor | 1 + basis/ui/tools/debugger/debugger-docs.factor | 2 +- basis/ui/tools/debugger/debugger.factor | 2 +- basis/ui/tools/deploy/deploy.factor | 13 ++++++------- basis/ui/tools/error-list/error-list.factor | 2 +- basis/ui/tools/profiler/profiler.factor | 7 +++---- basis/ui/ui.factor | 2 +- basis/unix/debugger/debugger.factor | 3 ++- basis/unix/process/process.factor | 2 +- basis/unix/stat/stat.factor | 4 ---- basis/unix/types/types.factor | 3 +-- basis/unix/unix.factor | 3 ++- core/kernel/kernel-docs.factor | 2 +- core/slots/slots-docs.factor | 9 ++++----- 58 files changed, 98 insertions(+), 101 deletions(-) diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index df5a5bbba8..6e398667ec 100755 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -1,11 +1,11 @@ ! Copyright (C) 2004, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: byte-arrays arrays assocs kernel kernel.private libc math -namespaces make parser sequences strings words assocs splitting -math.parser cpu.architecture alien alien.accessors alien.strings -quotations layouts system compiler.units io io.files -io.encodings.binary io.streams.memory accessors combinators effects -continuations fry classes ; +namespaces make parser sequences strings words splitting math.parser +cpu.architecture alien alien.accessors alien.strings quotations +layouts system compiler.units io io.files io.encodings.binary +io.streams.memory accessors combinators effects continuations fry +classes ; IN: alien.c-types DEFER: diff --git a/basis/bootstrap/compiler/compiler.factor b/basis/bootstrap/compiler/compiler.factor index 3aefdec29f..5e3827efea 100755 --- a/basis/bootstrap/compiler/compiler.factor +++ b/basis/bootstrap/compiler/compiler.factor @@ -1,13 +1,14 @@ ! Copyright (C) 2007, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors compiler cpu.architecture vocabs.loader system +USING: accessors cpu.architecture vocabs.loader system sequences namespaces parser kernel kernel.private classes classes.private arrays hashtables vectors classes.tuple sbufs hashtables.private sequences.private math classes.tuple.private growable namespaces.private assocs words command-line vocabs io -io.encodings.string libc splitting math.parser memory -compiler.units math.order compiler.tree.builder -compiler.tree.optimizer compiler.cfg.optimizer ; +io.encodings.string libc splitting math.parser memory compiler.units +math.order compiler.tree.builder compiler.tree.optimizer +compiler.cfg.optimizer ; +FROM: compiler => enable-optimizer compile-word ; IN: bootstrap.compiler ! Don't bring this in when deploying, since it will store a diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index 4a7a558703..68c7b23302 100644 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2004, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien arrays byte-arrays generic assocs hashtables assocs +USING: alien arrays byte-arrays generic hashtables hashtables.private io io.binary io.files io.encodings.binary io.pathnames kernel kernel.private math namespaces make parser prettyprint sequences sequences.private strings sbufs vectors words diff --git a/basis/calendar/format/format.factor b/basis/calendar/format/format.factor index c2e95f2a9e..ad43cc2f1d 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: math math.order math.parser math.functions kernel sequences io accessors arrays io.streams.string splitting -combinators accessors calendar calendar.format.macros present ; +combinators calendar calendar.format.macros present ; IN: calendar.format : pad-00 ( n -- str ) number>string 2 CHAR: 0 pad-head ; diff --git a/basis/compiler/cfg/rpo/rpo.factor b/basis/compiler/cfg/rpo/rpo.factor index 158903b4bf..bb4153da78 100644 --- a/basis/compiler/cfg/rpo/rpo.factor +++ b/basis/compiler/cfg/rpo/rpo.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel accessors namespaces make math sequences sets -assocs fry compiler.cfg.instructions ; +assocs fry compiler.cfg compiler.cfg.instructions ; IN: compiler.cfg.rpo SYMBOL: visited diff --git a/basis/compiler/compiler.factor b/basis/compiler/compiler.factor index 01e58461ff..c3d70fdc5b 100644 --- a/basis/compiler/compiler.factor +++ b/basis/compiler/compiler.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel namespaces arrays sequences io words fry continuations vocabs assocs dlists definitions math graphs generic -generic.single combinators deques search-deques macros io +generic.single combinators deques search-deques macros source-files.errors stack-checker stack-checker.state stack-checker.inlining stack-checker.errors combinators.short-circuit compiler.errors compiler.units compiler.tree.builder diff --git a/basis/compiler/tree/debugger/debugger.factor b/basis/compiler/tree/debugger/debugger.factor index 60cab92843..d1a9f5215a 100644 --- a/basis/compiler/tree/debugger/debugger.factor +++ b/basis/compiler/tree/debugger/debugger.factor @@ -16,6 +16,7 @@ compiler.tree.builder compiler.tree.optimizer compiler.tree.combinators compiler.tree.checker ; +FROM: fry => _ ; RENAME: _ match => __ IN: compiler.tree.debugger diff --git a/basis/compiler/tree/def-use/def-use.factor b/basis/compiler/tree/def-use/def-use.factor index 705f44eeb6..fa504919a3 100644 --- a/basis/compiler/tree/def-use/def-use.factor +++ b/basis/compiler/tree/def-use/def-use.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays namespaces assocs sequences kernel generic assocs +USING: arrays namespaces sequences kernel generic assocs classes vectors accessors combinators sets stack-checker.state stack-checker.branches diff --git a/basis/compiler/tree/normalization/normalization.factor b/basis/compiler/tree/normalization/normalization.factor index ee7bf8672e..7494ed064e 100644 --- a/basis/compiler/tree/normalization/normalization.factor +++ b/basis/compiler/tree/normalization/normalization.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: fry namespaces sequences math math.order accessors kernel arrays -combinators compiler.utilities assocs +combinators assocs stack-checker.backend stack-checker.branches stack-checker.inlining diff --git a/basis/compiler/tree/propagation/nodes/nodes.factor b/basis/compiler/tree/propagation/nodes/nodes.factor index d676102bde..c3f5312601 100644 --- a/basis/compiler/tree/propagation/nodes/nodes.factor +++ b/basis/compiler/tree/propagation/nodes/nodes.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2004, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: sequences accessors kernel assocs sequences +USING: sequences accessors kernel assocs compiler.tree compiler.tree.propagation.copy compiler.tree.propagation.info ; diff --git a/basis/concurrency/messaging/messaging-docs.factor b/basis/concurrency/messaging/messaging-docs.factor index 41beedb6dc..039e9a53af 100644 --- a/basis/concurrency/messaging/messaging-docs.factor +++ b/basis/concurrency/messaging/messaging-docs.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006 Chris Double. ! See http://factorcode.org/license.txt for BSD license. USING: help.syntax help.markup concurrency.messaging.private -threads kernel arrays quotations threads strings ; +threads kernel arrays quotations strings ; IN: concurrency.messaging HELP: send diff --git a/basis/documents/documents.factor b/basis/documents/documents.factor index 451c912779..104dea6b98 100644 --- a/basis/documents/documents.factor +++ b/basis/documents/documents.factor @@ -3,6 +3,7 @@ USING: accessors arrays io kernel math models namespaces make sequences strings splitting combinators unicode.categories math.order math.ranges fry locals ; +FROM: models => change-model ; IN: documents : +col ( loc n -- newloc ) [ first2 ] dip + 2array ; diff --git a/basis/editors/editors.factor b/basis/editors/editors.factor index d5b4b909e3..f81490bcf2 100644 --- a/basis/editors/editors.factor +++ b/basis/editors/editors.factor @@ -4,7 +4,7 @@ USING: parser lexer kernel namespaces sequences definitions io.files io.backend io.pathnames io summary continuations tools.crossref vocabs.hierarchy prettyprint source-files source-files.errors assocs vocabs vocabs.loader splitting -accessors debugger prettyprint help.topics ; +accessors debugger help.topics ; IN: editors TUPLE: no-edit-hook ; diff --git a/basis/environment/unix/unix.factor b/basis/environment/unix/unix.factor index 7da19ee47b..84dfbbd43e 100644 --- a/basis/environment/unix/unix.factor +++ b/basis/environment/unix/unix.factor @@ -2,8 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: alien alien.c-types alien.strings alien.syntax kernel layouts sequences system unix environment io.encodings.utf8 -unix.utilities vocabs.loader combinators alien.accessors -alien.syntax ; +unix.utilities vocabs.loader combinators alien.accessors ; IN: environment.unix HOOK: environ os ( -- void* ) diff --git a/basis/help/cookbook/cookbook.factor b/basis/help/cookbook/cookbook.factor index 59486a9c35..8aa0265239 100644 --- a/basis/help/cookbook/cookbook.factor +++ b/basis/help/cookbook/cookbook.factor @@ -1,4 +1,4 @@ -USING: help.markup help.syntax io kernel math namespaces parser +USING: help.markup help.syntax io kernel math parser prettyprint sequences vocabs.loader namespaces stack-checker help command-line multiline see ; IN: help.cookbook diff --git a/basis/http/client/client-docs.factor b/basis/http/client/client-docs.factor index e00f8e2263..890518aa2a 100644 --- a/basis/http/client/client-docs.factor +++ b/basis/http/client/client-docs.factor @@ -1,5 +1,5 @@ USING: http help.markup help.syntax io.pathnames io.streams.string -io.encodings.8-bit io.encodings.binary kernel strings urls +io.encodings.8-bit io.encodings.binary kernel urls urls.encoding byte-arrays strings assocs sequences destructors http.client.post-data.private ; IN: http.client diff --git a/basis/http/client/client.factor b/basis/http/client/client.factor index d1997c73f9..2f6bcfafe9 100644 --- a/basis/http/client/client.factor +++ b/basis/http/client/client.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors assocs kernel math math.parser namespaces make +USING: assocs kernel math math.parser namespaces make sequences strings splitting calendar continuations accessors vectors math.order hashtables byte-arrays destructors io io.sockets io.streams.string io.files io.timeouts diff --git a/basis/http/parsers/parsers.factor b/basis/http/parsers/parsers.factor index 2520c35acb..1810617c56 100644 --- a/basis/http/parsers/parsers.factor +++ b/basis/http/parsers/parsers.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: combinators.short-circuit math math.order math.parser kernel sequences sequences.deep peg peg.parsers assocs arrays -hashtables strings unicode.case namespaces make ascii ; +hashtables strings namespaces make ascii ; IN: http.parsers : except ( quot -- parser ) diff --git a/basis/images/tesselation/tesselation.factor b/basis/images/tesselation/tesselation.factor index 694041a28d..cbdf396b48 100644 --- a/basis/images/tesselation/tesselation.factor +++ b/basis/images/tesselation/tesselation.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: sequences kernel math grouping fry columns locals accessors -images math math.vectors arrays ; +images math.vectors arrays ; IN: images.tesselation : group-rows ( bitmap bitmap-dim -- rows ) diff --git a/basis/io/buffers/buffers.factor b/basis/io/buffers/buffers.factor index 49b5357d98..c9396dd081 100644 --- a/basis/io/buffers/buffers.factor +++ b/basis/io/buffers/buffers.factor @@ -3,7 +3,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien alien.accessors alien.c-types alien.syntax kernel libc math sequences byte-arrays strings -hints accessors math.order destructors combinators ; +hints math.order destructors combinators ; IN: io.buffers TUPLE: buffer diff --git a/basis/io/launcher/unix/unix.factor b/basis/io/launcher/unix/unix.factor index 5d7502f681..5424ab4238 100644 --- a/basis/io/launcher/unix/unix.factor +++ b/basis/io/launcher/unix/unix.factor @@ -4,13 +4,10 @@ USING: accessors alien.c-types arrays assocs combinators continuations environment io io.backend io.backend.unix io.files io.files.private io.files.unix io.launcher io.launcher.unix.parser io.pathnames io.ports kernel math -namespaces sequences strings system threads unix unix +namespaces sequences strings system threads unix unix.process ; IN: io.launcher.unix -! Search unix first -USE: unix - : get-arguments ( process -- seq ) command>> dup string? [ tokenize-command ] when ; diff --git a/basis/io/sockets/secure/unix/unix.factor b/basis/io/sockets/secure/unix/unix.factor index f1f39a0559..6580af891d 100644 --- a/basis/io/sockets/secure/unix/unix.factor +++ b/basis/io/sockets/secure/unix/unix.factor @@ -7,6 +7,7 @@ openssl.libcrypto openssl.libssl io io.files io.ports io.backend.unix io.sockets.unix io.encodings.ascii io.buffers io.sockets io.sockets.secure io.sockets.secure.openssl io.timeouts system summary fry ; +FROM: io.ports => shutdown ; IN: io.sockets.secure.unix M: ssl-handle handle-fd file>> handle-fd ; diff --git a/basis/io/sockets/sockets.factor b/basis/io/sockets/sockets.factor index 0671247ade..d6a8d1b54e 100644 --- a/basis/io/sockets/sockets.factor +++ b/basis/io/sockets/sockets.factor @@ -1,18 +1,17 @@ ! Copyright (C) 2007, 2008 Slava Pestov, Doug Coleman, ! Daniel Ehrenberg. ! See http://factorcode.org/license.txt for BSD license. -USING: generic kernel io.backend namespaces continuations -sequences arrays io.encodings io.ports io.streams.duplex -io.encodings.ascii alien.strings io.binary accessors destructors -classes byte-arrays system combinators parser -alien.c-types math.parser splitting grouping math assocs summary -system vocabs.loader combinators present fry vocabs.parser ; +USING: generic kernel io.backend namespaces continuations sequences +arrays io.encodings io.ports io.streams.duplex io.encodings.ascii +alien.strings io.binary accessors destructors classes byte-arrays +parser alien.c-types math.parser splitting grouping math assocs +summary system vocabs.loader combinators present fry vocabs.parser ; IN: io.sockets << { { [ os windows? ] [ "windows.winsock" ] } { [ os unix? ] [ "unix" ] } -} cond add-use >> +} cond add-ambiguous-use >> ! Addressing GENERIC: protocol-family ( addrspec -- af ) diff --git a/basis/io/sockets/unix/unix.factor b/basis/io/sockets/unix/unix.factor index 68c7d5c196..6ba7ca2322 100644 --- a/basis/io/sockets/unix/unix.factor +++ b/basis/io/sockets/unix/unix.factor @@ -1,12 +1,12 @@ ! Copyright (C) 2004, 2008 Slava Pestov, Ivan Tikhonov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien alien.c-types alien.strings generic kernel math -namespaces threads sequences byte-arrays io.ports -io.binary io.backend.unix io.streams.duplex -io.backend io.ports io.pathnames io.files.private -io.encodings.utf8 math.parser continuations libc combinators -system accessors destructors unix locals init ; +USING: alien alien.c-types alien.strings generic kernel math threads +sequences byte-arrays io.ports io.binary io.backend.unix +io.streams.duplex io.backend io.ports io.pathnames io.files.private +io.encodings.utf8 math.parser continuations libc combinators system +accessors destructors unix locals init ; +EXCLUDE: namespaces => bind ; EXCLUDE: io => read write ; EXCLUDE: io.sockets => accept ; diff --git a/basis/logging/server/server.factor b/basis/logging/server/server.factor index 7dced852fd..8374ab421b 100644 --- a/basis/logging/server/server.factor +++ b/basis/logging/server/server.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: namespaces kernel io io.files io.pathnames io.directories -io.sockets io.encodings.utf8 -calendar calendar.format sequences continuations destructors -prettyprint assocs math.parser words debugger math combinators -concurrency.messaging threads arrays init math.ranges strings ; +io.encodings.utf8 calendar calendar.format sequences continuations +destructors prettyprint assocs math.parser words debugger math +combinators concurrency.messaging threads arrays init math.ranges +strings ; IN: logging.server : log-root ( -- string ) diff --git a/basis/models/range/range.factor b/basis/models/range/range.factor index a1abd9aeea..c8bc8d8e54 100644 --- a/basis/models/range/range.factor +++ b/basis/models/range/range.factor @@ -2,6 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors kernel models arrays sequences math math.order models.product ; +FROM: models.product => product ; IN: models.range TUPLE: range < product ; diff --git a/basis/opengl/textures/textures.factor b/basis/opengl/textures/textures.factor index 49725d2242..f0edab23a3 100755 --- a/basis/opengl/textures/textures.factor +++ b/basis/opengl/textures/textures.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors assocs cache colors.constants destructors fry kernel +USING: accessors assocs cache colors.constants destructors kernel opengl opengl.gl opengl.capabilities combinators images images.tesselation grouping specialized-arrays.float sequences math math.vectors math.matrices generalizations fry arrays namespaces diff --git a/basis/peg/ebnf/ebnf.factor b/basis/peg/ebnf/ebnf.factor index fafb846147..94df4ca209 100644 --- a/basis/peg/ebnf/ebnf.factor +++ b/basis/peg/ebnf/ebnf.factor @@ -1,11 +1,13 @@ ! Copyright (C) 2007 Chris Double. ! See http://factorcode.org/license.txt for BSD license. -USING: kernel compiler.units words arrays strings math.parser +USING: kernel words arrays strings math.parser sequences quotations vectors namespaces make math assocs continuations peg peg.parsers unicode.categories multiline splitting accessors effects sequences.deep peg.search combinators.short-circuit lexer io.streams.string stack-checker -io combinators parser vocabs.parser summary ; +io combinators parser summary ; +FROM: compiler.units => with-compilation-unit ; +FROM: vocabs.parser => search ; IN: peg.ebnf : rule ( name word -- parser ) @@ -441,7 +443,7 @@ M: ebnf-sequence build-locals ( code ast -- code ) drop ] [ [ - "USING: locals sequences ; [let* | " % + "FROM: locals => [let* ; FROM: sequences => nth ; [let* | " % dup length swap [ dup ebnf-var? [ name>> % diff --git a/basis/peg/peg.factor b/basis/peg/peg.factor index dda36432e7..c76ca7ac9c 100644 --- a/basis/peg/peg.factor +++ b/basis/peg/peg.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2008 Chris Double. ! See http://factorcode.org/license.txt for BSD license. USING: kernel sequences strings fry namespaces make math assocs -io vectors arrays math.parser math.order vectors combinators +io vectors arrays math.parser math.order combinators classes sets unicode.categories compiler.units parser words quotations effects memoize accessors locals effects splitting combinators.short-circuit generalizations ; diff --git a/basis/prettyprint/prettyprint-docs.factor b/basis/prettyprint/prettyprint-docs.factor index f938ab30f7..1af921d4f3 100644 --- a/basis/prettyprint/prettyprint-docs.factor +++ b/basis/prettyprint/prettyprint-docs.factor @@ -1,5 +1,5 @@ USING: prettyprint.backend prettyprint.config prettyprint.custom -prettyprint.sections prettyprint.private help.markup help.syntax +prettyprint.sections help.markup help.syntax io kernel words definitions quotations strings generic classes prettyprint.private ; IN: prettyprint diff --git a/basis/random/mersenne-twister/mersenne-twister.factor b/basis/random/mersenne-twister/mersenne-twister.factor index 361ba7719e..a02abbb8ac 100644 --- a/basis/random/mersenne-twister/mersenne-twister.factor +++ b/basis/random/mersenne-twister/mersenne-twister.factor @@ -69,8 +69,6 @@ M: mersenne-twister random-32* ( mt -- r ) [ seq>> nth-unsafe mt-temper ] [ [ 1+ ] change-i drop ] tri ; -USE: init - [ [ 32 random-bits ] with-system-random random-generator set-global diff --git a/basis/random/random.factor b/basis/random/random.factor index 661e771258..1962857d57 100755 --- a/basis/random/random.factor +++ b/basis/random/random.factor @@ -86,8 +86,6 @@ PRIVATE> [ 1.0 swap - log -2.0 * sqrt ] bi* * * + ; -USE: vocabs.loader - { { [ os windows? ] [ "random.windows" require ] } { [ os unix? ] [ "random.unix" require ] } diff --git a/basis/stack-checker/inlining/inlining.factor b/basis/stack-checker/inlining/inlining.factor index 23283fb6e3..c99e0f0252 100644 --- a/basis/stack-checker/inlining/inlining.factor +++ b/basis/stack-checker/inlining/inlining.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: fry namespaces assocs kernel sequences words accessors definitions math math.order effects classes arrays combinators -vectors arrays hints +vectors hints stack-checker.state stack-checker.errors stack-checker.values diff --git a/basis/stack-checker/known-words/known-words.factor b/basis/stack-checker/known-words/known-words.factor index 56ef67d2a8..70382c0829 100644 --- a/basis/stack-checker/known-words/known-words.factor +++ b/basis/stack-checker/known-words/known-words.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2004, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: fry accessors alien alien.accessors arrays byte-arrays classes -sequences.private continuations.private effects generic hashtables +continuations.private effects generic hashtables hashtables.private io io.backend io.files io.files.private io.streams.c kernel kernel.private math math.private math.parser.private memory memory.private namespaces @@ -11,7 +11,7 @@ strings.private system threads.private classes.tuple classes.tuple.private vectors vectors.private words definitions assocs summary compiler.units system.private combinators combinators.short-circuit locals locals.backend locals.types -quotations.private combinators.private stack-checker.values +combinators.private stack-checker.values generic.single generic.single.private alien.libraries stack-checker.alien diff --git a/basis/stack-checker/transforms/transforms.factor b/basis/stack-checker/transforms/transforms.factor index 8113a662d6..a85cd44a47 100755 --- a/basis/stack-checker/transforms/transforms.factor +++ b/basis/stack-checker/transforms/transforms.factor @@ -3,7 +3,7 @@ USING: fry accessors arrays kernel kernel.private combinators.private words sequences generic math math.order namespaces quotations assocs combinators combinators.short-circuit classes.tuple -classes.tuple.private effects summary hashtables classes generic sets +classes.tuple.private effects summary hashtables classes sets definitions generic.standard slots.private continuations locals sequences.private generalizations stack-checker.backend stack-checker.state stack-checker.visitor stack-checker.errors diff --git a/basis/ui/commands/commands.factor b/basis/ui/commands/commands.factor index 28529b013b..f45c3f8b05 100644 --- a/basis/ui/commands/commands.factor +++ b/basis/ui/commands/commands.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays definitions kernel sequences strings -math assocs words generic namespaces make assocs quotations +math assocs words generic namespaces make quotations splitting ui.gestures unicode.case unicode.categories tr fry ; IN: ui.commands diff --git a/basis/ui/gadgets/buttons/buttons.factor b/basis/ui/gadgets/buttons/buttons.factor index 0504231972..ec11bac2d3 100644 --- a/basis/ui/gadgets/buttons/buttons.factor +++ b/basis/ui/gadgets/buttons/buttons.factor @@ -7,6 +7,7 @@ ui.gadgets.borders ui.gadgets.labels ui.gadgets.tracks ui.gadgets.packs ui.gadgets.worlds ui.gestures ui.pens ui.pens.solid ui.pens.image ui.pens.tile math.rectangles locals fry combinators.smart ; +FROM: models => change-model ; IN: ui.gadgets.buttons TUPLE: button < border pressed? selected? quot ; diff --git a/basis/ui/gadgets/editors/editors.factor b/basis/ui/gadgets/editors/editors.factor index 9461b2348f..aa2b9ca58c 100755 --- a/basis/ui/gadgets/editors/editors.factor +++ b/basis/ui/gadgets/editors/editors.factor @@ -3,7 +3,7 @@ USING: accessors arrays documents documents.elements kernel math math.ranges models models.arrow namespaces locals fry make opengl opengl.gl sequences strings math.vectors math.functions sorting colors -colors.constants combinators assocs math.order fry calendar alarms +colors.constants combinators assocs math.order calendar alarms continuations ui.clipboards ui.commands ui.gadgets ui.gadgets.borders ui.gadgets.buttons ui.gadgets.labels ui.gadgets.scrollers ui.gadgets.menus ui.gadgets.wrappers ui.render ui.pens.solid diff --git a/basis/ui/gadgets/gadgets.factor b/basis/ui/gadgets/gadgets.factor index 5dd1710cdd..6a289ec1d6 100644 --- a/basis/ui/gadgets/gadgets.factor +++ b/basis/ui/gadgets/gadgets.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors arrays hashtables kernel models math namespaces +USING: accessors arrays hashtables kernel math namespaces make sequences quotations math.vectors combinators sorting binary-search vectors dlists deques models threads concurrency.flags math.order math.rectangles fry locals ; diff --git a/basis/ui/gadgets/glass/glass.factor b/basis/ui/gadgets/glass/glass.factor index 945e16150d..d6b87193ca 100644 --- a/basis/ui/gadgets/glass/glass.factor +++ b/basis/ui/gadgets/glass/glass.factor @@ -3,6 +3,7 @@ USING: accessors kernel namespaces ui.gadgets ui.gadgets.worlds ui.gadgets.wrappers ui.gestures math.rectangles math.rectangles.positioning combinators vectors ; +FROM: ui.gadgets.wrappers => wrapper ; IN: ui.gadgets.glass GENERIC: hide-glass-hook ( gadget -- ) diff --git a/basis/ui/gadgets/menus/menus.factor b/basis/ui/gadgets/menus/menus.factor index 734190e7e7..159da59be5 100644 --- a/basis/ui/gadgets/menus/menus.factor +++ b/basis/ui/gadgets/menus/menus.factor @@ -3,7 +3,7 @@ USING: colors.constants kernel locals math.rectangles namespaces sequences ui.commands ui.gadgets ui.gadgets.borders ui.gadgets.buttons ui.gadgets.glass ui.gadgets.packs ui.gadgets.frames ui.gadgets.worlds -ui.gadgets.frames ui.gadgets.corners ui.gestures ui.operations +ui.gadgets.corners ui.gestures ui.operations ui.render ui.pens ui.pens.solid opengl math.vectors words accessors math math.order sorting ; IN: ui.gadgets.menus diff --git a/basis/ui/gadgets/panes/panes.factor b/basis/ui/gadgets/panes/panes.factor index 6f6e7ee95f..eb741f13b6 100644 --- a/basis/ui/gadgets/panes/panes.factor +++ b/basis/ui/gadgets/panes/panes.factor @@ -11,6 +11,7 @@ ui.gadgets.menus ui.clipboards ui.gestures ui.traverse ui.render ui.text ui.gadgets.presentations ui.gadgets.grids ui.gadgets.tracks ui.gadgets.icons ui.gadgets.grid-lines ui.baseline-alignment colors io.styles ; +FROM: io.styles => foreground background ; IN: ui.gadgets.panes TUPLE: pane < track diff --git a/basis/ui/gadgets/tables/tables.factor b/basis/ui/gadgets/tables/tables.factor index ba3b5a2f78..390e652ac6 100644 --- a/basis/ui/gadgets/tables/tables.factor +++ b/basis/ui/gadgets/tables/tables.factor @@ -5,7 +5,7 @@ math.functions math.rectangles math.order math.vectors namespaces opengl sequences ui.gadgets ui.gadgets.scrollers ui.gadgets.status-bar ui.gadgets.worlds ui.gestures ui.render ui.pens.solid ui.text ui.commands ui.images ui.gadgets.menus ui.gadgets.line-support -math.rectangles models math.ranges sequences combinators +models math.ranges combinators combinators.short-circuit fonts locals strings ; IN: ui.gadgets.tables diff --git a/basis/ui/tools/browser/browser.factor b/basis/ui/tools/browser/browser.factor index 1b8af1dd03..21d827da9b 100644 --- a/basis/ui/tools/browser/browser.factor +++ b/basis/ui/tools/browser/browser.factor @@ -1,13 +1,14 @@ ! Copyright (C) 2006, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: debugger classes help help.topics help.crossref help.home kernel models -compiler.units assocs words vocabs accessors fry arrays -combinators.short-circuit namespaces sequences models help.apropos +USING: debugger classes help help.topics help.crossref help.home +kernel models compiler.units assocs words vocabs accessors fry arrays +combinators.short-circuit namespaces sequences help.apropos combinators ui ui.commands ui.gadgets ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.tracks ui.gestures ui.gadgets.buttons ui.gadgets.packs ui.gadgets.editors ui.gadgets.labels -ui.gadgets.status-bar ui.gadgets.glass ui.gadgets.borders ui.gadgets.viewports -ui.tools.common ui.tools.browser.popups ui.tools.browser.history ; +ui.gadgets.status-bar ui.gadgets.glass ui.gadgets.borders +ui.gadgets.viewports ui.tools.common ui.tools.browser.popups +ui.tools.browser.history ; IN: ui.tools.browser TUPLE: browser-gadget < tool history pane scroller search-field popup ; diff --git a/basis/ui/tools/browser/popups/popups.factor b/basis/ui/tools/browser/popups/popups.factor index 2cd90ab335..ac4318fa92 100644 --- a/basis/ui/tools/browser/popups/popups.factor +++ b/basis/ui/tools/browser/popups/popups.factor @@ -6,6 +6,7 @@ sorting definitions.icons tools.crossref ui.gadgets ui.gadgets.glass ui.gadgets.labeled ui.gadgets.scrollers ui.gadgets.tables ui.gadgets.search-tables ui.gadgets.wrappers ui.gestures ui.operations ui.pens.solid ui.images ; +FROM: ui.gadgets.wrappers => wrapper ; IN: ui.tools.browser.popups SINGLETON: link-renderer diff --git a/basis/ui/tools/debugger/debugger-docs.factor b/basis/ui/tools/debugger/debugger-docs.factor index b68b349774..21a0e95eb4 100644 --- a/basis/ui/tools/debugger/debugger-docs.factor +++ b/basis/ui/tools/debugger/debugger-docs.factor @@ -1,5 +1,5 @@ USING: ui.gadgets help.markup help.syntax kernel quotations -continuations debugger ui continuations ; +continuations debugger ui ; IN: ui.tools.debugger HELP: diff --git a/basis/ui/tools/debugger/debugger.factor b/basis/ui/tools/debugger/debugger.factor index 2c653266e5..cf86ce4223 100755 --- a/basis/ui/tools/debugger/debugger.factor +++ b/basis/ui/tools/debugger/debugger.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays hashtables io kernel math models -colors.constants namespaces sequences sequences words continuations +colors.constants namespaces sequences words continuations debugger prettyprint help editors fonts ui ui.commands ui.gestures ui.gadgets ui.pens.solid ui.gadgets.worlds ui.gadgets.packs ui.gadgets.buttons ui.gadgets.labels ui.gadgets.panes diff --git a/basis/ui/tools/deploy/deploy.factor b/basis/ui/tools/deploy/deploy.factor index d3c1278bf5..cf6f1c066d 100644 --- a/basis/ui/tools/deploy/deploy.factor +++ b/basis/ui/tools/deploy/deploy.factor @@ -1,12 +1,11 @@ ! Copyright (C) 2007, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: colors kernel namespaces models tools.deploy.config -tools.deploy.config.editor tools.deploy vocabs -namespaces models.mapping sequences system accessors fry -ui.gadgets ui.render ui.gadgets.buttons ui.gadgets.packs -ui.gadgets.labels ui.gadgets.editors ui.gadgets.borders ui.gestures -ui.commands assocs ui.gadgets.tracks ui ui.tools.listener -ui.tools.browser ; +USING: colors kernel models tools.deploy.config +tools.deploy.config.editor tools.deploy vocabs namespaces +models.mapping sequences system accessors fry ui.gadgets ui.render +ui.gadgets.buttons ui.gadgets.packs ui.gadgets.labels +ui.gadgets.editors ui.gadgets.borders ui.gestures ui.commands assocs +ui.gadgets.tracks ui ui.tools.listener ui.tools.browser ; IN: ui.tools.deploy TUPLE: deploy-gadget < pack vocab settings ; diff --git a/basis/ui/tools/error-list/error-list.factor b/basis/ui/tools/error-list/error-list.factor index 704ae112e5..e9d4b50bac 100644 --- a/basis/ui/tools/error-list/error-list.factor +++ b/basis/ui/tools/error-list/error-list.factor @@ -8,7 +8,7 @@ models.arrow.smart models.search models.mapping debugger namespaces summary locals ui ui.commands ui.gadgets ui.gadgets.panes ui.gadgets.tables ui.gadgets.labeled ui.gadgets.tracks ui.gestures ui.operations ui.tools.browser ui.tools.common ui.gadgets.scrollers -ui.tools.inspector ui.gadgets.status-bar ui.operations +ui.tools.inspector ui.gadgets.status-bar ui.gadgets.buttons ui.gadgets.borders ui.gadgets.packs ui.gadgets.labels ui.baseline-alignment ui.images compiler.errors tools.errors tools.errors.model ; diff --git a/basis/ui/tools/profiler/profiler.factor b/basis/ui/tools/profiler/profiler.factor index 5fef64ea88..8be357b409 100644 --- a/basis/ui/tools/profiler/profiler.factor +++ b/basis/ui/tools/profiler/profiler.factor @@ -6,10 +6,9 @@ vocabs tools.profiler words prettyprint combinators.smart definitions.icons see ui ui.commands ui.gadgets ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.tracks ui.gestures ui.gadgets.buttons ui.gadgets.tables ui.gadgets.search-tables ui.gadgets.labeled -ui.gadgets.buttons ui.gadgets.packs ui.gadgets.labels -ui.gadgets.tabbed ui.gadgets.status-bar ui.gadgets.borders -ui.tools.browser ui.tools.common ui.baseline-alignment -ui.operations ui.images ; +ui.gadgets.packs ui.gadgets.labels ui.gadgets.tabbed +ui.gadgets.status-bar ui.gadgets.borders ui.tools.browser +ui.tools.common ui.baseline-alignment ui.operations ui.images ; FROM: models.arrow => ; FROM: models.arrow.smart => ; FROM: models.product => ; diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index b1bfce26e6..144530399c 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2006, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: arrays assocs io kernel math models namespaces make dlists -deques sequences threads sequences words continuations init +deques sequences threads words continuations init combinators combinators.short-circuit hashtables concurrency.flags sets accessors calendar fry destructors ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gadgets.tracks ui.gestures ui.backend ui.render diff --git a/basis/unix/debugger/debugger.factor b/basis/unix/debugger/debugger.factor index e059e1a184..4e276373e1 100644 --- a/basis/unix/debugger/debugger.factor +++ b/basis/unix/debugger/debugger.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: debugger prettyprint accessors unix io kernel ; +USING: debugger prettyprint accessors unix kernel ; +FROM: io => write print nl ; IN: unix.debugger M: unix-error error. diff --git a/basis/unix/process/process.factor b/basis/unix/process/process.factor index 22757cdbe1..9819e50843 100644 --- a/basis/unix/process/process.factor +++ b/basis/unix/process/process.factor @@ -1,5 +1,5 @@ USING: kernel alien.c-types alien.strings sequences math alien.syntax unix -vectors kernel namespaces continuations threads assocs vectors +vectors namespaces continuations threads assocs vectors io.backend.unix io.encodings.utf8 unix.utilities fry ; IN: unix.process diff --git a/basis/unix/stat/stat.factor b/basis/unix/stat/stat.factor index 156be96190..c3ab099d38 100644 --- a/basis/unix/stat/stat.factor +++ b/basis/unix/stat/stat.factor @@ -15,10 +15,6 @@ CONSTANT: S_IFLNK OCT: 120000 ! Symbolic link. CONSTANT: S_IFSOCK OCT: 140000 ! Socket. CONSTANT: S_IFWHT OCT: 160000 ! Whiteout. -FUNCTION: int chmod ( char* path, mode_t mode ) ; -FUNCTION: int fchmod ( int fd, mode_t mode ) ; -FUNCTION: int mkdir ( char* path, mode_t mode ) ; - C-STRUCT: fsid { { "int" 2 } "__val" } ; diff --git a/basis/unix/types/types.factor b/basis/unix/types/types.factor index f7ce6406fe..4ca2c4368a 100644 --- a/basis/unix/types/types.factor +++ b/basis/unix/types/types.factor @@ -1,5 +1,4 @@ -USING: kernel system alien.syntax combinators vocabs.loader -system ; +USING: kernel system alien.syntax combinators vocabs.loader ; IN: unix.types TYPEDEF: char int8_t diff --git a/basis/unix/unix.factor b/basis/unix/unix.factor index 95dca2cb34..9c4251dd1e 100644 --- a/basis/unix/unix.factor +++ b/basis/unix/unix.factor @@ -5,7 +5,7 @@ USING: alien alien.c-types alien.syntax kernel libc sequences continuations byte-arrays strings math namespaces system combinators vocabs.loader accessors stack-checker macros locals generalizations unix.types -io vocabs vocabs.loader ; +io vocabs ; IN: unix CONSTANT: PROT_NONE 0 @@ -132,6 +132,7 @@ FUNCTION: int ioctl ( int fd, ulong request, char* argp ) ; FUNCTION: int lchown ( char* path, uid_t owner, gid_t group ) ; FUNCTION: int listen ( int s, int backlog ) ; FUNCTION: off_t lseek ( int fildes, off_t offset, int whence ) ; +FUNCTION: int mkdir ( char* path, mode_t mode ) ; FUNCTION: void* mmap ( void* addr, size_t len, int prot, int flags, int fd, off_t offset ) ; FUNCTION: int munmap ( void* addr, size_t len ) ; FUNCTION: uint ntohl ( uint n ) ; diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index 22e0e76451..b617544084 100644 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -1,6 +1,6 @@ USING: generic help.markup help.syntax math memory namespaces sequences kernel.private layouts classes -kernel.private vectors combinators quotations strings words +vectors combinators quotations strings words assocs arrays math.order ; IN: kernel diff --git a/core/slots/slots-docs.factor b/core/slots/slots-docs.factor index 1e5f9bf1dd..348e2ec2b2 100644 --- a/core/slots/slots-docs.factor +++ b/core/slots/slots-docs.factor @@ -1,8 +1,7 @@ -USING: help.markup help.syntax generic kernel.private parser -words kernel quotations namespaces sequences words arrays -effects generic.standard classes.builtin -slots.private classes strings math assocs byte-arrays alien -math classes.tuple ; +USING: help.markup help.syntax generic kernel.private parser words +kernel quotations namespaces sequences words arrays effects +generic.standard classes.builtin slots.private classes strings math +assocs byte-arrays alien classes.tuple ; IN: slots ARTICLE: "accessors" "Slot accessors"