native-transcoder(3scm)

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

πŸ’… native-transcoder(3scm) β€” the Scheme Programmer's Manual, but make it cute

okay so bestie, we're in the native-transcoder(3scm) page of the Scheme Programmer's Manual and honestly? this one's short and sweet. let's get into it 🫢


✨ NAME ✨

native-transcoder β€” the transcoder for the native transcoding. that's it, that's the whole name, no notes πŸ’…

πŸ“š LIBRARY πŸ“š

two ways to get at it, pick your fighter:

(import (rnrs))                     ;R6RS
(import (rnrs io ports))            ;R6RS

πŸŽ€ SYNOPSIS πŸŽ€

(native-transcoder)

zero arguments, zero drama, one call. iconic behaviour honestly ⭐

πŸ’– DESCRIPTION πŸ’–

So what does it actually do? It returns an implementation-dependent transcoder that represents a possibly locale-dependent "native" transcoding. like, it's giving "whatever your OS thinks is normal" energy and we respect it 🌈

The tea β˜•: this is commonly a UTF-8 transcoder with eol-style none on Unix-like systems, and crlf on DOS and Windows systems β€” but ngl it can be anything that goes well with the native operating system. so don't come for it if it's not exactly that, the implementation gets to choose, fr fr πŸ’€

🧚 IMPLEMENTATION NOTES 🧚

See the notes in native-eol-style(3scm). that's where the eol lore lives, go read it bestie πŸ‘‘

πŸ¦‹ RETURN VALUES πŸ¦‹

Returns a single value β€” a transcoder. just the one, no bonus surprises, no cap ✨

🌸 EXAMPLES 🌸

here's the little demo and it ate, lowkey:

(transcoder-error-handling-mode (native-transcoder))
        => replace

see? replace. default error handling mode said "we move" πŸ’…

πŸ“ APPLICATION USAGE πŸ“

You don't just stare at the returned transcoder (as tempting as that is) β€” you pass it as an argument to various I/O procedures, like:

that's its whole job and it's doing it beautifully 🫢

πŸ’€ COMPATIBILITY πŸ’€

Transcoders are unique to the R6RS I/O system. so if you're on some other Scheme situation, this is not gonna vibe-check for you, sorry bestie 😭

πŸ”₯ ERRORS πŸ”₯

This procedure can raise exceptions with the following condition types:

  • &assertion (R6RS) β€” the wrong number of arguments was passed. you gave it an argument, it wanted none (or vice versa) and now we're all looking at each other πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • native-eol-style(3scm) β€” the sibling page, the eol icon itself, go show it some love πŸŽ€

⭐ STANDARDS ⭐

R6RS. that's the standard, periodt πŸ’œ

🌈 HISTORY 🌈

This procedure was introduced in R6RS as part of the reworked I/O system. so it's a glow-up baby, born in the great I/O rework ✨

🧚 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/. shoutout to the maintainers, they're the real main characters tbh 🫢


and that's the whole page bestie, no skip, no summary, every single detail intact, we ate and left no crumbs πŸ“

source / version: native-transcoder(3scm)  Β·  date: 2022-05-14 β€” mwah, signed off with love, go transcode something iconic πŸ’…πŸ’–

πŸ“¦ where this page comes from