tcl::chan::null(3tcl)
tcl::chan::null π« (that's the 3tcl manual, bestie β Reflected/virtual channel support, you're in the right place)
okay so. bestie. imagine a channel that just... does not care. you write to it, it goes "mmhm π " and immediately forgets. that's this. iconic behaviour honestly.
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require TclOO
package require tcl::chan::events ?1.1?
package require tcl::chan::null ?1.1?
::tcl::chan::null
like yes those are five separate lines and yes you need the ones you need. the ?1.1? bits mean that version is optional-ish (it's the version you're asking for, and it'll give you at least that). π«Ά
πΈ DESCRIPTION πΈ
so the tcl::chan::null package hands you a command that makes null channels β and a null channel is a write-only channel that immediately forgets whatever you write to it. like, zero retention. no memory. it's giving "not my problem, didn't happen" energy and honestly? we stan. π
it does the same job as the null channels you get from the Memchan package β except this one is written in pure Tcl, not C. no cap.
but here's the tradeoff, and it's a real one, so pay attention:
Memchanis usable with Tcl 8.4 and before- this package needs Tcl 8.5 or higher, and it needs TclOO
fr fr, if you're stuck on ancient Tcl, this is not your girl. sorry bestie. π
the related packages in this little family are tcl::chan::zero and tcl::chan::nullzero β go say hi to them too, they're siblings. π
and for the iykyk crowd: the internal TclOO class that implements the channel handler is a sub-class of the tcl::chan::events framework. that's the whole structural tea. β
π API π
::tcl::chan::nullβ this command creates a brand new null channel and hands you back its handle. that's it. that's the whole API. one command, main character energy, periodt. β¨
π BUGS, IDEAS, FEEDBACK π
okay so, real talk: this document, and the package it describes, will undoubtedly contain bugs and other problems. not me being dramatic, that's just what the page says and it's honest. π
please report such things in the category virtchannel of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist.
also please report any ideas for enhancements you have for either the package and/or the documentation. we want them. bring them. π«Ά
if you're proposing code changes, please provide unified diffs β i.e. the output of diff -u.
also, note further: attachments are strongly preferred over inlined patches. you can attach stuff 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 lore. π§
π KEYWORDS π
/dev/null, null, reflected channel, tip 219, virtual channel
ποΈ CATEGORY ποΈ
Channels
π COPYRIGHT π
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
okay that's the whole page, bestie, you're free to go write into the void now π this was tcllib version 1.1, brought to you by the tcl::chan::null(3tcl) manual β catch you in the next one, mwah π
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- 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