Jim development

What is the scope of this page

This page is used to coordinate development of Jim. In order to avoid duplication of work, this is a list of the core commands/features that are actually missing (both already implemented in Tcl or new). Please if you plan to contribute one command write a short note about it:


lsearch - DONE

 lsearch ?-exact|-glob|-regexp|-command 'command'? ?-bool|-inline? ?-not? ?-nocase? ?-all? list value

Note that unlike Tcl, -exact is the default

package - DONE

This is much simpler than Tcl. 'package require xyz' simply looks for xyz.tcl or xyz.so anywhere on $auto_path and loads the first one found.

To version a package, include it in the name.

source - DONE

string - DONE

clock - DONE

array - DONE

dict - DONE

Except with, incr, for, which probably won't be done.


This command will substitute the Tcl's binary command. This is more or less how it should work:

 struct get {
    version uint4n
    hdrlen uint4
    tos uint8
    totlen uint16
    id uint16
    flags uint3
    fragoff uint13
    srcaddr 4 uint8
    dstaddr uint32
    rest *
 } $binary

 struct set { } ... ...

struct get returns a dictionary, accordingly to the given structure. it's possible to specify a variable name, followed by a type specifier or by a number of elements + a type specifier (being the type specifier non numerical this is always determined). The special type * means "all the rest".

Struct set should work in a similar way, with exactly the same structure. so that it's possible, for example, to use struct get, modify some field because what we get is a dictionary, then use struct set to write the modified version of the binary data.

scan - DONE

format - DONE

try - DONE


Larry Smith Since Jim is a new implementation, it would be wonderful to tidy up one of the clumsier aspects of Tcl:

( and )

Equivalent to [ expr { <contents of ()> } ]

onleave Larry Smith Suggest "at_return" or "at-return"

This commands accumulate scripts to execute just before the current procedure is returning to the caller. Every new time onleave is called a script is accumulated. This scripts are executed in reverse order. If the command is called with an empty string as argument the current scritps list is cleared. If the command is called without arguments the current list of scripts registered is returned.

assigned to: Salvatore Sanfilippo

tailcall - DONE


Design in progress, it may resemble the Odys object system, but I've many changes in mind. The name will be obviously Josh, Jim Object System H?. What you expected from the guy that called the language Jim? - RS: How about JOE, Jim's Object Extension?


They will be for sure very different of Tcl's namespaces, i.e. designed to just resolve names collisions. Only one level of nesting. the dot as separator like in win32.beep. Ideally Jim namespaces should be similar in the simplicity of the concept to C's static qualifier.

Larry Smith Actually, the nesting namespaces are not that bad, they just have hard to read syntax. One of the more elegant features of Honeywell's Gecos 6 OS was their concept of "path expressions". The separator is ">" - and "<" is the equivalent of Unix's "..".

 in (namespace name) do {

example using a daughter namespace:

  in person do {
    set name Bob
    set occupation "town idiot"

...the "do" block could use the semantics of the "do...when" exception handler above.

Another, referring to something in a sibling namespace:

  in <family do {
    lappend members Bob

A path expression referring to the parent namespace:

  in < do {

A path expression referring to a daughter namespace within a sibling namespace:

  in <family>Mary do {
    set occupation "hairdresser"

Global namespace: >

  in >this>that>theother>thing do {

escargo 5 Oct 2005 - GCOS 6 got these from Multics. Unix reduced the number of characters required by using ., .., and / in pathnames. Also, the trick of using directories with . and .. in them made the notion match pretty well.