]> gitweb.factorcode.org Git - factor.git/commitdiff
Move make to its own vocabulary, remove fry _ feature
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 11 Sep 2008 01:07:00 +0000 (20:07 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 11 Sep 2008 01:07:00 +0000 (20:07 -0500)
98 files changed:
basis/alien/arrays/arrays.factor
basis/alien/c-types/c-types.factor
basis/alien/structs/fields/fields.factor
basis/bootstrap/image/image.factor
basis/cocoa/messages/messages.factor
basis/cocoa/subclassing/subclassing.factor
basis/cocoa/views/views.factor
basis/compiler/generator/fixup/fixup.factor
basis/compiler/generator/generator.factor
basis/compiler/generator/registers/registers.factor
basis/compiler/tree/cleanup/cleanup-tests.factor
basis/compiler/tree/debugger/debugger.factor
basis/compiler/tree/finalization/finalization.factor
basis/core-foundation/fsevents/fsevents.factor
basis/cpu/architecture/architecture.factor
basis/cpu/x86/architecture/architecture.factor
basis/cpu/x86/assembler/assembler.factor
basis/debugger/debugger.factor
basis/debugger/threads/threads.factor
basis/delegate/delegate.factor
basis/documents/documents.factor
basis/fry/fry-docs.factor
basis/fry/fry-tests.factor
basis/fry/fry.factor
basis/furnace/chloe-tags/chloe-tags.factor
basis/generalizations/generalizations.factor
basis/help/help.factor
basis/help/lint/lint.factor
basis/help/markup/markup.factor
basis/help/topics/topics.factor
basis/html/forms/forms.factor
basis/http/http.factor
basis/interval-maps/interval-maps.factor
basis/io/servers/packet/datagram.factor
basis/io/unix/backend/backend.factor
basis/locals/locals.factor
basis/macros/expander/expander.factor
basis/match/match.factor
basis/math/partial-dispatch/partial-dispatch.factor
basis/memoize/memoize.factor
basis/mime-types/mime-types.factor
basis/peg/parsers/parsers.factor
basis/peg/peg.factor
basis/persistent/hashtables/nodes/collision/collision.factor
basis/prettyprint/backend/backend.factor
basis/prettyprint/prettyprint.factor
basis/prettyprint/sections/sections.factor
basis/stack-checker/branches/branches.factor
basis/stack-checker/transforms/transforms.factor
basis/summary/summary.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/macosx/macosx.factor
basis/tools/disassembler/disassembler.factor
basis/tools/vocabs/vocabs.factor
basis/tools/walker/walker.factor
basis/ui/commands/commands-docs.factor
basis/ui/commands/commands.factor
basis/ui/gadgets/editors/editors.factor
basis/ui/gadgets/gadgets.factor
basis/ui/gadgets/grids/grids.factor
basis/ui/gadgets/labels/labels.factor
basis/ui/gestures/gestures.factor
basis/ui/operations/operations.factor
basis/ui/tools/walker/walker.factor
basis/ui/traverse/traverse.factor
basis/ui/ui-docs.factor
basis/ui/ui.factor
basis/unicode/case/case.factor
basis/unicode/normalize/normalize.factor
basis/unicode/syntax/syntax.factor
basis/urls/urls.factor
core/classes/classes.factor
core/classes/predicate/predicate.factor
core/classes/tuple/parser/parser.factor
core/classes/tuple/tuple.factor
core/compiler/errors/errors.factor
core/continuations/continuations.factor
core/destructors/destructors.factor
core/effects/effects.factor
core/generic/generic.factor
core/generic/math/math.factor
core/generic/standard/engines/tag/tag.factor
core/generic/standard/engines/tuple/tuple.factor
core/generic/standard/standard.factor
core/io/io.factor
core/io/streams/c/c.factor
core/math/parser/parser-docs.factor
core/math/parser/parser.factor
core/namespaces/namespaces-docs.factor
core/namespaces/namespaces.factor
core/slots/slots.factor
core/splitting/splitting.factor
core/strings/parser/parser.factor
core/vocabs/loader/loader.factor
extra/monads/monads.factor
extra/ui/gadgets/tabs/tabs.factor
extra/webapps/wiki/wiki.factor
extra/websites/concatenative/concatenative.factor

index 71c3fd6ff2bf53cd7b4146ddd429952e626820a6..94472e8261b092718bd7170c0912ba5e03722714 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien arrays alien.c-types alien.structs
-sequences math kernel namespaces libc cpu.architecture ;
+sequences math kernel namespaces make libc cpu.architecture ;
 IN: alien.arrays
 
 UNION: value-type array struct-type ;
index f44941d88f1ca66a38ee04d403904ee5e3de7e93..6a88441be915ae1f88f71c063a8ce24c14e90edb 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: byte-arrays arrays assocs kernel kernel.private libc math
-namespaces parser sequences strings words assocs splitting
+namespaces make parser sequences strings words assocs splitting
 math.parser cpu.architecture alien alien.accessors quotations
 layouts system compiler.units io.files io.encodings.binary
 accessors combinators effects continuations ;
index 5273c2c7bac6e3032ce40c694b533645f026c7e0..19e5b8c326e17bd8043bd4504d2eabf9b1857548 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays kernel kernel.private math namespaces
-sequences strings words effects combinators alien.c-types ;
+make sequences strings words effects combinators alien.c-types ;
 IN: alien.structs.fields
 
 TUPLE: field-spec name offset type reader writer ;
index edfd82dae2419f51d38c1bbc059d1127a31c2f36..9284728a7a8ee0a72d5db303fab605d5ea7f5ec2 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien arrays byte-arrays generic assocs hashtables assocs
-hashtables.private io kernel kernel.private math namespaces
+hashtables.private io kernel kernel.private math namespaces make
 parser prettyprint sequences sequences.private strings sbufs
 vectors words quotations assocs system layouts splitting
 grouping growable classes classes.builtin classes.tuple
index 7be649416c7f0cbdb805cc1984df633f3752900d..7977485b02c2245a34e0b2c40fcf2b01d88327d2 100755 (executable)
@@ -1,11 +1,10 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien alien.c-types alien.strings
-arrays assocs combinators compiler kernel
-math namespaces parser prettyprint prettyprint.sections
-quotations sequences strings words cocoa.runtime io macros
-memoize debugger io.encodings.ascii effects compiler.generator
-libc libc.private ;
+USING: accessors alien alien.c-types alien.strings arrays assocs
+combinators compiler kernel math namespaces make parser
+prettyprint prettyprint.sections quotations sequences strings
+words cocoa.runtime io macros memoize debugger
+io.encodings.ascii effects compiler.generator libc libc.private ;
 IN: cocoa.messages
 
 : make-sender ( method function -- quot )
index 1ee39c35d512c373e6589410d34d1ca82e85af20..3f8e709df0e779dc0d88855aba3177feb0329b0a 100755 (executable)
@@ -4,7 +4,7 @@ USING: alien alien.c-types alien.strings arrays assocs
 combinators compiler hashtables kernel libc math namespaces
 parser sequences words cocoa.messages cocoa.runtime
 compiler.units io.encodings.ascii generalizations
-continuations ;
+continuations make ;
 IN: cocoa.subclassing
 
 : init-method ( method -- sel imp types )
index 8bfbe330b279f25b6a2a3d5123c196ac0cf28e80..d03688b2be701cc2c865e8fed622a7955de20854 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2007 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.c-types arrays kernel math namespaces cocoa
+USING: alien.c-types arrays kernel math namespaces make cocoa
 cocoa.messages cocoa.classes cocoa.types sequences
 continuations ;
 IN: cocoa.views
index 5a3337fb32e8239e3f0429f8ba495bc5d150c3a4..ecc88a7a5e1ba16fe8c53699cea91b9e60299ba0 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays byte-arrays generic assocs hashtables io.binary
-kernel kernel.private math namespaces sequences words
+kernel kernel.private math namespaces make sequences words
 quotations strings alien.accessors alien.strings layouts system
 combinators math.bitwise words.private cpu.architecture
 math.order accessors growable ;
index da120ce4320f0b4fd5d1d30fa6a8b693f8e56c40..939d6e2276f82472940e6638a7f50de7742fcbfc 100755 (executable)
@@ -1,15 +1,15 @@
- ! Copyright (C) 2004, 2008 Slava Pestov.
+! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs classes combinators
 cpu.architecture effects generic hashtables io kernel
-kernel.private layouts math math.parser namespaces prettyprint
-quotations sequences system threads words vectors sets deques
-continuations.private summary alien alien.c-types
+kernel.private layouts math math.parser namespaces make
+prettyprint quotations sequences system threads words vectors
+sets deques continuations.private summary alien alien.c-types
 alien.structs alien.strings alien.arrays libc compiler.errors
-stack-checker.inlining
-compiler.tree compiler.tree.builder compiler.tree.combinators
-compiler.tree.propagation.info compiler.generator.fixup
-compiler.generator.registers compiler.generator.iterator ;
+stack-checker.inlining compiler.tree compiler.tree.builder
+compiler.tree.combinators compiler.tree.propagation.info
+compiler.generator.fixup compiler.generator.registers
+compiler.generator.iterator ;
 IN: compiler.generator
 
 SYMBOL: compile-queue
index e909db3f8341f8b5c2b1a1defda1a0c5e4e261ee..76d3c325947720ef3e69eaaca4268286dc528806 100755 (executable)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays assocs classes classes.private classes.algebra
-combinators hashtables kernel layouts math namespaces quotations
-sequences system vectors words effects alien byte-arrays
-accessors sets math.order cpu.architecture
+combinators hashtables kernel layouts math namespaces make
+quotations sequences system vectors words effects alien
+byte-arrays accessors sets math.order cpu.architecture
 compiler.generator.fixup ;
 IN: compiler.generator.registers
 
index bb30cda68567c1d2f1f75aaee10926d4100444fd..644b834117fc76ce3f000b6ced68445ad4e0fb90 100644 (file)
@@ -457,3 +457,24 @@ cell-bits 32 = [
     [ [ >r "A" throw r> ] [ "B" throw ] if ]
     cleaned-up-tree drop
 ] unit-test
+
+! Regression from benchmark.nsieve
+: chicken-fingers ( i seq -- )
+    2dup < [
+        2drop
+    ] [
+        chicken-fingers
+    ] if ; inline recursive
+
+: buffalo-wings ( i seq -- )
+    2dup < [
+        2dup chicken-fingers
+        >r 1+ r> buffalo-wings
+    ] [
+        2drop
+    ] if ; inline recursive
+
+[ t ] [
+    [ 2 swap >fixnum buffalo-wings ]
+    { <-integer-fixnum +-integer-fixnum } inlined?
+] unit-test
index db742197a55975477ecbf490e3b5a0652a3b4f9a..01b91b1613331bbebbe45f7b8349cc2d1ddc99c1 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel assocs fry match accessors namespaces effects
+USING: kernel assocs fry match accessors namespaces make effects
 sequences sequences.private quotations generic macros arrays
 prettyprint prettyprint.backend prettyprint.sections math words
 combinators io sorting hints
index 5aaeed360a397d70c2aa149a317bbd17dbeab7b7..540119f709665da38c31d3190e552022a82aa5c3 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel arrays accessors sequences sequences.private words
-fry namespaces math math.order memoize classes.builtin
+fry namespaces make math math.order memoize classes.builtin
 classes.tuple.private slots.private combinators layouts
 byte-arrays alien.accessors
 compiler.intrinsics
index f14dba643377d94250b5cd7a93591ed4f8961ae5..bb21391f0a875d0d42586dee73f518c99b7639f6 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.strings alien.syntax kernel
-math sequences namespaces assocs init accessors continuations
-combinators core-foundation core-foundation.run-loop
-io.encodings.utf8 destructors ;
+math sequences namespaces make assocs init accessors
+continuations combinators core-foundation
+core-foundation.run-loop io.encodings.utf8 destructors ;
 IN: core-foundation.fsevents
 
 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
index fc11e0a7317b89de4e15496efd51daa7d244552e..432e748cbf58ea3de8f58f6ffaf70ba72c898e75 100755 (executable)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays generic kernel kernel.private math memory
-namespaces sequences layouts system hashtables classes alien
-byte-arrays combinators words sets ;
+namespaces make sequences layouts system hashtables classes
+alien byte-arrays combinators words sets ;
 IN: cpu.architecture
 
 ! Register classes
index 69bc685364d18994aeb1ab330810e44ba273a39f..13524aecc4084a03490522f734af73436ac51235 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien alien.c-types arrays cpu.x86.assembler
 cpu.x86.assembler.private cpu.architecture kernel kernel.private
-math memory namespaces sequences words compiler.generator
+math memory namespaces make sequences words compiler.generator
 compiler.generator.registers compiler.generator.fixup system
 layouts combinators compiler.constants math.order ;
 IN: cpu.x86.architecture
index d9c25d8492b495bc9a2ee316bd94bf1de13aeaab..f557bb4adc48ce61dbe7c7a781ba71d90b163250 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays compiler.generator.fixup io.binary kernel
-combinators kernel.private math namespaces sequences
+combinators kernel.private math namespaces make sequences
 words system layouts math.order accessors
 cpu.x86.assembler.syntax ;
 IN: cpu.x86.assembler
index 4d01567131f47ac19bf81c01c73587285fa7254c..b7fd34c5be90313df0f4d50956c5cc7242c6e9c5 100755 (executable)
@@ -1,12 +1,12 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: slots arrays definitions generic hashtables summary io
-kernel math namespaces prettyprint prettyprint.config sequences
-assocs sequences.private strings io.styles io.files vectors
-words system splitting math.parser classes.tuple continuations
-continuations.private combinators generic.math classes.builtin
-classes compiler.units generic.standard vocabs init
-kernel.private io.encodings accessors math.order
+kernel math namespaces make prettyprint prettyprint.config
+sequences assocs sequences.private strings io.styles io.files
+vectors words system splitting math.parser classes.tuple
+continuations continuations.private combinators generic.math
+classes.builtin classes compiler.units generic.standard vocabs
+init kernel.private io.encodings accessors math.order
 destructors source-files parser classes.tuple.parser
 effects.parser lexer compiler.errors generic.parser
 strings.parser ;
index 7bb240859e8abf3d2c05e3859b7fe2cc63161479..27ffdc629bbd4453631e51ec8caea9828514139d 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors debugger continuations threads threads.private
-io io.styles prettyprint kernel math.parser namespaces ;
+io io.styles prettyprint kernel math.parser namespaces make ;
 IN: debugger.threads
 
 : error-in-thread. ( thread -- )
index fd9b9977e11759d2f3563bb4268a85745c0e116f..45cc214792e671b7e20010a8a03c05373fd1c7d7 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors parser generic kernel classes classes.tuple
 words slots assocs sequences arrays vectors definitions
-prettyprint math hashtables sets macros namespaces ;
+prettyprint math hashtables sets macros namespaces make ;
 IN: delegate
 
 : protocol-words ( protocol -- words )
index cac7574e35aed3541aba7f0d57b104220f6b8b36..54bc85284a14bfb22e6cfa96f6c48e5a6dc72d4b 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2007 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays io kernel math models namespaces
+USING: accessors arrays io kernel math models namespaces make
 sequences strings splitting combinators unicode.categories
 math.order ;
 IN: documents
index 05cde62c1fa6771851b995c4f9f8d463637af384..4f33a6892a30be49276ad3bb657d9d6bf183b86e 100755 (executable)
@@ -7,9 +7,6 @@ HELP: ,
 HELP: @\r
 { $description "Fry specifier. Splices a quotation into the fried quotation." } ;\r
 \r
-HELP: _\r
-{ $description "Fry specifier. Shifts all fry specifiers to the left down by one stack position." } ;\r
-\r
 HELP: fry\r
 { $values { "quot" quotation } { "quot'" quotation } }\r
 { $description "Outputs a quotation that when called, fries " { $snippet "quot" } " by taking values from the stack and substituting them in." }\r
@@ -52,25 +49,11 @@ $nl
     "{ 8 13 14 27 } [ even? ] 5 [ dup ] swap [ ? ] curry 3compose map"\r
     "{ 8 13 14 27 } [ even? dup 5 ? ] map"\r
 }\r
