From 947a1d54baa4a1e7660d22adc75ad2afdb870a30 Mon Sep 17 00:00:00 2001 From: Yewzir Date: Tue, 24 Feb 2026 09:34:09 +0100 Subject: [PATCH 1/3] Replace `std::cout` with `std::cerr` in the error diagnostics handler This is half of the solution for #643 and is more than workable in principle, but still without color. Regarding color, I noticed that "termcolor" is one of the additional project modules, so I'll see what that leads to. Finally, I'll review the current tests to see if any already exist that test the output flow and any coloration. If not, I'll try to implement such test(s). --- include/Ark/Error/Diagnostics.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/Ark/Error/Diagnostics.hpp b/include/Ark/Error/Diagnostics.hpp index 41084eff..8606eb66 100644 --- a/include/Ark/Error/Diagnostics.hpp +++ b/include/Ark/Error/Diagnostics.hpp @@ -64,16 +64,16 @@ namespace Ark::Diagnostics */ std::string makeContextWithNode(const std::string& message, const internal::Node& node); - ARK_API void generateWithCode(const CodeError& e, const std::string& code, std::ostream& os = std::cout, bool colorize = true); + ARK_API void generateWithCode(const CodeError& e, const std::string& code, std::ostream& os = std::cerr, bool colorize = true); /** - * @brief Generate a diagnostic from an error and print it to the standard output + * @brief Generate a diagnostic from an error and print it to the standard error output * * @param e code error * @param os output stream * @param colorize generate colors or not */ - ARK_API void generate(const CodeError& e, std::ostream& os = std::cout, bool colorize = true); + ARK_API void generate(const CodeError& e, std::ostream& os = std::cerr, bool colorize = true); } #endif // ARK_ERROR_DIAGNOSTICS_HPP From 3bc6ff0034c61ddaab55d62a2e7ba8462685cde7 Mon Sep 17 00:00:00 2001 From: Yewzir Date: Fri, 27 Feb 2026 22:06:13 +0100 Subject: [PATCH 2/3] Save benchmark test results --- tests/benchmarks/results/013-f533ccb6.csv | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/benchmarks/results/013-f533ccb6.csv diff --git a/tests/benchmarks/results/013-f533ccb6.csv b/tests/benchmarks/results/013-f533ccb6.csv new file mode 100644 index 00000000..d1148a33 --- /dev/null +++ b/tests/benchmarks/results/013-f533ccb6.csv @@ -0,0 +1,11 @@ +name,iterations,real_time,cpu_time,time_unit,bytes_per_second,items_per_second,label,error_occurred,error_message +"quicksort",4774,0.147361,0.147347,ms,,,,, +"ackermann/iterations:50",50,64.0243,64.0186,ms,,,,, +"fibonacci/iterations:100",100,6.33444,6.33389,ms,,,,, +"builtins",935,0.747226,0.747161,ms,,,,, +"binary_trees",1,1216.72,1216.61,ms,,,,, +"for_sum",4,164.447,164.419,ms,,,,, +"create_closure/iterations:500",500,1.13415,1.13405,ms,,,,, +"create_list/iterations:500",500,1.6521,1.65196,ms,,,,, +"create_list_with_ref/iterations:500",500,1.68385,1.68379,ms,,,,, +"n_queens/iterations:50",50,24.2829,24.2819,ms,,,,, From ca7855b8b3efc0b4e38295bb5957ccab25ce30c5 Mon Sep 17 00:00:00 2001 From: Yewzir Date: Sat, 28 Feb 2026 12:58:53 +0100 Subject: [PATCH 3/3] Delete benchmark test results --- tests/benchmarks/results/013-f533ccb6.csv | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 tests/benchmarks/results/013-f533ccb6.csv diff --git a/tests/benchmarks/results/013-f533ccb6.csv b/tests/benchmarks/results/013-f533ccb6.csv deleted file mode 100644 index d1148a33..00000000 --- a/tests/benchmarks/results/013-f533ccb6.csv +++ /dev/null @@ -1,11 +0,0 @@ -name,iterations,real_time,cpu_time,time_unit,bytes_per_second,items_per_second,label,error_occurred,error_message -"quicksort",4774,0.147361,0.147347,ms,,,,, -"ackermann/iterations:50",50,64.0243,64.0186,ms,,,,, -"fibonacci/iterations:100",100,6.33444,6.33389,ms,,,,, -"builtins",935,0.747226,0.747161,ms,,,,, -"binary_trees",1,1216.72,1216.61,ms,,,,, -"for_sum",4,164.447,164.419,ms,,,,, -"create_closure/iterations:500",500,1.13415,1.13405,ms,,,,, -"create_list/iterations:500",500,1.6521,1.65196,ms,,,,, -"create_list_with_ref/iterations:500",500,1.68385,1.68379,ms,,,,, -"n_queens/iterations:50",50,24.2829,24.2819,ms,,,,,