r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[I'm new] Ask any question, and a helpful person will try to answer.

DanielSz
3-Jun-2007
[456]
The more coding paradigms you know, the better it is. Rebol is great, 
but doesn't preclude you from investing tile in other languages. 
Rebol is one of the highest level language you will find, with maximum 
expressiveness. But learning Lisp is a whole experience, and OO coding 
is kind of vital these days as well (for GUI stuff, for example). 
Anyway, I got to Rebol because Carl sold it very well  to my ears. 
I was a Rexx scripter, coding also in javascript, actionscript, and 
lua. Lua  is great, as well. Compares well in some respect to Rebol. 
Good luck.
Geomol
3-Jun-2007
[457]
I remember, I found it hard at first to read and understand REBOL, 
but after some time I got it. My example above is maybe a good example. 
It is evaluated like:

insert (back (tail serie)) (somefunc + 1)


So 'insert' take 2 arguments, 1. and 2. outermost parenthesis. 'back' 
take 1 argument, so does 'tail'. 'serie' is a variable. 'somefunc' 
is a function taking no arguments. '+' is an operator connecting 
'somefunc' and '1'. If a programmer can think this way easily, REBOL 
should be no problem.
BrianH
3-Jun-2007
[458]
I first got into REBOL on a complete whim - back then I used to learn 
and make new programming languages for fun.


If you want to understand PARSE, it helps to have some background 
in parser generators, particularly recursive decent ones like Coco 
or Antlr. You can do more with PARSE, but the basic way you structure 
parse rules follows the LL model. Knowing regular expressions will 
not help.
[unknown: 9]
3-Jun-2007
[459]
Perhaps a great question to ask is not what is the best language, 
but rather,  but what feels the best to program in.
BrianH
3-Jun-2007
[460]
That's why I'm still here :)
[unknown: 9]
3-Jun-2007
[461]
Rebol is...........................fun.
Henrik
3-Jun-2007
[462]
I hang on, because of the enormous potential in it. Something like 
Rebcode and how it's implemented shows that. If Python or Ruby were 
a hand grenade, REBOL would be a nuclear bomb. :-) Not that direct 
comparisons are appropriate.
Sunanda
3-Jun-2007
[463]
Forgot, I used to write a lot of mainframe Rexx -- it sort of primes 
you for REBOL.

REBOL is so elegant; but it is more than a toy language designed 
for elegance....It can lift heavy weights too.
Maarten
3-Jun-2007
[464x4]
I think that REBOL "scales your mind" - that's both very god and 
very confronting.
god -> good
The fact that it's one small yet complete executable and rebol.org 
has scripts for things like XML etc. ... I have seen REBOL scale 
from netowrk management tools to e-bank prototypes to ...
Lisp let's you think thoughts previously not thought possible. REBOL 
makes you use them.

 In a way it may wreck a programmers view of the world because a lot 
 of other technologies may become.... annoying
DanielSz
3-Jun-2007
[468x10]
Rebol may become your most useful asset in your toolbox, because 
it's expressiveness and its ease of use, but it will not help you 
understand computer science, precisely because it is so intuitive. 
Anyone trying to grasp the fundamentals of programming will have 
to delve in other languages and paradigms. Also, Rebol didn't spring 
from the void. It is grounded in what Carl knows and he knows a lot. 
I think the link with Lisp is obvious. Parsing comes from the BNF 
grammar. I greatly benefited from studying S-expressions. Look at 
how Lua implements associative arrays (tables), it is very instructive, 
very powerful, they are better than hashes in Rebol, (Carl has expressed 
interest in his blog to revise them). Another thing Lua got right 
is size, it is smaller than Rebol. Lua can be ported more easily, 
it is available on the palm platform for years now. Rebol still promises 
this. Learn Rebol, but don't stop with Rebol.
The integrated internet protocols in Rebol is a great strenth. S-
S-expressions shows that code is data, and data is code. Blocks are 
conceptually the equivalent in rebol. I don't know if they are on 
par, though. It's an interesting topic.
OO in Rebol is prototype based, like in javascript, actionscript, 
lua. Unlike Smalltalk or Java, which are class based.
The guru in terms of explaining programming concepts in Rebol is 
Ladislav Mecir. His articles are a must.
Carl said in his rebol 3.0 front line blog: In REBOL 3.0, closure 
functions are implemented with the closure! datatype and a new mezzanine 
function called closure. That is significant in terms of programming 
techniques.   Ladislav shows how you can achieve them in Rebol 2. 
http://www.fm.vslib.cz/~ladislav/rebol/contexts.html
The thing is, you don't have to understand advanced concepts in order 
to use Rebol. Anyone with some willingness is ready to roll some 
Rebol code. That is great, and if one continues to learn on the side, 
one wins on all the fronts.
In the preface to Structure and Interpretation of Computer Programs, 
Abelson and Sussman state 

