1. C to EUphoria?

Greetz all.

Interesting thought I had today, is there any work being done on converting C
code to EUphoria?  I had a crazy notion of re-optimizing the source code
for the old Quake II engine mostly for S&G (hopefully more G than S) and I 
know I could probably use it as an excuse to actually work wholeheartedly on
a project for one of my programming classes.  Up to now, it runs using standard
straight C code.  I know theres a EUphoria to C converter.  I suppose it is
possible that as EUphoria is relatively incomplete, it might be impossible,
but I think it'd be pretty fun.

Regards,
  ~Matt

    "The individual has always had to struggle to keep from being
     overwhelmed by the tribe.  If you try it, you will be lonely
     often, and sometimes frightened.  But no price is too high to
     pay for the privilege of owning yourself."  -Nietzsche

new topic     » topic index » view message » categorize

2. Re: C to EUphoria?

Hi Matt,
A few years, ago I posted winconst.e to euphoria archives. 
At the time I had written an euphoria script to read C header files and extract
#define directives to convert them in euphoria constant defenitions.
Last week I revisited that code, thinking about extending it to extract win32api
functions prototypes and struct.
But converting a complete C program in euphoria is much work and require good
knownledge of parsers, analysers.

regards
Jacques DeschĂȘnes

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

3. Re: C to EUphoria?

Matt Vance wrote:
> 
> Greetz all.
> 
> Interesting thought I had today, is there any work being done on converting
> C
> code to EUphoria?  I had a crazy notion of re-optimizing the source code
> for the old Quake II engine mostly for S&G (hopefully more G than S) and I
> 
> know I could probably use it as an excuse to actually work wholeheartedly on
> a project for one of my programming classes.  Up to now, it runs using
> standard
> straight C code.  I know theres a EUphoria to C converter.  I suppose it is
> possible that as EUphoria is relatively incomplete, it might be impossible,
> but I think it'd be pretty fun.
> 
> Regards,
>   ~Matt
> 
>     "The individual has always had to struggle to keep from being
>      overwhelmed by the tribe.  If you try it, you will be lonely
>      often, and sometimes frightened.  But no price is too high to
>      pay for the privilege of owning yourself."  -Nietzsche

Hi again Matt,


I've done a tiny bit of work on this but dont have anything that
good to contribute at this point.  Mainly, i was going file by
file anyway because i didnt have the patience to try to get something
to read in a *whole* C program and understand *everything* it was
doing smile
A while back someone pointed me to a C to English language translator
that could be useful for doing this (ie convert to English first)
but i didnt pursue it very far (always seem to have something else
im working on).


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

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

4. Re: C to EUphoria?

> Interesting thought I had today, is there any work being done on converti=
ng C
> code to EUphoria?  I had a crazy notion of re-optimizing the source code
> for the old Quake II engine mostly for S&G (hopefully more G than S) and =
I
> know I could probably use it as an excuse to actually work wholeheartedly=
 on
> a project for one of my programming classes.  Up to now, it runs using st=
andard
> straight C code.  I know theres a EUphoria to C converter.  I suppose it =
is
> possible that as EUphoria is relatively incomplete, it might be impossibl=
e,
> but I think it'd be pretty fun.

That sounds like a rather daunting task. I've looked at the Quake II
source and its pretty long. You would have to sit down and rewrite it
line-by-line. You'd probably have to write a lot of little functions
for the various macros (#define statements that operate on variables).
If you choose to take it on, then I bid you good luck. And I just hope
C is your first language, not Euphoria. Making sense of C when you
don't know it is about as easy as learning German if you only know
English. It can be done, but there is some difficulty involved, and
you'll probably never get it 100%.

~Greg

P.S. Its Euphoria, not EUphoria.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu