1. Anyone done anything with the Euphoria Source Code?
- Posted by Ray Smith <smithr at ix.net.au> Jan 17, 2002
- 513 views
Just a quick questions ... (as in the subject line) ... Anyone done anything with the Euphoria ource Code? Any future projects anyone is thinking of doing? Ray Smith http;//www.geocities.com/ray_223
2. Re: Anyone done anything with the Euphoria Source Code?
- Posted by Kat <gertie at PELL.NET> Jan 17, 2002
- 512 views
On 18 Jan 2002, at 5:43, Ray Smith wrote: > > Just a quick questions ... > > (as in the subject line) ... Anyone done anything with the Euphoria > ource Code? > > Any future projects anyone is thinking of doing? I cannot afford the cost now, but if i could, i'd work on adding goto and string variable execution. Kat
3. Re: Anyone done anything with the Euphoria Source Code?
- Posted by David Cuny <dcuny at LANSET.COM> Jan 18, 2002
- 547 views
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
4. Re: Anyone done anything with the Euphoria Source Code?
- Posted by kbochert at ix.netcom.com Jan 19, 2002
- 468 views
-------Phoenix-Boundary-07081998- I now have reference parameters working, as in: sequence test1 = "abc", test2 = "zot" procedure foo (sequence s, sequence t) object x x = s[2] s[2] = t[2] t[2] = x end procedure foo (!!test1, !!test2) ?test1 -- prints "aoc" ?test2 -- prints "zbt" Now if I can just find some use for them. Karl Bochert -------Phoenix-Boundary-07081998---
5. Re: Anyone done anything with the Euphoria Source Code?
- Posted by David Cuny <dcuny at LANSET.COM> Jan 19, 2002
- 466 views
Bernie wrote: > I guess it would be easier to understand if I had spent > 10 years writing and compiling the code. > At least I'm learning some things. Perhaps the folk who have the source could get together and puzzle out a single feature? I'm thinking: integer a = 12, b, c = 22 might be a good start? -- David Cuny
6. Re: Anyone done anything with the Euphoria Source Code?
- Posted by tone.skoda at siol.net Jan 19, 2002
- 485 views
If I had source code I would add these things (in order of importance): 1. Simplified object orientation: A small example: include circle.e as circle circle circle1 circle circle2 circle1.x = 100 circle1.y = 100 circle1.radius = 10 circle2.x = 200 circle2.y = 200 circle2.radius = 50 circle1.draw () circle2.draw () Code above would draw two DIFFERENT circles. 2. Visual debugger with treeviews for sequences. 3. Structures or something similar. To atleast turn this: point [POINT_X] = x into this: point.x = x No other thing comes to mind this moment. Feature that every routine must be before you call it is not so bad thing. It keeps your code more organized. gotos are not needed. Maybe "continue" statement.
7. Re: Anyone done anything with the Euphoria Source Code?
- Posted by David Cuny <dcuny at LANSET.COM> Jan 19, 2002
- 470 views
Bernie wrote: >> integer a = 12, b, c = 22 > > > > might be a good start? > > I'am afraid that is more than I could handle with my > limited understanding of the code today. I'm open to suggestions. -- David Cuny
8. Re: Anyone done anything with the Euphoria Source Code?
- Posted by Kat <gertie at PELL.NET> Jan 19, 2002
- 472 views
On 19 Jan 2002, at 0:06, tone.skoda at siol.net wrote: <snip> > It keeps your code more organized. gotos are not needed. Maybe "continue" > statement. I guess i agree, but to be more versatile, lets have the "continue" specify where to continue to, to get out of deeply nested loops, without lots of flow control flag setting and testing,,, rather like this (and notice how each section is nicely blocked out with comment-like tags for the continue() statement!) : procedure demo_continue() for ... --code while ... --code if... --code for... --code if (we are finally done here) then continue(coreprocessing) end if --code end for --code end if --code if (we are finally done here) then continue(coreprocessing) end if end while --code end for :coreprocessing -- nice clear label ! -- more code while whatever --code if .....then continue(wrapup) --code end while :wrapup -- another clear definative label ! --code end procedure Kat
9. Re: Anyone done anything with the Euphoria Source Code?
- Posted by tone.skoda at siol.net Jan 19, 2002
- 475 views
I like more to just use if/elsif, even in C. ----- Original Message ----- From: <bensler at mail.com> To: "EUforum" <EUforum at topica.com> Subject: RE: Anyone done anything with the Euphoria Source Code? > > How about a switch/case structure too?
10. Re: Anyone done anything with the Euphoria Source Code?
- Posted by mistertrik at hotmail.com Jan 20, 2002
- 496 views
What about an 'exit' sort of proc, but one that can take a parameter.. eg... function check(atom a, atom b, atom c) return something end function for x = 1 to 100 do for y = 1 to 100 do for z = 100 do if check(x,y,z) then exit(3) end for end for end for So it would get out of all loops if check returned positive. The only way to do that right now is put the loop in a proc, and call return, or use lots of boolean flags.... not fun. >guess i agree, but to be more versatile, lets have the "continue" >pecify >here to continue to, to get out of deeply nested loops, without lots >of >flow >control flag setting and testing,,, rather like this (and notice how >each >section is nicely blocked out with comment-like tags for the continue() >statement!) : > >procedure demo_continue() >for ... >--code
11. Re: Anyone done anything with the Euphoria Source Code?
- Posted by Kat <gertie at PELL.NET> Jan 20, 2002
- 473 views
On 21 Jan 2002, at 1:20, mistertrik at hotmail.com wrote: > > What about an 'exit' sort of proc, but one that can take a parameter.. > > eg... > > function check(atom a, atom b, atom c) > return something > end function > > for x = 1 to 100 do > for y = 1 to 100 do > for z = 100 do > if check(x,y,z) then > exit(3) Ok, but if you go back and change the code, adding a loop, you now haveto remember this (3), and possibly change it too! I'd still rather have the clear label denoting the next execution block, and you can exit_to(blockname). Kat > end for > end for > end for > > So it would get out of all loops if check returned positive. The only way to > do > that right now is put the loop in a proc, and call return, or use lots of > boolean flags.... not fun. >guess i agree, but to be more versatile, lets have > the "continue" >pecify >here to continue to, to get out of deeply nested > loops, > without lots >of >flow >control flag setting and testing,,, rather like this > (and notice how >each >section is nicely blocked out with comment-like tags > for > the continue() >statement!) : > >procedure demo_continue() >for ... >--code > > > >
12. Re: Anyone done anything with the Euphoria Source Code?
- Posted by kbochert at ix.netcom.com Jan 20, 2002
- 461 views
-------Phoenix-Boundary-07081998- Hi David Cuny, you wrote on 1/17/02 11:02:44 AM: > >Perhaps the folk who have the source could get together and puzzle out a >single feature? I'm thinking: > > integer a = 12, b, c = 22 > >might be a good start? > >-- David Cuny Variable initialization apparently entails the re-arrangement of the code in a single subroutine. I have not doen extensive testing but it seems to work. Karl Bochert -------Phoenix-Boundary-07081998---