Computer Science Canada

Embedding Turing in a webpage?

Author:  Token [ Sun Oct 09, 2005 10:20 am ]
Post subject:  Embedding Turing in a webpage?

Well today I saw this topic, <a href"http://www.compsci.ca/v2/viewtopic.php?p=94947#94947"> Embedding Turing files in startup</a> and It gave me the idea, what if we could embed turing files into a webpage, it would have so many great uses. I know you are all going to say just learn Java/Javascript, which I slowly am. But if somone wanted a challenge that would be very cool to do, a online instance of turing. Let me know what you guys think and who would be willing to give it a shot.

Author:  [Gandalf] [ Sun Oct 09, 2005 1:15 pm ]
Post subject: 

I think before someone did that, they would first make a version of Turing from the ground up, but better Razz.
Online, it would have to be based on something, like php, Javascript, or one of the other multitude of programming languages. For something like Javascript, it is already fairly similar, and not too many people would want to do that since the scripting language itself is better.

Author:  Tony [ Sun Oct 09, 2005 2:01 pm ]
Post subject: 

you mean getting Turing executable to run as CGI? Confused

Author:  [Gandalf] [ Sun Oct 09, 2005 2:16 pm ]
Post subject: 

I think he means more of making "TuringScript" Laughing

Author:  Tony [ Sun Oct 09, 2005 3:00 pm ]
Post subject: 

Turing is not a scripting language though - it must be compiled.

I don't see any advantage of having a "TuringScript" Laughing

Author:  Token [ Mon Oct 10, 2005 10:38 am ]
Post subject: 

Meh, it was just a thaught, but ya I guess I was thinking of a TuringScript type deal, because it would be kinda cool to put some of the stuff I made online without making people download .exe's which a lot of people are weary of.

Author:  wtd [ Mon Oct 10, 2005 11:38 am ]
Post subject: 

If I may, I believe the original poster is referring to Java applets, and wanting to implement something similar in Turing.

Don't hold your breath.

Yes Java sucks, but it's marginally better than Turing, and quite a bit better equipped for such a task.

Author:  Token [ Mon Oct 10, 2005 11:41 am ]
Post subject: 

wtd wrote:
If I may


No you may not! Laughing

and that is exactly what I meant.

Author:  [Gandalf] [ Mon Oct 10, 2005 2:16 pm ]
Post subject: 

How about changing this around to make an open-source Turing? With higher OOP capabilities, etc.? This could solve a lot of the problems with Turing currently, and students wouldn't have to learn everything from the ground up.

Quote:
Yes Java sucks, but it's marginally better than Turing

Laughing

Author:  Token [ Mon Oct 10, 2005 2:26 pm ]
Post subject: 

that would be good, who would want to take on a project like that? i dont know any languages to do it in.

Author:  [Gandalf] [ Mon Oct 10, 2005 2:29 pm ]
Post subject: 

How about Java Wink hehehe...

C/C++? Since it might? have to be fairly low-level. Could Ruby do this? Nonetheless, 'big' projects do seem to be hard to get anything done - still, it's worth the thought.

Author:  Tony [ Mon Oct 10, 2005 3:08 pm ]
Post subject: 

Ruby + Rails + RMagick + AJAX

I suppose you one could build an applet-like interpreter... Thinking

Author:  md [ Mon Oct 10, 2005 6:11 pm ]
Post subject: 

I might be intereested in doing it in C/C++ (or halping to do it...), but I think it'd have to be turing stripped of all graphics routines at first... graphics are nice and all... but they are needless complications. I do think an open source turing interpreter would be cool though...

Author:  wtd [ Mon Oct 10, 2005 10:58 pm ]
Post subject: 

Cornflake wrote:
I do think an open source turing interpreter would be cool though...


Why precisely would you want Turing?

What about the language is especially appealing?

By which I mean, if you're going to go to that level of trouble, what makes Turing worthy of reimplementing?

Author:  md [ Tue Oct 11, 2005 10:01 am ]
Post subject: 

Why, to say I did it of course! Need I have any other reason? It's stupendously useless, and this is a perfect canidate for a time wasting project!

Actually it'd be kinda fun because I've never written an interpreter before... virtual machines yes... but it's just not hte same.

Author:  beard0 [ Tue Oct 11, 2005 10:51 am ]
Post subject: 

I already did this, when I wrote an http server in turing. I made my server recognize requests for files with the extension ".txe" execute the coresponding turing .exe on the server computer. It then passed GET variables to the turing executable using a predifined protocol, using turing's Net module. Through the same connection, the turing executable told the server what to ouput to the client. So it was a server-side implimentation (i.e. not like javascript - more like php).

Author:  Tony [ Tue Oct 11, 2005 11:28 am ]
Post subject: 

well to get it running as JavaScript, you would need to have user have something installed client-side.. which is the issue that brought this up in the first place Laughing

Though yeah, what beard0 has done Wink You could even output images by saving graphics in a web folder Laughing

Author:  beard0 [ Tue Oct 11, 2005 11:47 am ]
Post subject: 

Tony wrote:
You could even output images by saving graphics in a web folder :lol:


Hmm? Was this directed at me and my server? If so, my server already does serve up images from a defined folder and subfolders. The one problem is that if it gets too many requests at once, it can't deal with them, as Turing has no way (to the best of my knowledge) to move a connection to another port, freeing up port 80 for a new connection. This results in about half the images on a webpage not showing, as the server was busy with another image requested by the browser when they were requested.


: