tcl::chan::cat(n)
π± tcl::chan::cat β the concatenation channel, bestie π
okay so this is the man page for tcl::chan::cat, part of the Reflected/virtual channel support crew in Tcllib. it's giving "glue several channels together and pretend they're one" energy and honestly? iconic. β¨
β¨ 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...
like yes she needs Tcl 8.5 9, yes she needs TclOO (we love an OO girly), and yeah she's leaning on tcl::chan::core ?1.1? π«Ά
π DESCRIPTION π
so the tcl::chan::cat package hands you a command that makes concatenation channels. what's that? it's a channel that is non-seekable and it owns a whole list of subordinate channels, and it returns their contents in order, one after another, until every single one of them is exhausted. so basically the channel is the concatenation of the contents of all the sub-ordinate channels. no cap. π
β οΈ okay bestie, listen, this part matters: the created channels take ownership of the channels they were constructed with. whenever they've exhausted one of their channels, it gets closed. and same energy the other way β closing the cat channel will close all the sub-ordinates it still has. she's not borrowing your stuff, she's adopting it. π«Ά
the internal TclOO class that implements the channel handler is a sub-class of the tcl::chan::core framework. cute little family tree. πΈ
event handling? delegated to the currently active sub-channel. she's not doing it herself, she's passing the aux. π
π API π
::tcl::chan::cat chan...β this command creates the concatenation channel using all the channels you hand it, and returns its handle. that's it, that's the whole API, she's lowkey simple and we love that for her. β¨
π¦ BUGS, IDEAS, FEEDBACK π¦
ngl, this document and the package it describes will undoubtedly contain bugs and other problems. π please report them in the category virtchannel of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. and please also send any ideas for enhancements you may have for either the package and/or the documentation. we're listening fr fr. π
when you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. periodt. π
also note: attachments are strongly preferred over inlined patches. you can attach stuff by going to the Edit form of the ticket immediately after you create it, and then using the left-most button in the secondary navigation bar. iykyk. π
π KEYWORDS π
- concatenation channel
- reflected channel
- tip 219
- virtual channel
π CATEGORY π
Channels
π COPYRIGHT π
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page bestie, tysm for reading π this was tcllib, version 1.0.4, from the tcl::chan::cat(n) era of 2011 β slay, mwah π
β¨πΈ
π¦ 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) 2011 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