]> gitweb.factorcode.org Git - factor.git/commitdiff
More small fixes
authorslava <slava@factorcode.org>
Thu, 19 Oct 2006 18:12:47 +0000 (18:12 +0000)
committerslava <slava@factorcode.org>
Thu, 19 Oct 2006 18:12:47 +0000 (18:12 +0000)
TODO.FACTOR.txt
contrib/math/utils.factor
contrib/postgresql/load.factor
library/generic/standard-combination.factor
library/syntax/parse-stream.factor

index 82af07ab575dc02a0ce5084e89b9e78c3fc667e3..98ac4090cee47321a889ccb01ec5b5e4ea7e9f87 100644 (file)
@@ -10,6 +10,7 @@
 
 + ui:
 
+- menu should stay up if mouse button released
 - completion is not ideal: eg, search for "buttons"
 - some way of intercepting all gestures
 - slider needs to be modelized
index 947b73e16a7a5f6a16296de6d7afee928a6ed21f..c3fa24520bc91d0b153bf0306eaeff305074d2da 100644 (file)
@@ -33,8 +33,8 @@ USING: errors kernel sequences math sequences-internals namespaces arrays ;
         -rot (^mod)
     ] if ; foldable
 
-: powers ( n x -- { 1 x x^2 x^3 ... } )
-    #! Output sequence has n elements.
+: powers ( n x -- seq )
+    #! Output sequence has n elements, { 1 x x^2 x^3 ... }
     <array> 1 [ * ] accumulate ;
 
 : ** ( u v -- u*v' ) conjugate * ; inline
index 4bd5783bcb82abfc0993b271ac4a6cce830b1bbe..37c5757628a26966f8485616395c2f92175beb88 100644 (file)
@@ -1,3 +1,3 @@
 PROVIDE: contrib/postgresql
 { "libpq.factor" "postgresql.factor" }
-{ "postgresql-test" } ;
+{ "postgresql-test.factor" } ;
index 996a728a4a70895f558f63bc416f04fbfc0b8f34..4fd5506a4123b6e276e3fc03cd72145b0c4861fa 100644 (file)
@@ -58,7 +58,8 @@ TUPLE: no-method object generic ;
 : methods* ( dispatch# word -- assoc )
     #! Make a class->method association, together with a
     #! default delegating method at the end.
-    dup methods -rot default-method add* ;
+    dup methods -rot empty-method object bootstrap-word
+    swap 2array add* ;
 
 : method-alist>quot ( dispatch# word base-class -- quot )
     bootstrap-word swap simplify-alist
@@ -91,25 +92,6 @@ TUPLE: no-method object generic ;
 
 : small-generic? ( word -- ? ) generic-tags length 3 <= ;
 
-: build-class-vtable ( vtable pair -- )
-    dup first hashcode pick length rem rot nth push ;
-
-: <class-vtable> ( dispatch# word assoc -- table )
-    >r dupd default-method r>
-    [ length 3 + [ drop 1array >vector ] map-with ] keep
-    [ dupd build-class-vtable ] each
-    [ object method-alist>quot ] map-with ;
-
-: class-generic ( dispatch# word -- quot )
-    dup methods dup empty? [
-        drop default-method
-    ] [
-        [
-            pick picker % [ class hashcode ] %
-            <class-vtable> dup length , \ rem , , \ dispatch ,
-        ] [ ] make
-    ] if ;
-
 : standard-combination ( word dispatch# -- quot )
     swap {
         { [ dup tag-generic? ] [ num-tags \ tag type-generic ] }
index b8d6b47d6c40ca2d0a8516d60ceeacdb5e672469..159e24b7fafc86b9bdf56a52fb78259234b5f18b 100644 (file)
@@ -77,8 +77,7 @@ SYMBOL: parse-hook
         dup parsing-file dup record-file\r
         [ ?resource-path <file-reader> ] keep parse-stream\r
     ] [\r
-        over parse-file-restarts <condition> rethrow drop\r
-        parse-file\r
+        over parse-file-restarts condition drop parse-file\r
     ] recover ;\r
 \r
 : run-file ( file -- ) parse-file call ;\r