Introduction
InstallationLINUX and other UNIXsThe console window
MS Windows
newLISP DLL
Configuration
Controlling a remote newLISP on a different computer
Running multiple instances of newLISP-tk
Multiple instances of raw newLISP without tk
How to use the editor / browser
How to use the Debugger
Writing applications with newLISP and Tcl/Tk
Delivering applications with newLISP-tk
Special considerations using newLISP-tk
Options and settings
License
GNU Free Documentation License
GNU Public License
newLISP-tk is a Graphical User Interface (GUI) for newLISP based on Tcl/Tk, an Open Source and platform independent toolkit for GUI applications. newLISP-tk consists of two parts working together: the newLISP program which is an Open Source implementation of the programming language LISP, and newLISP-tk a GUI program to control newLISP written with a language and GUI toolkit called Tcl/Tk.
Since newLISP-tk v. 0.91 the BWidget set, is also included in the newlisp-tk.exe Win32 GUI executable. For Linux/UNIX installation see the Installation chapter on how to include the BWidget extensions. The BWidget set contains over 30 high-level widgets for making professional looking GUI interfaces.
For more information about Tcl/Tk and the BWidget set and their source code and licensing go to one of the following sites on the Internet:
http://www.scriptics.com
http://tcltk.org
http://tcl.activestate.com
http://tcllib.sourceforge.net/
There is an interactive Tcl/Tk tutorial at:
http://hegel.ittc.ukans.edu/topics/tcltk/tutorial-noplugin/index.html
For more information about newLISP and related programs, source and licensing go to:
http://sourceforge.net/projects/newlisp
http://www.newlisp.org
http://www.nuevatec.com
While newLISP by itself can only be controlled via a shell or console window, newLISP-tk adds multiple LISP -aware editors / browsers and a source code debugger. It also adds the possibility to make newLISP programs drawing graphics or show graphical widgets of the underlying operating system like buttons, text entries, list boxes, menus etc.. The graphical capabilities are delivered by the Tcl/Tk component. Because newLISP and Tcl/Tk both can be implemented on most operating systems, newLISP-tk can be used to create LISP applications for a variety of platforms at the same time.
Note that some features work differently in the bare console version of newLISP when compared with runnng the newLISP-tk front-end. See the chapter Special considerations using newLISP-tk for details.
If a previous installation is present the old newlisp-tk.config file may have to be removed because of changing directory structures in new versions.
A new file newlisp-tk.config can be generated in the home directory using the Options/Save settings function from the main menu.
The newLISP executable and help and demo files can be installed from a binary RPM distribution or newLISP can be compiled from source. See the file INSTALLATION in the newLISP source distribution in the newlisp-x.x.x/doc/ directory for details.
Most LINUX distributions include Tcl/Tk by default. The source distribution contains newlisp-tk.tcl, which is the Tcl/Tk source for newLISP-tk. If Tcl/Tk version 8.4 (or 8.3) is not installed on your operating system, it is available at the following Internet sites:
ftp://ftp.scriptics.com/pub/tcl/
ftp://tcl.activestate.com/pub/tcl/
If the BWidget set extension is installed (default on Tcl/Tk 8.4), the lines 157 and 158 in the file newlisp-tk.tcl have to be out commented to include the BWidget package and point to the right library path in the TCL/TK installation.
The first line in newlisp-tk.tcl should point to the correct location of the program wish, which is the Tcl/Tk binary used to run Tcl/Tk programs. By default the first line of newlisp-tk.tcl contains the line:
#!/usr/bin/wish
After installation newlisp and newlisp-tk should be in the /usr/bin directory, which should be in the execution path of the OS's environment. The install routine renames newlisp-tk.tcl to newlisp-tk. Icons used in newlisp-tk are installed in /usr/share/newlisp/newlisp-tk/images.
Demo programs are installed in /usr/share/newlisp/newlisp-tk and doc files are installed in /usr/share/newlisp/doc. Other directories are not used by the newlisp installation process on LINUX.
To run newLISP-tk just execute:
newlisp-tk
newLISP-tk comes up with a console window and will launch the newLISP program automatically. On the first line of the console window the newLISP copyright notice should appear to confirm successful startup.
If the copyright notice does not appear than newlisp-tk could not load newlisp or communicate with it. In this case make sure that port settings in newlisp-tk.config are correct.
The file newlisp-tk.config can be found in the users home directory. If no newlisp-tk.config is found, newLISP-tk will start using default values for all configuration parameters. A newlisp-tk.config file can be generated by selecting Options/Save Settings from the main console menu. Two different ports should be used for TCLTKport and newLISPport but newLISPhost and TCLTKhost should have the same IP address, normally localhost: 127.0.0.1. After an unsuccessful startup use the LINUX task manager, i.e.:'top' or 'ktop' or do a: 'ps -A' to make sure that none of the processes newlisp-tk and newlisp have been left running after a failed start attempt. Remove those processes and start over again executing newlisp-tk.
If a an old newLISP-tk installation is present it should be removed using the uninstaller from the 'Start Menu' in 'Start/Programs/newLISP' or by using the uninstaller in the control panel 'Add or Remove Programs' applet.
For Win32 based OS's the installer of newLISP-tk for Windows can be used which contains all components necessary to run newLISP-tk. The package contains a file called newlisp-tk.exe which is a precompiled and linked newlisp-tk.tcl containing all Tcl/Tk DLLs (Dynamic Link Libraries) necessary. The package also contains the file newlisp.exe which is newLISP compiled for Windows.
Be default the installer installs in the C:\Program Files\newlisp, where C:\Program Files is taken from the PROGRAMFILES environment variable. The install path can be changed during install.
To run newLISP-tk just execute the file:
newlisp-tk.exe
from the directory where it is installed or by clicking the link created on the desktop by the installer or by clicking the link in the Start menu of the Windows task bar.
newLISP-tk comes up with a console window and will launch the newLISP program automatically. On the first line of the console window the newLISP startup notice should appear to confirm successful startup.
If the sign-on message does not appear than newlisp-tk.exe could not load newlisp.exe or could communicate with it via TCP/IP. In this case make sure that port settings and newLISPbin location are specified correctly in the file newlisp-tk.config.
The file newlisp-tk.config can be found in the startup directory of newlisp-tk.exe. If no newlisp-tk.config is found, newLISP-tk will start using default values for all configuration parameters. A newlisp-tk.config file can be generated by selecting Options/Save Settings from the main console menu.
Two different ports are used for TCLTKport and newLISPport but newLISPhost and TCLTKhost should have the same IP address, normally 127.0.0.1, when running the GUI front-end and the newlisp executable on the same computer. After an unsuccessful startup use the Windows Task Manager to make sure that none of the processes newlisp-tk.exe and newlisp.exe has been left running. After a failed start attempt remove those processes and start over again executing newlisp-tk.exe.
To run newLISP without graphical capabilities just execute
newlisp.exe
in a command window.
The Win32 distribution of newLISP-tk also contains a file called newlisp.dll. Note that this file is not required to run newlisp.exe or newlisp-tk.exe. This file is newLISP compiled to a DLL (Dynamic Link Library). This file on its own can be imported into to other Win32 applications for delivering newLISP functionality in those applications. See the main newLISP manual for details.
newLISP-tk starts up in a default configuration, which can be changed and saved to a file from the applications Options menu. The saved file is named newlisp-tk.config and can also be edited using a text editor like vi on LINUX or notepad.exe on Windows. The configuration file contains some path / file names which are important for correct operation. For more details about configuration see the chapter Options and Settings.
The newLISP-tk GUI front-end and the newLISP executable binary can run on different computers connected on a TCP/IP network. In order for this to work, the config file parameters: newLISPhost and TCLTKhost must be configured correctly with their respective IP-numbers or host names in the file newlisp-tk.config.
For example the following lines might be included in the file newlisp-tk.conf:
set Ide(TCLTKhost) "68.128.23.35"
set Ide(TCLTKport) "64003"
set Ide(newLISPhost) "mysite.com"
set Ide(newLISPport) "64001"
Note, that either IP-numbers or host names can be used in host parameters. Any port numbers can be configured, but must be available with sufficient access rights on the participating computers. newLISP on the remote computer gets started first by executing:
newlisp -p 64001
On the local computer start newlisp-tk.exe. The file newlisp-tk.conf should be in the same directory as newlisp-tk.tcl (on UNIXs) or newlisp-tk.exe on Windows.
Speed of the GUI is adequate even on low speed dial-up connected computer system. Execution speed of Graphics applications depends on the speed of the link, as each graphics command goes back and forth over the TCP/IP connection.
Multiple instance or newLISP-tk can be run, but care must be taken to configure different ports newLISPport and TCLTKport for each instance to avoid conflict. When trying to start up a second instance without special configuration a message will appear "socket already in use".
Using the following steps multiple instances of newLISP-tk can
be run on Windows 2000/XP:
(3) Start newlisp-tk.exe from
a different startup directory containing a modified version of newlisp-tk.config
.
(2) In the second copy of newlisp-tk.config configure newLISPport and TCLTKport with different numbers, i.e. 64001 ND 64002 in the original version of newlisp-tk.config and 64101 and 64102 in the second version.
(3) When creating a Start menu or Desktop link, the startup directory should be configured for the location of the modified newlisp-tk.config file. newLISP-tk will always look for it's config file in the startup directory.
To run multiple instances of newLISP-tk on LINUX start a second instance as a different user. In LINUX newlisp-tk.tcl is centrally installed as newlisp-tk in usr/bin. When running newlisp-tk it searches for the config file newlisp-tk.config the users home directory.
newLISP statements can be entered directly in the console window for evaluation. When entering parentheses the cursor will jump to the matching parenthesis. This helps to enter LISP expressions with correctly balanced parentheses. Many Ctrl-key combinations are available as shortcuts to menu items. The most important functions are available as icons.
Almost all short cut Ctrl-key combinations are documented inside the menus or can be read in the bottom status line of the console when moving the mouse over the icons.
The following keys can be used for editing and retrieval of the command history and are not documented anywhere else:
Up arrow | previous entry |
Down arrow | next entry |
Home or Ctrl-A | beginning of line or [End] |
End or Ctrl-E | end of line or [Home] |
While in the console window menu, commands can be accessed with the mouse or with keyboard shortcuts specific to the underlying host operating system. On Windows press Alt- and the first letter of the item in the main console menu.
The mouse can also be used to select text for copy / cut / paste anywhere in the console window. Pressing the right mouse button opens up a pop up menu. On MacOS X press Ctrl-Button instead.
The Load ... option in the file menu can be used to load newLISP source files. The Save All as ... option can be used to save the whole contents of the newLISP workspace in to a file.
To open up a browser / editor select editor from the console menu or click the icon available. More than one editor / browser can be open at the same time. The main use of the editor / browser is for editing newLISP function definitions and for browsing newLISP code. The editor / browser contains three main areas:
When editing text in this window, parenthesis matching occurs when typing in parentheses. This helps in entering correctly balanced LISP expressions. When double clicking the mouse anywhere in an expression the scope of the current expression will be highlighted. This helps identifying correct syntax and helps recognizing the structure of an expression.
Copy, cut and paste work just like in the console window. To evaluate a definition select Evaluate or EvaluatePrint from the menu. When Evaluate is chosen only error conditions while evaluating are displayed in the console. When using EvaluatePrint also the result of the evaluation will be printed in the console window. When evaluating the editor window always look for output in the console window.
Although the editor window is normally used only for entering function definitions, it can also be used for entering any other LISP expression for evaluation and re-editing. While the console limits input to only one line, multi line expressions can be entered in the edit window.
The right mouse button offers a pop up menu similar to the console pop up working only on the part in the edit window that is currently selected.
When editing use Save Context As from the file menu to save your work inside a given name space.
This list box on the top left of the editor / browser shows the different newLISP contexts or name spaces. When clicking one of these with the mouse, the symbols contained in this name space are displayed in the symbols list box below. Everything contained in a specific context can be saved by using the Save Context As option in the File menu.
This list box contains all symbols of a specific name space or context. The symbols serve as variable containers or contain LISP lambda expressions defining user functions. When clicking on these symbols their content appears in the editor window and can be modified and evaluated to make the change effective.
When a symbol is selected it also can be deleted from the name space using the Delete option in the menu. Note that the functions in the SYSTEM name space should not be changed and are protected from deletion. These functions are used by newLISP and newLISP-tk for communicating. Note also that a symbol should only be deleted if no references to it exist in other functions. The function tk in the MAIN name space is also protected and should also not be modified as it is used for communications from newLISP to TK.
Many different keyboard shortcuts in form of Ctrl-key combinations are available in the browser / editor. They are documented in the menu and visible in the status line at the bottom when moving the mouse over the icons.
To debug a function close all browsers and open the debugger from the consoles main menu. In the console window change to the context, in which the function to debug is at home. For example: if the function to debug is MyContext:a-func execute:
(context 'MyContext)
this will change the current context in the console and for the debugger. Next in the console window execute:
(debug (a-func a b c))
the function a-func with its parameters a b c will now appear in the debugger window with the first expression highlighted. Using the left two buttons in the debugger evaluation will proceed step wise or entering into each sub expression o evaluated jumping to the next expression.. The third button can be used to continue evaluation without debugging. In this case the debugger closes and evaluation proceeds as if the debugger never has been open. The last button in the debugger quits the debugging session and interrupts the evaluation process completely.
Evaluation while debugging is somewhat slower and some of the pushbuttons in the debugger will be disabled for certain time intervals.
All normal output of evaluation will be directed as usual to the console window. Error messages will appear in the debugger window and highlighted in a red color. Optionally debugging can also be controlled from the console window pressing the keyboard keys S,N C or Q and <enter>. Ctrl-B will switch the focus back to the console window. From the console Ctrl-G will switch back into the debugger.
At any time when the debugger stops, expressions can be evaluated inn the console window and variables (symbols) can be entered to inquire their contents. The browser / editor can also be used to evaluate expressions or inquire the contents of symbols.
Debugging can be started after a program started execution by inserting (trace true) statements before the call to a user-defined function. After trace has been set to true and the program enters the user defined function, console based debugging will appear in the console window. The graphical debugger can now be started. After the first step entering the letter S in the console windows the graphical debugger will take over.
This documentation cannot be an introduction to Tcl/Tk. We recommend studying one of the many introductory books that are available for Tcl/Tl. The most important elements are presented here and we recommend studying the included example programs.
To execute Tcl/Tk statements from newLISP use the tk function. The tk function sends a Tcl/Tk statement to the Tcl/Tk module and evaluates it. Try the following:
(tk "toplevel .mywin")
will create a top-level window and pop it up over the console. Now try:
(tk "button .mywin.ok -text OK")
nothing will change in the top-level window at this time until entering:
(tk "pack .mywin.ok -padx 10 -pady 10")
the last line will make the button appear in the window previously created.
The tk function can take more than one parameter and will evaluate these and concatenate to a string before sending it out to Tcl/Tk. For example we could have written the change-color function this way:
(define (change-color) (tk".mywin config -background " color))
Let us assume we previously assigned a color name to the newLISP symbol color:
(set 'color "red")
The tk function will now correctly configure a Tcl/Tk statement as previously used, evaluating color to "red" and concatenating it to the previous string. Care must be taken to include spaces for separating variables, like the space after the word -background.
In order to connect the OK button to execute a newLISP function we need a callback initiated from the button press. This is done as follows:
First we need the newLISP callback function:
(define (say-hello) (println "HELLO WORLD"))
Now we need to configure the OK button with a command to be executed on button press:
(tk ".mywin.ok config -command {Newlisp {(say-hello)}}")
Note the use of different type of parenthesis. Tcl/Tk uses curly braces to group expressions an arguments. newLISP uses normal round parenthesis.
When pushing the OK button now, we will see HELLO WORLD twice, the first is the action from the println statement, the second is the return value from the function say-hello, which is the return value of the last function executed. We can suppress the display of the return value in the console using the newLISP function silent:
(tk ".mywin.ok config -command {Newlisp {(silent (say-hello))} }")
Note, that Newlisp is a Tcl/Tk function used to call back to newLISP, its argument should always be an expression executed in newLISP enclosed in braces { }, in this case (say-hello).
On some widgets Tcl/Tk supplies an extra argument to the callback function, but the built-in Tk function Newlisp allows only one. Writing a simple wrapper around it solves the problem. The following example of a Tk scale widget shows this technique:
(context 'SCALE)
(define (run )
(tk "proc ScaleValue { val } { Newlisp \"(silent (SCALE:set-value $val ) )\" }")
(tk "if {[winfo exists .example] == 1} {destroy .example}")
(tk "toplevel .example")
(tk "scale .example.scale -from -10 -to 20 -length 200 -orient horizontal")
(tk ".example.scale configure -command {ScaleValue}")
(tk "pack .example.scale"))
(define (set-value x)
(print x " "))
(context 'MAIN)
Sometimes we want the callback do something back in the TK widget, i.e. we might want the OK button change the color of the window. First define a new callback function:
(define (change-color) (tk ".mywin config -background red"))
Now reconfigure the button:
(tk ".mywin.ok config -command {Newlisp { (change-color) }}")
Now when clicking the OK button the background of .mywin will turn red.
The following example shows how to transfer text from an entry widget written in Tcl/Tk to newLISP:
(define (entry )
(tk "if {[winfo exists .entry] == 1} {destroy .entry}")
(tk "toplevel .entry")
(tk "wm title .entry {entry example}")
(tk "entry .entry.e -width 30 -textvariable ::display")
(tk "bind .entry.e <Return> { Newlisp {(silent (get-entry-text))} }")
(tk "pack .entry.e"))
(define (get-entry-text )
(println (tk "set ::display")))
Whenever return/enter key is pressed in the text of the entry widget will be printed in the console window.
Tcl/Tk variables like for example $var will not work when using newLISP-tk. Instead of writing:
(tk "set win [toplevel .mywin]")
(tk "$win config -background green") ;;this will not work
This will not work because the variable win from the first statement will not be known in the second statement. As an alternative both statements could be put together in one tk statement separated by a semicolon ;:
(tk "set win [toplevel .mywin]; $win config -background green")
To keep longer Tcl/Tk code portions together and over several lines see the next chapter.
another way is, to store the contents of the Tcl/Tk variable in a newLISP variable:
(set 'win (tk "toplevel .mywin"))
(tk win " config -background green")
Observe the space before config to separate .mywin and config when stringed together by the tk function.
This will the return value from (tk "toplevel .mywin") to the newLISP variable win. This method also shows, how to pass variable content back and forth between newLISP and Tcl/Tk.
As shown previously, variables get lost in between different tk statements because Tcl/Tk statements sent to the Tcl/Tk interpreter are evaluated inside a subroutine and not on the toplevel. Every variable created inside the subroutines name space get lost after the tk statement finished. There is a way in Tcl/Tk to refer to variables in a global name space using the global name space qualifier ::. This way variables are conserved in between tk calls:
;; create a variable in the current Tcl/Tk subroutine name space
(tk "set ::win [toplevel .mywin]")
(tk "$::win config -background green")
The last example uses the last technique but in a bigger example with a text variable in an entry widget:
(define (test)
(tk "if {[winfo exists .test] == 1} {destroy .test}")
(tk "toplevel .test")
(tk "set ::display {entry!}")
(tk "wm title .test $::display")
(tk "entry .test.e -width 30 -textvariable ::display")
(tk "pack .test.e"))
This technique is only necessary when the same variable is referenced from different calls with the tk function. In a contiguous portion of Tcl/Tk code it is not necessary to use global variables.
Note, that since version 1.0 of newLISP-tk, tk statements may contain line-breaks. This offers the possibility to pass bigger Tcl/Tk code portions using one tk statement and enclosing bigger text portions in [text] ... [/text] tags:
(context 'SCALE)
(tk [text]
## longer portion of Tcl/Tk source #################################
proc ScaleValue { val } {
Newlisp "(silent (SCALE:set-value $val ) )"
}
if {[winfo exists .example] == 1} {destroy .example}
toplevel .example
scale .example.scale -from -10 -to 20 -length 200 -orient horizontal
.example.scale configure -command {ScaleValue}
pack .example.scale
####################################################################
[/text])
(define (set-value x)
(print x " "))
(context 'MAIN)
Inside the [text][/text] tags quotes " and braces { } can be used freely. Text between [text][/text] tags will be passed without any translation.
When executing(main-args) in the newLISP-tk GUI environment something like the following is returned:
("c:/newlisp/newlisp" "-p" "64001")
The arguments when loading newlisp.exe (Win32) or newlisp (Linux) are shown. The first part can help to identify the startup directory. The second and third parameter start up newLISP for communications with the GUI front-end. To read command line arguments from the newLISP-tk command line use (tk-args). For example when starting newLISP-tk as follows:
newlisp-tk myApp.lsp 1 2 3 hello
the following would be returned from (tk-args) in myApp.lsp:
("1" "2" "3" "hello")
newLISP-tk can take a lisp file as a command line parameter or a specification in newlisp-tk.config can tell newlisp-tk.exe to load a newLISP application. This together with the ability to hide Tcl/Tk windows enables the delivery of applications in newLISP-tk where the developer environment is never visible and the application has the feel of an independent freestanding application.
The included example tcltk-app.lsp illustrates this. On the command line and in the newlisp directory enter:
newlisp-tk tcltk-app.lsp
As an alternative edit newlisp-tk.config and add or edit the specification:
set Ide(newLISPapp) "tcltk-app.lsp"
Now calling newlisp-tk alone will start up tcltk-app.lsp without the need to specify the application on the command line.
A little window will appear with an exit button without ever showing the newLISP-tk development environment. In order for this to work newlisp-tk on LINUX or newlisp-tk.exe on Windows should be in the execution path of the operating system's environment. A link can be created with an application specific icon on LINUX or Windows 2000/XP and the user will only be exposed to the application itself.
This is the contents of tcltk-app.lsp:
;; tcltk-app.lsp - application demo
;; (context 'App) (define (app-example ) (tk "toplevel .appex") (tk "button .appex.bExit -text Exit -command exit") (tk "pack .appex.bExit -side top -padx 60 -pady 30") (tk "bind .appex <destroy> exit")) (context 'MAIN) (tk "wm withdraw .") (App:app-example)
The two critical statements are:
(tk "bind .appex <destroy> exit"))
and
(tk "wm withdraw .")
The first statement makes sure that the application exits correctly even if the Exit button is not used but the application window is closed using the closing icon in the windows frame.
The second statement hides the newLISP-tk development environment. Another method to suppress the newLISP-tk console is available. In the file newlisp-tk.config include the following line:
set Ide(initCommand) "wm withdraw ."
This will suppress the newLISP-tk console window without any flicker.
To deliver an application called MyApp on Windows 2000/XP to an end user the following files should be included:
File name | Description |
---|---|
newlisp.exe | newLISP executable |
newlisp-tk.exe | newLISP loader GUI and Tcl/Tk runtime libraries |
newlisp-tk.config | config file, not strictly necessary if default configuration is Ok, can be generated with Options/Save |
MyApp | newLISP source file containing your application |
Most installer programs offer facilities to create links with icons on the operating system's desktop in an automated fashion.
On LINUX only the file MyApp would have to be delivered as Tcl/Tk is typically already installed on the system.
Most of the following considerations are trivial for users familiar with LINUX or other UNIX like operating systems and for users familiar running the command shell in Windows, but should be mentioned for users accustomed to use Windows only via it's graphical user interface.
There are some differences when running newLISP-tk versus running newLISP using the newlisp or newlisp.exe program binary alone.
On startup newLISP-tk tries to read a file called newlisp-tk.config. This file contains Tcl/Tk statements to configure various settings.
# newlisp-tk.config - newLISP Tcl/Tk configuration file # # This file is generated by menu "Options/Save settings" # set Ide(HelpProgram) "$env(PROGRAMFILES)/Internet Explorer/IEXPLORE.EXE" set Ide(TCLTKhost) "127.0.0.1" set Ide(TCLTKport) "64002" set Ide(WinPosX) "183" set Ide(WinPosY) "120" set Ide(consoleBackground) "white" set Ide(consoleForeground) "navy" set Ide(consoleHeight) "30" set Ide(consoleWidth) "80" set Ide(debuggerBackground) "white" set Ide(debuggerForeground) "navy" set Ide(debuggerHeight) "24" set Ide(debuggerWidth) "65" set Ide(editorBackground) "white" set Ide(editorForeground) "navy" set Ide(editorHeight) "30" set Ide(editorWidth) "65" set Ide(fontName) "Fixedsys" set Ide(fontSize) "10" set Ide(imageDir) "/freewrap/images" set Ide(initCommand) "" set Ide(lispFileExtension) ".lsp" set Ide(maxHistory) "50" set Ide(newLISPapp) "" set Ide(newLISPhost) "127.0.0.1" set Ide(newLISPport) "64001" set Ide(platform) "windows"
The previous example of a newlisp-t.config file contains the defaults installed on MS Wndows. Note that Windows accepts forward slashes in path names as long as they do not occur after a drive letter.
When running on Windows and selecting Options/Save Settings from the console menu all $env(PROGRAMFILES) specs will be replaced with the correct names of the local Windows installation, i.e. C:\Program Files\newlisp on English language Windows. When running on LINUX a different file of defaults will be generated. The file is generated in Tcl/Tk syntax.When saving, all quotes are replaced with {,} curly braces as string delimiters.
While font and color attributes for the console and editor can be configured from newLISP-tk menus, other attributes have to be changed manually using a text editor like vi or emacs on LINUX or notepad.exe on Windows. The settings in the newlisp-tk.config file will then overwrite the default settings in newLISP-tk for a specific platform.
Note, that on Windows 2000/XP file and directory path names in newlisp-tk.config should be written using the forward slash (like in LINUX/UNIX).
On LINUX all network ports up to 1024 can only be used by the root user. Make sure the port configured is not used by anything else in the system. The TCLKhost and newLISPhost addresses should not be changed unless care is taken to change the program line for starting up the newlisp or newlisp.exe binary in the source file newlisp-tk.tcl . In case that newlisp and the front-end newLISP-tk are running on different machines, the newlisp binary will have to be launched separately and not automatically from newlisp-tk.tcl, or newlisp-tk.exe.
The source code to newLISP and newlisp-tk.tcl is distributed under the GNU Public License or GPL, the text of which is included in this manual.. For the licensing of Tcl/Tk (licensed under another Open Source license) see:
http://www.scriptics.com
http://tcllib.sourceforge.net
The source code for newlisp and newLISP-tk, if not included in this distribution, can be obtained at the following links:
http://www.nuevatec.com
http://www.newlisp.org
http://sourceforge.net/projects/newlisp/