Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Official repository of Jim Tcl, an open-source, small footprint implementation of Tcl

License

NotificationsYou must be signed in to change notification settings

msteveb/jimtcl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Jim InterpreterA small-footprint implementation of the Tcl programming language.--------------------------------------------------------------------------------WHAT IS JIM?--------------------------------------------------------------------------------Jim is a small footprint implementation of the Tcl programming languagewritten from scratch. Currently Jim Tcl is very feature complete withan extensive test suite (see the tests directory).There are some Tcl commands and features which are not implemented(and likely never will be), including traces and Tk. However,Jim Tcl offers a number of both Tcl8.5 and Tcl8.6 features ({*}, dict, lassign,tailcall and optional UTF-8 support) and some unique features.These unique features include [lambda] with garbage collection, a general GC/referencessystem, arrays as syntax sugar for [dict]tionaries, object-based I/O and more.Other common features of the Tcl programming language are present, likethe "everything is a string" behaviour, implemented internally asdual ported objects to ensure that the execution time does not reflectthe semantic of the language :)--------------------------------------------------------------------------------WHEN JIM CAN BE USEFUL?--------------------------------------------------------------------------------1) Jim provides the ability to write scriptable applications without needingto link your application with a big system. You can include the Jim source directly in your project and use the Jim API to write the glue code that makes your application scriptable in Jim, with the following advantages:- Jim is not the next "little language", but it's a Tcl implementation.  You can reuse your knowledge if you already have Tcl skills, or enjoy  the availability of documentation, books, web resources, ...  (for example check my online Tcl book athttp://www.invece.org/tclwise)- Jim is simple with 14k lines of core code. If you want to adapt it you can hack  the source code to meet the needs of your application. It makes you  able to have scripting by default, and avoid external dependencies.  Having scripting support *inside*, and in a way that a given version  of your program always gets shipped with the given version of Jim, you can  write part of your application in Jim itself. This is similar to Emacs/Elisp  or Gimp/Scheme, where both of these applications have the interpreter inside. - Jim is Tcl, and Tcl looks like a configuration file if you want. So  if you use Jim you also have a flexible syntax for your config file.  This is a valid Tcl script:     set MyFeature on     ifssl {       set SslPort 45000       use compression     }  It looks like a configuration file, but if you implement the [ifssl]  and [use] commands, it's a valid Tcl script.- Tcl scales with the user. Not all know it, but Tcl is so powerful that  you can reprogram the language in itself. Jim support this feature  of the Tcl programming language. You can write new control structures, and  use the flexible data types it offers (Lists are a central data structure,  with Dictionaries that are also lists). Still, Tcl is simpler for the  casual programmer, especially when compared to other languages offering  small footprint implementations (like Scheme and FORTH).- Because of the Tcl semantic (pass by value, everything is a command  since there are no reserved words), there is a nice API to glue  your application with Jim. See under the Jim Tcl manual for more detail.- Jim is supported. If you need commercial software, contact the original author  at 'antirez@gmail.com' or the current maintainer at 'steveb@workware.net.au'.2) The other "field" where Jim can be useful is obviously embedded systems.3) We are working to make Jim as feature-complete as possible. Thanks to   dynamically loaded extensions it may stay as small as it is today   but able to do interesting things for you. So it's possible that   in the future Jim will be an option as a general purpose language.   But don't worry, there is already the mainstream Tcl implementation   for this :).--------------------------------------------------------------------------------HOW BIG IS IT?--------------------------------------------------------------------------------Jim with the default extensions configured and compiled with -Os is about 130k.Without any extensions, it is about 85k.--------------------------------------------------------------------------------HOW FAST IS IT?--------------------------------------------------------------------------------Jim is, in most code, faster than Tcl7.6p2 (latest 7.x version),and slower than Tcl 8.4.x. You can expect pretty decent performancefor such a little interpreter.If you want a more precise measure, there is 'bench.tcl' inside thisdistribution that will run both under Jim and Tcl, so just executeit with both the interpreters and see what you get :)--------------------------------------------------------------------------------HOW TO COMPILE--------------------------------------------------------------------------------Jim was tested under Linux, FreeBSD, MacosX, eCos, QNX, Windows XP (mingw, MVC).To compile Jim itself try:  ./configure  make--------------------------------------------------------------------------------EXTENSIONS--------------------------------------------------------------------------------Many optional extensions are included. Some are C extensions and others are pure Tcl.Form more information, try:  ./configure --help--------------------------------------------------------------------------------HOW TO EMBED JIM INTO APPLICATIONS--------------------------------------------------------------------------------See the "examples.api" directory--------------------------------------------------------------------------------HOW TO WRITE EXTENSIONS FOR JIM--------------------------------------------------------------------------------See the extensions shipped with Jim, jim-readline.c, jim-clock.c, glob.tcl and oo.tcl--------------------------------------------------------------------------------COPYRIGHT and LICENSE--------------------------------------------------------------------------------Unless explicitly stated, all files within Jim repository are releasedunder following license:/* Jim - A small embeddable Tcl interpreter * * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net> * Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com * Copyright 2008 Andrew Lunn <andrew@lunn.ch> * Copyright 2008 Duane Ellis <openocd@duaneellis.com> * Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de> * Copyright 2008 Steve Bennett <steveb@workware.net.au> * Copyright 2009 Nico Coesel <ncoesel@dealogic.nl> * Copyright 2009 Zachary T Welch zw@superlucidity.net * Copyright 2009 David Brownell * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above *    copyright notice, this list of conditions and the following *    disclaimer in the documentation and/or other materials *    provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * JIM TCL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation * are those of the authors and should not be interpreted as representing * official policies, either expressed or implied, of the Jim Tcl Project. */--------------------------------------------------------------------------------HISTORY--------------------------------------------------------------------------------"first Jim goal: to vent my need to hack on Tcl."And actually this is exactly why I started Jim, in the first daysof January 2005. After a month of hacking Jim was able to runsimple scripts, now, after two months it started to be clear tome that it was not just the next toy to throw away but somethingthat may evolve into a real interpreter. In the same timePat Thoyts and Clemens Hintze started to contribute code, so thatthe development of new core commands was faster, and also morepeople 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 almost finishedand it is entering the Beta stage. There is to add some other core command,to do a code review to ensure quality of all the parts and to writedocumentation.We already started to work on extensions like OOP, event loop,I/O, networking, regexp. Some extensions are already ready forprime time, like the Sqlite extension and the ANSI I/O.------------------------------------------------------------------------------Thanks to...------------------------------------------------------------------------------- First of all, thanks to every guy that are listed in the AUTHORS file,  that directly helped with code and ideas. Also check the ChangeLog  file for additional credits about patches or bug reports.- Elisa Manara that helped me to select this ill conceived name for  an interpreter.- Many people on the Tclers Chat that helped me to explore issues  about the use and the implementation of the Tcl programming language.- David Welton for the tech info sharing and our chats about  programming languages design and the ability of software to "scale down".- Martin S. Weber for the great help with Solaris issues, debugging of  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 Sanfilippo10 Mar 2005

About

Official repository of Jim Tcl, an open-source, small footprint implementation of Tcl

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp