I was doing some looping recently with tcl and comparing against another implementation (called Jim [1], a very cool project in its own right) and wondered why datetime formatting was so slow when using `clock format`.
The code at [2] provided an alternative approach using C via critcl. It was interesting to see how malleable tcl can be.
I don't think it needs much development at this point, it is stable, all it needs to do is keep up with Tcl/Tk development. I just started playing with it two days ago so I might be missing some of its flaws but so far it seems quite mature.
Any chance you can elaborate on your use case? Part of why I submitted this is because I am not completely sure on when it is wise to use, I can see situations where it is clearly useful but things get fuzzy rather quickly.
Are you the monetus who used to post on the pd forums? If so, thanks, I have found some of my answers in threads which you contributed too and probably provided the solution too.
Depends on how much C you need, it might make more sense to write a proper Tcl extension and it might make sense to just embed Tcl/Tk but having this middle ground is nice because swinging to the fences is rarely the best course of action.
Critcl looks to be quite nice in those situations when Tcl/Tk is almost but not quite, you get the speed and ease of Tcl/Tk but a little more as well. The big gotcha looks to be having the foresight of identifying when writing a proper Tcl/Tk extension or switching language is the better plan, but this is almost always the big gotcha.
TCL is popular for automated scripting, and is still quite popular with "expect" and "autoexpect" package users. The key feature is opening a remote scripted or interactive ssh session, and running setup/install commands admins would otherwise have to type in thousands of times a month (or worse, leave sensitive information/CSR on short lived host nodes.)
Being able to compile ephemeral objects is actually pretty useful in some use-cases. =3
The code at [2] provided an alternative approach using C via critcl. It was interesting to see how malleable tcl can be.
[1] https://github.com/msteveb/jimtcl [2] https://wiki.tcl-lang.org/page/speed+up+clock+format+and+clo...
Are you the monetus who used to post on the pd forums? If so, thanks, I have found some of my answers in threads which you contributed too and probably provided the solution too.
It makes more sense to me to embed Tk into a C program.
Critcl looks to be quite nice in those situations when Tcl/Tk is almost but not quite, you get the speed and ease of Tcl/Tk but a little more as well. The big gotcha looks to be having the foresight of identifying when writing a proper Tcl/Tk extension or switching language is the better plan, but this is almost always the big gotcha.
Being able to compile ephemeral objects is actually pretty useful in some use-cases. =3