Re: Anyone done anything with the Euphoria Source Code?

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

I'm working on a version that includes wxWindows, but I ran into some 
problems. I had written a library that makes it relatively easy to interface 
scripting language to wxWindows. You just rename your main() routine with 
wMain(), and write a routine to convert callback data to calls to your 
language's routines.

The first problem was my assumption that the code could be complied in a 
single pass, like:

   gcc euphoria.c

Robert's code, like most large C programs, is compiled in sections and the 
object binaries are stitched together into a single executable. Because of 
how my code worked, I had to go back and try to make the Euphoria source 
compile in a single pass. This wasn't too difficult, but I had to declare a 
lot of externs that he hasn't got, so it touches a lot of code. This issue 
may be unique to my library.

The next problem was that I was linking to a C++ library. Quite a number of 
the declarations are still in 'old style' C, which isn't acceptable to C++ 
compilers. So that meant rewriting a lot of the declarations. Robert said 
he'd take care of that.

The other problem I encountered was trying to create a 'generic' version of 
Euphoria, since wxWindows handled the creation of windows and so on. But 
that's pretty unque to what I was doing.

As the Euphoria code currently stands, it's relatively straightforward to add 
routine via machine_routine. You only have to mess with code in two places - 
the declaration of the constants for the case statement, and the case 
statement itself. So if you wanted a give native support for OpenGL, that 
would pretty much be a snap.

On the other hand, there's a real lack of high-level documenation. So there 
really isn't enough information given to make me feel comfortable with 
messing with the language itself. For example, there's no real overview of 
what the Euphoria 'virtual machine' looks like, and what the data structures 
look like. I don't know how to search for routine names, or how to determine 
if a variable is a sequence...

I guess the information is there, but there's no guide for the code, other 
than in-line comments.

I hate to sound so negative - I think that having the Euphoria source code is 
a great thing. But at this point, it's certainly lacking in a lot of things 
that would make it easier to code.

Perhaps those who purchased it could get together with Robert and start 
writing a tutorial?

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu