critcl(3tcl)

πŸ’– critcl β€” Introduction To CriTcl πŸ’–

okay bestie, welcome to the C Runtime In Tcl β€” short and sweet: CriTcl πŸŽ€ β€” a whole system for embedding and using C code from inside your Tcl scripts. Yes. From Tcl. Like, your Tcl script can just… have C in it. Iconic behaviour, honestly. This is critcl(3tcl), the intro page, and I'm gonna walk you through it like we're texting at 1am. πŸ¦‹


✨ DESCRIPTION ✨

Be welcome to the C Runtime In Tcl (short: CriTcl), a system for embedding and using C code from within Tcl scripts.

Adding C code to Tcl/Tk has never been easier. fr fr.

  • Improve performance by rewriting the performance bottlenecks in C. πŸ’…
  • Import the functionality of shared libraries into Tcl scripts. πŸ”₯
the Tcl and Tk homes live at http://core.tcl-lang.org/tcl and http://core.tcl-lang.org/tk β€” those are the links the original page points you to, no cap.

🌸 HISTORY & MOTIVATION 🌸

CriTcl started life as an experiment by Jean-Claude Wippler and was a self-contained Tcl package to build C code into a Tcl/Tk extension on the fly. It was somewhat inspired by Brian Ingerson's Inline for Perl, but is considerably more lightweight. πŸ’«

It's for the last 5% to 10% when pure Tcl, which does go a long way, is not sufficient anymore. I.e. for:

  1. when the last bits of performance are needed,
  2. access to 3rd party libraries,
  3. hiding critical pieces of your library or application, and
  4. simply needing features provided only by C.

🧚 OVERVIEW 🧚

To make the reader's topics of interest easy to find, this documentation is roughly organized by Quadrants (the Divio thing, at https://documentation.divio.com/), i.e.

                   | Study           | Work
     ----------- + --------------- + -----------------
     Practical   | Tutorials       | How-To Guides
                   | (Learning)      | (Problem solving)
     ----------- + --------------- + -----------------
     Theoretical | Explanations    | References
                   | (Understanding) | (Knowledge)
Note: At this point in time the documentation consists mainly of references, and a few how-to guides. Tutorials and Explanations are in need of expansion, this is planned. 🫢

πŸ‘‘ KNOWN USERS πŸ‘‘

like… the whole friend group showed up. πŸ’œ


πŸ’… TUTORIALS - PRACTICAL STUDY - TO LEARN πŸ’…

This section is currently empty. 😭 (it's giving "we'll get to it")


πŸ¦‹ EXPLANATIONS - THEORETICAL KNOWLEDGE - TO UNDERSTAND πŸ¦‹

This section is currently empty. 😭 (same energy)


πŸŽ€ HOW-TO GUIDES - PRACTICAL WORK - TO SOLVE PROBLEMS πŸŽ€

  1. How To Get The CriTcl Sources.
  2. How To Install CriTcl.
  3. How To Use CriTcl - A light introduction through examples.
  4. NEW: How To Adapt Critcl Packages for Tcl 9.

⭐ REFERENCES - THEORETICAL WORK - TO GAIN KNOWLEGDE ⭐

  1. The CriTcl License
  2. CriTcl Releases & Changes
  3. CriTcl Application Reference
  4. CriTcl Package Reference
  5. CriTcl cproc Type Reference
  6. CriTcl - Utilities
  7. CriTcl - C-level Utilities
  8. CriTcl - C-level Callback Utilities
  9. CriTcl - Wrap Support - String/Integer mapping
  10. CriTcl - Wrap Support - Bitset en- and decoding
  11. CriTcl - Wrap Support - Enum en- and decoding
  12. CriTcl - Code Gen - Constant string pools
  13. CriTcl - Code Gen - Tcl Interp Associations
  14. CriTcl - Code Gen - C Classes
  15. CriTcl Application Package Reference
  16. Guide To The CriTcl Internals

🌈 AUTHORS 🌈

Jean Claude Wippler, Steve Landers, Andreas Kupries. the OGs. πŸ‘‘


πŸ™ˆ BUGS, IDEAS, FEEDBACK πŸ™ˆ

This document, and the package it describes, will undoubtedly contain bugs and other problems. bestie, of course it will. Please report them at https://github.com/andreas-kupries/critcl/issues. Ideas for enhancements you may have for either package, application, and/or the documentation are also very welcome and should be reported at https://github.com/andreas-kupries/critcl/issues as well. 🫢


πŸ’– KEYWORDS πŸ’–

C code, Embedded C Code, calling C code from Tcl, code generator, compile & run, compiler, dynamic code generation, dynamic compilation, generate package, linker, on demand compilation, on-the-fly compilation


πŸ”₯ CATEGORY πŸ”₯

Glueing/Embedded C code


Copyright (c) Jean-Claude Wippler Copyright (c) Steve Landers Copyright (c) 2011-2024 Andreas Kupries


and that's the whole page, bestie, we ate and left no crumbs πŸ’…βœ¨ β€” this one's from the CriTcl docs, section 3tcl, version 3.3.1, rendered as doc, and yeah the copyright runs all the way to 2024 so it's still very much alive and thriving πŸ¦‹πŸŒΈπŸ’œ

πŸ“¦ where this page comes from