tcl::tr...imitsize(n)

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

πŸ’– tcl::transform::limitsize(n) β€” Reflected/virtual channel support πŸ’–

okay bestie so this one's from the tcllib manual pages, section n (that's the Tcl command section, iykyk), and it lives under the whole reflected/virtual channel support umbrella. it's called tcl::transform::limitsize, and it's all about limiting input. like, capping it. putting a little fence around your bytes. πŸŽ€


✨ NAME ✨

tcl::transform::limitsize β€” limiting input 🚧


🌸 SYNOPSIS 🌸

package require Tcl 8.6 9

package require tcl::transform::core ?1.1?

package require tcl::transform::limitsize ?1.1?

::tcl::transform::limitsize chan max

no cap, that's the whole vibe check right there πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::transform::limitsize package hands you a command that builds a channel transformation. and what does that transformation do? it limits the number of characters which can be read from the channel. that's it. that's the whole job. it's basically a generator for an artificial EOF β€” a little fake "okay we're done here bestie, nothing more to see" at the exact point you chose. 😭✨

and for the tech girlies who need to know: the internal TclOO class that implements the transform handler is a subclass of the tcl::transform::core framework. so it's part of the family, it inherits the drip, periodt. πŸ‘‘


πŸ’… API πŸ’…

  • ::tcl::transform::limitsize chan max β€” this command creates a size limiting transformation on top of the channel chan and returns its handle. yes, it gives you back a handle, hold onto it, it's your main character.

max is the number of bytes which can be read from the channel before EOF is signaled by the transformation.

⚠️ heads up bestie: note that popping the transformation clears the EOF it generated as well. so like, don't pop it and then be surprised when the EOF is just… gone. πŸ™ˆ

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

ngl this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving humble honesty, we love that for us. 🫢

please report such in the category virtchannel of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist](http://core.tcl.tk/tcllib/reportlist). please also report any ideas for enhancements you may have for either the package and/or the documentation. we want the ideas, bestie, drop them in. πŸ’Œ

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

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. yes, the left-most one. the leftmost. πŸ‘ˆ


πŸŽ€ KEYWORDS πŸŽ€

channel transformation, limitsize, reflected channel, size limit, tip 230, transformation, virtual channel


🌈 CATEGORY 🌈

Channels


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


and that's the whole page, bestie β€” this one came to you from tcllib, version 1.1, and it's the tcl::tr...imitsize(n) page, so if you see it truncated in your terminal with those little dots in the middle, that's just the manpage index doing its thing, the real name is tcl::transform::limitsize πŸ’–βœ¨ go forth and limit some input, you absolute icon πŸ¦‹

πŸ“¦ where this page comes from