The Jim Interpreter一个Tcl编程语言,体积非常小。它实现了一个大型的Tcl子集,并增添了垃圾收集,关闭,内置的面向对象编程系统,功能编程命令,和一流的阵列。引用新功能所有解释器的可执行文件只有70KB大小,并可以进一步减少不包括一些命令。它是对脚本内现有的方案纳入适当的没有依赖性的嵌入式系统。
The Jim Interpreter 0.71更新日志:
Bugs fixed
Line editing works better on serial consoles Fix various parsing bugs and crashes in unusual cases package require now loads packages at the global level string trim* and string last are now 8-bit clean and faster exec child processes are now reaped FD_CLOEXEC is now set on opened filehandles dlopen() handles are now freed on freeing interpreter
Features added
Add optional support for the binary command Test suite is now tcltests v2 compatible proc ‘args’ can now be re">named Automatic proc upref args are now supported with &varname expr shorthand syntax with $(…) Previous proc definitions can be saved with local and invoked with upcall Non-greedy regexp/regsub support with the built-in regexp implementation Minimal exec implementation is supported even without vfork/waitpid
configure is now faster and simpler with autosetup (https://github.com/msteveb/autosetup) Add string byterange Ability to create a single source file bootstrap jimsh Added debian packaging support
安装说明:
$ git clone git://repo.or.cz/jimtcl.gitremote: Counting objects: 3703, done.remote: Compressing objects: 100% (907/907), done.remote: Total 3703 (delta 2715), reused 3703 (delta 2715)Recei
ving objects: 100% (3703/3703), 1.88 MiB | 437 KiB/s, done.Resolving deltas: 100% (2715/2715), done.
建立:
$ cd jimtcl/$ ./configurechecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... ...etc...$ makegcc -g -O2 ... -c -o jim-subcmd.o jim-subcmd.cgcc -g -O2 ... -c -o jim-interactive.o jim-interactive.cgcc -g -O2 ... -c -o jim-format.o jim-format.c...etc...
测试:
$ make test alias.test: Total 18 Passed 18 Skipped 0 Failed 0
array.test: Total 12 Passed 12 Skipped 0 Failed 0 case.test: Total 6 Passed 6 Skipped 0 Failed 0 concat.test: Total 16 Passed 16 Skipped 0 Failed 0 dict.test: Total 30 Passed 30 Skipped 0 Failed 0 error.test: Total 3 Passed 3 Skipped 0 Failed 0 event.test: Total 14 Passed 14 Skipped 0 Failed 0 exec.test: Total 75 Passed 75 Skipped 0 Failed 0 exec2.test: Total 6 Passed 6 Skipped 0 Failed 0 exists.test: Total 16 Passed 16 Skipped 0 Failed 0 expand.test: Total 4 Passed 4 Skipped 0 Failed 0...etc...
试用:
$ ./jimsh Welcome to Jim version 0.71.