diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README | 32 | ||||
-rw-r--r-- | bench.tcl | 6 | ||||
-rw-r--r-- | jim.c | 15 | ||||
-rw-r--r-- | tools/benchtable.tcl | 3 |
5 files changed, 51 insertions, 7 deletions
@@ -16,7 +16,7 @@ SHELL = /bin/sh RM = rm -f LDFLAGS = $(PROFILE) -CFLAGS = -Wall -Wwrite-strings -W -O2 -g $(PROFILE) +CFLAGS = -Wall -Wwrite-strings -W -Os -g $(PROFILE) AR = /usr/bin/ar RANLIB = /usr/bin/ranlib LIBPATH =-L. @@ -178,6 +178,30 @@ All Rights Reserved See the License for the specific language governing permissions and limitations under the License. +-------------------------------------------------------------------------------- +HISTORY +-------------------------------------------------------------------------------- + +"first Jim goal: to vent my need to hack on Tcl." + +And actually this is exactly why I started Jim, in the first days +of Jenuary 2005. After a month of hacking Jim was able to run +simple scripts, now, after two months it started to be clear to +me that it was not just the next toy to throw away but something +that may evolve into a real interpreter. In the same time +Pat Thoyts and Clemens Hintze started to contribute code, so that +the development of new core commands was faster, and also more +people hacking on the same code had as result fixes in the API, +C macros, and so on. + +Currently we are at the point that the core interpreter is nearly +done. There is to add some more core command, to do a code review +to ensure quality of all the parts and to write documentation. + +The next step will be to start key extensions like OOP, event loop, +I/O, networking, regexp, ..., and to end the extensions already +available: win32, win32com, posix. + ------------------------------------------------------------------------------ Thanks to... ------------------------------------------------------------------------------ @@ -193,3 +217,11 @@ Thanks to... problems with [load] on this arch, 64bit tests. - The authors of "valgrind", for this wonderful tool, that helped me a lot to fix bugs in minutes instead of hours. + + +---- +Enjoy! +Salvatore Sanfilippo +10 Mar 2005 + + @@ -4,7 +4,7 @@ set benchmarks {} proc bench {title script} { global benchmarks batchmode - set Title [string range "$title [string repeat " " 20]" 0 20] + set Title [string range "$title " 0 20] set failed [catch {time $script} res] if {$failed} { @@ -13,8 +13,8 @@ proc bench {title script} { } else { set t [lindex $res 0] lappend benchmarks $title $t - set ts "[string repeat " " 10]$t" - set ts [string range $ts end-10 end] + set ts " $t" + set ts [string range $ts [expr {[string length $ts]-10}] end] if {!$batchmode} {puts "$Title -$ts microseconds per iteration"} } } @@ -1,7 +1,7 @@ /* Jim - A small embeddable Tcl interpreter * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * - * $Id: jim.c,v 1.85 2005/03/09 11:06:42 antirez Exp $ + * $Id: jim.c,v 1.86 2005/03/10 10:03:32 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -9590,6 +9590,18 @@ static int Jim_FormatCoreCommand(Jim_Interp *interp, int argc, return JIM_OK; } +/* [error] */ +static int Jim_ErrorCoreCommand(Jim_Interp *interp, int argc, + Jim_Obj *const *argv) +{ + if (argc != 2) { + Jim_WrongNumArgs(interp, 1, argv, "message"); + return JIM_ERR; + } + Jim_SetResult(interp, argv[1]); + return JIM_ERR; +} + static struct { const char *name; Jim_CmdProc cmdProc; @@ -9642,6 +9654,7 @@ static struct { {"split", Jim_SplitCoreCommand}, {"join", Jim_JoinCoreCommand}, {"format", Jim_FormatCoreCommand}, + {"error", Jim_ErrorCoreCommand}, {NULL, NULL}, }; diff --git a/tools/benchtable.tcl b/tools/benchtable.tcl index 0e47006..e853f61 100644 --- a/tools/benchtable.tcl +++ b/tools/benchtable.tcl @@ -4,7 +4,7 @@ # # Copyright (C) 2005 Pat Thoyts <patthoyts@users.sourceforge.net> # -# $Id: benchtable.tcl,v 1.1 2005/03/09 11:57:50 patthoyts Exp $ +# $Id: benchtable.tcl,v 1.2 2005/03/10 10:03:32 antirez Exp $ proc main {filename} { set versions {} @@ -45,4 +45,3 @@ if {!$tcl_interactive} { puts $res exit $r } -
\ No newline at end of file |