The errno and signal codesets Lassi Kortela (13 Dec 2022 11:38 UTC)
Re: The errno and signal codesets Lassi Kortela (13 Dec 2022 11:48 UTC)
Re: The errno and signal codesets John Cowan (14 Dec 2022 05:58 UTC)
Re: The errno and signal codesets Lassi Kortela (14 Dec 2022 09:08 UTC)
Re: The errno and signal codesets John Cowan (14 Dec 2022 22:48 UTC)
Re: The errno and signal codesets Lassi Kortela (15 Dec 2022 09:10 UTC)
Re: The errno and signal codesets John Cowan (18 Dec 2022 07:56 UTC)
Re: The errno and signal codesets Lassi Kortela (20 Dec 2022 10:51 UTC)
Re: The errno and signal codesets Lassi Kortela (20 Dec 2022 11:53 UTC)

Re: The errno and signal codesets Lassi Kortela 15 Dec 2022 09:10 UTC

>     It's handy for introspection purposes (REPL use, logs, etc.)
>
> Can you explain how?

If you work side by side with a high-level and a low-level language,
e.g. by writing FFI code or using an existing FFI wrapper. It's rare
that a wrapper fully hides a low-level feature. And documentation, logs,
and debuggers often state the numeric codes.

Note that the SRFI does not only cover errno, but all kinds of other codes:

- "Process exited with signal 6" -> look up which signal.

- C libraries that have hardware independent codes.

- Numeric network protocol codes (e.g. HTTP and IRC).

- Hardware codes, especially on embedded systems.

If you work with this stuff in Scheme, the REPL should let you look
things up.

>     C and Python programmers can easily find the integer corresponding to a
>     given errno symbol on the local machine. Have they been abusing this
>     capability?
>
> I don't see how anyone could possibly know the answer to that question.

I meant that as in "lots of language implementations offer this feature
by a simple name that does not explicitly say it's machine dependent,
and you don't see anybody complaining".