Hacker News new | ask | show | jobs
by currymj 2784 days ago
Are Unicode characters a problem for the tools you use?

For example, some languages will let you use λ instead of lambda. Or when trying to define the logistic function, I sometimes find myself writing

  σ(x) = 1.0 / (1.0 * exp(-x))
Or the Julia language has ≈, which tests if two floating point numbers are approximately equal. Visually, this is a reasonable symbol, it's not like one of the weird functional programming spaceship operators. But I have no idea what a screen reader would read.

Sometimes this sort of thing lets code correspond almost exactly to the notation in papers. It is a minor aesthetic improvement, but if it breaks screen readers and other tools I'd rather just write out "sigma" or "lambda".

1 comments

My screen reader, Orca under Linux, read those as "sigma" and "almost equal to." So I suppose those work, though I'd have to hit Google to find out how to type them. :)
The NVDA screen reader for Windows also reads these symbols. So it looks like they're not a problem.
In Julia editors these are written by e.g. typing `\sigma` with a backslash and using tab completion.
Thanks for the response, that is pleasantly surprising default behavior.