Re: Euphoria feature request
- Posted by "Philip Deets" <philip1987 at hotmail.com> Dec 09, 2003
- 459 views
I had not heard of EuScript before, I'll check it out. I had considered DLLs, but I don't know how to make them. I tried running ecw on a .ew file then running emake, and I got a .exe, not a .dll How can I make DLLs with the translator? Phil ----- Greg Haberek said: I think you're confusing binding with translating. When you bind a file, you're basically throwing Euphoria code onto the end of the PDE (Public Domain Edition) Interpreter. The interpreter then looks for the code at the end of the file and begins to execute it. Of course, it's not that simple, there are certain things it looks for so you can't just toss your code onto the end of your interpreter and have a working .exe file. When you translate a file, your Euphoria code is interpreted into C code, then compiled by your choice of compiler. At no point is the source of the interpreter included in this process. The C code produced by the Translator may have some of the same routines and macros in order to emulate the behavior of the Interpreter, such as error handling and sequence manipulation, but it's still C. If you're looking for a way to build modules of Euphoria code, you have a few options: 1 Use EuScript by Matt Lewis. you can run Euphoria code within a Euphoria program, as plain text, but speed may become an issue since Euphoria does not support threads, which would speed up execution. This is not for complex code. 2. Build DLL files with the Translator. This, however, would require users to each have a translator. A standard naming convention would also need to be in place. This is how many other software developers handle extentions or modules, but I'm sure you'd like to keep everything in Eu code, not C executables. 3. I recently bought a copy of the source, and I'm looking into converting the interpreter into a DLL file similar to EuScript. This would make life a lot easier for most of us. I'll keep everone updated on my progress. ~Greg > I wish for a procedure include( filename ) that would work the same as the > current way to include files. This way in my editor I'm making, I can have > a subdirectory (in the directory with the editor in it) called extentions, > it will have an include file for each file extention the end-user wants to > be able to edit. I would need have a include procedure to do this because I > do not know if the user downloaded support for only 2 extentions or 50 > extentions. > > > One alternative I could do would be to run dir() on the extentions > directory, get the list of files to include, have my editor make a file > called includes.e, write include statements for all those files to include, > then include includes.e. But if I did that, I wouldn't be able to bind it > because I would be making euphoria code. Maybe I could just keep a copy of > the eu source code in a sequence in the executable file, and when I wrote > the includes.e file, I could make my .exw source file for the editor then > re-bind it, delete all the source files, then delete the editor that is > running, start the newly made editor, maybe I could just do it silently so > the user wouldn't notice. > > What do you think I should do about it? > > Thanks, > Phil TOPICA - Start your own email discussion group. FREE!