Re: Digest for EUforum at topica.com, issue 4200
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 29, 2004
- 434 views
Christian Cuvier wrote: > > > Subject: Re: Contest > > > > > > posted by: Derek Parnell <ddparnell at bigpond.com> > > > > Tommy Carlier wrote: > > > >>> > >>> Some questions: > >>> 1. How far can we go in using machine-code? > >>> 2. How far can we go in calling external DLLs/routines? > >>> > >>> To make the contest interesting and competitive for everybody, > >>> I think it would be a good idea to disallow machine-code, and > >>> make it a pure Euphoria-contest. > >>> Calling external DLLs/routines also means that it's not pure > >>> Euphoria. > >>> I think it would be a big challenge for everybody, if only > >>> the use of Euphoria-code was allowed: no call, open_dll, > >>> define_c_proc, define_c_func, c_proc or c_func. > > > > > > Good point. I'll make this a stipulation. I did want to encourage Euphoria > > code. > > > > Sorry to disagree here, but... That's okay. I don't mind. > Euphoria has some strong points, and one of them is the relative ease with > which machine code can be interfaced with. The open_dll("",address) variant > added to Eu2.4 is meant to make it easier as I understand it. So, that > interfacing IS PART of pre Eu code imho; why discourage it? Firstly, I'm not using this contest to try and *discourage* interfacing Euphoria with code from other languages. Secondly, I'm trying to use the contest to encourage the use of Euphoria. In the extreme, if I allowed the use of other languages, one could do something like ... cmd = command_line() x = open_dll("mydll") y = define_c_proc(x, "doit", {C_POINTER}) z = allocate_string(cmd[3]) c_proc(t,{z}) Hardly an exercise in using Euphoria. > Further, call() carries a sizeable performance penalty (probably because of a > task switch), so that using it wouldn't be an obvious way to utmost speed. > > There's a rule already saying that any attempt to access any file other than > an include disqualifies the submission. This is enough to rule out using > shared libraries. I'm not sure adding a ban on machine code will encourage > anything: the way you interface it with Eu is still "Euphoria code", and > possibly not the easiest part, if only because sequences are not mere C-like > arrays. I take on board your objection, but I shall not be removing this contest rule based on the argument you present here. The rule serves my purpose. You can always set up your own contest. -- Derek Parnell Melbourne, Australia