-"Occurrences of " { $link _ } " have the effect of enclosing all code to their left in a quotation passed to " { $link dip } ". The following four lines are equivalent:"\r
-{ $code \r
-    "{ 10 20 30 } 1 '[ , _ / ] map"\r
-    "{ 10 20 30 } 1 [ [ ] curry dip / ] curry map"\r
-    "{ 10 20 30 } 1 [ swap / ] curry map"\r
-    "{ 10 20 30 } [ 1 swap / ] map"\r
-}\r
-"For any quotation body " { $snippet "X" } ", the following two are equivalent:"\r
-{ $code\r
-    "[ [ X ] dip ]"\r
-    "'[ X _ ]"\r
-}\r
 "Here are some built-in combinators rewritten in terms of fried quotations:"\r
 { $table\r
     { { $link literalize } { $snippet ": literalize '[ , ] ;" } }\r
     { { $link slip } { $snippet ": slip '[ @ , ] call ;" } }\r
-    { { $link dip } { $snippet ": dip '[ @ _ ] call ;" } }\r
     { { $link curry } { $snippet ": curry '[ , @ ] ;" } }\r
-    { { $link with } { $snippet ": with swapd '[ , _ @ ] ;" } }\r
     { { $link compose } { $snippet ": compose '[ @ @ ] ;" } }\r
     { { $link bi@ } { $snippet ": bi@ tuck '[ , @ , @ ] call ;" } }\r
 } ;\r
