Re: Help with plugin concept
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 14, 2004
- 665 views
Igor Kachan wrote: > Please, couldn't you explain more detailed what do you > mean when you say it does not work and it won't work. > What a reason ? The example code that you posted was... P_S = open ("plugins.ew", "wb") puts(P_S, PluginS) close(P_S) include plugins.ew The above code depends on the open() and puts() taking place before the include is processed. With the current interpreter that's what happens. With the current binder and translator that's not what happens. Rather, the binder and translator process the include file (and all other source code) first. Execution of statements happens later at run-time, when it's too late for the open/puts to have the desired effect. In the next release, with the clearer separation between front-end and back-end, the interpreter will also process the include (and all other source) before it executes any code. It will be simpler this way. I don't think a lot of people are actually using the above "dynamic" include technique, although it has been discussed on this list from time to time. > I run interpreted program to create the resulting include > file then run binder or translator with *ready* resulting > include file and *it works*. That's fine. You are first running a program that creates an include file, then *in a separate step* you are using that include file for translating or binding. However, the users of your program might not have the translator or binder, and even if they did, they might not want to run it. Status: Currently, I have built: - a new front-end (written 100% in Euphoria) - a new back-end for the translator (100% in Euphoria) - a backend for the interpreter (100% in Euphoria) I am working on attaching the current C-written back-end to the new Euphoria-written front-end. I have extensively tested the new translator (100% in Euphoria) and it appears to work flawlessly, as well as being pretty fast. I now have a Euphoria interpreter written 100% in Euphoria. It runs all Euphoria programs perfectly (as far as I know), though it's slower of course. It can even run itself. I tried running itself, running itself, running itself, running a small program, and it worked fine, although it was extremely slow. I'm not sure yet what I'll do with it. It was extremely easy to implement. I can translate the Euphoria-written interpreter to make it faster. I can interpret or translate the new translator. Both can handle the largest programs, such as Judith's IDE. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com