Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Rebol vs Ruby

 [1/12] from: galtbarber:mailandnews at: 19-Dec-2000 12:07


Librarian comment

More recent discussion here. 

I have been away from the list for a while, so forgive me if this has already been hashed to death. I just a few days ago ran across references to Ruby, a newish programming language invented by a man in Japan (Matsumoto something...) and it seems to have many features similar to Rebol. http://www.ruby-lang.org/en/ Anyway, as I was reading about it I started making a rough comparison to rebol. Weird how similar the names are. Anyway, let's see... They both have good web support, are interpreted, support advanced data structures, have automatic garbage collection, have context/closures, error-handling. Platform Rebol ++ great, easy install, works on lots of platforms Ruby - oriented towards unix, can work on windows with effort., only works in places like unix, and windows and dos and a few other platforms which can cobble together unix-like behavior with various add-on support modules. Multithreading Rebol - I know the apache server has some threading, but not basic reb. Ruby + good support for threads and semaphores Grpahics Rebol + graphics available now, no charge, and platform indep., easy to use Ruby - still don't have it built in, only some links to tk and other unix libs Open Source Rebol - no open source Ruby + strong open source community OOP Rebol ? rebol objects don't have real inheritance, you can do useful stuff, but they often just act as nice containers. Ruby + everything is an object, this is real oop, albeit single-inheritance. (personally, I don't care that much about oop, but if you do, you will like Ruby's oop) Performance Rebol ? Performance boosted at the loss of continuations and other niceties. Ruby ?- Probably has perf. not quite as good, but still pretty good, and they haven't jettisoned continuations, which is cool. Packages - modules for large sw dev. Rebol ? I haven't been following, but Rebol's are improving all the time Ruby + they seem to have good support for modules/libs/namespaces Size Rebol ++ Nice and small and easy to install Ruby ? Not sure how big, but probably not small like Rebol. Syntax Rebol + I like Rebol's syntax, don't suffer from endless parentheses and ; Ruby -? Pretty good syntax, but lots of "end" keywords everywhere Closures Rebol - Boo, hoo, I miss them Ruby + Yeah, they still got 'm Web Protocols Rebol + built in, could often use better doc. and examples, and some stuff like support for cookies is still lame addon Ruby ? seem to have good stuff, but as external package it is not quite as built in and ready to go, but still not bad. Object Serialization (saving and sending 'em) Rebol - nothing on the map yet, and it would add a whole new dimension, but problems as the definition of "binary" data and other types is not defined. Ruby + apparently, it is supposed to have good support for serializing objects, which is pretty cool. List as fundamental data element Rebol + has them built in, and very useful with good performance. Ruby ?- has great object support, but list support is an afterthought not an inherent tool. Ability to Link Foreign Code Rebol ? can do somewhat with Rebol/Command only? Ruby + supposed to excel at this Perl-like features Rebol + doesn't have 'em, I don't like perl much Ruby ?- partly Ruby was invented as a much better perl, has perl-like features Built-in utility features Rebol +/- platform isolation, but then you can't access some file attributes, etc. Ruby + supposed to be strong at this, although very unix-oriented Cost Rebol +? Not expensive, basic rebol and /view are free! Ruby + Hard to beat free Globalization support Rebol ? I always wondered why Rebol was not designed for an international global world. Only ascii support apparently at this time. Ruby + Partly because it's inventor is Japanese, this language is supposed to have excellent support built-in for handling lots of languages way beyond just plain 256 ascii codes. Well, you know I am extremely fond of Rebol, but it looks like Ruby has the edge in a few areas. While it is harder to install and runs on fewer platforms, lacks built-in graphics and simple installation, it does however have full oop, perl (yuck), good library/ext packages, international lang. support, serialization, and closures, and free open source with strong user community. I am sure some of you have run into this language, what do you think of Rebol vs. Ruby and the future? Note - I am just curious, not interested in flame-fights, and would like to know what some of the intelligent folks on the list here think about it. -Galt

 [2/12] from: gmassar::dreamsoft::com at: 19-Dec-2000 13:52


I don't like Perl or any Perl-like language. Period. Geo... [galtbarber--mailandnews--com] wrote:

 [3/12] from: mat:eurogamer at: 19-Dec-2000 23:23


Heya Geo, GM> I don't like Perl or any Perl-like language. Period. Quite. Looks horrible, 'sides this is the Rebol mailing list isn't it? -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [4/12] from: rebol:techscribe at: 19-Dec-2000 13:25


