platform::shell(3tcl)

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

πŸ’– platform::shell β€” the vibe check for other Tcl shells πŸ’–

okay so bestie, this page lives in the Tcl Bundled Packages corner of the manual, section 3tcl, and the whole package is literally called platform::shell. It's the "System identification support code and utilities" situation, and no cap it's kinda iconic for what it does.


✨ SYNOPSIS ✨

package require platform::shell ?1.1.4?

platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell

🌸 DESCRIPTION 🌸

The platform::shell package hands you several utility commands that are very useful for figuring out the architecture of one specific Tcl shell. Like, not the shell you're in β€” a whole other one. πŸ¦‹

Here's the tea: this package lets you identify the architecture of a Tcl shell that is different from the shell currently running the package. The only requirement (the bare minimum, the absolute lowest bar) is that the other shell β€” the one you point at by its path β€” is actually executable on the machine you're on right now. That's it. That's the whole ask. πŸ’…

And yeah, on most platforms the architecture of the shell you're interrogating turns out to be identical to the architecture of the shell you're running in. But bestie, that is not generally true, and I need you to sit with that for a sec. πŸ™ˆ

The counter example (the classic one, the one everyone brings up): platforms that have both 32 and 64 bit variants, where a 64bit system is perfectly capable of running 32bit code. In those cases the running shell and the interrogated shell can have different 32/64 bit settings, and therefore totally different identifiers. Not the same vibe at all. 😭

Why do we even care? For applications like a code repository, it's genuinely important to identify the architecture of the shell that will actually run the installed packages, versus the architecture of the shell that's out here running the repository software. Two different jobs, two different shells, and you need to know which is which. πŸ”₯


πŸ‘‘ COMMANDS πŸ‘‘

  • platform::shell::identify shell β€” Does the same identification as platform::identify, except it does it for the specified Tcl shell instead of the running shell. Same energy, different target. ✨
  • platform::shell::generic shell β€” Does the same identification as platform::generic, but again, for the specified Tcl shell rather than the running shell. πŸŽ€
  • platform::shell::platform shell β€” Returns the contents of tcl_platform(platform) for the specified Tcl shell. That's it, that's the whole function, and it ate. ⭐

🌈 KEYWORDS 🌈

operating system, cpu architecture, platform, architecture


k bye bestie, this was platform::shell version 1.1.4, from the Tcl Bundled Packages manual, page platform::shell(3tcl) β€” mwah, go identify some shells πŸ’œπŸ«Ά

πŸ“¦ where this page comes from