News for hackers. Stuff that matters.
Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by legobmw99 on Wednesday April 03, 2024 @12:29PM (#39919482)
How well do screen readers parse other compiler errors?

This isn’t me trying to be snarky, I actually have no idea! Reading a C++ template error is hard enough as a sighted person

Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by dmalcolm on Wednesday April 03, 2024 @02:47PM (#39921380)
FWIW I implemented SARIF output in GCC 13, which gives a machine-readable interchange format for the errors. It's viewable by e.g. VS Code (via a plugin). Hopefully that makes it easier to grok the messages.

You can see an example of the output here: https://godbolt.org/z/aan6Kfxds (that's the first example from the article, with -fdiagnostics-format=sarif-stderr added to the command-line options)

That doesn't cover the diagrams though (which I currently serialize in SARIF form by making a placeholder Markdown text containing "code" containing the diagram).

I experimented with SVG output for the diagrams, but didn't get this in good enough shape for GCC 14.

I've got a few ideas for more general UX improvements with how we do diagnostics, which I'll try in GCC 15 once we're finished focusing on GCC 14 bugfixing.

Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by OneOfTheMicahs on Wednesday April 03, 2024 @03:05PM (#39921608)
Very cool!
Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by spookie on Thursday April 04, 2024 @03:34AM (#39927557)
Huge thanks for the effort!

An advice to anyone out there making software: give a screen reader a whirl! Take it as a learning experience!

Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by OneOfTheMicahs on Wednesday April 03, 2024 @03:00PM (#39921537)
They read every symbol or character that is displayed. Normal errors are verbose but at least they have meaning. Pictures that use ascii or other characters end up having all the symbols read too because there are no semantics associated with the picture.

I like to ask this question on posts about new libraries or developer tools, because most developers don't consider the accessibility of the features they're building.

Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by spookie on Thursday April 04, 2024 @03:39AM (#39927577)
A good thing about emojis is that they'll be read correctly. Huge win for accessibility, they are.
Re:GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overf... by OneOfTheMicahs on Thursday April 04, 2024 @04:00PM (#39935126)
For those curious, here's an example of emacspeak reading a fairly basic c error from the terminal: https://youtu.be/t3BgDa1p7Qc?feature=shared&t=270.