diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 3ec887c84f..9dca8e1508 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -47,13 +47,11 @@ - nicer way to combine two paths - add a socket timeout - rename f* words to stream-* -- is badly named -- , + kernel: - ppc register decls - cat, reverse-cat primitives -- first-class hashtables + misc: @@ -63,6 +61,7 @@ - browser responder for word links in HTTPd - worddef props - prettyprint: when unparse called due to recursion, write a link +- vectors: ensure its ok with bignum indices + httpd: diff --git a/library/bootstrap/image.factor b/library/bootstrap/image.factor index 2594c13fc9..b5337eb04f 100644 --- a/library/bootstrap/image.factor +++ b/library/bootstrap/image.factor @@ -352,16 +352,15 @@ M: hashtable ' ( hashtable -- pointer ) ] ifte ; : write-image ( image file -- ) - [ [ write-word ] vector-each ] with-stream ; + [ [ write-word ] vector-each ] with-stream ; : with-minimal-image ( quot -- image ) [ 300000 image set - 521 "objects" set + "objects" set ! Note that this is a vector that we can side-effect, ! since ; ends up using this variable from nested ! parser namespaces. - 1000 "word-fixups" set call image get ] with-scope ; diff --git a/library/hashtables.factor b/library/hashtables.factor index 73a31e081a..fb3162dd42 100644 --- a/library/hashtables.factor +++ b/library/hashtables.factor @@ -106,7 +106,7 @@ IN: hashtables : grow-hash ( hash -- ) #! A good way to earn a living. - dup hash-size 3 * 2 /i swap set-hash-array ; + dup hash-size 2 * swap set-hash-array ; : (hash>alist) ( alist n hash -- alist ) 2dup bucket-count >= [ diff --git a/library/httpd/file-responder.factor b/library/httpd/file-responder.factor index ea4d8c45b3..61231fd17f 100644 --- a/library/httpd/file-responder.factor +++ b/library/httpd/file-responder.factor @@ -54,7 +54,7 @@ USE: unparser over file-length file-response "method" get "head" = [ drop ] [ - stdio get fcopy + stdio get fcopy ] ifte ; : serve-file ( filename -- ) diff --git a/library/httpd/httpd.factor b/library/httpd/httpd.factor index a55fcdff08..2d597f79fe 100644 --- a/library/httpd/httpd.factor +++ b/library/httpd/httpd.factor @@ -41,7 +41,7 @@ USE: url-encoding : httpd-log-stream ( -- stream ) #! Set httpd-log-file to save httpd log to a file. "httpd-log-file" get dup [ - + ] [ drop stdio get ] ifte ; diff --git a/library/io/logging.factor b/library/io/logging.factor index 07b97e50c3..4627bc6a53 100644 --- a/library/io/logging.factor +++ b/library/io/logging.factor @@ -51,4 +51,4 @@ USE: unparser [ stdio get "log" set call ] with-scope ; : with-log-file ( file quot -- ) - [ swap "log" set call ] with-scope ; + [ swap "log" set call ] with-scope ; diff --git a/library/io/stream-impl.factor b/library/io/stream-impl.factor index bd756b11c6..a69eb54885 100644 --- a/library/io/stream-impl.factor +++ b/library/io/stream-impl.factor @@ -64,18 +64,12 @@ M: fd-stream fclose ( -- ) C: fd-stream ( in out -- stream ) [ "out" set "in" set ] extend ; -: ( path -- stream ) +: ( path -- stream ) t f open-file ; -: ( path -- stream ) +: ( path -- stream ) f t open-file ; -: ( path -- stream ) - ; - -: ( path -- stream ) - ; - : init-stdio ( -- ) stdin stdout stdio set ; @@ -94,4 +88,4 @@ C: fd-stream ( in out -- stream ) "resource-path" get [ "." ] unless* ; : ( path -- stream ) - resource-path swap cat2 ; + resource-path swap cat2 ; diff --git a/library/syntax/parse-stream.factor b/library/syntax/parse-stream.factor index 2c84fa87d9..6141184472 100644 --- a/library/syntax/parse-stream.factor +++ b/library/syntax/parse-stream.factor @@ -75,7 +75,7 @@ USE: strings [ file-vocabs (parse-stream) ] with-scope ; : parse-file ( file -- quot ) - dup parse-stream ; + dup parse-stream ; : run-file ( file -- ) #! Run a file. The file is read with the default IN:/USE: @@ -83,7 +83,7 @@ USE: strings parse-file call ; : (parse-file) ( file -- quot ) - dup (parse-stream) ; + dup (parse-stream) ; : (run-file) ( file -- ) #! Run a file. The file is read with the same IN:/USE: as diff --git a/library/tools/jedit.factor b/library/tools/jedit.factor index 39ee372a61..5d30a9105b 100644 --- a/library/tools/jedit.factor +++ b/library/tools/jedit.factor @@ -41,7 +41,7 @@ USE: words [ "~" get "/.jedit/server" cat2 ] unless* ; : jedit-server-info ( -- port auth ) - jedit-server-file [ + jedit-server-file [ read drop read parse-number read parse-number