Try REBOL 3... (server needed)
Some of you have mentioned the "Try Ruby (in your browser)" page that lets you try Ruby from your browser. It's basically an HTML text-area that uses a browser script to send what you type to a server that runs Ruby and returns the result.
When I first saw this page several years ago, I found it a bit amusing. After all, users can download and install REBOL in about the same amount of time as bringing up that web page and typing a few lines, so why not just do that?
However, I will admit that the world sets it's own expectations. Despite the fact that you can download and install REBOL in just a few seconds, that does not mean that the world really believes that statement... and is willing to give it a try.
Of course, you could also ask what benefit there is in typing lines into a browser text-area when you're a new user and don't really know what to type. The Try Ruby demo helps a bit by suggesting some basic lines.
But, you know me, sure... I decided to give it a try. I typed:
>> print ["hi" 1 2 3]
and Ruby returned:
"(eval):17:in `run_line': compile error\n(eval):17: syntax error, unexpected tINTEGER, expecting ']'\nprint [\"hi\" 1 2 3]\n ^" SyntaxError: (eval):17:in `run_line': compile error (eval):17: syntax error, unexpected tINTEGER, expecting ']' print ["hi" 1 2 3]
Hmmm. I figured I'd give it something more fun and evaluative to "think about"...
>> print [1 + 2 "is" 3]
The response printed was:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator, ...
Sure, these things happen. We don't throw stones from glass houses.
But, it got me thinking... would our errors be any more friendly? So, to be fair, I decided to try some Ruby in REBOL. I found this in the tutorial:
def initialize(names = "World") @names = names end
and, I typed it into REBOL:
>> def initialize(names = "World") ** Script error: def has no value >> @names = names ** Syntax error: invalid "email" -- "@names" ** Near: (line 1) @names = names >> end ** Script error: end has no value
So, REBOL wasn't too harsh. In fact, if we had the WHY? feature better documented, users could quickly open to the online doc pages that describe what the errors actually mean. For example, these pages explain our famous has no value error message.
So, maybe it would be an interesting experiment to build a "Try REBOL" page now that 3.0 is almost beta. (In fact, maybe it already exists out there... and I've simply "lost my links" again.)
Is there a REBOLer out there interested in coding up the browser script and/or putting the backend on a server? I can provide the REBOL 3.0 executable and link to the page. (Sorry I can't do more... I'm a little short on time right now with development tasks.)