tcl::c...emchan(3tcl)

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

✨ tcl::chan::memchan β€” the manual page (3tcl) ✨

okay bestie, welcome to the tcl::chan::memchan page πŸ’– this one lives under Reflected/virtual channel support, and we're about to make in-memory channels make sense. no cap.


πŸŽ€ NAME πŸŽ€

tcl::chan::memchan β€” it's giving In-memory channel energy πŸ’…


🌸 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

like, yes, that's a lot of package require lines. it's fine. she's thorough 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::chan::memchan package hands you a command that makes channels which literally live purely in memory ✨ no files, no disk, just vibes.

these channels do random-access, meaning they're seekable. so you can jump around in them like it's nothing.

here's the tea β˜•: this is equivalent to the memchan channels that the Memchan package gives you β€” except that this one is written in pure Tcl, not C. flip side tho: Memchan works with Tcl 8.4 and before, whereas this package needs Tcl 8.5 or higher, plus TclOO. periodt.

the related packages in this little friend group are tcl::chan::string and tcl::chan::variable πŸ‘‘

and the internal TclOO class doing all the channel-handler work is a sub-class of the tcl::chan::events framework. main character inheriting from another main character, we love to see it πŸ’œ


πŸ’… API πŸ’…

  • ::tcl::chan::memchan β€” this command creates a brand new memchan channel and hands you back its handle. that's it, that's the whole job, and she does it flawlessly ✨

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

ngl, this document and the package it describes will undoubtedly contain bugs and other problems 😭 that's just how it is. please report them in the category virtchannel of the Tcllib Trackers: http://core.tcl.tk/tcllib/reportlist

also pls report any ideas for enhancements you have for either the package and/or the documentation 🫢 we want them.

when you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. no freestyle.

also, heads up bestie: attachments are strongly preferred over inlined patches. you can attach stuff by going to the Edit form of the ticket immediately after creating it, 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, bestie πŸŽ€ this came to you straight from tcllib, version 1.0.5, and yes we're citing it properly because credit is non-negotiable around here πŸ’… slay, go make some in-memory channels, and remember: seekable and unbothered βœ¨πŸ¦‹

πŸ“¦ where this page comes from