Click to See Complete Forum and Search --> : "Real" programming in a web page


dsc
02-25-2003, 03:35 PM
This is a long shot... I'm looking for a way to test fairly simple programs using nothing but a web browser (connected to the net). The idea is to be able to enter code in C, C++, Java, or Python into a text window, then compile/interpret the code and view the output (obviously this would only work for console applications, and would be generally very limited, but I'm fairly sure it's doable), and to do all this from any net-connected browser.

My notion is that there ought to be something on the order of a Java applet that serves as a container for a command-line compiler or interpreter. The closest thing I've been able to find so far is the Comeau "test drive", but that's a little too limited. Does anything else even exist? Needless to say, it should be on a publicly-accessible web site.

Energon
02-26-2003, 10:18 AM
Read the text in a form, which is passed to a perl app that can run gcc/g++ or whatever on the code, then run the code. Redirect stdout to a file when you run, print that file to the page via the perl script. You can't do input this way, but it'll work for output.