1. RE: Code Execution Problem

hey trevor! you can't execute euphoria code like that yet...what you 
need is a function like eval() in Perl, but Euphoria doesn't have 
that(hey robert, can you take a hint?)

new topic     » topic index » view message » categorize

2. RE: Code Execution Problem

Is it possible to use the mini assembler and a function or var address to jump
to the code?
The code in the var or function would have to return itself to be effective.



-----Original Message-----
From: sephiroth _ [mailto:euman2376 at yahoo.com]
Subject: RE: Code Execution Problem



hey trevor! you can't execute euphoria code like that yet...what you 
need is a function like eval() in Perl, but Euphoria doesn't have 
that(hey robert, can you take a hint?)

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

3. RE: Code Execution Problem

huh? if what you're thinking is to get the address of a string 
containing euphoria code and to execute it...BAHAHAHA!!!!!!! oh 
man...what a dumb idea. please tell me that's not what you're thinking.

Paul.Abbott at PSS.Boeing.com wrote:
> Is it possible to use the mini assembler and a function or var address 
> to jump to the code? 
> The code in the var or function would have to return itself to be 
> effective.

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

4. RE: Code Execution Problem

I certainly wouldn't want to start throwing bricks here. In the first place I
just got Euphoria last week and haven't even spent more than a couple hours at it
yet. However, as I told one list member, I can name at least 3 different
languages which DID allow just that!

Next time you call ME dumb I suggest you look in a mirror!




-----Original Message-----
From: sephiroth _ [mailto:euman2376 at yahoo.com]
Subject: RE: Code Execution Problem


huh? if what you're thinking is to get the address of a string 
containing euphoria code and to execute it...BAHAHAHA!!!!!!! oh 
man...what a dumb idea. please tell me that's not what you're thinking.

Paul.Abbott at PSS.Boeing.com wrote:
> Is it possible to use the mini assembler and a function or var address 
> to jump to the code? 
> The code in the var or function would have to return itself to be 
> effective.

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

5. RE: Code Execution Problem

On 10 May 2001, at 15:51, sephiroth _ wrote:


> 
> hey trevor! you can't execute euphoria code like that yet...what you 
> need is a function like eval() in Perl, but Euphoria doesn't have 
> that(hey robert, can you take a hint?)

We did more than hint about this same problem last year. Same with goto 
and vertical sequence slices. There are two(?) interpreters in the archives, 
that you can include in your code and pass vars to be executed. They run 
slower than the native interpreter, of course.

Kat

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

6. RE: Code Execution Problem

It's not that dumb. That's how i made the C64 gosub a :target in the middle of 
a BASIC line. Encounter goto, search for target in program and untokenized 
var memory, execute it, and return. since Eu is interpreted, it can be told to 
do anything Rob wants it to do.

Kat

On 10 May 2001, at 10:05, Paul.Abbott at PSS.Boeing.com wrote:


> 
> I certainly wouldn't want to start throwing bricks here. In the first place I
> just got Euphoria last week and haven't even spent more than a couple hours at
> it yet. However, as I told one list member, I can name at least 3 different
> languages which DID allow just that! 
> 
> Next time you call ME dumb I suggest you look in a mirror!
> 
> 
> 
> 
> -----Original Message-----
> From: sephiroth _ [mailto:euman2376 at yahoo.com]
> Sent: Thursday, May 10, 2001 9:35 AM
> To: EUforum
> Subject: RE: Code Execution Problem
> 
> 
> huh? if what you're thinking is to get the address of a string 
> containing euphoria code and to execute it...BAHAHAHA!!!!!!! oh 
> man...what a dumb idea. please tell me that's not what you're thinking.
> 
> Paul.Abbott at PSS.Boeing.com wrote:
> > Is it possible to use the mini assembler and a function or var address 
> > to jump to the code? 
> > The code in the var or function would have to return itself to be 
> > effective.
> 
> 
> 
> 
>

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

7. RE: Code Execution Problem

Yes, indeed. And Clipper has somewhat the same construction. One puts a
subroutine in a var, so to speak, and then iterates the var for each item in a
list.




-----Original Message-----
From: Kat [mailto:gertie at PELL.NET]
Subject: RE: Code Execution Problem





It's not that dumb. That's how i made the C64 gosub a :target in the middle of 
a BASIC line. Encounter goto, search for target in program and untokenized 
var memory, execute it, and return. since Eu is interpreted, it can be told to 
do anything Rob wants it to do.

Kat

On 10 May 2001, at 10:05, Paul.Abbott at PSS.Boeing.com wrote:


