tcl::chan::zero(n)
π tcl::chan::zero(n) π
Reflected/virtual channel support β yes bestie, we're in the Tcllib tcl::chan::zero(n) page, and it's lowkey iconic β¨
π NAME π
tcl::chan::zero β Zero channel. That's it, that's the name, it's giving minimal and we respect it π
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require TclOO
package require tcl::chan::events ?1.1?
package require tcl::chan::zero ?1.1?
::tcl::chan::zero
π¦ DESCRIPTION π¦
Okay so, the tcl::chan::zero package hands you a command that makes zero channels. And what is a zero channel, you ask? It's a read-only channel that, when you read from it, just gives you an infinite stream of null characters. Forever. Endless. No cap, it will never run out π«Ά
It's basically the same deal as the zero channels that the package Memchan gives you β except this one is written in pure Tcl, not C. Which, slay, but also: the tradeoff is real. Memchan works with Tcl 8.4 and before, whereas this package needs Tcl 8.5 or higher, plus TclOO. So if you're on ancient Tcl, bestie, this one isn't gonna work out π
Packages related to this one: tcl::chan::null and tcl::chan::nullzero. Siblings! Family! We love a cohesive little ecosystem πΈ
And for the lore girlies: the internal TclOO class that implements the channel handler is a sub-class of the tcl::chan::events framework. It's giving inheritance, it's giving main character energy π
π API π
::tcl::chan::zeroβ this command creates a brand new zero channel and returns its handle. That's the whole vibe. Call it, get a handle, go read your infinite nulls π
π BUGS, IDEAS, FEEDBACK π
This document, and the package it describes, will undoubtedly contain bugs and other problems.
Yes, they said it themselves, and honestly? Respect for the honesty. If you find something cursed, please report it in the category virtchannel of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. Ideas for enhancements β for either the package and/or the docs β are also extremely welcome, so don't be shy π₯°
When you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. That's the format they want, fr fr.
Also important: attachments are strongly preferred over inlined patches. How do you attach? Go to the Edit form of the ticket immediately after its creation, and then use the left-most button in the secondary navigation bar. Boom, attached, you're a legend β
π₯ KEYWORDS π₯
/dev/zero, reflected channel, tip 219, virtual channel, zero
π CATEGORY π
Channels
π COPYRIGHT π
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
And that's the whole page, bestie! This little beauty is from tcllib, version 1.1, dated with the manpage tag tcl::chan::zero(n) β so go forth and read your infinite nulls responsibly π
β¨π
π¦ 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) 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