Jim Tcl version 0.78

ANNOUNCE: Jim Tcl version 0.78

Jim Tcl 0.78 has been released and is available from:

http://repo.or.cz/w/jimtcl.git or https://github.com/msteveb/jimtcl

Find out all about Jim Tcl at http://jim.tcl.tk/

CHANGES SINCE VERSION 0.77

This release contains some bug fixes plus a number of additional features. A summary is below. See git for the full changelog.

Thanks to everyone who contributed to this release.

Bugs fixed in version 0.78

  • local - Fix crash when local command is deleted
  • history - When creating ~/.jim_history, set permissions to 0600 for security
  • exec - Fix windows exec with empty or unset env
  • exec - Fix check for | and |&
  • jim.c - Fix Object leak in zlib support
  • signal - Restore default signal handling on interp exit
  • dict - Fix [dict values] with duplicate values
  • Fix ‘/’ command, divide by zero
  • expr - Replace expression engine to fix a number of problems
  • zlib - Various fixes
  • lsort -unique - Fix case with no duplicates
  • aio tempname - Fix a crash when the template is invalid
  • Tcl compatibility - Error on extra characters after close brace
  • eventloop - Return from callback is not an error
  • oo - Fix methods for superclasses
  • Various refcount and edge case fixes found by fuzz testing

Features added in version 0.78

  • Add support for utf-8 wide characters
  • aio - Add tty for termios settings
  • aio - Add sockopt for broadcast, tcp_nodelay, etc.
  • utf-8 - Update UnicodeData.txt to 9.0.0
  • jimsh - Add support for jimsh -
  • jimsh - Scriptable command-line completion support via tcl::autocomplete
  • history - Add autocompletion support history completion <cmd>
  • Add support for -commands to many commands
  • Add pkg-config support - jimtcl.pc
  • clock - Add -gmt option to format and scan
  • tree - Allow nodes to be deleted
  • defer, $jim::defer - Allow scripts to run on proc exit
  • eventloop - Support sub-millisecond timer resolution
  • Support lambda even if references are disabled
  • Performance - Improve a number of common cases through caching
  • signal, exec, wait, pid, pipe - Many improvements
  • build - Support --silent-rules, and enable by default
  • regexp - Implement class shorthand escapes in brackets
  • linenoise (jimsh) - Add ^Z (SUSP) support
  • linenoise (jismh) - Update to support multiline mode

Other changes

  • signal - Remove the signal command from child interpreters
  • os.wait is now wait
  • aio ssl now upgrades the current channel rather than creating a new channel
  • Update autosetup to v0.6.8

Steve Bennett (steveb@workware.net.au)

Comments >>>

Jim Tcl version 0.77

ANNOUNCE: Jim Tcl version 0.77

Jim Tcl 0.77 has been released and is available from:

http://repo.or.cz/w/jimtcl.git or https://github.com/msteveb/jimtcl

Find out all about Jim Tcl at http://jim.tcl.tk/

CHANGES SINCE VERSION 0.76

This release contains some bug fixes plus a number of additional features. A summary is below. See git for the full changelog.

Thanks to everyone who contributed to this release.

