TryRuby for BASIC: I Want One

Have you seen Try Ruby? I want one for BASIC. And maybe for JScript. Except I want the interpreter to be in the browser, not on a server.

Comments (4)

  1. Max Battcher says:

    JScript is easy: some Browsers have a "JScript Console".  You can emulate one with a simple HTML document with a TextBox that eval()s the textbox and clears it on submit/enter/whatever.

    BASIC is a bit tougher.  You probably want to build a JScript-based interpreter.  (Unless you plan on IE-only and then you can get away with eval()ing VBScript.)

  2. johnmont says:

    JScript should be easy, but it’s the learning content that’s the experience I want. BASIC would require someone to write a BASIC interpreter in JScript. All "should be easy," but the devil would be in the details.

  3. If what you’re saying by "in the browser" is that you want the presentation benefits and educational potential of hypertext and the deployment ease of a URI, +1.

    But why do you care what CPU executes the interpreter? With a locked-down security context, hard-wiring "using" references, and perhaps some judicious GAC manipulation, you should be able to create a void InterpretBasic(string functionBody) that is safe. Of course, you’d have to interpret the function inside a controlled context (e.g., no more than 1 second of execution time allowed).

  4. johnmont says:

    The main reason I want it executed on the client is so the server doesn’t get overloaded. The main reason of "in the browser" is to eliminate the need to have any bits persisted onto the client.