Jim Tcl
Timeline
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

50 most recent check-ins that include changes to files matching 'examples/*'

2023-02-25
00:00
build: appveyor: support different libssl version

Use wildcards when packaging libssl in case the version changes.

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: 5257f2d41e user: steveb@workware.net.au tags: trunk

2023-02-13
00:44
redis: Add -async support

Supports communication with redis as part of an event loop

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 93c0eab09d user: steveb@workware.net.au tags: trunk,

00:44
vwait -signal docs and test script

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: c283d26146 user: steveb@workware.net.au tags: trunk,

2022-08-21
03:44
docs: update for 0.81+

Document changes since 0.81 and add documentation for new filename return for sockets.

Internal version is now 0.82 in preparation for (eventual) 0.82 release.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 740547f453 user: steveb@workware.net.au tags: trunk,

2022-08-20
05:25
oo: better object construction

Now a default constructor is created, as an alias for defaultconstrutor. The constructor is passed the arguments to new and by default this accepts a dictionary that is checked for valid instance variables and sets them.

However the constructor can be replaced by one that takes arbitrary arguments. Thus we can how have:

a new -optiona -optionb

And the constructor is invoked with arguments '-optiona -optionab'.

This makes object initialisation more flexible.

** Note: This is an incompatible change if you have classes with a constructor and you create object instances with new <dict>.

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Documentation fixes - Co-authored-by: Adrian Ho <the.gromgit@gmail.com> check-in: e90a015520 user: steveb@workware.net.au tags: trunk,

2022-07-25
12:45
examples/redis-pubsub.tcl: better error handling

More gracefully handle errors, e.g. the redis server going away in line with how a real client would do this.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9f0baf740f user: steveb@workware.net.au tags: trunk,

2022-05-16
22:34
jim-redis: Add support for -type

For retrieving type information of return values.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 15cf3a2677 user: steveb@workware.net.au tags: trunk,

2022-02-23
02:30
aio: gets: Improve behaviour for non-blocking streams

Previously calling gets on a non-blocking stream could easily result in a partial line. Now if a partial line is read, return zero/empty to indicate that nothing is available while storing the partial line. The next call to gets (typically within a readable script) will continue appending to the previous partial line until a complete line can be returned.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 81b26a6587 user: steveb@workware.net.au tags: trunk,

2021-11-28
00:39
build: update appveyor version number

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: 4e470a5e50 user: steveb@workware.net.au tags: trunk

2021-01-10
05:19
jcov, jtime, jtrace: fix not removing callback check-in: 15be64893a user: steveb@workware.net.au tags: trunk,
2021-01-09
01:06
jimdb: A command line Jim debugger using xtrace

Also add some additional tools that use xtrace.

examples/jcov - code coverage examples/jtime - code coverage that measures execution time examples/jtrace - trace script execution

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: ca7bb2659b user: steveb@workware.net.au tags: trunk,

2021-01-06
03:07
configure: Add --allextmod option

To build all non-default extensions as modules if prerequisites are met.

Also move the extension help out of the main help since it is quite long and show it with --extinfo. Now extension help is generated from $extdb to avoid the help and the module configuration becoming out of sync.

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: 22ff3326d5 user: steveb@workware.net.au tags: trunk

2021-01-01
06:59
sdl: Add basic text support

Requires a truetype font file

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: ab6230c961 user: steveb@workware.net.au tags: trunk,

06:54
Add examples/sdlevents.tcl

Add example of integrating SDL event loop and the Tcl event loop

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9aff900db9 user: steveb@workware.net.au tags: trunk,

06:54
sdl: convert to using jim-subcmd

And add: - poll ?script? - optional window title

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: e6ddc2b9e2 user: steveb@workware.net.au tags: trunk,

06:54
sdl: Add support for SDL2

Now we only support using pkg-config to find SDL, and prefer SDL2 over SDL. For compatibility between versions, the render surface is now cleared on flip. And closing the window now results in a JIM_EXIT return code from flip. Also supports [sdl clear] to clear the background to a given colour.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 76f737d2a9 user: steveb@workware.net.au tags: trunk,

2020-11-15
10:05
redis: Add simple redis client extension

Using the hiredis client library. Synchronous API only.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 88f83e3cee user: steveb@workware.net.au tags: trunk,

2020-10-31
22:46
build: Fix the appveyor build

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: b4017a73cb user: steveb@workware.net.au tags: trunk

2020-05-06
01:22
aio: ssl: Allow SNI to be specified

For some SSL connections it is necessary to set the Server Name Indication in the connection in order to receive the correct certificate. Allow this as part of the client ssl call with:

$sock ssl -sni $servername

Also for -server mode, allow the certificate and private key to be stored in a single file and only be specified once.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: ea0ecbd6b5 user: steveb@workware.net.au tags: trunk,

2019-11-29
22:14
string map and string compare now support embedded nulls

Reported-by: dbohdan <dbohdan@dbohdan.com> Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: 959e476b93 user: steveb@workware.net.au tags: trunk

2019-11-14
23:02
Update ssl cert to use a 4096 bit key

Keep newer libssl happy

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 8a80086767 user: steveb@workware.net.au tags: trunk,

2019-07-01
01:14
aio: Add dgram unix socket support

Also add support for sockname and peername And remove unix domain sockets when the socket is closed And generally clean up the socket support

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: b56b7f5fe3 user: steveb@workware.net.au tags: trunk,

01:14
Jim_SubstObj: Add an assertion if ref count is zero

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: c28b844655 user: steveb@workware.net.au tags: trunk

