Bill Poser <
billp...@gmail.com> wrote:
> I don't actually care where the Tcl code executes. The desideratum
> is that the user be able to execute the program by going to a web
> site, without the need to have anything special (e.g. Tcl/Tk,
> browser plugin, starkit) installed on his or her local system.
This severely limits your options.
> The program is educational, and the request comes from a school
> administrator whose school district locks down the machines students
> use so that the cannot download or install software.
While the "lockdown" itself may have as many holes as a slice of
swiss-cheese, violating the "lockdown rule" by utilizing one of the
holes is likely to get the students (and/or you) in more hot water than
you wish to be in, so this further limits your options.
> She would prefer to avoid getting the IT staff to install the program
> on the students' machines.
Ok, last possible option cut off. Is there any chance the student
computers ship with a Tcl interpreter installed as part of the OS? If
no, then yup, you are quite limited.
> So I would expect the Tcl code to execute on the server,
Given what you've told us, this looks to be your only option without
creating a "rules violation" situation.
> but if there were a way to have it execute in the browser on the
> client without installing a special plugin, that would be fine.
Had the browser world taken a right turn circa 1993-1994 or so instead
of the left turn they did take, then we'd all have browsers with
embedded Tcl interpreters instead of embedded Javascript interpreters.
But, alas, Sun did not pick Tcl when the choice of "Tcl or Javascript"
for embedding in the browser came up way back then, and here we are
with JS in the browser instead of Tcl.
There is a JS implemention of a Tcl interpreter
(
https://wiki.tcl-lang.org/page/Tcl+in+Javascript) which might be worth
your time to see if it is complete enough (or if you could reduce your
program down to its limits) to be useful. This would let (if it works)
Tcl code run in the browser (because as far as the browser is
concerned, it is just running a big pile of JS).
But if that does not work, and you need to run the Tcl code server
side, you'll either need to use some kind of remote desktop (so Tk's
windows can be seen by the students) of you'll need to rewrite your
code to talk "HTML" to a browser.