[HN Gopher] Critcl - C Runtime in Tcl
___________________________________________________________________
Critcl - C Runtime in Tcl
Author : ofalkaed
Score : 21 points
Date : 2025-08-03 19:58 UTC (3 hours ago)
(HTM) web link (andreas-kupries.github.io)
(TXT) w3m dump (andreas-kupries.github.io)
| forinti wrote:
| I suppose you would use this to do low level stuff because it's
| much harder to do in TCL, but it just doesn't feel right.
|
| It makes more sense to me to embed Tk into a C program.
| ofalkaed wrote:
| 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.
| NelsonMinar wrote:
| Still in active development, or at least maintenance.
| https://github.com/andreas-kupries/critcl/commits/master/
| ofalkaed wrote:
| 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.
| bb01100100 wrote:
| 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.
|
| [1] https://github.com/msteveb/jimtcl [2] https://wiki.tcl-
| lang.org/page/speed+up+clock+format+and+clo...
___________________________________________________________________
(page generated 2025-08-03 23:00 UTC)