4 ms·
Maybe Tcl does recursion poorly — those all seem to be tiny recursive functions. Maybe there was something Tcl did well? https://web.archive.org/web/200609240
by igouy 7y ago
Maybe Tcl does recursion poorly — those all seem to be tiny recursive functions.
Maybe there was something Tcl did well?
https://web.archive.org/web/20060924085254/http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=all https://web.archive.org/web/20060924085254/http://shootout.a...
- databasher 7y agoTCL had an amazing architecture for someone who was working in C. In C, you'd (1) create an instance of a TCL interpreter, (2) register your C functions with the TCL interpreter, and then (3) load scripts into the TCL interpreter. You'd do all your fast stuff in your C code, and just use the TCL for stitching together the high-level logic.
- pinopinopino 7y agoThis, it is really easy to embed the tcl interpreter. Far easier than perl and python, even easier than lua.
- lanstin 7y agoEspecially the commands were invoked command_name(argv, argc) and the thing was just like a CS 101 C program. Dead simple, and as they mentioned just used to orchestrate the fast stuff. You shouldn't make a command block a long time, but you could grab a handle to the output destination and set it up to stream output there from the C.