Aha! So RR is just like HyperCard - except for custom properties and a few other querky things - as I knew all along. Thanks for the confirmation. No sarcasm intended. I'm serious!

Joe Wilkins

On Mar 29, 2007, at 8:12 AM, Devin Asay wrote:

On Mar 29, 2007, at 5:27 AM, Simon HARPER wrote:
Hi there, and I do agree that, as a coder of 15 years, I would normally go on gut instinct. However, being used to c/c++, Java and Perl the Revolution Transcript syntax and expressions are not 'natural' for me, as I'm trained to think in the more mathematical syntax of these grammars and not the more discursive grammar of Transcript. I'm sure I'll get it with persistence but I just think that coders moving over could really do with good documentation as it just is not intuitive for a people with experience of these other 'conventional' languages, IMO.

Simon,

Richmond makes a good point, although I think it's an exaggeration to say RunRev don't take documentation seriously. What most developers, including myself, have discovered after a few weeks is that the structure of the Rev scripting language (AKA Transcript) is pretty consistent and therefore new things become easily discoverable once the structure "clicks" in your brain. Here are some of the "aha!" moments that helped me figure out Xtalk scripting.

Rev scripting and object naming is case-insensitive.

Variables are untyped.

= is a logical comparison operator, not an assignment operator.

almost all operators have both symbolic and verbose variants:
        = - is
        <> - is not
        + - add

To assign a value to a data container use
put <value> into <container> (not <container> = <value>)

There are *lots* of synonyms; eg., the constant return = cr = lf = linefeed;

Internally, all line delimiters are ASCII 10 (LF), but Rev automatically translates to and from the OS native line delimiter when reading and writing text files.

The word 'the' is important; it means that what follows is a property or a revolution function the <property> of <object> : set the visible of btn 1 to not the visible of btn 1
        the <function> of <argument> : put the sqrt of 9 into myvar
But functions also have an "algebraic" form:
        <function>(<arg>): put sqrt(9) into myvar

Since Rev tries to be helpful, it's not picky about the use of 'the' and will try make sense of a statement missing a 'the'. It usually succeeds.

Sometimes it's hard to tell the difference between properties and functions.
        Corollary: the distinction usually doesn't matter.

You create variables by naming them in a statement.
        put 100 into george

You create custom properties, which act just like built-in properties, by naming them in a statement:
        set the squirrelCount of button "startSquirrels" to random(15)

Arrays are really lookup tables, indexed by key strings, not numerically.
        put "squirrel" into cage["favoriteRodent"]
put "squirrel" into cage[1] -- is the same as -- put "squirrel" into cage["1"]

Object references are verbose, Rev doesn't use dot notation:
        button "mybtn" of card "mycard" of stack "mystack"

I apologize if these seem trivial or too basic. They are just things that "clicked" for me as I traveled along the xTalk path.

Maybe others can share similar "Aha!" insights about the nature of the Rev scripting language.

Regards,

Devin


On 29 Mar 2007, at 12:15, Richmond Mathewson wrote:

I beleive one of the main reasons RR does not spend a
lot of time and resources on updating documentation is
because a very large number of programmers don't read
the documentation in anything but a cursory manner -
relying on their intuition, their past experience and
their willingness ot "get their feet wet" instead.

When I was learning PASCAL (Durham, 1984) the standard
joke going around the computer labs was that the last
person to write a computer programming manual had had
a mausoleum constructed out of unsold copies.

I have yet to read a really user-friendly programming
manual as most computer-programmers who write manuals
do not seem to spend a lot of time on audience
research or the finer points of reader-response
theory.

The other reason why RR may not take their
documentation too seriously is that, in my experience,
the best manual I am aware of for Runtime Revolution
is this Use-List - it is dynamic, adaptive and
generally very friendly.


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to