random(3tcl)
π random β bestie edition π
okay so this is random(3tcl), from the memchan family of manual pages, and babes it's literally so fun. we're making a channel that spits out randomness. let's get into it π
β¨ NAME β¨
random β create and manipulate randomizer channels π
πΈ SYNOPSIS πΈ
package require Tcl
package require memchan
random
no cap, that's the whole vibe. you pull in Tcl, you pull in memchan, and then random shows up. slay. π
π¦ DESCRIPTION π¦
okay so here's the tea, bestie. random creates a random channel β and the way this thing works is genuinely iconic:
- everything you write into it gets absorbed π«§
- and that absorbed stuff gets used as a seed for a random number generator
- then that generator is what makes a random sequence of bytes whenever you read from the channel
so like. you pour words in, you get chaos out. main character energy fr fr β¨
and one thing you gotta know up front:
it is not possible to seek the channel. don't even try it. that's not a thing here. periodt. π
π OPTIONS π
Memory channels created by random provide one additional option to set or query. just one! a lil baby option. but it's important so pay attention bestie π
-delay ?milliseconds?β okay so a random channel is always writable and readable. sounds great right?? but it means all fileevent-handlers will fire continuously π to avoid starvation of other event sources, the events raised by this channel type have a configurable delay. this option is set in milliseconds and defaults to5. so like, if you don't say anything, it's5ms. that's the vibe check. π
π SEE ALSO π
go read these too, they're all part of the squad π«Ά
fifofifo2memchannullzero
β KEYWORDS β
channeli/oin-memory channelrandom
iykyk π
π COPYRIGHT π
Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
and that's the whole page bestie!! this was Memory channels, version 2.2, and the page itself is random(3tcl) β originally dated with the memchan 2.2 release. thank you for coming to my ted talk, mwah ππΈπ¦β¨ππ
π¦ where this page comes from
- debian trixie: tcl-memchan 2.3+dfsg-2
- ubuntu questing: tcl-memchan 2.3+dfsg-2
- ubuntu resolute: tcl-memchan 2.3+dfsg-2build1
- ubuntu stonking: tcl-memchan 2.3+dfsg-5
- Copyright (c) 2004 Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms