3 ms·
So I started playing with TCL for the first time this weekend after seeing this post, and here are my thoughts. I think the language is fun and much different t
by replwoacause 2y ago
So I started playing with TCL for the first time this weekend after seeing this post, and here are my thoughts. I think the language is fun and much different than I’m used to, but my biggest challenge so far is just getting packages installed. There seems to be no current, modern, maintained package manager or central repository, and to do basic stuff like stand up a web server requires compiling from C source. Kinda brutal. TclHttpd failed to compile with TCL 8.6 installed because I guess there was some change in APIs. I didn’t bother spending time figuring out how to patch the C code to make it work because that’s getting in for more than I bargained for.
It’s too bad there’s not a simple way to get up and running with packages because for me so far that had been the biggest barrier to entry / deterrent. Also, I wanted to create a ES256 JWT but there’s no good way to do that apparently, due to the dated ecosystem, whereas in other languages this sort of this is just a package install away. I found a third-party solution in the form of Chilkat software but it costs $300 to license.
So overall while I think TCL is fun, I can see why people don’t choose it when they want to be productive fast and not have to fuss around with deeply manual things that are commonplace and quick in other languages.
- cmacleod4 2y agoTake a look at http://www.ch-werner.de/LUCK.html http://www.ch-werner.de/LUCK.html . This site builds custom single-file Tcl executables for various architectures. It has a large selection of packages and you can choose which ones get included in the build. E.g if you select tclhttpd to be included in the build and name the output file tcluck, you can then start the web server by running: ./tcluck tcluck/tclhttpd3.5/bin/httpd.tcl This is still using Tcl8.6 though, it will take time for all these packages to be updated to work with Tcl9.0. I am actually running tclhttpd with Tcl9.0 myself, after making a handful of tweaks for compatibility.
- cmacleod4 2y agoI'm not familiar with JWT at all, but I found a description of how to generate an ES256 JWT from the command line: https://techdocs.akamai.com/iot-token-access-control/docs/generate-jwt-ecdsa-keys https://techdocs.akamai.com/iot-token-access-control/docs/ge... . I don't know if this would meet your needs, but from Tcl you could use `exec` to run these commands and read the result.
- replwoacause 2y agoThanks for sharing this. My preference is to do it all in Tcl without having to shell out, which is possible (and easy!) to do in most other languages.
- chillpenguin 2y agoIt's a valid concern. But I just want to point out that shelling out to other things is part of the "paradigm" when using a shell-like language. If you embrace this paradigm, you will better understand the style. Think of it like learning functional programming. You have to "embrace the paradigm" instead of just mutating things all the time like you might be used to in an imperative language.