tcl::chan::null(3tcl)

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

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:

  • Memchan is 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 (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