Hi Galt, Ruby predates REBOL by a year or two (I've been on the Ruby mailing list much longer than REBOL's). IMHO you really cannot compare Ruby to REBOL. From a syntactic point of view Ruby (to me) is extremely cumbersome and cryptic. It is intended as a purely object oriented scripting language and reminds me of a mixture of Java and PHP. Here is a code sample submitted by Steve to the Ruby mailing list: #! /usr/bin/env ruby # Given the number of seconds, convert to English description table = [ [ 31557816, 'year' ], [ 2629818, 'month' ], [ 86400, 'day' ], [ 3600, 'hour' ], [ 60, 'min' ], [ 1, 'sec' ] ] result = "" time = ARGV[0].to_i table.each {|unit, sing, plur| plur = sing+'s' if !plur; size = time / unit if size > 0 result += "#{size} #{(size == 1) ? sing : plur} " end time %= unit } puts result -- [galtbarber--mailandnews--com] wrote:

 [5/12] from: sharriff:aina:med-iq at: 20-Dec-2000 7:30


Hi! I think a better comparism would be : REBOL vs PYTHON check out the features of python (www.python.org) , even Microsoft has shipped a product coded in python. REBOL is a clean, clear language, but Python is just as clean, and clear, itīs got OOP , Database, and bindings to every important graphic toolkit...ermm ..all for free. Regards Sharriff Aina

 [6/12] from: petr:krenzelok:trz:cz at: 20-Dec-2000 9:20


[Sharriff--Aina--med-iq--de] wrote:
> Hi! > I think a better comparism would be :
<<quoted lines omitted: 3>>
> Python is just as clean, and clear, itīs got OOP , Database, and bindings > to every important graphic toolkit...ermm ..all for free.
Yes, maybe that's why we lost folks like Tim Peters who was with us during Rebol 1.x days and is awarded python supporter? On the other side, the question is, if going in the directions where python, php etc. dominates will make ppl change their minds ... Look, I would like to see Apache module with Rebol modules, and component support in Rebol (to simply load /library component to Rebol/Apache e.g.) so much, but RT has to get some money first.It will come, I am just not sure when. Do you know btw. TCL and Python commercial attempts both were not succesfull? ;-) (IIRC ...) Rebol is OK, we just need it to be more modular, async., faster. Everything is planned, it will come. While playing with /View for last few weeks I am not sure any Python, whatever gfx toolkit can offer something similar to View concept .... Cheers, -pekr-

 [7/12] from: sharriff:aina:med-iq at: 20-Dec-2000 12:25


I agree with you to an extent Petr, but Python has bindings standard graphical toolkits like GTK, GNOME, MFC, OPENGL, TK e.t.c which is more useful for programmers that have to support existings programs implemeted in these toolkits. REBOL is still, in my opinion a great language, but as long as the crucial features like Database support are still missing in REBOL/core at present, it would be hard to convince anyone to use it as an allround programming language. My REBOL interpreter is still installed and would stay installed till.... Regards Sharriff Aina P.S APACHE has python modules; MOD-PYTHON.. Petr Krenzelok An: [rebol-list--rebol--com] <Petr.Krenzel Kopie: [ok--trz--cz]> Thema: [REBOL] Re: Antwort: Rebol vs Ruby Gesendet von: rebol-bounce@ rebol.com 20.12.00 08:20 Bitte antworten an rebol-list [Sharriff--Aina--med-iq--de] wrote:
> Hi! > > I think a better comparism would be : > > REBOL vs PYTHON > > check out the features of python (www.python.org) , even Microsoft has > shipped a product coded in python. REBOL is a clean, clear language, but > Python is just as clean, and clear, itīs got OOP , Database, and
bindings
> to every important graphic toolkit...ermm ..all for free.
Yes, maybe that's why we lost folks like Tim Peters who was with us during Rebol 1.x days and is awarded python supporter? On the other side, the question is, if going in the directions where python, php etc. dominates will make ppl change their minds ... Look, I would like to see Apache module with Rebol modules, and component support in Rebol (to simply load /library component to Rebol/Apache e.g.) so much, but RT has to get some money first.It will come, I am just not sure when. Do you know btw. TCL and Python commercial attempts both were not succesfull? ;-) (IIRC ...) Rebol is OK, we just need it to be more modular, async., faster. Everything is planned, it will come. While playing with /View for last few weeks I am not sure any Python, whatever gfx toolkit can offer something similar to View concept .... Cheers, -pekr-

 [8/12] from: riachtchenko:docutec at: 20-Dec-2000 14:33


