
-----------------------------------
rsshelas
Mon Sep 27, 2010 8:09 pm

Turing and Webpages
-----------------------------------
Is it possible to upload your code and make it work on a website?

-----------------------------------
andrew.
Mon Sep 27, 2010 8:13 pm

RE:Turing and Webpages
-----------------------------------
No. The user would have to download the source and compile it in order to run it. Or you would have to compile it for Windows and upload that. I'm assuming you want to embed it into the webpage like an applet, and you simply can't do it with Turing.

-----------------------------------
DtY
Mon Sep 27, 2010 8:59 pm

Re: RE:Turing and Webpages
-----------------------------------
No. The user would have to download the source and compile it in order to run it. Or you would have to compile it for Windows and upload that. I'm assuming you want to embed it into the webpage like an applet, and you simply can't do it with Turing.If there was a working Unix version (or if the Windows version had some way to access standard input/output) you could use it with CGI, theoretically. https://secure.wikimedia.org/wikipedia/en/wiki/Common_Gateway_Interface

-----------------------------------
DanShadow
Mon Sep 27, 2010 10:13 pm

RE:Turing and Webpages
-----------------------------------
Take the next step and learn Java ;).
Its a relatively easy, very structured language with an easy to use graphics API. Plus you can implement them in a web-page by making it a Java Applet.

-----------------------------------
Tony
Tue Sep 28, 2010 1:07 am

Re: RE:Turing and Webpages
-----------------------------------
you could use it with CGI, theoretically.
Or listen on port 80 and run as a webserver itself. http://compsci.ca/v3/viewtopic.php?t=2304

-----------------------------------
Srlancelot39
Tue Sep 28, 2010 6:26 pm

RE:Turing and Webpages
-----------------------------------
is this possible with C++?

-----------------------------------
DtY
Tue Sep 28, 2010 6:47 pm

Re: RE:Turing and Webpages
-----------------------------------
is this possible with C++?Of course, using both methods mentioned; but it wont work on most web hosts.

- Any language that can access standard input, output and environment variables can be used to write CGI scripts
- c++ has a sockets library (actually, I don't think it's standard, might be part of POSIX?) so you could write a web server that would serve the pages for you (skipping another webserver, though you might use a reverse proxy to route it to your program). There's even a c++ library for this (like ruby on rails), but I cannot remember the name.

-----------------------------------
andrew.
Tue Sep 28, 2010 9:55 pm

RE:Turing and Webpages
-----------------------------------
Okay I know that it's technically possible, but it's not practical. It's easier to just rewrite your program in Java as an applet.
