Version 0 of Jim Extensions

Updated 2005-04-03 06:52:36 by antirez

The following is a list of extensions available for Jim. Note that all the extensions are shipped directly with the core, so you will find they inside the Jim tar.gz ready to be compiled.


Ansi I/O

Goal: Pure ANSI/C file I/O capabilities, mainly useful for embedded systems or if you plan to use Jim in context where only an ANSI/C compiler may be assumed (for example to replace autoconf/automake with a Jim script).

Status: This extension is already usable, while not fully complete (the read subcommand is missing).

Platforms: tested under POSIX systems and win32.


Sqlite

Goal: To provide sqlite bindings. This extension exports a command-based interface to access the database (Tk alike), supports format-alike auto escape of special chars in queries, returns rows as lists of dicts so you in Jim it is possible to access row elements like this:

    . set res [$db query "SELECT * from tbl1"]
    {one hello! two 10} {one goodbye two 20}
    . foreach row $res {puts "One: $row(one), Two: $row(two)"}
    One: hello!, Two: 10
    One: goodbye, Two: 20

The subcommands supported are close, query, lastid, changes. It is possible to specify what string to use to represent SQL NULL.

Status: This lib is complete.

Platforms: tested under POSIX, should work under win32 without problems.


SDL

Goal: To provide SDL bindings for 2D graphics.

Status: this library is experimental, but some GLX primitive are supported. This is an example script:

 package require sdl

 set xres 200
 set yres 200
 set s [sdl.screen $xres $yres]

 set i 0
 while 1 {
     set x1 [rand $xres]
     set y1 [rand $yres]
     set x2 [rand $xres]
     set y2 [rand $yres]
     set rad [rand 40]
     set r [rand 256]
     set g [rand 256]
     set b [rand 256]
     $s fcircle $x1 $y1 $rad $r $g $b 100
     incr i
     if {$i > 2000} {$s flip}
     if {$i == 3000} exit
 }

That's the result: http://jim.berlios.de/jim-sdl-screenshot.png