Hi, It is a lot of clever programmer on this list, and the rebol programming concepts and the rebol shell are the best i ever seen - but isn't it so, that those willing ( and capable) to seriously play with rebol would't have a chance to do it on their own, without undescribe certain agreements with RT - i' m not for or contra open source and read Carl's interview about "open source is teared off ..." - isn't it (ironically) the rebol that could have the undesirable impact from a lack of -desirable? - wide rebol acceptance in the programming wold.? Python is a very good example - just look at what Jim Hinguin , Mark Hammod, Barry Warsaw did for Python - and here (most) have to look up at RT to see if they have done something.. - OK, you could say - "how about you?"- i dont' bother; - i think that many would'n even think about rebol if they know it's not open... Those of you that have definitive insigths about rebol's development and plans would say - wait, we have more in the pipeline -! If i'm wrong i would rather hear it. Thanks Sascha. [Sharriff--Aina--med-iq--de] wrote:

 [9/12] from: kracik:mbox:dkm:cz at: 20-Dec-2000 15:03


Wow, Python has bindings for OpenGL, and I still use C++ for that :-( Has anyone with REBOL/command tried binding and calling OpenGL or Mesa library? Realtime 3D graphics would be way cool in REBOL! -- Michal Kracik [Sharriff--Aina--med-iq--de] wrote:

 [10/12] from: jkinraid:clear at: 21-Dec-2000 11:10


Michal Kracik wrote:
> Wow, Python has bindings for OpenGL, and I still use C++ for that :-( > Has anyone with REBOL/command tried binding and calling OpenGL or Mesa > library? Realtime 3D graphics would be way cool in REBOL!
Yes, I did have that running (can't remember how well). I don't use Command now so it is stuck in limbo :) Julian Kinraid

 [11/12] from: chaz:innocent at: 20-Dec-2000 23:16


I'm trying to figure out how to implement what I think that code does. Unfortuately I get an error. It looks like it's trying to parse a series of blocks. The blocks are in the form of units of time measured in seconds, singular form of the unit, and the plural form of the unit.
> table.each {|unit, sing, plur| > plur = sing+'s' if !plur;
If the plural is absent, we assume that it is formed by adding s to the singular form. For instance the plural of "year" is "years", but perhaps, as in some contrived situation like this, the plurals cannot be formed this way. table: [ [31557816 "year" ] [2629818 "month" "rewarding months"] [86400 "day" ] [3600 "hour" "enjoyable hours"] [60 "minute" ] [1 "second" ] ] time: 2629818 + 2629818 + 2629818 + 3600 + 3600 + 15 ; I expect the output "3 rewarding months 2 enjoyable hours ; 15 seconds" result: "" rule: [ set unit integer! set sing string! set plur [none! | string!] ] foreach line table [ ; parse returns false if there is no plural entry if not [parse line rule] [plur: rejoin [sing "s"]] ; Unfortunately the error occurs here size: time / unit ; We want to take the integer part of size and compare it to 1 to ; determine if we need to use the singular or plural form. if [to-integer size > 0][result: rejoin [result size " " either [size 1][sing][plur]] " "] time: time // unit ] print result chaz At 01:25 PM 12/19/00 -0800, you wrote:

 [12/12] from: rebol:techscribe at: 21-Dec-2000 0:16


Hi chaz, I think that using parse is overkill in this situation. Here's pretty much your code which replaces the parse rule and the use of parse by using the following construct: foreach line table [ set [unit singular plural] line Here's the complete modified code: REBOL [] table: [ [31557816 "year" ] [2629818 "month" "rewarding months"] [86400 "day" ] [3600 "hour" "enjoyable hours"] [60 "minute" ] [1 "second" ] ] time: 2629818 + 2629818 + 2629818 + 3600 + 3600 + 15 ; I expect the output "3 rewarding months 2 enjoyable hours ; 15 seconds" result: "" foreach line table [ set [unit singular plural] line if not plural [ plural: rejoin [singular "s"] ] size: time / unit ; We want to take the integer part of size and compare it to 1 to ; determine if we need to use the singular or plural form. if (to-integer size) > 0 [ result: rejoin [ result size " " either size = 1 [singular][plural] " " ] time: time // unit ] ] print result chaz wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted