If you wish to run the entire demo locally, or you wish to run the C version of the sender code, you'll need to install the SIMPL toolset plus the Tcl/Tk SIMPL extensions. See the main SIMPL website for more info.
If all you want to do is participate in the "game" as a Tcl/Tk sender then you'll only need the tarball below + Tcl/Tk installed on your Linux box.
Actually the Tcl/Tk sender only box need not be running Linux, the Tcl/Tk code we are using should run just fine on a Mac or Windows PC.
This tarball will untar into hosug subdirectory. The demo code lives in /src and /include subdirectories. In addition to the demo code you'll find the Open Office Impress slides from this presentation along with a couple of screenshots which are used.
Some extra images are required if you wish to run the demo6.tcl IOA demo.
You'll need to first install and build the SIMPL toolkit +Tcl/Tk SIMPL extension as per the prerequisites section above.
This should have created an executable which we will be using in all our demos called:
$SIMPL_HOME/bin/tclSurrogate
We now need to run this executable from a console by typing:
cd $SIMPL_HOME/bin
tclSurrogate -n BOBTCL
It might be nice to add $SIMPL_HOME/bin to our PATH.
If we do this we can run
fcshow
from another console and see out SIMPL task BOBTCL up and running.
NOTE: The default port for tclSurrogate is port 8000. If you wish to connect from a remote machine this port needs to be open through the firewall.
From another console we need to run the SIMPL receiver portion of our pixel game as:
bobrecv.tcl
If all is happy our fcshow command above should now show two SIMPL processes:
BOBTCL
HOSUGR
and the 3x3 pixel "play area" should be visible in a separate window.
We are now in a position to run our SIMPL senders ... up to 9 of these ... one per pixel in our 3x3 grid.
The simplest way to do this is to invoke a console and run each instance in the background as:
bob.tcl -N BOB1&
bob.tcl -N BOB2&
bob.tcl -N BOB3&
etc.
NOTE: Each sender instance will come up at exactly the same location on the screen so you might want to move them around a little.
Go crazy and hit the button on the senders and you should see individual pixels light up on the receiver screen. Try making patterns like an X or a T.
It is not much of a challenging game to make patterns when you are in control of all the senders. The more interesting variation comes when senders are distributed to other players on separate nodes in the audience.
To accomplish this distribution to the audience all we have to do is assign
each a unique SIMPL name and run with an extra command line argument to
assign the real gateway address instead of 127.0.0.1. eg:
bob.tcl -N BOB1 -G 192.168.0.1 &
To illustrate the language agnostic feature of SIMPL you'll want to build the C version of the HOSUG sender. To do this simply type:
make
in the same directory that you found the Tcl/Tk demos above (ie. hosug/src).
If this went well you should now have a
../bin/tclStim
Knock down one or your senders above and run the C version in its place as:
../bin/tclStim -n BOBC1
A "t" at the prompt will toggle and a "q" will exit.
The C version can also be distributed to a separate node, but that node must have SIMPL installed and both nodes need to be running the TCP/IP SIMPL surrogates.
For more info on the TCP/IP SIMPL surrogates consult the SIMPL documentation at:
$SIMPL_HOME/docs/readme.surrogateTCP
NOTE: It is more than possible to run both the tclSurrogate and the TCP/IP surrogates together. The TCP/IP surrogates default to a diffent port (8001). The rule of thumb is that you utilize the tclSurrogate when you are running from a box without SIMPL installed and you use the TCP/IP surrogates when both nodes are running SIMPL.
While this isn't complicated at all, the important thing to note is that our tclStim executable wouldn't need to change in any way to accomplish this magic.
There is another variation of our pixel sender which is interesting to demo: the Tcl/Tk applet version
For this you'll need to install the Tcl/Tk plugin for your Firefox browser first.
If you are local to the box running the tclSurrogate and bobrec.tcl you simply need to point Firefox at:
hosug/src/boblet.html
If all is well you should get a window very similar to the straight Tcl/Tk sender up in the browser window.
If you are more adventuresome you can bring up Apache and move the boblet.html and the boblet.tcl files to the Apache directory. At this point your applet should be runable from a remote Firefox without any change.
NOTE: It is worth comparing the boblet.tcl with the bob.tcl to see how little they actually differ; recognizing that the bob.tcl is really the combination of bob.tcl and simpl.tcl whereas in boblet.tcl they are already merged.
One final variation worth demoing is the browserless applet. It is worth noting that in practice you'd only want to run in this mode on a trusted network, but nonetheless it is illustrative as a demo.
If you place the simpl.tcl and the fetch.tcl in the same directory on the client box. On the server box you'll need to configure Apache as you would for the applet example above, but put the bob.tcl file in the Apache default directory.
Now on a client box console you can type:
fetch.tcl -N BOB1 -G 192.168.0.1
or whatever the server (gateway) IP address is.
If all goes well in a few seconds the bob.tcl will be served from the server and run as if it was local to the client box.
For this demo you need to leave the tclSurrogate running.
The default SIMPL naming will allow you to keep the pixel game up if you wish, but it might be less cluttered if you knock it down.
The first step in the OOcalc demo calls for running a straight Tcl-SIMPL receiver (ie. no Tk or GUI part). Do this by typing:
bobr.calc.tcl
on one console. Very boring ... not much visible happens other than fcshow will indicate a SIMPL process is active.
Next you'll need to bring OO Calc up and click in blank cell with room to grow vertically below it. Using the Insert->Link External Document menu item, point the resulting dialog at the bob.html file that bobr.calc.tcl just created in the hosug/src subdirectory.
Before exiting the dialog be sure to chose HTML table from the middle section and click the refresh on and reduce the time to 20 sec.
From another console you'll now want to run the Tcl/Tk sender portion as:
bobs.calc.tcl
Go ahead and enter a couple of numbers in the entry box, each time followed by the
After 20 sec or so you should see those numbers magically appearing in the OO Calc cells.
Once again the bobs.calc.tcl can be run from a separate node by simply hacking in the real gateway IP address instead of 127.0.0.1.
where junk1 is the name of the file you want the catcher to create.
From a second console you'll need to run the sender half of this application:
where junk is the name of the file you want pushed to the catcher.
This demo application could be deployed across a network between two Linux boxes. It would have to be modified to work via the tclSurrogate between two Windows boxes or a Windows and Linux box.
Have fun
File Transfer Demo
From one console you'll need to run the receiver half of this application:
catcher.tcl -N CATCHER -f junk1
pusher.tcl -N PUSHER -c CATCHER -f junk