Version 61 of TclTalk

Updated 2007-01-16 13:20:48 by tb

An interactive learning tool and development environment for Tcl/Tk

 What:        tcltalk.kit
 Where:       http://tcltalk.ath.cx:8090/
              or for the impatient: http://tcltalk.ath.cx/pub
 Description: A beginner's learning tool (or teaching tool?)
              and development environment for Tcl/Tk.
 Updated:     1/2007
 Contact:     See web site

TclTalk tries to follow some concepts from common Smalltalk(tm) systems, some of which are workspaces, browsers and used for image-based developing. (escargo - This not to be confused with other "image-based" computing, which has to do with image processing. This is the kind of "image" used in some early APL systems and with common Smalltalk implementations.)

The idea is to give the user immediate feedback from the underlying interpreter, which can be very instructive for the novice. To serve as a learning tool, TclTalk provides a simple mechanism to manage its tutorial files. To realize some sort of image based computing, TclTalk's starkit is writable and all changes that you make using the system browser are traced in a change log within the kit's file.

TclTalk is written in pure Tcl/Tk and gets deployed as a starkit for best possible plattform independence. Feel free to download the starkit from http://tcltalk.ath.cx/pub/ and/or start a subject for discussion on the TclTalk-Wiki at http://tcltalk.ath.cx:8090/

Regards...

Shin The Gin (Thomas Braun)


Screenshot:

http://tcltalk.ath.cx/img/tcltalk_sstransp.png


See also: IDE

Amazing, it looks like XOTclIDE (also Smalltalk like IDE but based on XOTcl).

Shin The Gin - Yes! I like XOTclIDE a lot. But TclTalk is more targeted to the novice and/or teacher of Tcl/Tk, and therefore I prefer to stay procedural for now. The only OO-alike encapsulation of code with TclTalk is done with namespaces and commands/subcommands, which should be all right for novices and small projects.

Artur Trzewik - XOTclIDE seems to be, for most users, total overkill for an application. So it might be indeed a good idea to have a small nice GUI to play with the interpreter. Also Tkinspect and tkcon offers some functionality of this kind, but Smalltalk is indeed the best model. Why simulate a 70's like console if one has the text-widget?


Shin The Gin 2007-01-03 - Version 0.2.2 is online now. It contains only bugfixes and the nsb package at version 0.3

Shin The Gin 2007-01-04 - Version 0.2.3 is out. The system browser's title bar is more informative and some bug fixes.

Shin The Gin 2007-01-06 - TclTalk is at version 0.2.4 now. Better logging of changes. Better creation of new namespace variables and procedures using the system browser. Package creation now asks for a target directory and has better variable initialization support (see ::nsb::initializeNamespace). The menubar in a tutorial window is gone. Some bug fixes and a little intro.

escargo 11 Jan 2007 - I just downloaded and tried to run the 0.2.4 kit. It was very strange. When I tried to select it on my XP Pro desktop, it became unselected. It would not accept being clicked on to become selected. If I used Windows Task Manager to switch to it, it became highlighted. When I tried typing to it, it was unresponsive. I had to use the Task Manager End Task button to kill it.

Shin The Gin 2007-01-12 - Oops, I shouldn't have put the about box before the start of the program. It seems, that it's just not visible on your screen but has the focus. Please be patient. Version 0.3 is underway. It will also handle the tree structured namespaces better when creating packages, is more informative in the "System Transcript" and will present an early version of a "Project Manager". Also the namespaces, that make up TclTalk, will be reorganized as a tree like:

  ::tcltalk
    ::tcltalk::nsb
    ::tcltalk::prj
      ::tcltalk::prj::mgr
    ::tcltalk::ws

I don't have a Microsoft license to test TclTalk against MS-Windows. Maybe someone likes to cooperate on this?


Shin The Gin 2007-01-13 - Ok, let's enter level 0.3 with version 0.3a. I haven't done any testing on MS-Windows yet but it runs at least on Ubuntu-6.06LTS, SLAX 5.1.8 and Debian (testing). TclTalk is now able to create new functional starkits, when it finds your sdx binary. This mechanism is called Turnkey deployment. TclTalk simply replaces its startup code with yours and spawns a copy of itself to disk. Give it a try! http://tcltalk.ath.cx:8090/44

You'll always find the latest version at http://tcltalk.ath.cx/pub/


AET 15jan06 - Still a problem starting on Windows XP. Workaround:

  Start the .kit
  Click on another application window (focus goes away from TclTalk)
  Click back on TclTab (focus disappears from everywhere!)
  Alt-Tab & hold down the Alt key.  You should see an unknown 
    application (DOS-style icon) next to the Tk Icon of TclTab in the dialog.  
    Still holding down the Alt key, press Shift-Tab.  Nothing 
    seems to change, but the focus now moves to the invisible window.  
  Alt-F4 to kill that window.  A Tk toplevel appears.  Ignore it, and 
    you're in business. 

escargo 14 Jan 2007 - One bit of help that I need is an answer to a basic question. If I create a snippet of code, and then select "Do It", what do I have to do to make my code produce output in the Transcript?

Back in version 0.2.3 (the last one where focus on Windows XP worked the right way), I tried setting variables and printing there values, but I never got it to do something that I understood. The "Do It" feature reminds me of Squeak Smalltalk (which is surely intentional). But I was unclear about what state the workspace was in and was never really happy about saving it.

Shin The Gin 2007-01-15 - Hi, please try version 0.3c from http://tcltalk.ath.cx/pub/tcltalk-0.3c.kit !

