Re: Euphoria feature request

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu