Re: How to become Euphoric from Euphoria (Was: Re: Euphoria++)
- Posted by Mike The Spike <mtsreborn at yahoo.com> Feb 01, 2001
- 413 views
This is the opportunity of a life time... No programming language in the history of computing has ever allowed you to write a game in it, and with the click of a button compile it for Dos, Linux, Win32, Playstation, Playstation 2 and N64 and it would run as expected.. If Rob realy, realy, realy doesn't want to allow this to happen for Euphoria, because he'd rather not place the source to the Euphoria Runtime libraries on the net, then there is one tiny alternative. He should write a 'How To...' document and place it on his site and ship it with the translator, describing how the runtime routines work and what parameters they expect. So people can code, based on that description, their own runtime libraries for Euphoria. I am capable of doing this right now, if Robert explains what the following routines do; int NewDouble(double); void de_reference(s1_ptr); int binary_op_a(int, int, int); int binary_op(int, int, int); void *which_file(int, int); int unary_op(int, int); int NewS1(int); unsigned long get_pos_int(char *, int); int memory_set(int, int, int); int memory_copy(int, int, int); int getc(void *); void Concat(int *, int, s1_ptr); void Append(int *, int, int); void Prepend(int *, int, int); int EGetenv(s1_ptr); void RHS_Slice(s1_ptr, int, int); void ctrace(char *); int e_floor(int); int DoubleToInt(int); int SequenceCopy(s1_ptr); void shift_args(int, char**); int NewString(char *); char *malloc(int); int CRoutineId(int, int, int); void AssignSlice(int, int, int); void StdPrint(int, int, int); void system_call(int, int); void RTFatal(char *); The rest I have found out allready. I wanna know what these routines do exactly, not because otherwise I can't implement them, but because otherwise I can't implement them safely enough. If I return a value that was not expected, your programs might crash, like if I return 0 on error instead of -1 or something, etc. It takes too much work and time to try to find this out by looking at the C code produced, and thanks to the GOTOs and garbage collection it's spaghetti code anyways. (Allthough quite ANSI C compliant if I may say so myself) But I think releasing the source to the runtime libraries is the best thing to do. So that one only has to shuffle around a few function calls and strip out platform specific code that isn't portable, and leave the rest intact. Something I have always wanted to do for a long time is add Direct Draw support to pixel() for Win32, and OpenGL support for pixel() on all platforms. If OpenGL or DirectDraw is installed, it will be used, else, it won't. So you can code extremely fast polygon fillers and graphics effects in Euphoria. I'd like to optimise passing sequences of values to pixel() too, so that display_image() runs faster, for extremely fast bitmap blitting and back buffering. I could do that by simplifying/leaving out some checks made on the parameters passed, or use plain old Machine code if the compiler/platform supports it (by using #ifdefs). Mike The Spike