TclTalk starts as follows

  1. Load packages
  2. Load the change log
  3. Request your initials
  4. Open the system transcript

Maybe, the input box which requests your initials is the problem under windows?

@escargo: The "Do it" option doesn't change anything within your workspace, as long as your evaluated code doesn't either. If you want to see the result of an evalutated block of code, then you should use "Print it" instead, which in return changes the contents of your workspace.

To output something to the transcript, please use ::tcltalk::ws::report <your string> - Perhaps there should be another option on the context menu of a workspace that says: "Report it" and prints the evaluation result on the transcript?

escargo 15 Jan 2007 - I certainly think it needs to be readily available. While it's nice that some things produce effects (like making buttons, etc.), many things that want to be done need to produce visible and persistent results. Think of how you might use tclsh (with or without TkConsole). I often use it to set variables that I then feed to code that I have sourced. Then I can tell if the code does what I expect. With a workspace (or image), I would write something that defines a proc, and then define data to feed to it. Then I would look at the results, and see if the code was doing what I wanted. That's maybe now how one might use the browser and transcript with TclTalk, but I would like to try. Making output of computations readily avaiable and changing the state of the image are integral.

Shin The Gin 2007-01-15 - Oh yes! I see! You should give verison 0.3e a try, which is a descendent of 0.3d.

There is a version 0.3d, which I could fix a little against XP today and a version 0.3e including the "Report it" option. see http://tcltalk.ath.cx/pub

escargo 15 Jan 2007 - My, haven't you been busy. I grabbed 0.3e (shortly after grabbing 0.3d), and started it. It seems to work fine, but I am puzzled by how much the sizes of the different versions vary. Why would the e version be 29K and the d version 40K? Usually programs get bigger, not smaller.

Shin The Gin 2007-01-15 - :) @ escargo

Actually I develop TclTalk using TclTalk. It's A piece of rock in the hands of the scupltor. Some resulting starkits are smaller, because I created them from a source directory. Those which are bigger are released from TclTalk itself. Maybe there is a function to compress a writable starkit?

escargo 15 Jan 2007 - What would be your recommended way to change the puts command to direct output to the Transcript? Is it something that could be easily added to the system menu? (Think of what you might to have happen to a user doing "parray ::env". Wouldn't it be nice if that could just work?)

Shin The Gin 2007-01-15 - Well, actually I would use the system browser. Just click on "::" in the namespace tree and then on env in the variables list.

Artur Trzewik - At look nice. Is system browser designed to be only single instance? I use usually two instances one for editing and the other for browsing and introspection. But it can be that many instances will be confusing for oo-resistant users (and it makes some problems by synchronization of views). So why menu System Browser->System->Open System Browser. I miss also undo in text widget (it is just option setting in Tk8.4) and shortcut for 'accept'. A generally suggestion, it should be able to use keyboard only. System browser ("namespace browser") is good idea, perhaps I will reuse it in my app. Functions "Do It", "Show It" are typical Smalltalk, For Tcl usable is also "Substitute It" that is shortcut for "subs" command.

Shin The Gin 2007-01-15 - Thanks for your response!

I've been thinking of multiple system browsers, but left it for last. Synchronization would be easy with namespace globals and traces. I also like the idea of an option "Subst it", allthough I'd rarely use it.

There are plans to write 'yash' (Yet Another Syntax Highlighter) to be used with workspaces and the system browser. And I have to make more clear, that the change log is only affected by the system browser and not by activities using a workspace, which in return is a gap that doesn't exist in Smalltalk. Maybe Tcler's wouldn't mind, but Smaltalkers coming to Tcl/Tk shurely would.

I haven't had a look at "Undo" yet, but I'll stay tuned :) - When I want to undo something here and now, I open the change log and do it by hand (copying an older version back into the system browser), but that could be hidden away with the "Undo" function in deed.

AT - sorry. I have mean "micro" undo, only in one text window. So I can undo with Control-Z some editing code between accepting it. After "accept" the text undo buffer should be cleaned. Undo of CHANGES log (for example deleting or modifying proc) is another theme. It would lead to version control system. I think squak use so called changes set to deploy patches and implement base version control but I do not know it exactly . Indeed changes log is quite brilliant and interesting idea of persisting system (like some database concepts). Another one thema: I am also not sure if one need to trace proc command to get all changes of procedures. It is because the user can define and modify procedures simply by using "Do it" in Tcl.

STG - Hm... - I must think about that. set, array et al must be traced then also. There should be two "undos". One saying "Undo" and one saying "Revert to..", giving a nice list of available hits on the change log.

AT - I think that persisting variables on the flow is quite problematic area. Because there are many non transient variables (example: file handles, windows handles which need initialization). There should be a difference between init state and application state, or definition variables and working variables. Data in variables are also used to define structures or meta programing. There are probably a need for namespace init methods to initialize that variables. It could be name convention. Smalltalk use for it class method initializeAfterLoad. In that background the defining of variables in current implementation could be the best solution.

STG - Yes. Been there. Done that :) (See ::tcltalk::initializeNamespace ...)

When creating a namespace and then adding variables to that namespace, TclTalk could easily fetch their declaration from within ::tcltalk::nsb::accept and take care of <your namespace>::initializeNamespace to add and delete variables as one would go on developing. I'll put that into TODO. I'm not after the complete concept of an image like Smalltalk does, but just keeping track of things done with the browser. One can play around with workspaces and then get real using the browser. It could be easily understood by a novice, I think.


Category Dev. Tools - Category Education - Category Tclkit