From: "mame (Yusuke Endoh) via ruby-core" Date: 2024-12-12T10:26:21+00:00 Subject: [ruby-core:120205] [Ruby master Bug#20940] Colored syntax error from prism Issue #20940 has been updated by mame (Yusuke Endoh). Personal opinion on terminal coloring (or any escape sequences). Colors should be completely optional as information because colors are not subject to copy and paste in today's standard environment. I don't think Prism currently violates this, but I would ask you to make sure that it never violates this. The reason for this is partly because of the colorblindness issue that ko1 mentions, but also because it would damage the Ruby ecosystem. If copying and pasting text reduces information, people will start asking questions on stackoverflow, etc. with screenshots instead of text. Then error messages will no longer be subject to string searches. This would make it difficult to search for the information on Google or in a browser. In the future, when Google search, browsers, and ChatGPT or something, all support OCR by default, this limitation could be relaxed, but for the time being, terminal output must be complete as a text. ---------------------------------------- Bug #20940: Colored syntax error from prism https://bugs.ruby-lang.org/issues/20940#change-110968 * Author: ko1 (Koichi Sasada) * Status: Open * Assignee: matz (Yukihiro Matsumoto) * Target version: 3.4 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Prism shows syntax error with coloring. But we have long avoided coloring Ruby for reasons such as color weakness. Can we release next Ruby 3.4.0 with colored syntax errors? ![colored_syntax_error1](clipboard-202412101454-v5ydy.png) ![colored_syntax_error2](clipboard-202412101456-u1hrp.png) NOTE: * irb supports `NO_COLOR` environment variable ([NO_COLOR: disabling ANSI color output by default](https://no-color.org/)) ---Files-------------------------------- clipboard-202412101454-v5ydy.png (20.6 KB) clipboard-202412101456-u1hrp.png (10.7 KB) -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/