The Jim Interpreter 0.72

A small footprint implementation of the Tcl programming language
Jim is an opensource small footprint implementation of the Tcl programming language. It implements a large subset of Tcl and adds new features like references with garbage collection, closures, built-in Object Oriented Programming system, Functional Programming commands, First class arrays. All this with a binary size of 70kb (that can be reduced further excluding some command).

This project is currently a work in progress, but most of the core language is already implemented and it is possible to use it to run many unmodified Tcl programs, so if you want to start to evaluate it, or want to look at our internal design and virtual

Jim's goal is to provide a powerful language implemented in roughly 10k lines of code that is presented as a single C file and an header file, in order to allow developers to put Jim inside their applications, as scripting language, configuration file syntax, without to depend on external libraries or other big systems.

We belive scripting is a very interesting feature for many applications, but developers are often not encouraged to link the application to a big external system. Jim try to address this problem providing a very simple to understand and small footprint implementation of a language that is ideal for scripting, and at the same time is powerful and able to scale.

Another field where Jim may help is the one of Embedded Systems. Jim is written in ANSI-C, is very little both in binary size and memory requirements, and the Tcl language is just ideal for this tasks (For example, CISCO routers are using Tcl).

This is how The Paul Graham's accumulator procedure looks like in Jim:

proc accumulator n {
lambda increment n {
set n [+ $n $increment]

· Math operations as commands (together with expr support).
· Ability to load extensions at runtime via a STUB system. Even programs using Jim that are linked statically are able to load extensions.
· 70Kbyte binary size!.

Main features:

  • Support for important features that will be availabe in Tcl8.5, like dict and {expand}.
  • Arrays in Jim aren't collection of variables like in Tcl, but a first class type. Array access syntax is in Jim syntax sugar to set and get dictionaries elements.
  • A compact design. Jim is currently less than 10k lines of code. It does a heavy use of dual ported objects, in Jim even the VM pseudo-bytecode is a specialized Jim_Obj type.
  • lambda with garbage collection, and a reference system to build linked data structures.
  • closures, Jim's procedures can have persistent procedure-specific variables (called statics). Statics initialization value can be caputred form the procedure creation context, so it is very similar to lexical scoping to use.

last updated on:
October 8th, 2011, 23:32 GMT
developed by:
license type:
The Apache License 2.0 
ROOT \ Programming \ Interpreters
The Jim Interpreter
Download Button

In a hurry? Add it to your Download Basket!

user rating 16



Rate it!
What's New in This Release:
  • This version adds much-improved mingw32 support (including fully-implemented exec), adds bugfixes, improves documentation, adds a new metakit extension, and makes the SDL extension work again.
read full changelog

Add your review!