tcl::c...:string(3tcl)

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

πŸ’– tcl::chan::string β€” bestie edition πŸ’–

okay so this is the man page for tcl::chan::string, straight outta section 3tcl of the tcllib docs (the manual page name is literally tcl::c...:string(3tcl), which is giving "my name got truncated by a terminal in 1998" energy but we move πŸ’…).


✨ NAME ✨

tcl::chan::string β€” a read-only in-memory channel. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

package require Tcl 8.5 9

package require TclOO

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

package require tcl::chan::string ?1.0.4?

::tcl::chan::string content

πŸ¦‹ DESCRIPTION πŸ¦‹

so the tcl::chan::string package hands you a command that makes channels which live purely in memory ✨. no files, no sockets, no drama, just vibes in RAM.

these channels give you random-access, meaning they are seekable β€” you can jump around in them like it's a playlist and not a cassette tape, bestie. πŸ”₯

BUT. here's the plot twist πŸ‘€ β€” unlike the channels that tcl::chan::memchan makes, these ones are read-only. their content gets handed over at the time of construction, and after that it is immutable. you cannot change it. not one character. it's set in stone, it's canon, it's periodt. πŸ’€

other packages in this friend group: tcl::chan::memchan and tcl::chan::variable. 🫢

the internal TclOO class doing the actual channel-handler work is a sub-class of the tcl::chan::events framework. slay, inheritance. πŸ‘‘


πŸ’… API πŸ’…

  • ::tcl::chan::string content β€” makes you a brand new string channel and gives you back its handle πŸŽ€. the channel then serves up random read-only access to the content string. that's the whole deal, no cap.

😭 BUGS, IDEAS, FEEDBACK 😭

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. it's giving "we're all just doing our best". πŸ™ˆ

please report those in the category virtchannel of the Tcllib Trackers over at:

http://core.tcl.tk/tcllib/reportlist

also pls pls pls send any ideas you have for enhancements to either the package and/or the documentation. we love a glow-up suggestion πŸ’–.

when you're proposing code changes, bring unified diffs, i.e. the output of diff -u. fr fr.

and one more thing β€” attachments are strongly preferred over inlined patches. you can attach stuff by going to the Edit form of the ticket right after you create it, 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 Andreas Kupries <andreas_kupries@users.sourceforge.net>


okay bestie that's the whole page 🫢 this was tcllib, version 1.0.4, chillin' in section 3tcl β€” go forth and make your in-memory read-only channels, you absolute main character βœ¨πŸ’–πŸŒΈ

πŸ“¦ where this page comes from