Professional

Home
Learn Shen
Videos
Community Wiki
Community
OS Kernel 
OS Library
Shen Professional

 

 

The SP Top Level
 

1. Introduction.   

SP is a cloud based system which is maintained over the web; you do not have to reinstall updates which flow into the system month by month.   Currently (March 2017) the latest version is SP 17 which runs under Windows and Linux.

As an SP user you will have an executable version of Shen and two files; a graphics file logo.gif containing the Shen logo and a file init.shen which initialises SP.    All other code is downloaded either automatically or as plugins by your command from the web. 

When you click on your executable version of Shen, you get two windows.  A command window incorporating the REPL and a GUI interface called root which appear as shown below.

1. Introduction

2. The Toolbar Options

3. The Programmable F Keys

4. The Checkboxes

5. The Settings Boxes

From bottom to top in the GUI interface there is a toolbar, a set of checkboxes and a list of settings.

2. The Toolbar Options

The toolbar options are shown at the bottom reading from left to right. The load option calls up a standard window for loading a file. The plugins option gives a pop-up menu for the list of plugins that can be downloaded from the web.  This comes as a tear-off menu that you can tear off and keep as a window. When you click on a plugin you will download the plugin from the internet and that plugin option will turn grey indicating you have loaded it.  You see that some of these plugins are already loaded and the titles are greyed out. 

Other plugins have already been implemented in part and in whole and are currently (September 2016) being made available as they are documented and placed on the web.  If you click on a plugin you will download the latest version from the web.  If the plugin is currently unavailable you will get a warning window.

You can learn about these plugins by clicking on the help links to the left of this page.   All plugins come with help.

The track facility produces a tear-off pop-up menu listing of all the user defined functions present in the image in alphabetical order.  If you click on a menu item, it will turn red and the corresponding function will now be tracked. This means that the I/O behaviour of the function will be printed in the command window.  If you click on the same function again, the item will go from red to black and the function will be untracked.   The tracking function is described in The Book of Shen (TBoS) 3rd edition p 41. Note that this facility is driven through the load button. Only functions that are loaded throguh the GUI can be tracked.

3. The Programmable F Keys

The toolbar contains 9 F keys which are not programmed and raise warning windows if clicked; these keys can be programmed by the user.  For example

(putw .toolbar.f1 -text "My Cool App")

(putw .toolbar.f1 -command (freeze (my-cool-app)))

 will change the text on F1 to My Cool App and invoke the my-cool-app function.  You can put these commands at the end of your init.shen file to configure your system the way you want. Read the help on the graphics package to learn what you can do with these keys.

3. The Checkboxes

The checkboxes toggle certain standard features of Shen.  tc enables type checking and spy turns on the spy feature of Shen. step makes the tracking interactive.  occurs is the only box enabled by default and it enforces occurs check unification throughout Shen. echo causes error messages from TCL/tk to be echoed to the REPL.

4. The Settings Boxes

The settings boxes fix the settings for certain global system variables; expand and inline are compiler settings for the SP Griffon compiler; a highly optimising compiler that produces very fast code.  See the help on the Griffon to see what these settings do.  prlen controls the maximum print length; the maximum length of a list Shen will print out before resorting to ... etc.  By default this is set to 20.   cores gives the number of cores that the machine has; this figure is set in the init.shen file.  cores is used to optimise load balancing in concurrent programs.

The button marked set! will enforce these settings.