1. RE: Dynamic includes

jbrown105 at speedymail.org wrote:
> 
> 
> On Tue, Jun 24, 2003 at 06:21:47PM +0000, Al Getz wrote:
> <snip matheval stuff>
> > 
> > Hello again Matt,
> > 
> > I didnt mean to imply that your evaluator didnt bind or anything
> > like that, i was just stating that mine doesnt bind because
> > it uses dynamic includes.
> > Would be nice if binding could handle that too smile
> > 
> > Take care for now,
> > Al
> > 
> 
> For binding, dynamic includes are not impossible. I am not sure, but it 
> would
> not be difficult for the interpreter to add support for include when in 
> binded
> mode. The "include filename" part would have to be cleartext in the 
> binded file
> tho.
> 
> Obviously, this won't work for a translated program (short of putting
> the interpreter into the translated program ... but the overhead for 
> that
> is clearly not worth it).
> 
> Another approach is this (example using dynamic includes depending on 
> platforms):
> 
> Run the file on the platform you intend to bind, but set it up so that 
> the
> files created dynamicly are NOT deleted. (I.e. use 
> 'set_delete_dynamic(0)'
> or something.)
> 
> Then after it is run, set up the program code to not write out the 
> dynamic
> files (i.e. use 'do_write_dynamic(0)' or somesuch) and then bind it.
> 
> Repeat for each platform you intend to bind for. This sort of thing is
> tedious but doable, and it is also a usable method for the translator as 
> well.
> 
> jbrown
> 
> -- 
>  /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
>  \ /  campain against           | Linux User:190064
>   X   HTML in e-mail and        | Linux Machine:84163
>  /*\  news, and unneeded MIME   | http://verify.stanford.edu/evote.html
> 
> 

Hello again jbrown,

I guess what i had in mind was a way the interpreter could
use an include that was written during run time, that wasnt 
already a part of the bound exe.
I guess this would bring in still yet another function like
uninclude file1.ew
or something like that, so that you could use the same name
over again:

WriteNewIncludeFile("file1.ew",1)
include file1.ew
DoStuffWithNewFile()

uninclude file1.ew
WriteNewIncludeFile("file1.ew",2)
include file1.ew
DoStuffWithNewFile()

Sound interesting to anyone?

Take care for now,
Al

new topic     » topic index » view message » categorize

2. RE: Dynamic includes

On 25 Jun 2003, at 15:39, Al Getz wrote:

> 
> 
> jbrown105 at speedymail.org wrote:
> > 
> > 
> > On Tue, Jun 24, 2003 at 06:21:47PM +0000, Al Getz wrote:
> > <snip matheval stuff>
> > > 
> > > Hello again Matt,
> > > 
> > > I didnt mean to imply that your evaluator didnt bind or anything
> > > like that, i was just stating that mine doesnt bind because
> > > it uses dynamic includes.
> > > Would be nice if binding could handle that too smile
> > > 
> > > Take care for now,
> > > Al
> > > 
> > 
> > For binding, dynamic includes are not impossible. I am not sure, but it 
> > would
> > not be difficult for the interpreter to add support for include when in 
> > binded
> > mode. The "include filename" part would have to be cleartext in the 
> > binded file
> > tho.
> > 
> > Obviously, this won't work for a translated program (short of putting
> > the interpreter into the translated program ... but the overhead for 
> > that
> > is clearly not worth it).
> > 
> > Another approach is this (example using dynamic includes depending on 
> > platforms):
> > 
> > Run the file on the platform you intend to bind, but set it up so that 
> > the
> > files created dynamicly are NOT deleted. (I.e. use 
> > 'set_delete_dynamic(0)'
> > or something.)
> > 
> > Then after it is run, set up the program code to not write out the 
> > dynamic
> > files (i.e. use 'do_write_dynamic(0)' or somesuch) and then bind it.
> > 
> > Repeat for each platform you intend to bind for. This sort of thing is
> > tedious but doable, and it is also a usable method for the translator as
> > well.
> > 
> > jbrown
> > 
> > -- 
> >  /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
> >  \ /  campain against           | Linux User:190064
> >   X   HTML in e-mail and        | Linux Machine:84163
> >  /*\  news, and unneeded MIME   | http://verify.stanford.edu/evote.html
> > 
> > 
> Hello again jbrown,
> 
> I guess what i had in mind was a way the interpreter could
> use an include that was written during run time, that wasnt 
> already a part of the bound exe.
> I guess this would bring in still yet another function like
> uninclude file1.ew

I'd still go with executing strings. You could then gets() the "include" file
you
want, parse each function to a subslice, and then execute them as if they 
were a routine_id. (Hmmmmm,, makes a good point for pointers to vars.) 
Visability of variables and other procedure/functions would be whatever is 
visable at the point the line is executed in the program, making it interesting 
what's "namespaced" or visable at different execution points. Alternatively, 
the subseq containing the function could have the vars prepended to it as 
you wish at any time. You could possibly call a function to set up the string 
"include", using vars scoped at the point of the function you called, and 
execute the string with that scope somewhere else in the program. This 
would be rather like the pascal with..do block.

But people have already said they do not want self-modifying code or string 
execution. <sigh> It's useful in mirc, people, and it would be useful in Eu too,
making Eu more useable to me.

Kat

new topic     » goto parent     » topic index » view message » categorize

3. RE: Dynamic includes

> From: gertie at visionsix.com [mailto:gertie at visionsix.com]

> But people have already said they do not want self-modifying 
> code or string execution. <sigh> It's useful in mirc, people,
> and it would be useful in Eu too, making Eu more useable to me.

Well, I only saw one reference (in a rather quick search of the mailing list
archives) that was derogatory toward executing strings (besides Rob, of
course).  I've thought it would be a good thing to have, and have even
applied some thought as to putting it into the Euphoria source code, but I
always get lost in the scanning/parsing routines.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu