tcl::tra...::spacer(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ NAME ✨

tcl::transform::spacer β€” bestie, it's all about inserting spaces and then taking them right back out. πŸ’«

(also hi, you're reading a page from the Reflected/virtual channel support manual, slay)


πŸŽ€ SYNOPSIS πŸŽ€

package require Tcl 8.6 9

package require tcl::transform::core ?1.1?

package require tcl::transform::spacer ?1.1?

::tcl::transform::spacer chan n ?space?

πŸ’– DESCRIPTION πŸ’–

So the tcl::transform::spacer package hands you a command that makes a channel transformation, okay? And what that transformation does is genuinely iconic: it adds spacing to the data written to it, and then it removes that same spacing from the data read from it. In and out. Symmetry. Periodt. πŸ¦‹

And ngl, the internal TclOO class doing the actual transform-handler work? It's a subclass of the tcl::transform::core framework. Family tree matters, iykyk. πŸ‘‘


🌸 API 🌸

  • ::tcl::transform::spacer chan n ?space? β€” this one right here creates a spacer transformation sitting on top of the channel chan, and it returns its handle back to you. 🫢

The space character sequence gets added every n bytes of data written, and on the read side the exact same thing happens but in reverse β€” the spacing gets removed. Full circle, no crumbs. ✨

And if you don't pass space? It just defaults to a single space character (ASCII 32). Chill of it. πŸ’…


πŸ’€ BUGS, IDEAS, FEEDBACK πŸ’€

Okay real talk, this document and the package it describes? They will undoubtedly contain bugs and other problems. Not a vibe, but it's the truth. So please report anything like that in the virtchannel category of the Tcllib Trackers over at http://core.tcl.tk/tcllib/reportlist. πŸ™ˆ

Also please send along any ideas for enhancements you might have β€” for either the package and/or the documentation. We want them. πŸ‘‘

If you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. That's the format, bestie. 🌈

And note further: attachments are strongly preferred over inlined patches. You can make an attachment by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. That's the whole trick. ⭐

πŸ”₯ KEYWORDS πŸ”₯

  • channel transformation
  • reflected channel
  • spacing
  • tip 230
  • transformation
  • virtual channel

πŸ‘‘ CATEGORY πŸ‘‘

Channels πŸ’…


Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>

okay that's the whole page, you ate it, love that for you 🧚 β€” this was tcllib, version 1.1, serving tcl::tra...::spacer(n) realness. byeee πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from