tcl::chan::memchan(n)

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

πŸ’– tcl::chan::memchan(n) πŸ’–

okay bestie so this is the manual page for tcl::chan::memchan, from the Reflected/virtual channel support corner of the world 🌸 buckle up


✨ NAME ✨

tcl::chan::memchan β€” the in-memory channel, like a channel that just vibes in RAM and never touches your disk πŸ§ πŸ’…


🌈 SYNOPSIS 🌈

package require Tcl 8.5 9

package require TclOO

package require tcl::chan::events ?1.1?

package require tcl::chan::memchan ?1.0.5?

::tcl::chan::memchan

πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::chan::memchan package hands you a command that makes channels living purely in memory. no disk, no files, just vibes ✨ and they're random-access, meaning yes bestie they are seekable πŸ‘‘

this is basically equivalent to the memchan channels you'd get from the Memchan package β€” except that this one is written in pure Tcl, not C. the trade-off, and it's a real one so listen up: Memchan works with Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher, and TclOO. no cap. πŸ™ˆ

packages related to this one are tcl::chan::string and tcl::chan::variable 🫢

also fyi the internal TclOO class that implements the channel handler is a sub-class of the tcl::chan::events framework. iconic behavior honestly.


πŸ’… API πŸ’…

  • ::tcl::chan::memchan β€” this command creates a brand new memchan channel and returns its handle. that's it. that's the whole thing. she's simple, she's effective, she ate πŸ’–

😭 BUGS, IDEAS, FEEDBACK 😭

ngl this document, and the package it describes, will undoubtedly contain bugs and other problems. it's giving humble. so please report them in the category virtchannel of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist πŸ”₯

and please also report any ideas for enhancements you may have for either the package and/or the documentation β€” we want them, fr fr.

when proposing code changes, please provide unified diffs, i.e. the output of diff -u. this is not optional bestie, it's the whole thing.

also note further that attachments are strongly preferred over inlined patches ⭐ you can make an attachment 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 πŸ”₯

in-memory channel, reflected channel, tip 219, virtual channel


πŸŽ€ CATEGORY πŸŽ€

Channels


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


and that's the whole page babes 🫢 this one shipped as part of tcllib 1.0.5 in the tcl::chan::memchan(n) manual section β€” go make some memory channels, you're gonna slay πŸ’œβœ¨

πŸ“¦ where this page comes from