From 44cef753daeb596474d1aeb2ceb62a5dc82b206f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 7 Mar 2008 21:29:04 -0600 Subject: [PATCH] Benchmarks can use ascii encoding --- extra/benchmark/mandel/mandel.factor | 6 +++--- extra/benchmark/raytracer/raytracer.factor | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/extra/benchmark/mandel/mandel.factor b/extra/benchmark/mandel/mandel.factor index 05eda2ad81..0f8c81da75 100755 --- a/extra/benchmark/mandel/mandel.factor +++ b/extra/benchmark/mandel/mandel.factor @@ -1,6 +1,7 @@ IN: benchmark.mandel USING: arrays io kernel math namespaces sequences strings sbufs -math.functions math.parser io.files colors.hsv io.encodings.binary ; +math.functions math.parser io.files colors.hsv +io.encodings.ascii ; : max-color 360 ; inline : zoom-fact 0.8 ; inline @@ -65,7 +66,6 @@ SYMBOL: cols ] with-scope ; : mandel-main ( -- ) - "mandel.ppm" temp-file - binary [ mandel write ] with-file-writer ; + mandel "mandel.ppm" temp-file ascii set-file-contents ; MAIN: mandel-main diff --git a/extra/benchmark/raytracer/raytracer.factor b/extra/benchmark/raytracer/raytracer.factor index 232842a51e..4bb8c30383 100644 --- a/extra/benchmark/raytracer/raytracer.factor +++ b/extra/benchmark/raytracer/raytracer.factor @@ -3,7 +3,7 @@ USING: float-arrays compiler generic io io.files kernel math math.functions math.vectors math.parser namespaces sequences -sequences.private words io.encodings.binary ; +sequences.private words io.encodings.ascii ; IN: benchmark.raytracer ! parameters @@ -170,7 +170,6 @@ DEFER: create ( level c r -- scene ) ] "" make ; : raytracer-main - "raytracer.pnm" temp-file - binary [ run write ] with-file-writer ; + run "raytracer.pnm" temp-file ascii set-file-contents ; MAIN: raytracer-main