RE: Let me try once more
- Posted by John Cage <drcage2000 at YAHOO.COM> Jan 28, 2001
- 578 views
> So you do not wish to gets() a line or read() a file > and exec it from a > properly shrouded and bound Eu exe? <blink> > > Kat Don't mind him, Kat. He's the type of guy that prevents Rob from implement the features us AI coders are asking for. These people like, write their first program in Eu, a Hello World program, and when someone asks for a new feature in Eu, these people say "I don't need that! I never felt inclined to use such a feature". And interpreter that can't interpret dynamically will never make it. I know how Eu's interpreter works, and it wouldn't be that hard to implement this. Rob should create a new 'int *code;' array wich holds to addresses of variables and opcodes (like ADD, etc.) whenever interpret() or run() or whatever is called. This way us Eu coders can implement fast programming languages of our own, code extremely powerfull AI algos that modefy their own code, load and call Euphoria routines from disk as DLLs, apply our own encryption to our Euphoria program components, dynamically re-write parts of our program while it is allready running, etc... Euphoria has a LIGHTNING FAST top-down descent parse that makes it possible for Euphoria program to get the best Dynamic Interpretation ever seen. In a fraction of a fraction of a second, your dynamic code will be running. I'd personally like to see it implemented as a 'load()' routine, wich would work like this; integer MyFoo MyFoo = load( "procedure MyFoo() puts(1,\"FOO!\") end procedure" ) call_proc(MyFoo,{}) So that you could do this if ya want; integer fptr fptr = open("dll.txt","w") puts(fptr,"procedure MyFoo() puts(1,\"FOO!\") end procedure\n") call_func(load(gets(fptr)) Cool huh? Mike The Spike __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ ____________________________________________________________ T O P I C A -- Learn More. Surf Less. Newsletters, Tips and Discussions on Topics You Choose. http://www.topica.com/partner/tag01