endianness(7scm)

πŸ“¦ version 0-unstable-2024-02, in nixpkgs unstable

πŸ’… endianness(7scm) β€” quote an endianness symbol

okay so this is the Scheme Programmer's Manual page for endianness, and it's literally about quoting an endianness symbol. Group-chat voice on, facts stay on πŸ’–

✨ NAME ✨

endianness β€” quote an endianness symbol.

πŸ“š LIBRARY πŸ“š

       (import (rnrs))                     ;R6RS
       (import (rnrs bytevectors))         ;R6RS

πŸͺ„ SYNOPSIS πŸͺ„

       (endianness endianness-symbol)

πŸ’– DESCRIPTION πŸ’–

The endianness syntax quotes the endianness-symbol, while making absolutely sure it's one of the supported endiannesses in the implementation. No fake symbols allowed, bestie ✨

An implementation must support at least big and little, but it may support other endianness symbols.

🧠 IMPLEMENTATION NOTES 🧠

Heads up, this part is implementation-specific tea β˜•

πŸ’€ Larcency Scheme

Using this syntax causes a deprecation warning to be printed.

πŸ” EVALUATION πŸ”

This syntax evaluates to one of the supported endianness symbols. It's giving validated-endianness-label energy, periodt πŸ’…

πŸ“ EXAMPLES πŸ“

Watch this:

       (endianness little)
                 => little

       (endianness big)
                 => big

πŸ› οΈ APPLICATION USAGE πŸ› οΈ

This is used as an argument to bytevector procedures. That's the whole job, and it ate πŸ’…

🌈 RATIONALE 🌈

The native endianness is not included as an option, like it was in SRFI-74. It would have unnecessarily caused the expansion of a program to depend on the machine on which it's expanded.

It is impossible to tell if a new endianness will become popular in the future, so extensions are allowed. Lowkey future-proofing, no cap ✨

🀝 COMPATIBILITY 🀝

This syntax works the same everywhere that it's supported (but see Implementation Notes above). So yeah, consistent vibes, with that one deprecation-warning caveat πŸ‘€

😭 ERRORS 😭

This syntax can raise exceptions during expansion with the following condition types:

  • &syntax (R6RS) β€” The wrong number of operands was given or the operand was not a supported endianness symbol.

πŸ‘€ SEE ALSO πŸ‘€

Go peek at native-endianness(3scm) and bytevector-u16-ref(3scm). Bestie cross-references, iykyk πŸ’–

πŸ‘‘ STANDARDS πŸ‘‘

R6RS. Periodt.

πŸ¦‹ HISTORY πŸ¦‹

This syntax is new for R6RS and first appeared in SRFI-74.

There have been mixed-endianness machines, such as the PDP-11, which do not fit as either big or little.

🫢 AUTHORS 🫢

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://github.com/schemedoc/manpages/.


okay that's the whole page, bestie πŸ’– from the Scheme Programmer's Manual, date 2021-03-06, page endianness(7scm) β€” mwah πŸ’‹

πŸ“¦ where this page comes from