From b9d88f019e8a347566423eead696b6dd219e6775 Mon Sep 17 00:00:00 2001 From: Michael Schimmel Date: Fri, 6 Mar 2026 12:07:39 +0100 Subject: [PATCH] Remove unused err.myc example Update benchmark output for soa_series.myc. Also, fix the tester to not panic when a baseline is missing, and instead just report it as missing. --- examples/err.myc | 14 -------------- examples/soa_series.myc | 4 ++-- src/ast/rtl/core.rs | 5 ++++- src/utils/tester.rs | 11 +++-------- 4 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 examples/err.myc diff --git a/examples/err.myc b/examples/err.myc deleted file mode 100644 index 9d0e22b..0000000 --- a/examples/err.myc +++ /dev/null @@ -1,14 +0,0 @@ -;; Output: 20 -(do - (def tst - (fn [length] - (do - (def history (series :float)) - (fn [val] - (do - length - )) - ))) - - ((tst 20) 5) -) \ No newline at end of file diff --git a/examples/soa_series.myc b/examples/soa_series.myc index 8c8cb30..8f02c15 100644 --- a/examples/soa_series.myc +++ b/examples/soa_series.myc @@ -1,6 +1,6 @@ ;; Output: 26.7 -;; Benchmark: 1.0us -;; Benchmark-Repeat: 1944 +;; Benchmark: 1.4us +;; Benchmark-Repeat: 1406 (do (def my_ticks (series {:price :float :volume :int :msg :text})) diff --git a/src/ast/rtl/core.rs b/src/ast/rtl/core.rs index 8334bad..31259d1 100644 --- a/src/ast/rtl/core.rs +++ b/src/ast/rtl/core.rs @@ -498,7 +498,10 @@ fn register_io(env: &Environment) { })); env.register_native_fn("print", print_ty, Purity::Impure, |args| { for arg in args { - print!("{}", arg); + match arg { + Value::Text(t) => print!("{}", t), + _ => print!("{}", arg), + } } println!(); Value::Void diff --git a/src/utils/tester.rs b/src/utils/tester.rs index db2f430..24f2968 100644 --- a/src/utils/tester.rs +++ b/src/utils/tester.rs @@ -100,6 +100,9 @@ pub fn run_benchmarks(update: bool, filter: Option<&str>) -> Vec) -> Vec