]> gitweb.factorcode.org Git - factor.git/commitdiff
fix load errors from load-all
authorJoe Groff <arcata@gmail.com>
Wed, 28 Oct 2009 18:56:15 +0000 (13:56 -0500)
committerJoe Groff <arcata@gmail.com>
Wed, 28 Oct 2009 18:56:15 +0000 (13:56 -0500)
basis/persistent/hashtables/nodes/bitmap/bitmap.factor
extra/benchmark/fasta/fasta.factor
extra/mongodb/driver/driver.factor
extra/mongodb/operations/operations.factor

index eb8533c186b15557c3059ce31063c896badc13bc..a8194a127f00ec264f875402780cb3754d12f7b5 100644 (file)
@@ -36,17 +36,16 @@ M:: bitmap-node (new-at) ( shift value key hashcode bitmap-node -- node' added-l
         new-leaf
     ] [
         idx nodes nth :> n
-            shift radix-bits + value key hashcode n (new-at) :> new-leaf :> n'
-            n n' eq? [
-                bitmap-node
-            ] [
-                bitmap
-                n' idx nodes new-nth
-                shift
-                <bitmap-node>
-            ] if
-            new-leaf
-        ]
+        shift radix-bits + value key hashcode n (new-at) :> new-leaf :> n'
+        n n' eq? [
+            bitmap-node
+        ] [
+            bitmap
+            n' idx nodes new-nth
+            shift
+            <bitmap-node>
+        ] if
+        new-leaf
     ] if ;
 
 M:: bitmap-node (pluck-at) ( key hashcode bitmap-node -- node' )
index 4b15eaac7e9e144ce2d9f624cecfd5181c1878e3..7abf5ec5bd0861ac6d8f11857d3d350e91f3fd66 100755 (executable)
@@ -77,28 +77,34 @@ CONSTANT: homo-sapiens
 
 : write-repeat-fasta ( n alu desc id -- )
     write-description
-    0 :> k! :> alu
-    [| len | k len alu make-repeat-fasta k! ] split-lines ; inline
+    [let
+        0 :> k! :> alu
+        [| len | k len alu make-repeat-fasta k! ] split-lines
+    ] ; inline
 
 : fasta ( n out -- )
     homo-sapiens make-cumulative
     IUB make-cumulative
-    :> homo-sapiens-floats
-    :> homo-sapiens-chars
-    :> IUB-floats
-    :> IUB-chars
-    :> out
-    :> n
-    initial-seed :> seed
-
-    out ascii [
-        n 2 * ALU "Homo sapiens alu" "ONE" write-repeat-fasta
-
-        initial-seed
-        n 3 * homo-sapiens-chars homo-sapiens-floats "IUB ambiguity codes" "TWO" write-random-fasta
-        n 5 * IUB-chars IUB-floats "Homo sapiens frequency" "THREE" write-random-fasta
-        drop
-    ] with-file-writer ;
+    [let
+        :> homo-sapiens-floats
+        :> homo-sapiens-chars
+        :> IUB-floats
+        :> IUB-chars
+        :> out
+        :> n
+        initial-seed :> seed
+
+        out ascii [
+            n 2 * ALU "Homo sapiens alu" "ONE" write-repeat-fasta
+
+            initial-seed
+            n 3 * homo-sapiens-chars homo-sapiens-floats
+            "IUB ambiguity codes" "TWO" write-random-fasta
+            n 5 * IUB-chars IUB-floats
+            "Homo sapiens frequency" "THREE" write-random-fasta
+            drop
+        ] with-file-writer
+    ] ;
 
 : run-fasta ( -- ) 2500000 reverse-complement-in fasta ;
 
index b0242fd06758bcaa46dc7313d19d1dfdad638a3c..294672523cbb6c237d2870cbcc92c4a36235cc0e 100644 (file)
@@ -151,14 +151,16 @@ M: mdb-collection create-collection
     [ "$cmd" = ] [ "system" head? ] bi or ;
 
 : check-collection ( collection -- fq-collection )
-    mdb-instance :> instance
-    instance name>> :> instance-name
-    dup mdb-collection? [ name>> ] when
-    "." split1 over instance-name =
-    [ nip ] [ drop ] if
-    [ ] [ reserved-namespace? ] bi
-    [ instance (ensure-collection) ] unless
-    [ instance-name ] dip "." glue ; 
+    [let
+        mdb-instance :> instance
+        instance name>> :> instance-name
+        dup mdb-collection? [ name>> ] when
+        "." split1 over instance-name =
+        [ nip ] [ drop ] if
+        [ ] [ reserved-namespace? ] bi
+        [ instance (ensure-collection) ] unless
+        [ instance-name ] dip "." glue
+    ] ;
 
 : fix-query-collection ( mdb-query -- mdb-query )
     [ check-collection ] change-collection ; inline
index 69b14cb967bc306f2a16495c0b08b1ebcbb50b46..7e99c52aacf6d95085815e7ceef72565fb26f1eb 100644 (file)
@@ -105,9 +105,9 @@ USE: tools.walker
     ! [ dump-to-file ] keep
     write flush ; inline
 
-: build-query-object ( query -- selector )
+:: build-query-object ( query -- selector )
     H{ } clone :> selector
-    { [ orderby>> [ "orderby" selector set-at ] when* ]
+    query { [ orderby>> [ "orderby" selector set-at ] when* ]
       [ explain>> [ "$explain" selector set-at ] when* ]
       [ hint>> [ "$hint" selector set-at ] when* ] 
       [ query>> "query" selector set-at ]