> 
> I certainly wouldn't want to start throwing bricks here. In the first place I
> just got Euphoria last week and haven't even spent more than a couple hours at
> it yet. However, as I told one list member, I can name at least 3 different
> languages which DID allow just that! 
> 
> Next time you call ME dumb I suggest you look in a mirror!
> 
> 
> 
> 
> -----Original Message-----
> From: sephiroth _ [mailto:euman2376 at yahoo.com]
> Sent: Thursday, May 10, 2001 9:35 AM
> To: EUforum
> Subject: RE: Code Execution Problem
> 
> 
> huh? if what you're thinking is to get the address of a string 
> containing euphoria code and to execute it...BAHAHAHA!!!!!!! oh 
> man...what a dumb idea. please tell me that's not what you're thinking.
> 
> Paul.Abbott at PSS.Boeing.com wrote:
> > Is it possible to use the mini assembler and a function or var address 
> > to jump to the code? 
> > The code in the var or function would have to return itself to be 
> > effective.
> 
> 
> 
> 
>

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

8. RE: Code Execution Problem

okay, okay...but this is different. here, you thought about getting the 
pointer to a string. this is way different than getting a function 
pointer in C.

Paul.Abbott at PSS.Boeing.com wrote:
> I certainly wouldn't want to start throwing bricks here. In the first 
> place I just got Euphoria last week and haven't even spent more than a 
> couple hours at it yet. However, as I told one list member, I can name 
> at least 3 different languages which DID allow just that! 
> 
> Next time you call ME dumb I suggest you look in a mirror!

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

9. RE: Code Execution Problem

I think that, being Euphoria interpretive, it would be easy to create such a
function. Have you heard about the APL language? Well, one of its strengths
is the existence of the "execute" function, that allows exactly what Trevor
asked for.
Very cute this young programmer, uh?
----- Original Message -----
From: sephiroth _ <euman2376 at yahoo.com>
Subject: RE: Code Execution Problem


>
>
> hey trevor! you can't execute euphoria code like that yet...what you
> need is a function like eval() in Perl, but Euphoria doesn't have
> that(hey robert, can you take a hint?)
>
>
>
>

${list_footer}

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

10. RE: Code Execution Problem

> -----Original Message-----
> From: sephiroth _ [mailto:euman2376 at yahoo.com]
 
> huh? if what you're thinking is to get the address of a string 
> containing euphoria code and to execute it...BAHAHAHA!!!!!!! oh 
> man...what a dumb idea. please tell me that's not what you're 
> thinking.

That seems a little uncalled for.  Besides, that's not really outside the
realm of possibility with the translator.  

In any case, you could work up a scheme to do this in pure Euphoria.  You
could create your own heap within a sequence/a-list and use routine_id's.
Then you parse the command and execute it.  It's more work, and it would be
slower than using native variables, but that doesn't mean it couldn't work.
The extra flexibility could definitely be worth it.
 
> Paul.Abbott at PSS.Boeing.com wrote:
> > Is it possible to use the mini assembler and a function or 
> var address 
> > to jump to the code? 
> > The code in the var or function would have to return itself to be 
> > effective.

Or you could just tweak Dave's Eu/Ox/Py to do this kind of stuff (I believe
it's called scripting:).

Matt Lewis

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

11. RE: Code Execution Problem

Hmmmmm, well, what I was thinking of was the Clipper code sequences hidden in
var names and iterated thru in code. Sort of
a /for each (line in database) do <codevar>/ which allows pretty extensive
branching based on conditions in the database. And
I was just following up on a post by another member. Hope he didn't get
discouraged by the flack which followed.

Have a real nice day,

>

-----Original Message-----
From: Matthew Lewis [mailto:matthewwalkerlewis at YAHOO.COM]
Sent: Thursday, May 10, 2001 10:05 AM
To: EUforum
Subject: RE: Code Execution Problem

> -----Original Message-----
> From: sephiroth _ [mailto:euman2376 at yahoo.com]

> huh? if what you're thinking is to get the address of a string
> containing euphoria code and to execute it...BAHAHAHA!!!!!!! oh
> man...what a dumb idea. please tell me that's not what you're
> thinking.

That seems a little uncalled for.  Besides, that's not really outside the
realm of possibility with the translator.

In any case, you could work up a scheme to do this in pure Euphoria.  You
could create your own heap within a sequence/a-list and use routine_id's.
Then you parse the command and execute it.  It's more work, and it would be
slower than using native variables, but that doesn't mean it couldn't work.
The extra flexibility could definitely be worth it.

> Paul.Abbott at PSS.Boeing.com wrote:
> > Is it possible to use the mini assembler and a function or
> var address
> > to jump to the code?
> > The code in the var or function would have to return itself to be
> > effective.

Or you could just tweak Dave's Eu/Ox/Py to do this kind of stuff (I believe
it's called scripting:).

Matt Lewis

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

12. RE: Code Execution Problem

hey paul, sorry about the "bahahahaha" thing

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

Search



Quick Links

User menu

Not signed in.

Misc Menu