1. Euphoria Interpreter

I've just posted my latest program, a Euphoria interpreter called Eu,
written in (you guessed it) Euphoria! Now you can:

   - WATCH IN AMAZEMENT as code run as slow as mollasses!
   - GASP IN HORROR as the interpreter crashes and burns!
   - REEL WITH ASTONISHMENT as you uncover bug after bug!

The program (Eu) implements an almost complete subset of Euphoria, except
for routine_id. It even has a cheezy little trace routine in it, so you can
step through your code.

I can't think of any real use of the program, but it's been bugging me for a
long time, so I finally sat down and coded it. It's pretty spiff, but sort
of falls into the 'parlour trick' category. This is code you can't live
without! blink

If anyone is really interested in an alternate Euphoria interpreter, I'd
suggest taking a look at Pete's Peuphoria.

-- David Cuny

new topic     » topic index » view message » categorize

2. Re: Euphoria Interpreter

>I've just posted my latest program, a Euphoria interpreter called Eu,
>written in (you guessed it) Euphoria! Now you can:

Sounds interesting! I'll be sure to take a look at it.

>I can't think of any real use of the program, but it's been bugging me for a
>long time, so I finally sat down and coded it. It's pretty spiff, but sort
>of falls into the 'parlour trick' category. This is code you can't live
>without! blink

Well, if the routines can be called in a way so that the program can be
modified to be interactive, that would make it quite useful. smile


Rod

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

3. Re: Euphoria Interpreter

Holy cats!  Now if we had a c-interpreter running under eu, we could write:

ex eu.ex euc.ex peu.c test.ex

Dave's new eu.ex certainly illustrates the versatility of the pink language.
Since Euphoria supports recursion, could we next be using an interpreted os?

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

4. Re: Euphoria Interpreter

___David Cuny___
> I've just posted my latest program, a Euphoria interpreter called Eu,
> written in (you guessed it) Euphoria!

So now we can run a Euphoria interpreter in a Euphoria version
which is interpreted by another Euphoria interpreter, which perhaps
is interpreted in Peu etc. I suggest we emulate this on an Amiga
emulated iMac which again is emulated by a PC... and that
emulater could be programmed in ... Why not: D.C.'s Eu
Runnin under Peu, of course.

How could this in any possible way not be useful? blink


Thanks,

Tor

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

5. Re: Euphoria Interpreter

David Cuny wrote:

> I've just posted my latest program, a Euphoria interpreter called Eu,
> written in (you guessed it) Euphoria! Now you can:
>
>    - WATCH IN AMAZEMENT as code run as slow as mollasses!
>    - GASP IN HORROR as the interpreter crashes and burns!
>    - REEL WITH ASTONISHMENT as you uncover bug after bug!

... Ah. So, this is only to show that one cannot make an interpreter (especially
its own language) under Eu? I can understand all of the above, because its a
third layer... bad juujuu. (Machine layer/C-layer, Eu-layer, Eu-layer 2)

Where is it? perhaps I can take a peek at it.

Too much caffeine fer that night, eh? :)

But, if this CAN be done, perhaps a cpp interpreter under Eu could work too.
Probably tedious as a mofo too. (I lost count at 500 commands, or however many
there are)

Blessed Be! --"LEVIATHAN"

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

6. Re: Euphoria Interpreter

LEVIATHAN wrote:

> ... Ah. So, this is only to show that one cannot
> make an interpreter (especially its own language)
> under Eu?

No, it actually runs pretty fast, in a relative sense. I ran the benchmarks
that were supplied with Euphoria, and it was lightyears behind Euphoria and
QBasic. But when I removed the DEFINT from the QBasic code, it actually ran
faster than QBasic!

The main reason for the slow speed stems from storing values in sequences.
The difference between:

   a[1] += 1

and

   a += 1

is staggering. I found this out when I wrote my Basic to Euphoria
interpreter some time back. The interpreter can't perform all it's cool
optimizations on data stored in sequences. So it's pathetically slow
relative to Euphoria.


> Where is it? perhaps I can take a peek at it.

It's posted on the Euphoria page.


> But, if this CAN be done, perhaps a cpp interpreter
> under Eu could work too.

Go for it! Just make sure that it's got garbage collection built in, and a
nice trace routine, and ... ooops, that's Euphoria, isn't it? smile

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu