3 ms·
I highly recommend The Tcl Programming Language: A Comprehensive Guide: https://www.magicsplat.com/ttpl/index.html https://www.magicsplat.com/ttpl/index.html
by bandoti 1y ago
I highly recommend The Tcl Programming Language: A Comprehensive Guide:
https://www.magicsplat.com/ttpl/index.html https://www.magicsplat.com/ttpl/index.html
For those who are not aware, Tcl is actually part of standard Python distribution through TKinter.
There are many things Tcl has built in that are quite amazing, like a robust virtual filesystem support, reflective channels, and less known these days Starpacks (stand alone runtime) that bundle sources with the binary.
I am current working on bringing back kitcreator for an AI project that uses Tcl as a scripting environment over llama.cpp.
https://github.com/tclmonster/kitcreator https://github.com/tclmonster/kitcreator
Roy Keene is the original author, and has done some really clever stuff here, like encrypting the VFS appended to the executable. I added compression to this. It provides some manner of obfuscating sources.
And actually, I am also working on using tohil to compile a static Python and load it as a Tcl extension, with the goal to have standalone Python applications bundled with their sources and completely loadable from within the VFS. This will provide a means to bundle TKinter with a “frozen” Python app.
https://github.com/tclmonster/tohil https://github.com/tclmonster/tohil
- 7thaccount 1y agoThe previous edition of that book is the one I read lol. A great book. You can really feel the author's love of the language.
- sph 1y agoThank you and GP for the recommendation, just bought the book, seems pretty good! Now I wonder whether it's a good idea to replace my shell with tclsh... seems a lot more sane than bash/zsh.
- 7thaccount 1y agoBash is pretty good for really small scripts. Anything bigger and I have reached for Perl, Python, or Tcl in the past ... depending on what IT had installed on the server.
- bandoti 1y agoDefinitely would be interesting to use it in that way! The nice thing about Tcl is the syntax is clean (in brevity and understanding). Basic features like piping, file globbing, encoding conversions, compression, and so-forth are intuitive. If you’re interested, I have various Tclkits available for download on GitHub. I have added dependencies to them like TLS for HTTPS and so-forth. It can be convenient to have them standalone; the TLS extension here is bundled with the ca certs from libcurl. https://github.com/tclmonster/kitcreator/releases/latest https://github.com/tclmonster/kitcreator/releases/latest And here’s an example how I use the kits in the CI build. It uses the kit it builds to push the update using the TLS extension along with the GitHub REST API: https://github.com/tclmonster/kitcreator/blob/main/.github/scripts/create-release.tcl https://github.com/tclmonster/kitcreator/blob/main/.github/s...