Bugs fixed in version 0.77

  • exec - better handline of pipeline abnormal termination
  • exec - fix append redirection on Windows
  • regsub - fix substitution with trailing backslash
  • expr - improved mathfunc handling and pow/**
  • chained tailcalls were not always being run

Features added in version 0.77

  • Add support for configure --docdir=...
  • Add support for jimsh --help
  • Add support for booleans in string is and expressions (true, false, on, off, yes, no)
  • aio - add sync, openssl bindings, posix locking
  • expr - add support for atan2, hypot and fmod
  • regexp, regsub:
    • Add support for \D, \W and \S
    • Add partial support for \A, \Z
    • Add support for all character classes: [[::blank:]], [[::xdigit::]], etc.
  • Update included sqlite3 to v3.14.1
  • Add $tcl_platform(engine)
  • Add basic (optional) zlib support
  • Add interp child interprester support
  • oo:
    • Add support for constructor, runs on new object creation
    • Add support for unknown method
  • Add Travis and AppVeyor continuous integration support
  • Use pkg-config in configure to find packages if possibe

Steve Bennett (steveb@workware.net.au)

Comments >>>

Jim Tcl version 0.76

ANNOUNCE: Jim Tcl version 0.76

Jim Tcl 0.76 has been released and is available from:

http://repo.or.cz/w/jimtcl.git or https://github.com/msteveb/jimtcl

Find out all about Jim Tcl at http://jim.tcl.tk/

CHANGES SINCE VERSION 0.75

This release contains some bug fixes plus a number of additional features. A summary is below. See git for the full changelog.

Thanks to everyone who contributed to this release.

Bugs fixed in version 0.76

  • file - fix stat file size for large files
  • array - avoid crash on unset variable
  • exec, file` - set umask before mkstemp
  • file copy - use binary mode when reading and writing files (Windows)
  • glob - work when intermediate dirs are not readable, and other fixes
  • aio - fix conflict between onexception and writable
  • namespace - restore namespace import support
  • alias - don’t rely on internal list never shimmering
  • Fix various minor problems reported by coverity
  • Fix info nameofexecutable after cd

Features added in version 0.76

  • exec, file - respect $TMPDIR
  • aio - optional argument addrvar for accept.
  • string - implement string cat (TIP #429)
  • file - add support for file link
  • info - add support for info source ?filename line?
  • Better script validation (e.g. missing trailing brackets)
  • Install tcltest compatibility package

Compatiblity

  • Some invalid scripts will now throw an error rather than silently executing
  • glob is more Tcl-compatible with respect to -directory and -tails, so may affect some scripts
  • The output of errorInfo has changed from "Runtime Error: <file>:<line>: ..." to "<file>:<line>: Error: ..."

Steve Bennett (steveb@workware.net.au)

Comments >>>

Jim Tcl version 0.75

ANNOUNCE: Jim Tcl version 0.75

Jim Tcl 0.75 has been released and is available from:

http://repo.or.cz/w/jimtcl.git or https://github.com/msteveb/jimtcl

Find out all about Jim Tcl at http://jim.tcl.tk/

CHANGES SINCE VERSION 0.74

This release contains some bug fixes plus a number of additional features. A summary is below. See git for the full changelog.

Thanks to everyone who contributed to this release.

Bugs fixed in version 0.75

  • eventloop - Correct file handler should be deleted
  • eventloop - Fix memory management of aio event handlers
  • local - Requires at least one argument
  • exec - Support nulls in exec immediate redirection
  • binary - More compliant with Tcl
  • aio - Fix aio recvfrom for non-inet socket
  • Fix string tolower buffer overflow for non-utf8
  • jimsh - consider scripts with trailing backslash as unfinished
  • Properly respect backslashes in comments
  • Avoid infinite recursion with namespace import
  • Fix dict/list shimmering with embedded nulls
  • Fix aio close from non-global namespace
  • tailcall should resolve command in current namespace
  • errors caught by catch shouldn`t affect later stacktrace
  • tailcall: properly merge tailcall frames
  • exec: fix reaping of detached processes
  • clock: handle case of format string too long
  • format: fix format %hd on some platforms
  • jim.c: fix some dict/list shimmering issues

Features added in version 0.75

  • binary, pack and unpack now support floating point
  • file copy -force handles source and target as the same file
  • format now supports %b for binary conversion
  • lsort now supports -unique and -real
  • Add support for half-close with aio close ?r|w?
  • Add socket pair for a bidirectional pipe
  • Add –random-hash to randomise hash tables for greater security
  • dict now supports for, values, incr, append, lappend, update, info and replace
  • file stat no longer requires the variable name

Compatiblity

  • The deprecated case command has been removed

Steve Bennett (steveb@workware.net.au)

Comments >>>

Binary Cheatsheet

I have been using Tcl for years, but I still need to lookup the manual every time I use binary format and binary scan. If you are like me, you will find this cheatsheet a handy reference.

Endian      
Little Big Host Type Notes
a     byte string format pads with nulls
A     byte string format pads with spaces, scan strips trailing spaces/nulls
b B   binary digits  
h H   hex digits  
c     8 bit integer list In other words, ASCII chars
s S t 16 bit integer list  
i I n 32 bit integer list  
w W m 64 bit integer list  
r R f single prec. float list  
q Q d double prec. float list  
x     null bytes count is number of bytes
X     move cursor back count is number of bytes to back up
@     move cursor to location count is byte position, zero based

Examples

set bin [binary format I2sH2a* {0x123 0x456} 17 ab "testing"]

# This returns 4 (number of conversions)
binary scan $bin I2sH2a* intlist intval hexval str

Steve Bennett (steveb@workware.net.au)

Comments >>>

Jim Tcl version 0.74

ANNOUNCE: Jim Tcl version 0.74

Jim Tcl 0.74 has been released and is available from:

http://repo.or.cz/w/jimtcl.git or https://github.com/msteveb/jimtcl

Find out all about Jim Tcl at http://jim.tcl.tk/

CHANGES SINCE VERSION 0.73

This release is mostly a bug fix release with some performance enhancements and a few small additional features. A summary is below. See git for the full changelog.

Thanks to everyone who contributed to this release.

Bugs fixed in version 0.74

  • Space allocated for exec envenvironment may be one byte short
  • Fix glob with patterns containing spaces, [ and ]
  • Sense of fconfigure -blocking is reversed
  • subst -noc should substitute vars inside brackets
  • Fix a reference counting bug
  • Fix invalid memory reference during finalisers
  • Fix an invalid memory reference in info references
  • Fix a buffer overflow in info references
  • Ensure that the full ref is passed to finalizer
  • Fix conversion of numbers >= 2^31
  • Fix binary scan for too-few bytes.
  • Fix bug that was causing the system environ variable to be freed
  • Fix a linenoise bug when moving off the left
  • Fix linenoise serial console window size for vt102
  • Fix a bug in the sqlite3 module (array index out of bounds)
  • Fix string replace replacing a single char

Features added in version 0.74

  • Add support for aio isatty
  • Remove octal literals with a leading 0 (http://www.tcl.tk/cgi-bin/tct/tip/114.html)
  • Add support for glob -directory
  • Allow abbreviations to glob options
  • Ensure that signals can break vwait
  • Allow aio copyto and aio read to copy >2GB
  • aio seek and aio tell should allow for 64 bit offsets
  • Add support for string equal -length and string compare -length

Performance Improvements

Thanks in large part to Lauri Kasanen, performance of Jim Tcl has improved by up to 20% in some areas compared to version 0.73.

    Executable Size     +1%
          PI digits     -4%
    [for] busy loop       .
       [local] loop       .
  [while] busy loop     -1%
                ary    -10%
         ary [dict]    -20%
       ary [static]     -1%
       dynamic code     -3%
dynamic code (list)       .
             expand     -1%
      fibonacci(25)     +1%
           heapsort     -4%
             mandel     -9%
         mini loops       .
       nested loops       .
             repeat       .
             rotate       .
              sieve    -20%
       sieve [dict]    -20%
              upvar    -16%
   wiki.tcl.tk/8566       .

Steve Bennett (steveb@workware.net.au)

Comments >>>

See All News Articles »