ooeu [was Re: Proposal for math.e (2007-08-23)]

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

Kat wrote:
> 
> CChris wrote:
> > 
> > As for string execution, did you look at Matt's OOEu variant?
> 
> Yes, i did, and i like OOEU a lot. OOEU's oop-ish if you like, 
> but it isn't if you don't want. I like that implementation of classes a lot.
> 
> But.. it can be *extremely* slow at some things. I suspect converting 
> it to the newer Eu versions would speed it up, since most of the lag 
> seems to be in memory allocation when dealing with dozens of megabytes 
> of data coming in.

The issue is that I haven't ported the eval() functionality to the C-based
backend yet.  I think it's possible (at least for interpreted code), but
there are some serious changes that need to be made.  

For instance, in the eu-based backend, it's really easy to grow the symbol 
table, since it's just a sequence.  However, in the C-based backend, the
table is an array.  Reallocing isn't really an option, because you'd have
to go through and fix up all the pointers each time it grew. Ok, you could
allocate some extra space, but that doesn't really solve the problem--who
knows how many evals will be called?  So my idea is to turn it into a linked
list of tables.  I'd started work on this, but it's far from finished.

Then there's the issue of handling errors.  It should return gracefully and
not crash your program.  Again, I think there's a way to do this, but it
involves some serious changes to the backend.

I think this is important, and I won't abandon ooeu because this capability
is important to me.  Once the eval stuff is in there, you can embed ooeu
as a scripting language inside your code, and you'll get native [interpreted]
speed from the scripts.  I think it would be a good thing to have in
Euphoria, but it's gonna be tough to get it in.

> I hope all of OOEU appears in some form in openeu, with appropriate 
> credits to Matt.

Thanks.  I think certain things should be left out, like some of the 
dynamic goto stuff.  I think the static gotos are a good thing to add,
or at the minimum, a more structured form of them for things like exiting 
loops with more flexibility and power than we currently have.  There are
also some changes that I would make to the way OOP works to make it 
better.

For those interested in reading about gotos in ooeu:
http://ooeu.sourceforge.net/docs/USING_GOTO.htm

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu