diff --git a/extra/benchmark/benchmark.factor b/extra/benchmark/benchmark.factor index 7eb5f10276..26f1a9e96d 100755 --- a/extra/benchmark/benchmark.factor +++ b/extra/benchmark/benchmark.factor @@ -2,27 +2,27 @@ ! See http://factorcode.org/license.txt for BSD license. USING: kernel vocabs vocabs.loader tools.time tools.vocabs arrays assocs io.styles io help.markup prettyprint sequences -continuations debugger ; +continuations debugger combinators.cleave ; IN: benchmark : run-benchmark ( vocab -- result ) - [ dup require [ run ] benchmark ] [ error. drop f f ] recover 2array ; + [ [ require ] [ [ run ] benchmark nip ] bi ] curry + [ error. f ] recover ; : run-benchmarks ( -- assoc ) - "benchmark" all-child-vocabs values concat [ vocab-name ] map + "benchmark" all-child-vocabs-seq [ dup run-benchmark ] { } map>assoc ; : benchmarks. ( assoc -- ) standard-table-style [ [ [ "Benchmark" write ] with-cell - [ "Run time (ms)" write ] with-cell - [ "GC time (ms)" write ] with-cell + [ "Time (ms)" write ] with-cell ] with-row [ [ - swap [ dup ($vocab-link) ] with-cell - first2 pprint-cell pprint-cell + [ [ 1array $vocab-link ] with-cell ] + [ pprint-cell ] bi* ] with-row ] assoc-each ] tabular-output ; diff --git a/extra/editors/editors.factor b/extra/editors/editors.factor index bb3fd05400..4ee906bccb 100755 --- a/extra/editors/editors.factor +++ b/extra/editors/editors.factor @@ -13,8 +13,7 @@ M: no-edit-hook summary SYMBOL: edit-hook : available-editors ( -- seq ) - "editors" all-child-vocabs - values concat [ vocab-name ] map ; + "editors" all-child-vocabs-seq [ vocab-name ] map ; : editor-restarts ( -- alist ) available-editors diff --git a/extra/tools/vocabs/vocabs.factor b/extra/tools/vocabs/vocabs.factor index ba6baa543f..21b8da8910 100755 --- a/extra/tools/vocabs/vocabs.factor +++ b/extra/tools/vocabs/vocabs.factor @@ -210,11 +210,11 @@ MEMO: all-vocabs-seq ( -- seq ) ] { } map>assoc f rot unrooted-child-vocabs 2array add ; -: load-children ( prefix -- ) - all-child-vocabs values concat - filter-dangerous - require-all - load-failures. ; +: all-child-vocabs-seq ( prefix -- assoc ) + vocab-roots get swap [ + dupd (all-child-vocabs) + [ vocab-dir? ] with subset + ] curry map concat ; : map>set ( seq quot -- ) map concat prune natural-sort ; inline