@@ -85,11 +68,6 @@ ARTICLE: "fry.philosophy" "Fried quotation philosophy"
 { $code\r
     "'[ 3 , + 4 , / ]"\r
     "[let | a [ ] b [ ] | [ 3 a + 4 b / ] ]"\r
-}\r
-"The " { $link _ } " fry specifier has no direct analogue in " { $vocab-link "locals" } ", however closure conversion together with the " { $link dip } " combinator achieve the same effect:"\r
-{ $code\r
-    "'[ , 2 + , * _ / ]"\r
-    "[let | a [ ] b [ ] | [ [ a 2 + b * ] dip / ] ]"\r
 } ;\r
 \r
 ARTICLE: "fry.limitations" "Fried quotation limitations"\r
@@ -103,7 +81,6 @@ $nl
 "Fried quotations contain zero or more " { $emphasis "fry specifiers" } ":"\r
 { $subsection , }\r
 { $subsection @ }\r
-{ $subsection _ }\r
 "When a fried quotation is being evaluated, values are consumed from the stack and spliced into the quotation from right to left."\r
 { $subsection "fry.examples" }\r
 { $subsection "fry.philosophy" }\r
index 6d6abba23c7cb02bc57b7ce10d2de96a242b623b..b8cdbc8cd746f9e278628fdaa8f6f77b54850121 100755 (executable)
@@ -19,29 +19,25 @@ sequences ;
 [ [ + ] [ - ] '[ 1 2 @ 3 4 @ ] ] unit-test
 
 [ 1/2 ] [
-    1 '[ , _ / ] 2 swap call
+    1 '[ [ , ] dip / ] 2 swap call
 ] unit-test
 
 [ { { 1 "a" "A" } { 1 "b" "B" } { 1 "c" "C" } } ] [
-    1 '[ , _ _ 3array ]
+    1 '[ [ , ] 2dip 3array ]
     { "a" "b" "c" } { "A" "B" "C" } rot 2map
 ] unit-test
 
 [ { { 1 "a" } { 1 "b" } { 1 "c" } } ] [
-    '[ 1 _ 2array ]
+    '[ [ 1 ] dip 2array ]
     { "a" "b" "c" } swap map
 ] unit-test
 
-[ 1 2 ] [
-    1 2 '[ _ , ] call
-] unit-test
-
 [ { { 1 "a" 2 } { 1 "b" 2 } { 1 "c" 2 } } ] [
-    1 2 '[ , _ , 3array ]
+    1 2 '[ [ , ] dip , 3array ]
     { "a" "b" "c" } swap map
 ] unit-test
 
-: funny-dip '[ @ _ ] call ; inline
+: funny-dip '[ [ @ ] dip ] call ; inline
 
 [ "hi" 3 ] [ "h" "i" 3 [ append ] funny-dip ] unit-test
 
index 2b84d58d068ef88b04b8c67c728ff61105a4c932..af7da07d27ec80211845c23108e653cd5e05d1c9 100755 (executable)
@@ -1,13 +1,14 @@
 ! Copyright (C) 2008 Slava Pestov, Eduardo Cavazos.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel sequences combinators parser splitting math
-quotations arrays namespaces qualified ;
-QUALIFIED: namespaces
+quotations arrays make qualified words ;
+QUALIFIED: make
 IN: fry
 
 : , ( -- * ) "Only valid inside a fry" throw ;
 : @ ( -- * ) "Only valid inside a fry" throw ;
-: _ ( -- * ) "Only valid inside a fry" throw ;
+
+<PRIVATE
 
 DEFER: (shallow-fry)
 DEFER: shallow-fry
@@ -19,15 +20,13 @@ DEFER: shallow-fry
     ] unless-empty ; inline
 
 : (shallow-fry) ( accum quot -- result )
