tcl::chan::cat(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– tcl::chan::cat β€” bestie edition πŸ’–

okay so this is the manual page for tcl::chan::cat, straight out of the Reflected/virtual channel support corner of the Tcllib docs, and honestly? it's giving concatenation channel. sit down, grab a boba, we're doing this. πŸ§‹βœ¨


✨ NAME ✨

tcl::chan::cat β€” Concatenation channel. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

package require Tcl 8.5 9

package require TclOO

package require tcl::chan::core ?1.1?

package require tcl::chan::cat ?1.0.4?

::tcl::chan::cat chan...

no cap, that's the whole incantation. πŸͺ„


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::chan::cat package hands you a command that makes concatenation channels. what's that? it's a channel that's non-seekable (so like, no rewinding, bestie, we move forward only πŸšΆβ™€οΈ) and it owns a list of subordinate channels, and it just serves up their contents in order, one after the other, until they're all exhausted. so the channel is literally the concatenation of everything its sub-ordinate channels contain. it's a glow-up of a chain. πŸ‘‘

⚠️ heads up, and this part is important: the created channels take ownership of the channels they were constructed with. the moment they exhaust one of their channels, it gets closed. and same energy the other way β€” if you close the cat channel, it closes all the sub-ordinates it still has. no take-backs. 🫣

the internal TclOO class doing the actual channel-handler work is a sub-class of the tcl::chan::core framework. fancy family tree, slay. 🌳

and event handling? that gets delegated to whichever sub-channel is currently active. it's not doing the most, it's just passing the aux. 🎧


πŸ’œ API πŸ’œ

  • ::tcl::chan::cat chan... β€” this is the one. it creates the concatenation channel out of all the channels you pass in, and returns its handle. that's it. that's the whole command. iconic behaviour, honestly. 🫢

😭 BUGS, IDEAS, FEEDBACK 😭

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. it's not a flaw, it's a personality trait. πŸ’€

please report them in the category virtchannel of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist. and while you're there β€” got ideas for enhancements for either the package and/or the documentation? report those too, we love a glow-up suggestion. ✨

when you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. no vibes-based patches, we need the receipts. πŸ“„

also note, fr fr: attachments are strongly preferred over inlined patches. you make an attachment by going to the Edit form of the ticket right after its creation, and then using the left-most button in the secondary navigation bar. yes, that one. go get it. πŸ‘ˆ


πŸŽ€ KEYWORDS πŸŽ€

  • concatenation channel
  • reflected channel
  • tip 219
  • virtual channel

iykyk. πŸ’…


🌈 CATEGORY 🌈

Channels


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


okay that's the whole page, you're officially educated bestie πŸŽ“πŸ’– this was tcllib version 1.0.4, page tcl::chan::cat(3tcl) β€” go forth and concatenate responsibly. periodt. πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from