From: kim kubik Date: 2005-11-03T04:27:07+09:00 Subject: Re: [OT] Ruby vs REBOL "Peter Carlsson" wrote > I apologize if this is a little bit off topic. > > As part of my master thesis I am about to develop some > scripts using Ruby. As I have never used it before and > using REBOL for six years I would like to ask if anyone > could give a brief summary of what's the difference > between Ruby and REBOL. The main diff is Ruby is open source which implies a whole lot more than the mere fact that anyone can browse the source. Not exactly what you're looking for but is sort of cute, it's excerpt from a posting to comp.lang.python, October, 1998 when the "amazing new language" was just released: ---- ---------------------------- Here's a REBOL session: >> print 1+2 ERROR discovered in function port_read: Invalid INTEGER on line 1: 1+2 (malformed or too long) Returning to top level. (Note REBOL's human-friendliness compared to Python: Python burdens users with 50% more ">" characters at the start of a prompt, and confusingly treats "1+2" as three distinct tokens despite that there's nothing to separate them save computer-centric convention. Proper REBOL is apparently the human-centric): >> print 1 + 2 3 (So there! It's simple. Or at least simpler than the alternative) >> print do [1 + 2] (which also works. OTOH): >> print 1 + 2 * 3 9 (The manual claims that this left-to-right evaluation is "for the convenience of users". It starts by saying "REBOL operators and functions have no preferred ordering or precedence", later qualified by the warning "Ignoring REBOL's preferred ordering can be a source of errors in your scripts.") >> print 1/2 (yields an "invalid DATE" error, while): >> print 1 /2 (yields "unimplemented functionality", while): >> print 1 / 2 (yields 0.5) At higher levels, REBOL's semantics appear to be derived from Scheme's, with first-class lexically scoped functions, closures, and even first-class continuations. The syntax is friendlier ("more infix") but also quirkier. REBOL has acollection of built-in datatypes with native syntax: dates, URLs, email addresses, currency, and even IP addresses are primitive notions. This could be very attractive for some users. E.g., at the REBOL prompt I typed: >> send t...@email.msn.com "Did this work?" and in response it dialed my modem, connected to my ISP, and then REBOL crashed after provoking an invalid page fault in kernel32.dll. Then my connection broke, and the modem dialed and connected again. Then it just sat there until it timed out.