-    [
-        1quotation
-    ] [
+    [ 1quotation ] [
         unclip {
             { \ , [ [ curry ] ((shallow-fry)) ] }
             { \ @ [ [ compose ] ((shallow-fry)) ] }
 
             ! to avoid confusion, remove if fry goes core
-            { \ namespaces:, [ [ curry ] ((shallow-fry)) ] }
+            { \ make:, [ [ curry ] ((shallow-fry)) ] }
 
             [ swap >r suffix r> (shallow-fry) ]
         } case
@@ -35,32 +34,23 @@ DEFER: shallow-fry
 
 : shallow-fry ( quot -- quot' ) [ ] swap (shallow-fry) ;
 
-: deep-fry ( quot -- quot )
-    { _ } last-split1 dup [
-      shallow-fry [ >r ] rot
-      deep-fry    [ [ dip ] curry r> compose ] 4array concat
-    ] [
-        drop shallow-fry
-    ] if ;
+PREDICATE: fry-specifier < word { , make:, @ } memq? ;
 
-: fry-specifier? ( obj -- ? ) { , namespaces:, @ } member? ;
+GENERIC: count-inputs ( quot -- n )
+
+M: callable count-inputs [ count-inputs ] sigma ;
+M: fry-specifier count-inputs drop 1 ;
+M: object count-inputs drop 0 ;
+
+PRIVATE>
 
-: count-inputs ( quot -- n )
-    [
-        {
-            { [ dup callable?      ] [ count-inputs ] }
-            { [ dup fry-specifier? ] [ drop 1       ] }
-                                     [ drop 0       ]
-        } cond
-    ] map sum ;
-    
 : fry ( quot -- quot' )
     [
         [
             dup callable? [
                 [ count-inputs \ , <repetition> % ] [ fry % ] bi
-            ] [ namespaces:, ] if
+            ] [ make:, ] if
         ] each
-    ] [ ] make deep-fry ;
+    ] [ ] make shallow-fry ;
 
 : '[ \ ] parse-until fry over push-all ; parsing
index 8822bca519ce7a96e36a1a0268dd083d83c7d927..e4286e3bdf0624b4b6498287909342345275b3f6 100644 (file)
@@ -56,7 +56,7 @@ CHLOE: write-atom drop [ write-atom-feeds ] [code] ;
 
 : compile-link-attrs ( tag -- )
     #! Side-effects current namespace.
-    attrs>> '[ [ , _ link-attr ] each-responder ] [code] ;
+    attrs>> '[ [ [ , ] dip link-attr ] each-responder ] [code] ;
 
 : a-start-tag ( tag -- )
     [ compile-link-attrs ] [ compile-a-url ] bi
index c97e9c7b914e20ded0b17cf0b175fc1399026a63..a3c86b6683e6c51c770a49f6337e6f2068697e2f 100755 (executable)
@@ -14,8 +14,8 @@ MACRO: narray ( n -- quot )
 \r
 MACRO: firstn ( n -- )\r
     dup zero? [ drop [ drop ] ] [\r
-        [ [ '[ , _ nth-unsafe ] ] map ]\r
-        [ 1- '[ , _ bounds-check 2drop ] ]\r
+        [ [ '[ [ , ] dip nth-unsafe ] ] map ]\r
+        [ 1- '[ [ , ] dip bounds-check 2drop ] ]\r
         bi prefix '[ , cleave ]\r
     ] if ;\r
 \r
index b2fff2237222ed283b1602a113e2b9f426467f5d..686578f1b61e31343f527c7be5d0d9a5aac39d6b 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays io io.styles kernel namespaces parser
-prettyprint sequences words assocs definitions generic
+USING: accessors arrays io io.styles kernel namespaces make
+parser prettyprint sequences words assocs definitions generic
 quotations effects slots continuations classes.tuple debugger
 combinators vocabs help.stylesheet help.topics help.crossref
 help.markup sorting classes vocabs.loader ;
index 4ad9067457f7eb10b6531ad56a3689a416329ab4..facaa8a0109f540797a3f65259f9f0c75d321bd3 100755 (executable)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: fry accessors sequences parser kernel help help.markup
-help.topics words strings classes tools.vocabs namespaces io
-io.streams.string prettyprint definitions arrays vectors
+help.topics words strings classes tools.vocabs namespaces make
+io io.streams.string prettyprint definitions arrays vectors
 combinators combinators.short-circuit splitting debugger
 hashtables sorting effects vocabs vocabs.loader assocs editors
 continuations classes.predicate macros math sets eval ;
index 3077a93ed4b6983b0213df7e5ab98ee46601bfbd..b5e074b598c9fcc282d21d74c6f9be641d2c0b3c 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions generic io kernel assocs
-hashtables namespaces parser prettyprint sequences strings
+hashtables namespaces make parser prettyprint sequences strings
 io.styles vectors words math sorting splitting classes slots
 vocabs help.stylesheet help.topics vocabs.loader alias ;
 IN: help.markup
index cdb32b18eec94331d2fcd98d3a51459f17376c5c..e6b19d5baae1866acd6e84bb1c299a2e4ff9a2c1 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2007 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.x
 USING: accessors arrays definitions generic assocs
-io kernel namespaces prettyprint prettyprint.sections
+io kernel namespaces make prettyprint prettyprint.sections
 sequences words summary classes strings vocabs ;
 IN: help.topics
 
index 911e545f87330b346e46629d0e990df80643595c..34d6a4dcb2dac4f0ef618dcbd8d43b0d709a843e 100644 (file)
@@ -103,4 +103,4 @@ C: <validation-error> validation-error
     swap set-value ;
 
 : validate-values ( assoc validators -- assoc' )
-    swap '[ dup , at _ validate-value ] assoc-each ;
+    swap '[ [ dup , at ] dip validate-value ] assoc-each ;
index 03cca05ff38028f278fb16ae7c551c976d6a611e..d03d6c22036ab9c8d80ae188e1a5f1b52e7e5a4c 100755 (executable)
@@ -196,7 +196,7 @@ M: response clone
         [ clone ] change-cookies ;
 
 : get-cookie ( request/response name -- cookie/f )
-    [ cookies>> ] dip '[ , _ name>> = ] find nip ;
+    [ cookies>> ] dip '[ [ , ] dip name>> = ] find nip ;
 
 : delete-cookie ( request/response name -- )
     over cookies>> [ get-cookie ] dip delete ;
index a62855d78fafdaeeea80e8648b06f2e96343d932..99da00ceab5fb62a62c21b16a60475ff46f99fec 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Daniel Ehrenberg.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: kernel sequences arrays accessors grouping math.order\r
-sorting binary-search math assocs locals namespaces ;\r
+sorting binary-search math assocs locals namespaces make ;\r
 IN: interval-maps\r
 \r
 TUPLE: interval-map array ;\r
index 03596ee43c7f8f7c1a0cf286d5a373ee5303bb04..758e85a777521d994e41910e6336f4ff1daa7330 100644 (file)
@@ -18,4 +18,4 @@ LOG: received-datagram NOTICE
 PRIVATE>
 
 : with-datagrams ( seq service quot -- )
-    '[ [ , _ spawn-datagrams ] parallel-each ] with-logging ; inline
+    '[ [ [ , ] dip spawn-datagrams ] parallel-each ] with-logging ; inline
index aa27b21d98ad62d4aec5cec7e46b37d4e46c778c..0e9139f4311c57df0d35096abd10045adb683d7c 100755 (executable)
@@ -3,7 +3,7 @@
 USING: alien alien.c-types generic assocs kernel kernel.private
 math io.ports sequences strings structs sbufs threads unix
 vectors io.buffers io.backend io.encodings math.parser
-continuations system libc qualified namespaces io.timeouts
+continuations system libc qualified namespaces make io.timeouts
 io.encodings.utf8 destructors accessors summary combinators
 locals ;
 QUALIFIED: io
index af5f6834bcbc481a9df45bcd818fdf253e47e958..bfc92ee9e215b946539240eccf12986e206fd1be 100755 (executable)
@@ -1,14 +1,13 @@
 ! Copyright (C) 2007, 2008 Slava Pestov, Eduardo Cavazos.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces sequences sequences.private assocs math
-       vectors strings classes.tuple generalizations 
-       parser words quotations debugger macros arrays macros splitting
-       combinators prettyprint.backend definitions prettyprint
-       hashtables prettyprint.sections sets sequences.private effects
-       effects.parser generic generic.parser compiler.units accessors
-       locals.backend memoize macros.expander lexer
-       stack-checker.known-words ;
-
+USING: kernel namespaces make sequences sequences.private assocs
+math vectors strings classes.tuple generalizations parser words
+quotations debugger macros arrays macros splitting combinators
+prettyprint.backend definitions prettyprint hashtables
+prettyprint.sections sets sequences.private effects
+effects.parser generic generic.parser compiler.units accessors
+locals.backend memoize macros.expander lexer
+stack-checker.known-words ;
 IN: locals
 
 ! Inspired by
index 0a1703de58aae204c9a60b6ea4b7d9f1363ad981..d766430810bfeef03317aee10a97a992fa49d388 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences namespaces quotations accessors words
-continuations vectors effects math stack-checker.transforms ;
+USING: kernel sequences namespaces make quotations accessors
+words continuations vectors effects math
+stack-checker.transforms ;
 IN: macros.expander
 
 GENERIC: expand-macros ( quot -- quot' )
index 0ae285d20d47d469ffccfbda8e9bcbfa44ec5ab4..c546555d077c26dcd5eb3d4e34b3d5e8100cdc2c 100755 (executable)
@@ -2,8 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 !
 ! Based on pattern matching code from Paul Graham's book 'On Lisp'.
-USING: parser lexer kernel words namespaces sequences classes.tuple
-combinators macros assocs math effects ;
+USING: parser lexer kernel words namespaces make sequences
+classes.tuple combinators macros assocs math effects ;
 IN: match
 
 SYMBOL: _
index baa5558f7f02515e98e5a3d85fb28ae9fec0582b..6def4966a28c442239142d24d93b5fdd2de40f3d 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel kernel.private math math.private words
-sequences parser namespaces assocs quotations arrays locals
+sequences parser namespaces make assocs quotations arrays locals
 generic generic.math hashtables effects compiler.units ;
 IN: math.partial-dispatch
 
index 4b1a4a67d544e34e9928a55a791701dc5c3fdb33..1c3115631184400f8987efc6424d493fde972c55 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007 Slava Pestov, Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel hashtables sequences arrays words namespaces
+USING: kernel hashtables sequences arrays words namespaces make
 parser math assocs effects definitions quotations summary
 accessors ;
 IN: memoize
index 9489da814962ff8acd4b054baf5e95016c2954ac..42b8f2e739b53fb6117fde78413198bfac48ab9d 100755 (executable)
@@ -16,7 +16,9 @@ MEMO: mime-db ( -- seq )
     } ;
 
 MEMO: mime-types ( -- assoc )
-    [ mime-db [ unclip '[ , _ set ] each ] each ] H{ } make-assoc
+    [
+        mime-db [ unclip '[ [ , ] dip set ] each ] each
+    ] H{ } make-assoc
     nonstandard-mime-types assoc-union ;
 
 : mime-type ( filename -- mime-type )
index 93de40d67201d60655c0643e5edf47b85dfdf39b..5739482093550d321726f0a05386588b99db6360 100755 (executable)
@@ -1,9 +1,8 @@
 ! Copyright (C) 2007, 2008 Chris Double, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences strings namespaces math assocs shuffle 
-     vectors arrays math.parser accessors
-     unicode.categories sequences.deep peg peg.private 
-     peg.search math.ranges words ;
+USING: kernel sequences strings namespaces make math assocs
+shuffle vectors arrays math.parser accessors unicode.categories
+sequences.deep peg peg.private peg.search math.ranges words ;
 IN: peg.parsers
 
 TUPLE: just-parser p1 ;
index 9ef1ac658e4ccdb96a8c6b03b51bbd5021c9147d..e90a4c60b67c21331fa91b4e283efeb95a962c56 100755 (executable)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2007, 2008 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel sequences strings fry namespaces math assocs shuffle debugger io
-       vectors arrays math.parser math.order vectors combinators
-       classes sets unicode.categories compiler.units parser
-       words quotations effects memoize accessors locals effects splitting 
-       combinators.short-circuit combinators.short-circuit.smart
-       generalizations ;
+USING: kernel sequences strings fry namespaces make math assocs
+shuffle debugger io vectors arrays math.parser math.order
+vectors combinators classes sets unicode.categories
+compiler.units parser words quotations effects memoize accessors
+locals effects splitting combinators.short-circuit
+combinators.short-circuit.smart generalizations ;
 IN: peg
 
 USE: prettyprint
index 83003e5c47729e1b62feb649cd267ca0ef1555ef..741e3d067a94d048455a9a979351884ef4ef8c2f 100644 (file)
@@ -8,7 +8,7 @@ persistent.hashtables.nodes.leaf ;
 IN: persistent.hashtables.nodes.collision
 
 : find-index ( key hashcode collision-node -- n leaf-node )
-    leaves>> -rot '[ , , _ matching-key? ] find ; inline
+    leaves>> -rot '[ [ , , ] dip matching-key? ] find ; inline
 
 M:: collision-node (entry-at) ( key hashcode collision-node -- leaf-node )
     key hashcode collision-node find-index nip ;
index c2fd94e5cfa3ce4ed3a7b4d90710a249c2b914c6..f8445c7783a8193363d5e5d8a132dc0c684457d7 100755 (executable)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays byte-arrays byte-vectors generic
-hashtables io assocs kernel math namespaces sequences strings
-sbufs io.styles vectors words prettyprint.config
+hashtables io assocs kernel math namespaces make sequences
+strings sbufs io.styles vectors words prettyprint.config
 prettyprint.sections quotations io io.files math.parser effects
 classes.tuple math.order classes.tuple.private classes
 combinators colors ;
index 3b9d034378350e0f7b5a310df64848294c1342dc..149ecde447b3175b78c0d566aa34d1ed0a41820f 100755 (executable)
@@ -1,15 +1,13 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-
-USING: arrays generic generic.standard assocs io kernel
-math namespaces sequences strings io.styles io.streams.string
+USING: arrays generic generic.standard assocs io kernel math
+namespaces make sequences strings io.styles io.streams.string
 vectors words prettyprint.backend prettyprint.sections
 prettyprint.config sorting splitting grouping math.parser vocabs
 definitions effects classes.builtin classes.tuple io.files
 classes continuations hashtables classes.mixin classes.union
 classes.intersection classes.predicate classes.singleton
 combinators quotations sets accessors colors ;
-
 IN: prettyprint
 
 : make-pprint ( obj quot -- block in use )
index 13c86ea99430e104d3699c3e6d03723d1879bbf3..a629ca6fff2ff40efef57bd5ee56564a043e9269 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays generic hashtables io kernel math assocs
-namespaces sequences strings io.styles vectors words
+namespaces make sequences strings io.styles vectors words
 prettyprint.config splitting classes continuations
 io.streams.nested accessors sets ;
 IN: prettyprint.sections
index 46854831031df8b2c4e13f5c9377d03422d37265..651b8d162695d335a86707f3335c8bd125a4a52f 100644 (file)
@@ -22,7 +22,7 @@ SYMBOL: +bottom+
 
 : phi-inputs ( max-d-in pairs -- newseq )
     dup empty? [ nip ] [
-        swap '[ , _ first2 unify-inputs ] map
+        swap '[ [ , ] dip first2 unify-inputs ] map
         pad-with-bottom
     ] if ;
 
@@ -50,7 +50,7 @@ SYMBOL: quotations
     ] if-empty ;
 
 : branch-variable ( seq symbol -- seq )
-    '[ , _ at ] map ;
+    '[ [ , ] dip at ] map ;
 
 : active-variable ( seq symbol -- seq )
     [ [ terminated? over at [ drop f ] when ] map ] dip
index d60565e849d288caf8870ed0fddc1a0b176c08e9..e64795c5dfb5ff0b1ef29d6013b8e2d983496cdf 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: fry accessors arrays kernel words sequences generic math
-namespaces quotations assocs combinators classes.tuple
+namespaces make quotations assocs combinators classes.tuple
 classes.tuple.private effects summary hashtables classes generic
 sets definitions generic.standard slots.private continuations
 stack-checker.backend stack-checker.state stack-checker.visitor
index 5da6599c63bc5670155bbaf476349cd92b5cb44d..ea2c19fd6df6198746803128a5a0e9b3c3d434c2 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors classes sequences splitting kernel namespaces
-words math math.parser io.styles prettyprint assocs ;
+make words math math.parser io.styles prettyprint assocs ;
 IN: summary
 
 GENERIC: summary ( object -- string )
index ae4f6a8d62ad2b9e74250a7957a5dc16a56bab0e..324adcaad20ea055f385a526ce071242abce9122 100755 (executable)
@@ -1,12 +1,12 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces continuations.private kernel.private init
+USING: namespaces make continuations.private kernel.private init
 assocs kernel vocabs words sequences memory io system arrays
 continuations math definitions mirrors splitting parser classes
 summary layouts vocabs.loader prettyprint.config prettyprint
-debugger io.streams.c io.files io.backend
-quotations io.launcher words.private tools.deploy.config
-bootstrap.image io.encodings.utf8 destructors accessors ;
+debugger io.streams.c io.files io.backend quotations io.launcher
+words.private tools.deploy.config bootstrap.image
+io.encodings.utf8 destructors accessors ;
 IN: tools.deploy.backend
 
 : copy-vm ( executable bundle-name extension -- vm )
index d38b40db4b96c5d216d623238f6e59654ef6591e..ee60ce3982a61fbbb799423aaf7f69685d670f79 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io io.files kernel namespaces sequences
+USING: io io.files kernel namespaces make sequences
 system tools.deploy.backend tools.deploy.config assocs
 hashtables prettyprint io.unix.backend cocoa io.encodings.utf8
 io.backend cocoa.application cocoa.classes cocoa.plists
index 887fd1b6d74739b70f75b4b4122d3816f960f3b2..dabdaaaa7caba5a5486a5732fb271ee204b9d155 100755 (executable)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Slava Pestov, Jorge Acereda Macia.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.files io words alien kernel math.parser alien.syntax
-io.launcher system assocs arrays sequences namespaces qualified
-system math compiler.generator.fixup io.encodings.ascii
-accessors generic tr ;
+io.launcher system assocs arrays sequences namespaces make
+qualified system math compiler.generator.fixup
+io.encodings.ascii accessors generic tr ;
 IN: tools.disassembler
 
 : in-file ( -- path ) "gdb-in.txt" temp-file ;
index 1c7e8d28d2c8222546c18dfbac7cc6faa7e2d927..732a6635b77e4054af2ddc67fae21277ae577350 100755 (executable)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.\r
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: kernel io io.styles io.files io.encodings.utf8\r
-vocabs.loader vocabs sequences namespaces math.parser arrays\r
-hashtables assocs memoize summary sorting splitting combinators\r
-source-files debugger continuations compiler.errors init\r
-checksums checksums.crc32 sets accessors ;\r
+vocabs.loader vocabs sequences namespaces make math.parser\r
+arrays hashtables assocs memoize summary sorting splitting\r
+combinators source-files debugger continuations compiler.errors\r
+init checksums checksums.crc32 sets accessors ;\r
 IN: tools.vocabs\r
 \r
 : vocab-tests-file ( vocab -- path )\r
index c1073eda8c2a03ad6ddc25dcc8a9fe3535d45e3b..9775bdff81a057b3ae8180dfb2e23e25af38b8d3 100755 (executable)
@@ -4,7 +4,7 @@ USING: threads kernel namespaces continuations combinators
 sequences math namespaces.private continuations.private
 concurrency.messaging quotations kernel.private words
 sequences.private assocs models models.filter arrays accessors
-generic generic.standard definitions ;
+generic generic.standard definitions make ;
 IN: tools.walker
 
 SYMBOL: show-walker-hook ! ( status continuation thread -- )
index 804236dadcb33233abac9f17aa15bdf493f731ce..25312ad868c1bcac88b343fa410cae5664a4485f 100644 (file)
@@ -1,5 +1,5 @@
 USING: accessors ui.gestures help.markup help.syntax strings kernel
-hashtables quotations words classes sequences namespaces
+hashtables quotations words classes sequences namespaces make
 arrays assocs ;
 IN: ui.commands
 
index 2677c496ec9c95b9c55b489e881b89658b999304..b45e2e400427139c8462e1aeeca4365c883ca61e 100755 (executable)
@@ -1,8 +1,8 @@
 ! 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 assocs quotations splitting
-ui.gestures unicode.case unicode.categories tr ;
+math assocs words generic namespaces make assocs quotations
+splitting ui.gestures unicode.case unicode.categories tr ;
 IN: ui.commands
 
 SYMBOL: +nullary+
index 81422973184373ab9dc6f2f0900b9a556ed5d9a0..888716b364b95c9efbd98daed989263dab386d14 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2006, 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays documents io kernel math models
-namespaces opengl opengl.gl sequences strings io.styles
+namespaces make opengl opengl.gl sequences strings io.styles
 math.vectors sorting colors combinators assocs math.order
 ui.clipboards ui.commands ui.gadgets ui.gadgets.borders
 ui.gadgets.buttons ui.gadgets.labels ui.gadgets.scrollers
index 15850ae35786ea6eaf9bd50d81a6b98d40ed476f..05764d5b84899c48d791802f1368b7400e1e9cd4 100755 (executable)
@@ -1,10 +1,9 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays hashtables kernel models math namespaces
-       sequences quotations math.vectors combinators sorting
-       binary-search vectors dlists deques models threads
-       concurrency.flags math.order math.geometry.rect ;
-
+make sequences quotations math.vectors combinators sorting
+binary-search vectors dlists deques models threads
+concurrency.flags math.order math.geometry.rect ;
 IN: ui.gadgets
 
 SYMBOL: ui-notify-flag
index 42e8cfdfdf00a38a56cda3bf727fb7adbf616181..f14ccf1cca395614a8d63eddb93fd07f73d035eb 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel math namespaces sequences words io
+USING: arrays kernel math namespaces make sequences words io
 io.streams.string math.vectors ui.gadgets columns accessors
 math.geometry.rect ;
 IN: ui.gadgets.grids
index ed951824b8fee043467c3f1568da723ed9ba2690..f27b9898a125b88a67e1919ef211011e629f1922 100755 (executable)
@@ -1,9 +1,8 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays hashtables io kernel math namespaces
-opengl sequences strings splitting
-ui.gadgets ui.gadgets.tracks ui.gadgets.theme ui.render colors
-models ;
+make opengl sequences strings splitting ui.gadgets
+ui.gadgets.tracks ui.gadgets.theme ui.render colors models ;
 IN: ui.gadgets.labels
 
 ! A label gadget draws a string.
index 1170ea3fd15bcf87d83e5b400f34a615c94f98ef..a1c6adac6e452e6c3fde632483153e73c3d9f18a 100755 (executable)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs kernel math models namespaces
-sequences words strings system hashtables math.parser
-math.vectors classes.tuple classes ui.gadgets boxes
-calendar alarms symbols combinators sets columns ;
+make sequences words strings system hashtables math.parser
+math.vectors classes.tuple classes ui.gadgets boxes calendar
+alarms symbols combinators sets columns ;
 IN: ui.gestures
 
 : set-gestures ( class hash -- ) "gestures" set-word-prop ;
index 8b4817dcacb41c15ec1e555eddbb9a087eca1df6..3e0b36486eb3cac4fd124aa3ea687255b693d675 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions kernel ui.commands
-ui.gestures sequences strings math words generic namespaces
+ui.gestures sequences strings math words generic namespaces make
 hashtables help.markup quotations assocs ;
 IN: ui.operations
 
index 51091c576dadf1129b686e5f96d508e4f50dc667..7bc42ea6761f89b6b7472eae839fe98f5a7aa1c9 100755 (executable)
@@ -4,7 +4,7 @@ USING: accessors kernel concurrency.messaging inspector
 ui.tools.listener ui.tools.traceback ui.gadgets.buttons
 ui.gadgets.status-bar ui.gadgets.tracks ui.commands ui.gadgets
 models models.filter ui.tools.workspace ui.gestures
-ui.gadgets.labels ui threads namespaces tools.walker assocs
+ui.gadgets.labels ui threads namespaces make tools.walker assocs
 combinators ;
 IN: ui.tools.walker
 
index 440f6487c2c62ddecb263cf95d84b3ac16b0a608..eadd110fe7e8ac3c5efab0965262bfbbc5cb231e 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors namespaces sequences kernel math arrays io ui.gadgets
-generic combinators ;
+USING: accessors namespaces make sequences kernel math arrays io
+ui.gadgets generic combinators ;
 IN: ui.traverse
 
 TUPLE: node value children ;
index e086b7ebaebe10ffe5955b56188366489c3213d9..d8c816d71750a76fb8954e783adece8ba573244e 100755 (executable)
@@ -192,7 +192,6 @@ HELP: raise-window
 ARTICLE: "ui-layouts" "Gadget hierarchy and layouts"
 "A layout gadget is a gadget whose sole purpose is to contain other gadgets. Layout gadgets position and resize children according to a certain policy, taking the preferred size of the children into account. Gadget hierarchies are constructed by building up nested layouts."
 { $subsection "ui-layout-basics" }
-{ $subsection "ui-layout-combinators" }
 "Common layout gadgets:"
 { $subsection "ui-pack-layout" }
 { $subsection "ui-track-layout" }
@@ -230,12 +229,6 @@ $nl
 { $subsection pref-dim* }
 "To get a gadget's preferred size, do not call the above word, instead use " { $link pref-dim  } ",  which caches the result." ;
 
-ARTICLE: "ui-layout-combinators" "Creating layouts using combinators"
-"The " { $link make } " combinator provides a convenient way of constructing sequences by keeping the intermediate sequence off the stack until construction is done. The " { $link , } " and " { $link % } " words operate on this implicit sequence, reducing stack noise."
-$nl
-"Similar tools exist for constructing complex gadget hierarchies. Different words are used for different types of gadgets; see " { $link "ui-pack-layout" } ", " { $link "ui-track-layout" } " and " { $link "ui-frame-layout" } " for specifics. This section documents their common factors."
-;
-
 ARTICLE: "ui-null-layout" "Manual layouts"
 "When automatic layout is not appropriate, gadgets can be added to a parent with no layout policy, and then positioned and sized manually by setting the " { $snippet "loc" } " field." ;
 
index 22abfc8f21b2c6fa45d5009c07e6910a99fdf523..da9e2f0d43eb435adde7fb5dd1e0c7fb5d9a2593 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2007 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays assocs io kernel math models namespaces
+USING: arrays assocs io kernel math models namespaces make
 prettyprint dlists deques sequences threads sequences words
 debugger ui.gadgets ui.gadgets.worlds ui.gadgets.tracks
 ui.gestures ui.backend ui.render continuations init combinators
index 0234a959daeb39543d01a6f6048bfae9b3585869..5e961e2d6795a9c15be505765680cf2f118d0aa1 100755 (executable)
@@ -1,4 +1,4 @@
-USING: unicode.data sequences sequences.next namespaces
+USING: unicode.data sequences sequences.next namespaces make
 unicode.normalize math unicode.categories combinators
 assocs strings splitting kernel accessors ;
 IN: unicode.case
index 6f36461d38b8f0f8ff494b13cd600cf80a299acf..53a38faed4eee9c9db67eda0f9d01272e545d15c 100755 (executable)
@@ -1,4 +1,4 @@
-USING: sequences namespaces unicode.data kernel math arrays
+USING: sequences namespaces make unicode.data kernel math arrays
 locals sorting.insertion accessors ;
 IN: unicode.normalize
 
index 9df14a39289a6e3545ccb3b3eefd141d847fe194..1ba76fd380a5aa68ad4dc0b35de6d33d7ce4cf97 100755 (executable)
@@ -1,6 +1,6 @@
-USING: unicode.data kernel math sequences parser lexer bit-arrays
-namespaces sequences.private arrays quotations assocs
-classes.predicate math.order eval ;
+USING: unicode.data kernel math sequences parser lexer
+bit-arrays namespaces make sequences.private arrays quotations
+assocs classes.predicate math.order eval ;
 IN: unicode.syntax
 
 ! Character classes (categories)
index 299f3053718e9e6537fef7f636e692f5eeb433b0..92a05806b57f2acad6f33a8b9abaddb19d822662 100644 (file)
@@ -105,7 +105,7 @@ TUPLE: url protocol username password host port path query anchor ;
     swap query>> at ;
 
 : set-query-param ( url value key -- url )
-    '[ , , _ ?set-at ] change-query ;
+    '[ [ , , ] dip ?set-at ] change-query ;
 
 : parse-host ( string -- host port )
     ":" split1 [ url-decode ] [
index 5ec96bbbb0f0f69ec6c31e01e51c36c4b3da036c..67a789a1dcdcb484b8538044ec73f41fcdab2ce5 100755 (executable)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions assocs kernel kernel.private
-slots.private namespaces sequences strings words vectors math
-quotations combinators sorting effects graphs vocabs sets ;
+slots.private namespaces make sequences strings words vectors
+math quotations combinators sorting effects graphs vocabs sets ;
 IN: classes
 
 SYMBOL: class<=-cache
index e6d6b5a0d4566f2046a411e12e67e2848456ab7b..4ba93acae46674f284541e0ef34edd8d970c9f64 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: classes classes.algebra kernel namespaces words sequences
-quotations arrays kernel.private assocs combinators ;
+USING: classes classes.algebra kernel namespaces make words
+sequences quotations arrays kernel.private assocs combinators ;
 IN: classes.predicate
 
 PREDICATE: predicate-class < class
index 531658a5e0c5507799616f4d14a9ed332106493c..c190ce85e7a990ebb3f09873e2514fac2a968c45 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors kernel sets namespaces sequences parser
+USING: accessors kernel sets namespaces make sequences parser
 lexer combinators words classes.parser classes.tuple arrays
 slots math assocs ;
 IN: classes.tuple.parser
index b5c3658542b818b2badccaa0689d79a5a854cb0d..f92c9c0fd58730e9c5e0191df761cdd319b9c24b 100755 (executable)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays definitions hashtables kernel kernel.private math
-namespaces sequences sequences.private strings vectors words
-quotations memory combinators generic classes classes.algebra
-classes.builtin classes.private slots.private slots
-compiler.units math.private accessors assocs effects ;
+namespaces make sequences sequences.private strings vectors
+words quotations memory combinators generic classes
+classes.algebra classes.builtin classes.private slots.private
+slots compiler.units math.private accessors assocs effects ;
 IN: classes.tuple
 
 PREDICATE: tuple-class < class
index e21348fd19c1ed7f9bb3211db00444796f382377..7a28c1fb992c379366d834ee0083722debed9da6 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces assocs io sequences
+USING: kernel namespaces make assocs io sequences
 sorting continuations math math.parser ;
 IN: compiler.errors
 
index bfa3848186e2bab9a782e78a3590d223384b08d9..6dde851963442774f3b24cfaf305a43f60ddfb39 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays vectors kernel kernel.private sequences
-namespaces math splitting sorting quotations assocs
+namespaces make math splitting sorting quotations assocs
 combinators accessors ;
 IN: continuations
 
index 154e1c30ac098180e80702b5c921a4079b1a09a9..afc956fae473592ab7635f80b3ee5c3cb6cb6510 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors continuations kernel namespaces
+USING: accessors continuations kernel namespaces make
 sequences vectors ;
 IN: destructors
 
index 8a000b0615fc97eafa351963c8b6f2696c85ae18..0c082477c700df893d7292df9d821a16855f60ac 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math math.parser namespaces sequences strings
+USING: kernel math math.parser namespaces make sequences strings
 words assocs combinators accessors arrays ;
 IN: effects
 
index c0a21dbaba3def9070746cea7005dff9ff931c33..026e37291244b666fc255432ae4c052e3ad20713 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors words kernel sequences namespaces assocs
+USING: accessors words kernel sequences namespaces make assocs
 hashtables definitions kernel.private classes classes.private
 classes.algebra quotations arrays vocabs effects combinators
 sets ;
index 834e19d9d9b11ec20c3fe9ad87ca684ca99ff7d9..077795c4b786a8101e0a67954a807412720af8eb 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays generic hashtables kernel kernel.private
-math namespaces sequences words quotations layouts combinators
+USING: arrays generic hashtables kernel kernel.private math
+namespaces make sequences words quotations layouts combinators
 sequences.private classes classes.builtin classes.algebra
 definitions math.order ;
 IN: generic.math
index 02a7af105f8d621e96e4e813b606e42423259500..50813f191cea2f9a14e9d85484d521c0de91f31f 100644 (file)
@@ -1,4 +1,6 @@
-USING: classes.private generic.standard.engines namespaces
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: classes.private generic.standard.engines namespaces make
 arrays assocs sequences.private quotations kernel.private
 math slots.private math.private kernel accessors words
 layouts ;
index 325f2ebb394bc8754d925b78a81c9b692a662805..8c61aa4240584ff658dc2927d1e5400265614eca 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel classes.tuple.private hashtables assocs sorting
 accessors combinators sequences slots.private math.parser words
-effects namespaces generic generic.standard.engines
+effects namespaces make generic generic.standard.engines
 classes.algebra math math.private kernel.private
 quotations arrays definitions ;
 IN: generic.standard.engines.tuple
index 860781e5e2636c5a00c7db4ac98cf78a86b1216a..d22d20a0fc61430189141976aa2ef65ecc6db4a1 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays assocs kernel kernel.private slots.private math
-namespaces sequences vectors words quotations definitions
+namespaces make sequences vectors words quotations definitions
 hashtables layouts combinators sequences.private generic
 classes classes.algebra classes.private generic.standard.engines
 generic.standard.engines.tag generic.standard.engines.predicate
index a03aaac6d84c2277e40fdabba72fef84270b0702..0d5a8574901cc857114b7332f9710a0327fa378a 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2003, 2007 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: hashtables generic kernel math namespaces sequences
+USING: hashtables generic kernel math namespaces make sequences
 continuations destructors assocs ;
 IN: io
 
index de6d8519ca025ba1fc19a2aedef49b56d8b807bf..780d892d2e294dd0c928a71e6a6ada1136c6c365 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel kernel.private namespaces io io.encodings
+USING: kernel kernel.private namespaces make io io.encodings
 sequences math generic threads.private classes io.backend
 io.files continuations destructors byte-arrays accessors ;
 IN: io.streams.c
index 1d2a24057cd2ac4b807611b7e5759d7e8beaa3f1..bcc75a842aa9b9abd34b3217384e1bde9ab1c45d 100644 (file)
@@ -1,5 +1,5 @@
 USING: help.markup help.syntax math math.private prettyprint
-namespaces strings ;
+namespaces make strings ;
 IN: math.parser
 
 ARTICLE: "number-strings" "Converting between numbers and strings"
index 05e267f0356aad477d1adcfeb40c3dd53b4826e0..04d8fb6a413977e4bfd094554a685a0842d8f6f9 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2004, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math.private namespaces sequences strings arrays
-combinators splitting math assocs ;
+USING: kernel math.private namespaces make sequences strings
+arrays combinators splitting math assocs ;
 IN: math.parser
 
 : digit> ( ch -- n )
index 1da3bc45db16cd3b864c518128a40c1a2d998e9b..f410148566031854b890939451c7ed7a4c01c04b 100755 (executable)
@@ -22,13 +22,6 @@ ARTICLE: "namespaces-global" "Global variables"
 { $subsection get-global }
 { $subsection set-global } ;
 
-ARTICLE: "namespaces-make" "Constructing sequences"
-"There is a lexicon of words for constructing sequences without passing the partial sequence being built on the stack. This reduces stack noise."
-{ $subsection make }
-{ $subsection , }
-{ $subsection % }
-{ $subsection # } ;
-
 ARTICLE: "namespaces.private" "Namespace implementation details"
 "The namestack holds namespaces."
 { $subsection namestack }
@@ -50,8 +43,6 @@ $nl
 { $subsection "namespaces-change" }
 { $subsection "namespaces-combinators" }
 { $subsection "namespaces-global" }
-"A useful facility for constructing sequences by holding an accumulator sequence in a variable:"
-{ $subsection "namespaces-make" }
 "Implementation details your code probably does not care about:"
 { $subsection "namespaces.private" }
 "An alternative to dynamic scope is lexical scope. Lexically-scoped values and closures are implemented in the " { $vocab-link "locals" } " vocabulary." ;
@@ -162,22 +153,6 @@ HELP: >n
 HELP: ndrop
 { $description "Pops a namespace from the name stack." } ;
 
-HELP: building
-{ $var-description "Temporary mutable growable sequence holding elements accumulated so far by " { $link make } "." } ;
-
-HELP: make
-{ $values { "quot" quotation } { "exemplar" "a sequence" } { "seq" "a new sequence" } }
-{ $description "Calls the quotation in a new " { $emphasis "dynamic scope" } ". The quotation and any words it calls can execute the " { $link , } " and " { $link % } " words to accumulate elements. When the quotation returns, all accumulated elements are collected into a sequence with the same type as " { $snippet "exemplar" } "." }
-{ $examples { $example "USING: namespaces prettyprint ;" "[ 1 , 2 , 3 , ] { } make ." "{ 1 2 3 }" } } ;
-
-HELP: ,
-{ $values { "elt" object } }
-{ $description "Adds an element to the end of the sequence being constructed by " { $link make } "." } ;
-
-HELP: %
-{ $values { "seq" "a sequence" } }
-{ $description "Appends a sequence to the end of the sequence being constructed by " { $link make } "." } ;
-
 HELP: init-namespaces
 { $description "Resets the name stack to its initial state, holding a single copy of the global namespace." }
 $low-level-note ;
index 3d3d3c554bc7aced62c3c6cfe4a71fe4ce52e926..20400f4e54d11848677f99b0d54b71a919f2bf19 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2003, 2007 Slava Pestov.
+! Copyright (C) 2003, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel vectors sequences hashtables
 arrays kernel.private math strings assocs ;
@@ -6,9 +6,7 @@ IN: namespaces
 
 <PRIVATE
 
-: namestack* ( -- namestack )
-    0 getenv { vector } declare ; inline
-
+: namestack* ( -- namestack ) 0 getenv { vector } declare ; inline
 : >n ( namespace -- ) namestack* push ;
 : ndrop ( -- ) namestack* pop* ;
 
@@ -25,18 +23,11 @@ PRIVATE>
 : off ( variable -- ) f swap set ; inline
 : get-global ( variable -- value ) global at ;
 : set-global ( value variable -- ) global set-at ;
-
-: change ( variable quot -- )
-    >r dup get r> rot slip set ; inline
-
+: change ( variable quot -- ) >r dup get r> rot slip set ; inline
 : +@ ( n variable -- ) [ 0 or + ] change ;
-
 : inc ( variable -- ) 1 swap +@ ; inline
-
 : dec ( variable -- ) -1 swap +@ ; inline
-
 : bind ( ns quot -- ) swap >n call ndrop ; inline
-
 : counter ( variable -- n ) global [ dup inc get ] bind ;
 
 : make-assoc ( quot exemplar -- hash )
@@ -47,19 +38,3 @@ PRIVATE>
 
 : with-variable ( value key quot -- )
     >r associate >n r> call ndrop ; inline
-
-! Building sequences
-SYMBOL: building
-
-: make ( quot exemplar -- seq )
-    [
-        [
-            1024 swap new-resizable [
-                building set call
-            ] keep
-        ] keep like
-    ] with-scope ; inline
-
-: , ( elt -- ) building get push ;
-
-: % ( seq -- ) building get push-all ;
index 6f831c30c5eb7faaa5570e04c1307b9368e6557f..d4ae60ca9469852b11fbfb09cd2ce79fd1744611 100755 (executable)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: arrays byte-arrays kernel kernel.private math namespaces
-sequences strings words effects generic generic.standard classes
-classes.algebra slots.private combinators accessors words
-sequences.private assocs alien ;
+make sequences strings words effects generic generic.standard
+classes classes.algebra slots.private combinators accessors
+words sequences.private assocs alien ;
 IN: slots
 
 TUPLE: slot-spec name offset class initial read-only ;
index 38f5ae08912111b7e60c5ce1edad8be9d31e9f85..aac32784a1f8c49465c72f61b460b7fe31ea66cb 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math namespaces strings arrays vectors sequences
+USING: kernel math make strings arrays vectors sequences
 sets math.order accessors ;
 IN: splitting
 
index 8d95254539ffcd3d69b1f9e23c1aca0735a96da7..2695860a59b53c7c5cbba4c6350df41667297dfc 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel assocs namespaces splitting sequences
+USING: kernel assocs namespaces make splitting sequences
 strings math.parser lexer accessors ;
 IN: strings.parser
 
index 4677a7b5d73bbb0ae633a0f72b0fa5e2cc4da95e..44f538d5d9a47bce08e773e910211e6f71b48791 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces sequences io.files kernel assocs words vocabs
-definitions parser continuations io hashtables sorting
+USING: namespaces make sequences io.files kernel assocs words
+vocabs definitions parser continuations io hashtables sorting
 source-files arrays combinators strings system math.parser
 compiler.errors splitting init accessors ;
 IN: vocabs.loader
index e110cb38d3397690b146bffe1cbc98412998df18..bff720b2a36b506bcb5bc5d15f1bacbcb53cbf2e 100644 (file)
@@ -51,7 +51,7 @@ M: identity monad-of drop identity-monad ;
 M: identity-monad return drop identity boa ;
 M: identity-monad fail   "Fail" throw ;
 
-M: identity >>= value>> '[ , _ call ] ;
+M: identity >>= value>> '[ , swap call ] ;
 
 : run-identity ( identity -- value ) value>> ;
 
@@ -73,7 +73,7 @@ M: maybe-monad return drop just ;
 M: maybe-monad fail   2drop nothing ;
 
 M: nothing >>= '[ drop , ] ;
-M: just    >>= value>> '[ , _ call ] ;
+M: just    >>= value>> '[ , swap call ] ;
 
 : if-maybe ( maybe just-quot nothing-quot -- )
     pick nothing? [ 2nip call ] [ drop [ value>> ] dip call ] if ; inline
@@ -97,7 +97,7 @@ M: either-monad return  drop right ;
 M: either-monad fail    drop left ;
 
 M: left  >>= '[ drop , ] ;
-M: right >>= value>> '[ , _ call ] ;
+M: right >>= value>> '[ , swap call ] ;
 
 : if-either ( value left-quot right-quot -- )
     [ [ value>> ] [ left? ] bi ] 2dip if ; inline
@@ -112,7 +112,7 @@ M: array-monad fail   2drop { } ;
 
 M: array monad-of drop array-monad ;
 
-M: array >>= '[ , _ map concat ] ;
+M: array >>= '[ , swap map concat ] ;
 
 ! List
 SINGLETON: list-monad
@@ -124,7 +124,7 @@ M: list-monad fail   2drop nil ;
 
 M: list monad-of drop list-monad ;
 
-M: list >>= '[ , _ lazy-map lconcat ] ;
+M: list >>= '[ , swap lazy-map lconcat ] ;
 
 ! State
 SINGLETON: state-monad
@@ -142,7 +142,7 @@ M: state-monad fail   "Fail" throw ;
 
 : mcall ( state -- ) quot>> call ;
 
-M: state >>= '[ , _ '[ , mcall first2 @ mcall ] state ] ;
+M: state >>= '[ , swap '[ , mcall first2 @ mcall ] state ] ;
 
 : get-st ( -- state ) [ dup 2array ] state ;
 : put-st ( value -- state ) '[ drop , f 2array ] state ;
@@ -164,7 +164,7 @@ M: reader monad-of drop reader-monad ;
 M: reader-monad return drop '[ drop , ] reader ;
 M: reader-monad fail   "Fail" throw ;
 
-M: reader >>= '[ , _ '[ dup , mcall @ mcall ] reader ] ;
+M: reader >>= '[ , swap '[ dup , mcall @ mcall ] reader ] ;
 
 : run-reader ( reader env -- ) swap mcall ;
 
@@ -185,7 +185,7 @@ M: writer-monad fail   "Fail" throw ;
 
 : run-writer ( writer -- value log ) [ value>> ] [ log>> ] bi ;
 
-M: writer >>= '[ , run-writer _ '[ @ run-writer ] dip append writer ] ;
+M: writer >>= '[ [ , run-writer ] dip '[ @ run-writer ] dip append writer ] ;
 
 : pass ( writer -- writer' ) run-writer [ first2 ] dip swap call writer ;
 : listen ( writer -- writer' ) run-writer [ 2array ] keep writer ;
index 50e2df2e9e3ec90696702325d026f6d672fa5af8..83ed445593f73ae93416623034eeb174a0719e0d 100755 (executable)
@@ -23,7 +23,7 @@ DEFER: (del-page)
      [ names>> ] [ model>> ] [ toggler>> ] tri\r
      [ clear-gadget ] keep\r
      [ [ length ] keep ] 2dip\r
-    '[ , _ _ , add-toggle ] 2each ;\r
+     '[ [ , ] 2dip , add-toggle ] 2each ;\r
 \r
 : refresh-book ( tabbed -- )\r
     model>> [ ] change-model ;\r
index 5f679be431047746be105fa0c0d66aea02f64938..f36e8a11f0eb15636b82d2fa93da5be24f37d559 100644 (file)
@@ -93,18 +93,12 @@ M: revision feed-entry-url id>> revision-url ;
     <article> select-tuple
     dup [ revision>> <revision> select-tuple ] when ;
 
-: init-relative-link-prefix ( -- )
-    URL" $wiki/view/" adjust-url present relative-link-prefix set ;
-
 : <view-article-action> ( -- action )
     <action>
 
         "title" >>rest
 
-        [
-            validate-title
-            init-relative-link-prefix
-        ] >>init
+        [ validate-title ] >>init
 
         [
             "title" value dup latest-revision [
@@ -126,7 +120,6 @@ M: revision feed-entry-url id>> revision-url ;
             validate-integer-id
             "id" value <revision>
             select-tuple from-object
-            init-relative-link-prefix
         ] >>init
 
         { wiki "view" } >>template
index e37f7d4c3ffe1776f675169427f647343618bb3e..a35358ae6b7166b67766578d5db40693799d6f45 100644 (file)
@@ -74,20 +74,24 @@ SYMBOL: dh-file
     "noreply@concatenative.org" lost-password-from set-global
     "website@concatenative.org" insomniac-sender set-global
     "slava@factorcode.org" insomniac-recipients set-global
-    <factor-website> main-responder set-global
     init-factor-db ;
 
 : init-testing ( -- )
     "resource:basis/openssl/test/dh1024.pem" dh-file set-global
     "resource:basis/openssl/test/server.pem" key-file set-global
     "password" key-password set-global
-    common-configuration ;
+    common-configuration
+    <factor-website> main-responder set-global ;
+
+: no-www-prefix ( -- responder )
+    "http://concatenative.org" <permanent-redirect> <trivial-responder> ;
 
 : init-production ( -- )
-    f dh-file set-global
-    f key-password set-global
-    "/home/slava/cert/host.pem" key-file set-global
-    common-configuration ;
+    common-configuration
+    <vhost-dispatcher>
+        <factor-website> "concatenative.org" add-responder
+        no-www-prefix "www.concatenative.org" add-responder
+    main-responder set-global ;
 
 : <factor-secure-config> ( -- config )
     <secure-config>