Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing and Webpages
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rsshelas




PostPosted: Mon Sep 27, 2010 8:09 pm   Post subject: Turing and Webpages

Is it possible to upload your code and make it work on a website?
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Mon Sep 27, 2010 8:13 pm   Post subject: 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




PostPosted: Mon Sep 27, 2010 8:59 pm   Post subject: Re: RE:Turing and Webpages

andrew. @ Mon Sep 27, 2010 8:13 pm wrote:
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




PostPosted: Mon Sep 27, 2010 10:13 pm   Post subject: RE:Turing and Webpages

Take the next step and learn Java Wink.
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




PostPosted: Tue Sep 28, 2010 1:07 am   Post subject: Re: RE:Turing and Webpages

DtY @ Mon Sep 27, 2010 8:59 pm wrote:
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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Srlancelot39




PostPosted: Tue Sep 28, 2010 6:26 pm   Post subject: RE:Turing and Webpages

is this possible with C++?
DtY




PostPosted: Tue Sep 28, 2010 6:47 pm   Post subject: Re: RE:Turing and Webpages

Srlancelot39 @ Tue Sep 28, 2010 6:26 pm wrote:
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.




PostPosted: Tue Sep 28, 2010 9:55 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: