tcl::chan::random(n)
β¨ tcl::chan::random β bestie edition β¨
okay so real quick, the manual name for this one is Reflected/virtual channel support, and it's a tcl::chan::random(n) page π it lives in tcllib and it's all about making a channel that just... generates random characters forever. iconic behavior honestly.
π NAME π
tcl::chan::random β Random channel π²β¨
π¦ SYNOPSIS π¦
package require Tcl 8.5 9
package require TclOO
package require tcl::chan::events ?1.1?
package require tcl::chan::random ?1.1?
::tcl::chan::random seed
π DESCRIPTION π
The tcl::chan::random package hands you a command that creates random channels β meaning read-only channels that, upon reading, return an infinite stream of pseudo-random characters. no cap, infinite. it just keeps going π
This is giving very similar energy to the random channels you'd get from the package Memchan, except:
- this one is written in pure Tcl, not C π«Ά
- it uses a much simpler generator as well π
- but flip side: Memchan works with Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher, and TclOO π (no TclOO, no vibes)
The internal TclOO class that implements the channel handler is a sub-class of the tcl::chan::events framework. it's giving family tree π§
π API π
::tcl::chan::randomseed β this command creates a new random channel and returns its handle. the seed is a list of integer numbers used to initialize the internal feedback shift register of the generator. yes bestie, a whole feedback shift register, it's that serious π
π BUGS, IDEAS, FEEDBACK π
ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. like, obviously. please report those in the category virtchannel of the Tcllib Trackers: [http://core.tcl.tk/tcllib/reportlist]. also please report any ideas for enhancements you may have for either the package and/or the documentation β we wanna hear it π«Ά
When proposing code changes, please provide unified diffs, i.e. the output of diff -u. that's the format, bestie, respect it β¨
Note further that attachments are strongly preferred over inlined patches. attachments can be made 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. iykyk π
π₯ KEYWORDS π₯
/dev/random, random, 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, periodt πΈ this was tcllib version 1.1 of the tcl::chan::random(n) man page β go make some infinite random characters, you've got this π¦β¨
π¦ 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