From 7e6479cd365a0a8084594d3ff3261d9d15023d32 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Sun, 14 Feb 2010 15:59:18 -0600 Subject: [PATCH 1/4] collect-benchmarks needs to convert from nano not micro --- extra/project-euler/ave-time/ave-time.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/project-euler/ave-time/ave-time.factor b/extra/project-euler/ave-time/ave-time.factor index ec190fed18..9927486eb7 100644 --- a/extra/project-euler/ave-time/ave-time.factor +++ b/extra/project-euler/ave-time/ave-time.factor @@ -1,11 +1,11 @@ ! Copyright (c) 2007, 2008 Aaron Schaefer. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators.smart formatting fry io kernel macros math -math.functions math.statistics memory sequences tools.time ; +USING: combinators.smart formatting fry io kernel macros math math.functions +math.statistics memory sequences tools.time ; IN: project-euler.ave-time MACRO: collect-benchmarks ( quot n -- seq ) - swap '[ _ [ [ [ _ nullary ] preserving ] gc benchmark 1000 / ] replicate ] ; + swap '[ _ [ [ [ _ nullary ] preserving ] gc benchmark 6 10^ / ] replicate ] ; : ave-time ( quot n -- ) [ From e772aae5103cad688fde0e71c425163a03032015 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Sun, 14 Feb 2010 16:00:08 -0600 Subject: [PATCH 2/4] Typo in command-line docs --- basis/command-line/command-line-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/command-line/command-line-docs.factor b/basis/command-line/command-line-docs.factor index 11ee46c227..9a69614766 100644 --- a/basis/command-line/command-line-docs.factor +++ b/basis/command-line/command-line-docs.factor @@ -91,7 +91,7 @@ ARTICLE: "standard-cli-args" "Command line switches for general usage" } ; ARTICLE: "factor-boot-rc" "Bootstrap initialization file" -"The botstrap initialization file is named " { $snippet "factor-boot-rc" } " on Windows and " { $snippet ".factor-boot-rc" } " on Unix. This file can contain " { $link require } " calls for vocabularies you use frequently, and other such long-running tasks that you do not want to perform every time Factor starts." +"The bootstrap initialization file is named " { $snippet "factor-boot-rc" } " on Windows and " { $snippet ".factor-boot-rc" } " on Unix. This file can contain " { $link require } " calls for vocabularies you use frequently, and other such long-running tasks that you do not want to perform every time Factor starts." $nl "A word to run this file from an existing Factor session:" { $subsections run-bootstrap-init } From e19461d4106950e9300937d30a6d1f2bb9a5e5c5 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Feb 2010 17:15:26 +1300 Subject: [PATCH 3/4] io.files.info: load io.files.info.unix if we're on Unix. Fixes long-standing no-method error on file-info --- basis/io/files/info/info.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/io/files/info/info.factor b/basis/io/files/info/info.factor index 500fd62cd3..a314361e9d 100644 --- a/basis/io/files/info/info.factor +++ b/basis/io/files/info/info.factor @@ -26,7 +26,7 @@ available-space free-space used-space total-space ; HOOK: file-system-info os ( path -- file-system-info ) { - { [ os unix? ] [ "io.files.info" ] } + { [ os unix? ] [ "io.files.info.unix" ] } { [ os windows? ] [ "io.files.info.windows" ] } } cond require From 62f5a2af1cf0aeb1a764c1e055c97124f00ee04c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Feb 2010 17:37:07 +1300 Subject: [PATCH 4/4] tools.deploy.shaker: don't strip out io.files hook, since then we lose resource-path and such --- basis/tools/deploy/deploy-tests.factor | 6 ++++++ basis/tools/deploy/shaker/shaker.factor | 1 - basis/tools/deploy/test/18/18.factor | 8 ++++++++ basis/tools/deploy/test/18/authors.txt | 1 + basis/tools/deploy/test/18/deploy.factor | 14 ++++++++++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 basis/tools/deploy/test/18/18.factor create mode 100644 basis/tools/deploy/test/18/authors.txt create mode 100644 basis/tools/deploy/test/18/deploy.factor diff --git a/basis/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor index 1412e65f95..987b4aa8a1 100644 --- a/basis/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -117,3 +117,9 @@ os macosx? [ [ ] [ "tools.deploy.test.16" shake-and-bake run-temp-image ] unit-test [ ] [ "tools.deploy.test.17" shake-and-bake run-temp-image ] unit-test + +[ t ] [ + "tools.deploy.test.18" shake-and-bake + deploy-test-command ascii [ readln ] with-process-reader + "test.image" temp-file = +] unit-test diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index 5897712a02..e5dddc5fe6 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -43,7 +43,6 @@ IN: tools.deploy.shaker "io.thread" startup-hooks get delete-at ] unless strip-io? [ - "io.files" startup-hooks get delete-at "io.backend" startup-hooks get delete-at "io.thread" startup-hooks get delete-at ] when diff --git a/basis/tools/deploy/test/18/18.factor b/basis/tools/deploy/test/18/18.factor new file mode 100644 index 0000000000..0676376701 --- /dev/null +++ b/basis/tools/deploy/test/18/18.factor @@ -0,0 +1,8 @@ +! Copyright (C) 2010 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors io.streams.c math.parser system ; +IN: tools.deploy.test.18 + +: main ( -- ) image show ; + +MAIN: main diff --git a/basis/tools/deploy/test/18/authors.txt b/basis/tools/deploy/test/18/authors.txt new file mode 100644 index 0000000000..d4f5d6b3ae --- /dev/null +++ b/basis/tools/deploy/test/18/authors.txt @@ -0,0 +1 @@ +Slava Pestov \ No newline at end of file diff --git a/basis/tools/deploy/test/18/deploy.factor b/basis/tools/deploy/test/18/deploy.factor new file mode 100644 index 0000000000..66069d6430 --- /dev/null +++ b/basis/tools/deploy/test/18/deploy.factor @@ -0,0 +1,14 @@ +USING: tools.deploy.config ; +H{ + { deploy-name "tools.deploy.test.18" } + { deploy-ui? f } + { deploy-c-types? f } + { deploy-unicode? f } + { "stop-after-last-window?" t } + { deploy-io 1 } + { deploy-reflection 1 } + { deploy-word-props? f } + { deploy-math? f } + { deploy-threads? f } + { deploy-word-defs? f } +}