Re: Immediate/Compile Time Execution for
if Runtime exposed a lower level API the xTalk,Transcript ... community could build language extensions. Frank, As a business applications programmer, I rarely have occasion to program at the level you describe; so pardon me if I'm missing the big picture. * One can extend the language to recognize new commands by writing handlers to perform the functionality and placing them in a library stack or other script. * One can extend the language to recognize new commands by writing externals in C or another language and including the externals in a library stack or other stack. * One cannot write one's own version of a Transcript command with the same name and place it in the message path ahead of the engine [just tested this] So it seems to me one can EXTEND Transcript functionality without too much difficulty. The problem arises when one tries to MODIFY existing Transcript command functionality or add/change compiler syntax.. Before I wrote a handler to resolve SDB field name references to the correct record field at runtime, I gave some thought to writing a script preprocessor that would let the developer reference fields by dataname in the Script Editor and convert the script text to change references like "TYPE:dataName" to "item [fieldNumber] of TYPEBuffer -- >TYPE:dataName<" before compiling and to convert the references back when the developer reedits the script. With such a preprocessor, you should be able to script "x=1" and have the preprocessor convert that to "put 1 into x" and vice versa. I run out of ideas that don't require cooperation from the Run Rev team at this point. -- Rob Cozens CCW, Serendipity Software Company http://www.oenolog.net/who.htm "And I, which was two fooles, do so grow three; Who are a little wise, the best fooles bee." from "The Triple Foole" by John Donne (1572-1631) ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for
> Ken Ray: > on preOpenStack > start using "libMyStuff.mc" > end preOpenStack > It simply looks for a stack with that name in the current directory and > then loads it as a library. The stack doesn't have to be already open > and in memory to be able to "library" it. Thanks, I was not aware of this the documentation did not elude it in any way. Is is possible to call it like so: start using "../common/utils.rev" (and is this multi-platform compatible) I ask since I am not readily at a computer with RR to test it myself. > Rob Cozen: > As others have noted, there is considerable discussion of this > subject in the List archives. > The solution I have proposed, and would be interested in hearing your > reaction to, is support for an external symbol table stack that would > be referenced by the Script Editor when compiling. > Using the symbol table, a developer could: > 1. Declare constants globally instead of inside every script that > references them > > 2. Explicitly type variables, including pointers & handles > > 3. Define record structure field names, assigning variable type & offset > > 4. Define system call names, including # of arguments & "system glue" > (eg: register assignment) info > > The compiler would check the symbol table stack(s) [if present] when > resolving symbols. This would definitely be a step in the appropriate direction. However, if Runtime exposed a lower level API the xTalk,Transcript ... community could build language extensions. Thus releasing Runtime developers to focus more important things. Personally, I have always been a low level developer I prefer creating my own constructs and expanding on those already present. If I do not like something about a language I would like to have the power to correct it or circumvent it. > Brian Yennie: > > I'm a bit lost as to where you're headed with this, but hopefully some > of this background helps: > * Transcript is compiled into bytecode when you save a script. It is > not purely interpreted- think Java (conceptually at least). > * The "do" command allows you to execute arbitrary scripts at runtime, > but is subject to the scriptLimits property. > * You can write your own "handlers" to add commands and functions to > the language > * You can write externals in C or C++ to add commands and functions to > the language > * There are no #if, #include, #define, etc directives, but there is > "start using" , "insert script" and constant declarations. > * commandNames(), functionNames(), externalCommands() and > externalFunctions() can give you a list of all built-in commands and > functions, along with external commands and functions. Thanks, for the education! My purpose originally was to simply be educated about the compile time/immediate constructs available to me. Since it seems the documentation I have fails to address those individuals interested on the lower level facilities. Now I would like to persuade RR to give developers access to the the lower level building blocks so we can extend the language ourselves. ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for
I'm a bit lost as to where you're headed with this, but hopefully some of this background helps: * Transcript is compiled into bytecode when you save a script. It is not purely interpreted- think Java (conceptually at least). * The "do" command allows you to execute arbitrary scripts at runtime, but is subject to the scriptLimits property. * You can write your own "handlers" to add commands and functions to the language * You can write externals in C or C++ to add commands and functions to the language * There are no #if, #include, #define, etc directives, but there is "start using" , "insert script" and constant declarations. * commandNames(), functionNames(), externalCommands() and externalFunctions() can give you a list of all built-in commands and functions, along with external commands and functions. HTH So, when tha apply button is invoked the routines/interpreter that builds the "tokens" has no parse directives? Are there no #if style constructs? I guess some documentation on specifically how the compile/tokenization process occurs would be helpful. Is the metacard/transcript compiler using the TIL concept of words? Doese metacard/transcript have a header segment or dicrionary that is accessible? So each of the words/handlers have a IMMEDIATE bit or identifier? I understand these are rather "under the hood" questions I just fiqure that they would be in the documentation. Kevin ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for
I would like to be able to extend the language/standard library itself. Kevin, As others have noted, there is considerable discussion of this subject in the List archives. The solution I have proposed, and would be interested in hearing your reaction to, is support for an external symbol table stack that would be referenced by the Script Editor when compiling. Using the symbol table, a developer could: 1. Declare constants globally instead of inside every script that references them 2. Explicitly type variables, including pointers & handles 3. Define record structure field names, assigning variable type & offset 4. Define system call names, including # of arguments & "system glue" (eg: register assignment) info The compiler would check the symbol table stack(s) [if present] when resolving symbols. -- Rob Cozens CCW, Serendipity Software Company http://www.oenolog.net/who.htm "And I, which was two fooles, do so grow three; Who are a little wise, the best fooles bee." from "The Triple Foole" by John Donne (1572-1631) ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for
> I am currently using "start using" and "insert the script of" > syntax and evaluating the pros and cons of each. However, my > question is one of larger scope I would like to be able to > extend the language/standard library itself. With many other > languages there exists a facilities to extend the language. > Via classes in the case of C++, objects in the case of Java > and Small-talk, and WORDS in the case of FORTH. I have even > built objects in FORTH (similar to MOPS). It is my hope > that we as developers can further the language and it's > success. With such constructs this would be simple and allow > a amazing flexibility. Kevin, what your asking for is not currently available to developers (AFAIK). This would need to be built in by the RunRev engineers to enable this kind of language extension. There has been a lot of talk about extending the capabilities of the product, so you're certainly welcome to ask for this enhancement (there's a place on Bugzilla for that if you didn't already know), but people are using libraries to add centralized handlers and functions to either the IDE or to their deployed applications. > Just another small note. The "start using" syntax refers to > a "stack" not a "file" the stack must be "in memory" in my > understanding. I would like to create a "#include" that > would solve these dependicies without developer/inteligent > intervention. Thus removing the most problematic variable > from the equation (human error). Actually, this is not true. If you do: on preOpenStack start using "libMyStuff.mc" end preOpenStack It simply looks for a stack with that name in the current directory and then loads it as a library. The stack doesn't have to be already open and in memory to be able to "library" it. HTH, Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for
Kevin- I'm not sure where you're trying to go with this thread, but Transcript by its nature extends the language as you go along. For example, the Forth statement : beeps 0 do beep loop ; would be coded in Transcript as on dots howMany repeat with howMany beep end repeat end dots and then you would use it the same way: 4 beeps so you're actually building extensions to the language as you go along, much the same way that you extend the Forth dictionary. Not much support for vocabulary switching, though, if you're used to that. There's no explicit support for objects, although there's been a lot of discussion about it. You can always do aggregate objects, of course, but there's no subclassing. I think my development time in Transcript is about equal to that in Forth and there's a much richer set of existing functions and operators to draw from. If you're looking for support for runtime [compile] statements, though, you're probably better off looking through the Transcript dictionary and finding a different way of doing things instead of thinking in Forth. -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for
I have also looked into using several stacks written by Sweat Technologies AKS Charlie Finley Script Browser and Script Library in hope if simplifying the inclusion madness. ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for
Just another small note. The "start using" syntax refers to a "stack" not a "file" the stack must be "in memory" in my understanding. I would like to create a "#include" that would solve these dependicies without developer/inteligent intervention. Thus removing the most problematic variable from the equation (human error). Kevin ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for
I am currently using "start using" and "insert the script of" syntax and evaluating the pros and cons of each. However, my question is one of larger scope I would like to be able to extend the language/standard library itself. With many other languages there exists a facilities to extend the language. Via classes in the case of C++, objects in the case of Java and Small-talk, and WORDS in the case of FORTH. I have even built objects in FORTH (similar to MOPS). It is my hope that we as developers can further the language and it's success. With such constructs this would be simple and allow a amazing flexibility. Kevin --- On Sat 02/21, Ken Ray < [EMAIL PROTECTED] > wrote: From: Ken Ray [mailto: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Sat, 21 Feb 2004 14:43:01 -0600 Subject: RE: Immediate/Compile Time Execution for > Honestly, there is no "compile time" I am refering to as the > script is > being parsed. Basically I am looking fo a set of > parse directives. It > seems that there must be a API from > inside Revolution to load and parse a > module. I mean it > does so already from distrubition builder. I just want > to > add "directives" look initially in a specific directory for > > library code or the path specified.If you're talking about #parse > or #include directives, with theintention of creating an include file that > contains a chunk of code thatis #included in a number of different scripts, Rev > does things a littledifferently.Let's say you had a set of transcript > routines called myFunc1() andmyFunc2() that you want to be able to call from > anywhere. If I'm readingyou correctly, it sounds like you'd want to put > myFunc(1) and myFunc2()into a exparate source file and #include them when you > needed to getaccess to them. If I'm right, this is done differently in Transcript.You put those functions into the stack script of a stack and you"include" that code by using the "library" (or "start using") command.This inserts the code into the message passing hierarchy so that thesefunctions can be called from anywhere.If I'm on the right track and you need more assistance in getting thisdone, let me know. If I'm not on the right track, please try to explainin detail what it is you're trying to do - I apologize for not "gettingit".Ken RaySons of Thunder SoftwareEmail: [EMAIL PROTECTED]Web Site: http://www.sonsothunder.com/ ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for
TIL (Threaded Interpretive Languages) is a acronym that refers the languages like Forth, Visual Basic and even SmalTalk/Java variations. Maybe this is a question I should post to the Runtime Revolution support staff. I was under the impression from the postings I have read that many of the MetaCard gurus frequent this mailing list and could point me to some documents about the general design of the engine. I seems odd to me that the engine could be built and extended without these constructs for example a "if" construct. In Forth and SmallTalk a "if" statement is "immediate" it encodes a comparison and a 2 wsize (aka word size) cells for the true jump branch and one for the false branch. Since it is not viable at runtime there must be a "compile time" subsystem. Thanks for the suggestions though I think I will be asking the support at RunRev. Kevin ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for
So, when tha apply button is invoked the routines/interpreter that builds the "tokens" has no parse directives? Are there no #if style constructs? I guess some documentation on specifically how the compile/tokenization process occurs would be helpful. Is the metacard/transcript compiler using the TIL concept of words? Doese metacard/transcript have a header segment or dicrionary that is accessible? So each of the words/handlers have a IMMEDIATE bit or identifier? I understand these are rather "under the hood" questions I just fiqure that they would be in the documentation. Kevin --- On Sat 02/21, Dar Scott < [EMAIL PROTECTED] > wrote: From: Dar Scott [mailto: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Date: Sat, 21 Feb 2004 10:29:31 -0700 Subject: Re: Immediate/Compile Time Execution for On Saturday, February 21, 2004, at 09:41 AM, Kevin wrote:> Honestly, there is no "compile time" I am refering to as the script is > being parsed. Basically I am looking fo a set of parse directives. > It seems that there must be a API from inside Revolution to load and > parse a module. I mean it does so already from distrubition builder. > I just want to add "directives" look initially in a specific > directory for library code or the path specified.The documentation uses the word compile. This takes place when a script is set and between loading of a stack and the use of a script.Here are a couple of approaches.The script is a property; you can set it yourself. There are limitations for standalones. You can make your own editor. When you hit the apply button, the editor can look for includes and expand them. Then it can set the script property. You woul d use a custom property for your unexpanded source.Or you can work out a scheme using the more traditional stack library or button "library" (front/back script).Dar Scott ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for
On Saturday, February 21, 2004, at 09:41 AM, Kevin wrote: Honestly, there is no "compile time" I am refering to as the script is being parsed. Basically I am looking fo a set of parse directives. It seems that there must be a API from inside Revolution to load and parse a module. I mean it does so already from distrubition builder. I just want to add "directives" look initially in a specific directory for library code or the path specified. The documentation uses the word compile. This takes place when a script is set and between loading of a stack and the use of a script. Here are a couple of approaches. The script is a property; you can set it yourself. There are limitations for standalones. You can make your own editor. When you hit the apply button, the editor can look for includes and expand them. Then it can set the script property. You would use a custom property for your unexpanded source. Or you can work out a scheme using the more traditional stack library or button "library" (front/back script). Dar Scott ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for
Honestly, there is no "compile time" I am refering to as the script is being parsed. Basically I am looking fo a set of parse directives. It seems that there must be a API from inside Revolution to load and parse a module. I mean it does so already from distrubition builder. I just want to add "directives" look initially in a specific directory for library code or the path specified. Kevin --- On Sat 02/21, Ken Ray < [EMAIL PROTECTED] > wrote: From: Ken Ray [mailto: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Date: Sat, 21 Feb 2004 01:14:25 -0600 Subject: RE: Immediate/Compile Time Execution for "USING" library STACKS Kevin,When you say "at compile time", do you mean when the script editorcloses (i.e. at the time the script is parsed)? Or some other time?What exactly are you trying to do?Ken RaySons of Thunder SoftwareEmail: [EMAIL PROTECTED]Web Site: http://www.sonsothunder.com/ > -Original Message-> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kevin> Sent: Friday, February 20, 2004 7:43 PM> To: [EMAIL PROTECTED]> Subject: Immediate/Compile Time Execution for "USING" library STACKS> > > > Okay, this is anoying. Does any one know of a API or > contruct to execute Transcript at "complile time" (since in > a intrepretative lnaguage there is really no such animal). > In traditional TILs there a keywords such as IMMEDIATE, .IF > .ELSE, .THEN , COMPILE and [COMPILE]. Since I believe > Transcript is a TIL these constructs should exist. I am wold > like to use such constructs to create a "include" that would > operate using a default LIBRARY PATH or possibly even create > a "plugin" that would have a XML based project file. Any suggestions?> > I have already created a "handler" to force parameters (aka > make them manadatory) it is called manatory. It is raw but > functional. I am also working on a dialog the generates a > error message with the call stack detail should anyone find it useful.> > Kevin> > > > ___> Join Excite! - http://www.excite.com> The most personalized portal on the Web! > ___> use-revolution mailing list> [EMAIL PROTECTED] m > http://lists.runrev.com/mailman/listinfo/use->; revolution> ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Immediate/Compile Time Execution for "USING" library STACKS
Kevin, When you say "at compile time", do you mean when the script editor closes (i.e. at the time the script is parsed)? Or some other time? What exactly are you trying to do? Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kevin > Sent: Friday, February 20, 2004 7:43 PM > To: [EMAIL PROTECTED] > Subject: Immediate/Compile Time Execution for "USING" library STACKS > > > > Okay, this is anoying. Does any one know of a API or > contruct to execute Transcript at "complile time" (since in > a intrepretative lnaguage there is really no such animal). > In traditional TILs there a keywords such as IMMEDIATE, .IF > .ELSE, .THEN, COMPILE and [COMPILE]. Since I believe > Transcript is a TIL these constructs should exist. I am wold > like to use such constructs to create a "include" that would > operate using a default LIBRARY PATH or possibly even create > a "plugin" that would have a XML based project file. Any suggestions? > > I have already created a "handler" to force parameters (aka > make them manadatory) it is called manatory. It is raw but > functional. I am also working on a dialog the generates a > error message with the call stack detail should anyone find it useful. > > Kevin > > > > ___ > Join Excite! - http://www.excite.com > The most personalized portal on the Web! > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-> revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Immediate/Compile Time Execution for "USING" library STACKS
Kevin, You might want to check out the scriptLimits function. You can't run outside scripts longer than 10 lines from a standalone. -Chipp ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution