diff --git a/extra/builder/benchmark/benchmark.factor b/extra/builder/benchmark/benchmark.factor deleted file mode 100644 index afe277d30b..0000000000 --- a/extra/builder/benchmark/benchmark.factor +++ /dev/null @@ -1,43 +0,0 @@ - -USING: kernel continuations arrays assocs sequences sorting math - io io.styles prettyprint builder.util ; - -IN: builder.benchmark - -! : passing-benchmarks ( table -- table ) -! [ second first2 number? swap number? and ] filter ; - -: passing-benchmarks ( table -- table ) [ second number? ] filter ; - -! : simplify-table ( table -- table ) [ first2 second 2array ] map ; - -: benchmark-difference ( old-table benchmark-result -- result-diff ) - first2 >r - tuck swap at - r> - swap - - 2array ; - -: compare-tables ( old new -- table ) - [ passing-benchmarks ] bi@ - [ benchmark-difference ] with map ; - -: benchmark-deltas ( -- table ) - "../benchmarks" "benchmarks" [ eval-file ] bi@ - compare-tables - sort-values ; - -: benchmark-deltas. ( deltas -- ) - standard-table-style - [ - [ [ "Benchmark" write ] with-cell [ "Delta (ms)" write ] with-cell ] - with-row - [ [ swap [ write ] with-cell pprint-cell ] with-row ] - assoc-each - ] - tabular-output ; - -: show-benchmark-deltas ( -- ) - [ benchmark-deltas benchmark-deltas. ] - [ drop "Error generating benchmark deltas" . ] - recover ; \ No newline at end of file diff --git a/extra/builder/util/util.factor b/extra/builder/util/util.factor index f9ab6c1d1d..db3b476365 100644 --- a/extra/builder/util/util.factor +++ b/extra/builder/util/util.factor @@ -41,12 +41,17 @@ DEFER: to-strings : host-name* ( -- name ) host-name "." split first ; +! : datestamp ( -- string ) +! now `{ ,[ dup timestamp-year ] +! ,[ dup timestamp-month ] +! ,[ dup timestamp-day ] +! ,[ dup timestamp-hour ] +! ,[ timestamp-minute ] } +! [ pad-00 ] map "-" join ; + : datestamp ( -- string ) - now `{ ,[ dup timestamp-year ] - ,[ dup timestamp-month ] - ,[ dup timestamp-day ] - ,[ dup timestamp-hour ] - ,[ timestamp-minute ] } + now + { year>> month>> day>> hour>> minute>> } [ pad-00 ] map "-" join ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/extra/shell/parser/parser.factor b/extra/shell/parser/parser.factor index 46548bb34f..2ecca6199c 100644 --- a/extra/shell/parser/parser.factor +++ b/extra/shell/parser/parser.factor @@ -23,8 +23,8 @@ TUPLE: factor-expr expr ; pipeline-expr new over [ 1st ] [ 4th [ 1st ] map ] [ 5th ] tri suffix prefix-on >>commands over 2nd >>stdin - over 5th >>stdout - swap 6th >>background ; + over 6th >>stdout + swap 7th >>background ; : ast>single-quoted-expr ( ast -- obj ) 2nd >string single-quoted-expr boa ;