tcl::tra...::spacer(n)
β¨ 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 transformationreflected channelspacingtip 230transformationvirtual channel
π CATEGORY π
Channels π
π COPYRIGHT π
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
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms