tcl::chan::null(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

tcl::chan::null πŸ’–

ok so bestie, welcome to the tcl::chan::null(n) page β€” it lives in the Reflected/virtual channel support corner of the tcllib manual, and it's literally the chillest little channel package you'll ever meet. let's get into it πŸŽ€


✨ NAME ✨

tcl::chan::null β€” a null channel. that's it. that's the vibe. πŸ•³οΈ


🌸 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, you need Tcl 8.5 or 9, and you need TclOO, no negotiating πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::chan::null package gives you a command that makes null channels β€” and a null channel is a write-only channel that immediately forgets whatever you write to it. you write, it's gone, no cap. it's the "post it in the group chat at 3am" of channels 🫢

this is the same behaviour as the null channels from the Memchan package, EXCEPT that this one is written in pure Tcl, not C. so like, trade-offs bestie: on the other hand, Memchan works with Tcl 8.4 and before, whereas this package needs Tcl 8.5 or higher, and TclOO. pick your fighter 😀

related packages, if you wanna go down the rabbit hole: tcl::chan::zero and tcl::chan::nullzero. πŸ’–

also fyi the internal TclOO class that implements the channel handler is a sub-class of the tcl::chan::events framework. so it's got the whole event architecture underneath, it's giving main character with a solid support system ✨


πŸ‘‘ API πŸ‘‘

  • ::tcl::chan::null β€” this command creates a brand new null channel and hands you back its handle. that's the whole API bestie, go forth and write into the void πŸ•³οΈπŸ’œ

πŸ’€ BUGS, IDEAS, FEEDBACK πŸ’€

ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving "we're all just doing our best". so please report them in the category virtchannel of the Tcllib Trackers:

http://core.tcl.tk/tcllib/reportlist

and please also report any ideas for enhancements you may have for either the package and/or the documentation. we love ideas, we eat them up πŸ“

when proposing code changes, please provide unified diffs, i.e the output of diff -u. yes literally that.

also note β€” and this is important, don't skip it πŸ™ˆ β€” attachments are strongly preferred over inlined patches. you 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 one. click it. πŸ’…


⭐ KEYWORDS ⭐

/dev/null, null, reflected channel, tip 219, virtual channel


🌈 CATEGORY 🌈

Channels


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

ok that's the whole page bestie!! you ate πŸ’– this was tcllib version 1.1, documented under the name tcl::chan::null(n), and it's giving absolutely immaculate null-channel energy. periodt. βœ¨πŸ¦‹πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from