tcl::randomseed(3tcl)

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

🌸 tcl::randomseed β€” bestie's guide to random channels πŸ’…

okay so you found the tcl::randomseed(3tcl) page?? that's the Reflected/virtual channel support corner of the man pages and honestly? iconic. it's all about the lil utilities that help you seed tcl::chan::random channels. let's get into it 🫢


✨ NAME ✨

tcl::randomseed β€” utilities for random channels 🎲✨


πŸŽ€ SYNOPSIS πŸŽ€

package require Tcl 8.5 9

package require TclOO

package require tcl::randomseed ?1.1?

::tcl::randomseed

::tcl::combine seed1 seed2

πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::randomseed package is giving helper energy: it hands you a couple of utility commands that exist purely to help you with the seeding of tcl::chan::random channels. that's it. that's the whole vibe. no cap 🌈


πŸ‘‘ API πŸ‘‘

::tcl::randomseed

this command creates and returns a list of seed integers that are suitable as the seed argument for random channels. where do the numbers come from? bestie they're derived from the process id, the current time, and the Tcl random number generator. three sources, one slay little list πŸ’–

::tcl::combine seed1 seed2

this one takes two seed lists and combines them into a single list by XORing them elementwise, modulo 256. so if the lists are not of equal length, the shorter of the two gets padded with 0s before merging. shorter list stays in its lane, gets some zeros, everybody wins 🧚


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

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. that's just how it is sometimes 😭 please report such things in the category virtchannel of the Tcllib Trackers over at [http://core.tcl.tk/tcllib/reportlist](http://core.tcl.tk/tcllib/reportlist). and if you have ideas for enhancements for either the package and/or the documentation?? also report those. we love an idea girlie 🫢

when proposing code changes, please provide unified diffs, i.e the output of diff -u. fr fr, that's the format.

also, heads up: 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. iykyk πŸ’…


⭐ KEYWORDS ⭐

/dev/random, merge, random, reflected channel, seed, tip 219, virtual channel


🌈 CATEGORY 🌈

Channels


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


and that's the whole page bestie!! this lil slice of the man pages is from tcllib, version 1.1 β€” stay random, stay seeded πŸŽ€βœ¨

πŸ“¦ where this page comes from