2018-07-05
03:02
expr: Fix compiler warning on older gcc

jim/jim.c: In function ‘SetExprFromAny’: jim/jim.c:9109:16: error: ‘top’ may be used uninitialized in this function [-Werror=maybe-uninitialized] expr->expr = top; ^ jim/jim.c:9075:25: note: ‘top’ was declared here struct JimExprNode *top;

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: c9b57c7b2b user: steveb@workware.net.au tags: trunk

2017-10-21
02:49
doc: Update remaining references to os.wait

Now simply 'wait'

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 6f79baf755 user: steveb@workware.net.au tags: trunk

2017-09-22
03:53
scan: make some structure members const

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: f859e0f23f user: steveb@workware.net.au tags: trunk

2017-09-21
06:40
examples/tip.tcl: Use 'writable' when sending output

Avoids situations where the output might block

Signed-off-by: Steve Bennett <steveb@workware.net.au> Leaf check-in: d0d277697e user: steveb@workware.net.au tags: trunk

2017-09-15
02:11
history: Add autocompletion support

With 'history completion <cmd>'

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: bc78c3f08b user: steveb@workware.net.au tags: trunk

2017-04-07
01:10
Fix / command: divide by zero

Avoid exception on integer divided by zero

Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 336ea380dd user: steveb@workware.net.au tags: trunk

2016-10-26
09:44
examples/tip.tcl: Gracefully handle serial port being removed

e.g. a usb-serial port

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 7a2fd47ecc user: steveb@workware.net.au tags: trunk

2016-10-18
21:51
examples/tip.tcl: Lock the device

Prevent multiple access to a serial port by using locking. This is probably compatible with most serial port locking on Linux. Perhaps on macosx.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 1fee3f3a61 user: steveb@workware.net.au tags: trunk

2016-10-01
23:27
exec: ensure closed fd is -1

Reported-by: Evan Hunter <evan@ozhiker.com> Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 9875bbacf5 user: steveb@workware.net.au tags: trunk

2016-09-09
07:38
Add examples/tip.tcl

Example of using the aio termios support

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 2fe943d23f user: steveb@workware.net.au tags: trunk

2016-03-27
01:01
oo: constructor, unknown and bug fixes

- Added support for constructor, runs on new object creation - Added support for "unknown" method - Rename some dispatch variables (add double underscore) to avoid collision with user variables

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 963dac2427 user: steveb@workware.net.au tags: trunk

2016-02-01
05:52
aio: fix aio ssl support

The following changes were not merged: - commit examples/{certificate,key}.pem - return AioFile from JimMakeChannel to allow ssl-specific settings to be set - improve examples/ssl.{client,server} so they work out-of-the-box

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 15b5a5e47c user: steveb@workware.net.au tags: trunk

00:47
aio: add OpenSSL/LibreSSL bindings.

Example usage:

set s [socket stream.server 127.0.0.1:8443] set c [[$s accept] ssl -server certificate.pem key.pem] puts [$c gets]
check-in: 20a4f95d5a user: steveb@workware.net.au tags: trunk
2014-08-31
22:07
aio: optional argument addrvar for accept. check-in: 827f994363 user: steveb@workware.net.au tags: trunk
2013-11-11
10:40
Enhance examples/jtclsh.tcl

Now uses [info complete] to support continuations. Includes error code indication

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 57bd16f950 user: steveb@workware.net.au tags: trunk

2013-08-01
22:44
Correct file handler should be deleted

Previously, Jim_DeleteFileHandler() would indiscriminately delete the first matching file handler in the list. Instead, it should delete the file handler matching the event mask.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 1f044b688f user: steveb@workware.net.au tags: trunk

2012-02-14
00:40
Update examples/dns.tcl to match tcllib

Now that Jim Tcl supports namespaces, dns.tcl from tcllib can be used with very few changes.

Revert as much as possible to the original tcllib version in order to better show the differences between Jim Tcl and big Tcl.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: b2ebaab3c5 user: steveb@workware.net.au tags: trunk

2011-12-12
03:44
Add support for lightweight namespaces

See README.namespaces

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 0cfefd0727 user: steveb@workware.net.au tags: trunk

2011-12-09
03:52
Add support for lightweight namespaces

Disabled by default. See README.namespaces Leaf check-in: e5471a7e79 user: steveb@workware.net.au tags: namespace

02:10
Add the history command

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 3e2ad39c1d user: steveb@workware.net.au tags: trunk

2011-12-01
10:22
Initial implementation of lightweight namespaces check-in: 474e65133a user: steveb tags: namespace
2011-11-30
02:14
examples/udp.client needs buffering none

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 6bcd1324d5 user: steveb@workware.net.au tags: trunk

2011-11-29
21:51
Fix the poor-man's 'variable' in dns.tcl

Redefining upvar links is no longer allowed

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 6a5242f193 user: steveb@workware.net.au tags: trunk

2011-11-10
05:37
Remove non-website content from the www branch check-in: f4a305b177 user: steveb tags: www
2011-09-26
05:01
Class vars should take precedence

...over baseclass vars.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 75fe014d27 user: steveb@workware.net.au tags: trunk

2011-09-24
04:55
Restucture jim-aio for less duplication of code

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: fd7935e7d6 user: steveb@workware.net.au tags: trunk

2011-08-31
02:15
Add examples of Metakit usage to examples/metakit.tcl check-in: 70810ebd13 user: steveb@workware.net.au tags: trunk