“First, we want to establish the idea that a computer language is 
not just a way of getting a computer to perform operations but rather 
that it is a novel formal medium for expressing ideas about methodology. 
Thus, programs must be written for people to read, and only incidentally 
for machines to execute.”
Lots of the fun with Rebol comes from its readability. To be fair, 
lots of people testify the same with Ruby.
Sorry for my ramblings. I'm done now.
Chris
3-Jun-2007
[478x2]
I'm intrigued by Ruby's ability to minimize statements (for example 
here -- http://www.softiesonrails.com/2007/5/22/ruby-101-clear-code
)  There does seem to be cases where Ruby can be more concise/expressive 
than Rebol.
Perhaps that should be concise -- the expressive I guess is the ability 
to set the condition after the action, in a way that is easier for 
our brains to parse.  Of course, the core of Rebol's expressiveness 
is that the language is built on top of a consistent, robust vocubulary 
(datatypes), though it can take time to learn how to construct the 
most expressive statements.  Ruby is not instinctively reflective 
(is this the right term)?  Now I'm rambling...
Oldes
3-Jun-2007
[480]
I still prefere:

shutter_clicked: does [while [camera.on? and camera.memory_available?][capture_image]]
DanielSz
3-Jun-2007
[481]
Nice article, shows how modifiers are used in Ruby, a fine language 
by all accounts. I suppose you would resort to the dialecting facilities 
of rebol to achieve similar constructions.
Chris
3-Jun-2007
[482]
(someone already posted that link in AltME, don't remember who, sorry)
Oldes
3-Jun-2007
[483]
using...

def go_crazy
    capture_image until @camera.memory_card_full?
end


...seems to be useless if you need to do more than just call one 
function.... but I don't know Ruby at all, so maybe I'm wrong
Chris
3-Jun-2007
[484x3]
Yes, but in this instance, it is easy to read.
In dialects, it is possible to order things as you wish.  In filtered-import.r, 
a rule can be followed by a condition message:

foo: integer! else "Not an integer!"


But that is limited to dialects.  In Rebol proper, you'd be limited 
to:

while [camera/memory-available?][capture-image]
or
until [capture-image camera/memory-full?]
until [capture-image camera/memory-full?] -- is an awkward construct.
Oldes
3-Jun-2007
[487x3]
REBOL: while [camera/memory-available?][capture-image]

RUBY:    def go_crazy capture_image until @camera.memory_card_full? 
end
I still prefere Rebol:)
and I don't know if you can write it all at one line in Ruby
Chris
3-Jun-2007
[490]
To be fair:

REBOL: while [camera/memory-available?][capture-image]
RUBY:     capture_image until @camera.memory_card_full?
Oldes
3-Jun-2007
[491]
ok.. that's true
Sunanda
3-Jun-2007
[492]
As Oldes says: it looks great until you need to change the action 
[capture_image] with something more complicated....Say two functions: 
What then in Ruby?
Chris
3-Jun-2007
[493x2]
Or:

REBOL: while [not camera/memory-card-full?][capture-image]
RUBY:   capture_image until @camera.memory_card_full?
I'll leave that to someone else (like I said, I'm intrigued -- I 
don't understand :)
Oldes
3-Jun-2007
[495]
The true is... thay have very nice looking pages:-(
Chris
3-Jun-2007
[496]
It seems Ruby is full of such shortcuts -- I'd love to know if they 
really are effective the larger an application becomes.  I've seen 
it written that RoR is reknowned for it's expressive approach to 
building web apps, but that expressiveness is lacking if you actually 
delve into the actual RoR application code.  I guess Rebol has its 
dark secrets when you e.g. are exploring the internals of the View 
system...
Sunanda
3-Jun-2007
[497]
Scalability/maintainabilty are an important issues.

Carl, in an early Zine article shows a way of shortening a REBOL 
assignment:
http://www.rebolforces.com/zine/rzine-1-02/#sect10.

Clever, but I was never convinced it added to maintainability -- 
what if additional processing was needed when settimg data to "active" 
?
Pekr
3-Jun-2007
[498]
What is so special in linked Ruby examples? It is just few variables/methods 
tested, just that those are named in enlgish like manner.
DanielSz
3-Jun-2007
[499]
From the article: The key is to know that keywords like return, while, 
if, unless, and until can be used as modifiers. This means that you 
put the conditional part after the keyword. Sounds silly, and sometimes 
it is. But sometimes it has a big payoff.
Chris
3-Jun-2007
[500]
Petr, it's all about expression, and expression is the key to leveraging 
any language, no?
Pekr
3-Jun-2007
[501]
Yes, but with dialects, you can be as free form as you wish ... well, 
mostly ... But of course that is different - you have to construct 
your grammar ...
Geomol
3-Jun-2007
[502x2]
What would it mean, if I in Rudy wrote:
func1 while cond1 func2 while cond2 func3 end

Would it be:
(func1 while cond1) func2 (while cond2 func 3 end)
or
func1 (while cond1 (func2 while cond2) func2 end)
or what?
*Ruby*
Anton
4-Jun-2007
[504x2]
In rebol I can make my own function to order the condition and action 
arguments how I want, but, as easy as this is,  I generally avoid 
this and just use Rebol's built-in control functions. This means 
that other users can understand what my code is doing without scraping 
around looking for the custom control flow function that I put somewhere. 
(I put myself in the "other user" category after a few weeks have 
passed since writing the code...)
So I gnash my teeth sometimes at the argument order in some functions, 
wishing for the order to be different, but it is a perfectionist 
restriction I'm putting on myself, really.