
-----------------------------------
Token
Sun Oct 09, 2005 10:20 am

Embedding Turing in a webpage?
-----------------------------------
Well today I saw this topic,  Embedding Turing files in startup 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.

-----------------------------------
[Gandalf]
Sun Oct 09, 2005 1:15 pm


-----------------------------------
I think before someone did that, they would first make a version of Turing from the ground up, but better :P.
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.

-----------------------------------
Tony
Sun Oct 09, 2005 2:01 pm


-----------------------------------
you mean getting Turing executable to run as CGI? :?

-----------------------------------
[Gandalf]
Sun Oct 09, 2005 2:16 pm


-----------------------------------
I think he means more of making "TuringScript" :lol:

-----------------------------------
Tony
Sun Oct 09, 2005 3:00 pm


-----------------------------------
Turing is not a scripting language though - it must be compiled.

I don't see any advantage of having a "TuringScript" :lol:

-----------------------------------
Token
Mon Oct 10, 2005 10:38 am


-----------------------------------
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.

-----------------------------------
wtd
Mon Oct 10, 2005 11:38 am


-----------------------------------
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.

-----------------------------------
Token
Mon Oct 10, 2005 11:41 am


-----------------------------------
If I may

No you may not!  :lol: 

and that is exactly what I meant.

-----------------------------------
[Gandalf]
Mon Oct 10, 2005 2:16 pm


-----------------------------------
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.

Yes Java sucks, but it's marginally better than Turing
:lol:

-----------------------------------
Token
Mon Oct 10, 2005 2:26 pm


-----------------------------------
that would be good, who would want to take on a project like that? i dont know any languages to do it in.

-----------------------------------
[Gandalf]
Mon Oct 10, 2005 2:29 pm


-----------------------------------
How about Java ;) 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.

-----------------------------------
Tony
Mon Oct 10, 2005 3:08 pm


-----------------------------------
Ruby + Rails + RMagick + AJAX

I suppose you one could build an applet-like interpreter... :think:

-----------------------------------
md
Mon Oct 10, 2005 6:11 pm


-----------------------------------
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...

-----------------------------------
wtd
Mon Oct 10, 2005 10:58 pm


-----------------------------------
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?

-----------------------------------
md
Tue Oct 11, 2005 10:01 am


-----------------------------------
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.

-----------------------------------
beard0
Tue Oct 11, 2005 10:51 am


-----------------------------------
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).

-----------------------------------
Tony
Tue Oct 11, 2005 11:28 am


-----------------------------------
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 :lol: 

Though yeah, what beard0 has done :wink: You could even output images by saving graphics in a web folder :lol:

-----------------------------------
beard0
Tue Oct 11, 2005 11:47 am


-----------------------------------
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.
