1. IDE and eu4
- Posted by ChrisB (moderator) Jul 10, 2009
- 1296 views
Hi
IDE 104 does not appear to work with eu4 (latest revision)
Is it currently being updated / uploaded to maintain current version compatability?
(Latest crash
C:\EUPHORIA\ide104\includes\ide_xpmmer.ew:3214 badly-formed list of parameters - expected ',' or ')' procedure drawShape(int where, int what, int x1, int y1, int x2, int y2, int Dot ) \\ ^)
Since win32lib and IDE are so closely linked, is it not time to merge the two projects?
(PS I wish I could help, but my programming skills are so mediocre in comparison to others on this site)
Chris
2. Re: IDE and eu4
- Posted by AndyDrummond Jul 12, 2009
- 1266 views
It looks to me - as I wrote xpmmer - that something has happened to the source of IDE_xpmmer since the procedure is just a normal one. You seem to have a newline before the trailing ) which would rather upset the parser, I suspect. There really should be no reason why the procedure argument list should cause a fault.
Andy
3. Re: IDE and eu4
- Posted by ChrisB (moderator) Jul 12, 2009
- 1276 views
Hi
No, that's just the 80 line limit of a dos console - a straight copy from the dos console does that.
I thought 'where' was an eu4.0 reserved word - hence the error - or am I wrong?
Chris
4. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 12, 2009
- 1301 views
Hi
No, that's just the 80 line limit of a dos console - a straight copy from the dos console does that.
I thought 'where' was an eu4.0 reserved word - hence the error - or am I wrong?
No, it's a library function. The key to this bug is that you have what is effectively the use of a forward type (int). It's declared somewhere as a global type, but that file isn't included by IDE_XPMmer.ew, which means that the interpreter cannot resolve it until the end of parsing.
The other key ingredient is that the parameter name is the same as some other routine. Here is a minimal example to display the bug:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
This has been entered as bug 2820451:
https://sourceforge.net/tracker/?func=detail&aid=2820451&group_id=182827&atid=902782
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
Matt
5. Re: IDE and eu4
- Posted by AndyDrummond Jul 12, 2009
- 1292 views
No, it's a library function. The key to this bug is that you have what is effectively the use of a forward type (int). It's declared somewhere as a global type, but that file isn't included by IDE_XPMmer.ew, which means that the interpreter cannot resolve it until the end of parsing.
The other key ingredient is that the parameter name is the same as some other routine. Here is a minimal example to display the bug:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
This has been entered as bug 2820451:
https://sourceforge.net/tracker/?func=detail&aid=2820451&group_id=182827&atid=902782
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
Matt
But "int" has been the same as "integer" for years - part of Win32Lib. It's used in many, many places, so why should it throw an error on this one? It does seem more likely that drawShape() has been defined somewhere else and doesn't like being redefined. But that begs the question why does it merely claims the argument list is badly formed? It looks perfectly standard stuff to me, but I haven't touched Eu4 at all - if the Eu3 to Eu4 shift is the problem.
If Derek does maintain IDE that would be absolutely great - but it is a major item to pick up. I know Judith would be delighted, as would I be. I am a programmer who codes for Windows with reluctance; IDE and Win32Lib make life very much simpler, and for it to be kept up would be ace. Hint, hint!
Andy
6. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 12, 2009
- 1264 views
But "int" has been the same as "integer" for years - part of Win32Lib. It's used in many, many places, so why should it throw an error on this one? It does seem more likely that drawShape() has been defined somewhere else and doesn't like being redefined. But that begs the question why does it merely claims the argument list is badly formed? It looks perfectly standard stuff to me, but I haven't touched Eu4 at all - if the Eu3 to Eu4 shift is the problem.
int is not the same as integer. There are many optimizations in the backend when it knows that objects are integers. It generally can't do this for user defined types, which int is.
As I explained, the parser wasn't dealing properly with a forward type when the parameter name was the same as a previously defined routine name. It was a bug that it gave an error in this situation. It's been fixed in r2212.
Matt
7. Re: IDE and eu4
- Posted by bernie Jul 12, 2009
- 1290 views
No, it's a library function. The key to this bug is that you have what is effectively the use of a forward type (int). It's declared somewhere as a global type, but that file isn't included by IDE_XPMmer.ew, which means that the interpreter cannot resolve it until the end of parsing.
The other key ingredient is that the parameter name is the same as some other routine. Here is a minimal example to display the bug:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
This has been entered as bug 2820451:
https://sourceforge.net/tracker/?func=detail&aid=2820451&group_id=182827&atid=902782
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
Matt
Matt:
A Euphoria integer is in the range -1073741824 to +1073741823
A "C" type int is in the range -32,768 to +32,767
So isn't the type check wrong and not working properly.
8. Re: IDE and eu4
- Posted by DerekParnell (admin) Jul 12, 2009
- 1248 views
A Euphoria integer is in the range -1073741824 to +1073741823
A "C" type int is in the range -32,768 to +32,767
So isn't the type check wrong and not working properly.
Why do you suspect the intention of the type definition was to duplicate the C "int" on 32-bit machines?
As far as I recall, it was developed only as a shorter alias for integer; the coders got lazy
9. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 12, 2009
- 1241 views
No, it's a library function. The key to this bug is that you have what is effectively the use of a forward type (int). It's declared somewhere as a global type, but that file isn't included by IDE_XPMmer.ew, which means that the interpreter cannot resolve it until the end of parsing.
The other key ingredient is that the parameter name is the same as some other routine. Here is a minimal example to display the bug:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
This has been entered as bug 2820451:
https://sourceforge.net/tracker/?func=detail&aid=2820451&group_id=182827&atid=902782
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
Matt
A Euphoria integer is in the range -1073741824 to +1073741823
A "C" type int is in the range -32,768 to +32,767
So isn't the type check wrong and not working properly.
It wasn't meant to be an actual C int. It was meant for lazy coders (David Cuny hated extra typing), and the intent was more like a typedef.
Matt
10. Re: IDE and eu4
- Posted by SDPringle Jul 12, 2009
- 1244 views
- Last edited Jul 13, 2009
With my trusty editor I was able to search and replace 'where' with 'what_place' and then 'what_place(' with 'where('. I searched and replaced 'routine' with 'a_routine.' I did this using regular expressions so that I made sure these were whole words. This was enough to allow eui -test to run through without an error. I typed the following no the command line and pressed ENTER four times:
time && eui -test IDE.exw && time
I had a long bath. When I came back to the computer this is what I saw:
La hora actual es: 17:46:30.93 Escriba una nueva hora: La hora actual es: 18:07:41.54 Escriba una nueva hora:
This means it took twenty minutes for eui to check the file and it never even started running IDE.exw. This is on a Pentium IV. So, I stearted it again without the test switch and I started preparing supper. After I had finished supper, I had the IDE up and running. It doesn't run slowly. When I try to run the project it says CreateProcessHi failed.
Shwan Pringle
11. Re: IDE and eu4
- Posted by euphoric (admin) Jul 12, 2009
- 1262 views
- Last edited Jul 13, 2009
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
I went to start a new program here at home today and realized I didn't have Win32Lib-IDE installed. DOH! So I went looking for the SVN repository and could not find one. When I download the latest version of EuVIDE from SourceForge, it ultimately crashes with the error:
C:\win32lib-ide\includes\ide_xpmmer.ew:3214 badly-formed list of parameters - expected ',' or ')' procedure drawShape(int where, int what, int x1, int y1, int x2, int y2, int Dot)
I have the latest Euphoria installed (r2213) as of this moment.
Would love to have an SVN repository to which I could make beneficial code changes.
I don't want to duplicate Derek's [current?] efforts.
12. Re: IDE and eu4
- Posted by jaygade Jul 12, 2009
- 1334 views
- Last edited Jul 13, 2009
No, it's a library function. The key to this bug is that you have what is effectively the use of a forward type (int). It's declared somewhere as a global type, but that file isn't included by IDE_XPMmer.ew, which means that the interpreter cannot resolve it until the end of parsing.
The other key ingredient is that the parameter name is the same as some other routine. Here is a minimal example to display the bug:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
This has been entered as bug 2820451:
https://sourceforge.net/tracker/?func=detail&aid=2820451&group_id=182827&atid=902782
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
Matt
Matt:
A Euphoria integer is in the range -1073741824 to +1073741823
A "C" type int is in the range -32,768 to +32,767
So isn't the type check wrong and not working properly.
Wait a C int hasn't been -32,768 - +32,767 for a long time, at least since the advent of common 32-bit systems. At least 10-15 years now...
For most non-DOS systems, a C int is -2,147,483,648 to +2,147,483,647. Which includes most computer systems in current use.
Not that using legacy systems is a bad thing, mind you.
13. Re: IDE and eu4
- Posted by DerekParnell (admin) Jul 12, 2009
- 1248 views
- Last edited Jul 13, 2009
Would love to have an SVN repository to which I could make beneficial code changes.
I'm currently (as in right this moment) trying to convert the CVS repository to SVN. Try again in 12-24 hours.
To everyone: Let me know if you need write access to the EuIDE SVN respository. I can set you up with developer access if I know your sourceforge id.
14. Re: IDE and eu4
- Posted by euphoric (admin) Jul 12, 2009
- 1241 views
- Last edited Jul 13, 2009
Would love to have an SVN repository to which I could make beneficial code changes.
I'm currently (as in right this moment) trying to convert the CVS repository to SVN. Try again in 12-24 hours.
Will do! Is this going to be the official repository of Win32Lib IDE? I always thought EuVIDE was a separate project...
15. Re: IDE and eu4
- Posted by DerekParnell (admin) Jul 12, 2009
- 1269 views
- Last edited Jul 13, 2009
Is this going to be the official repository of Win32Lib IDE? I always thought EuVIDE was a separate project...
It is still a separate project and I'm not planning to make become part of Win32lib.
The sourceforge page is http://sourceforge.net/projects/euvide/
16. Re: IDE and eu4
- Posted by ChrisB (moderator) Jul 13, 2009
- 1242 views
With my trusty editor I was able to search and replace 'where' with 'what_place' and then 'what_place(' with 'where('. I searched and replaced 'routine' with 'a_routine.' I did this using regular expressions so that I made sure these were whole words. This was enough to allow eui -test to run through without an error. I typed the following no the command line and pressed ENTER four times:
time && eui -test IDE.exw && time
I had a long bath. When I came back to the computer this is what I saw:
La hora actual es: 17:46:30.93 Escriba una nueva hora: La hora actual es: 18:07:41.54 Escriba una nueva hora:
This means it took twenty minutes for eui to check the file and it never even started running IDE.exw. This is on a Pentium IV. So, I stearted it again without the test switch and I started preparing supper. After I had finished supper, I had the IDE up and running. It doesn't run slowly. When I try to run the project it says CreateProcessHi failed.
Shwan Pringle
Hi
I believe that the reason IDE is taking so long to fire up is because of the two ways (from a simplistic point of view) that eu now includes sub-files.
The quick way - each sub included file now explicitly includes the files it needs.
The slow way - each sub included file doesn't include the files it needs so for each symbol the interpreter searches the entire program tree.
(I know this is a simplistic view, but it does explain the slowness of some programs start up)
If win32lib and ide have not been updated with these explicit includes, then the startup is significantly slower. I do not think they have yet been updated (correct me if I'm wrong). Incidentally, this also affects any programs created with win32lib. I hope they will be much faster once they are. Until then I will continue to use the pre compile IDE available in the archives.
Chris
17. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 13, 2009
- 1221 views
I believe that the reason IDE is taking so long to fire up is because of the two ways (from a simplistic point of view) that eu now includes sub-files.
The quick way - each sub included file now explicitly includes the files it needs.
The slow way - each sub included file doesn't include the files it needs so for each symbol the interpreter searches the entire program tree.
(I know this is a simplistic view, but it does explain the slowness of some programs start up)
If win32lib and ide have not been updated with these explicit includes, then the startup is significantly slower. I do not think they have yet been updated (correct me if I'm wrong). Incidentally, this also affects any programs created with win32lib. I hope they will be much faster once they are. Until then I will continue to use the pre compile IDE available in the archives.
Yes, you're basically correct. The IDE (since it was made prior to 4.0) uses global symbols exclusively for symbols used outside of a single file. Also, nearly all of the files rely on the main file to include necessary libraries, including win32lib.
With euphoria 4.0, this has consequences. Since we've added forward referencing, we can't simply assume that if a global matches the symbol we're looking for, that we've found the right symbol. We use clues, especially the files that are included by any particular file. If you never include anything, then we can't tell until the end which symbols you really want.
This increases the time it takes to start up because the parser now has more items to resolve. Also, it uses a lot more memory, so there is more allocation that goes on as the list of references grows. For the win32lib IDE, there is a quick fix. Since the main file (IDE.exw) includes everything else, you can simply add include IDE.exw to the top of its supporting files. Note that this isn't a good long term solution, but it's a quick and easy way to get going.
Matt
18. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 13, 2009
- 1279 views
I seem to recall that Derek said he was going to be working with the IDE. Derek, have you done much with it? I looked at the sourceforge project page, and it doesn't show a svn repository, and the cvs repository is empty.
I went to start a new program here at home today and realized I didn't have Win32Lib-IDE installed. DOH! So I went looking for the SVN repository and could not find one. When I download the latest version of EuVIDE from SourceForge, it ultimately crashes with the error:
C:\win32lib-ide\includes\ide_xpmmer.ew:3214 badly-formed list of parameters - expected ',' or ')' procedure drawShape(int where, int what, int x1, int y1, int x2, int y2, int Dot)
I have the latest Euphoria installed (r2213) as of this moment.
Are you certain of this? What happens when you run the test code from bug 2820451:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
Matt
19. Re: IDE and eu4
- Posted by bernie Jul 13, 2009
- 1214 views
Wait a C int hasn't been -32,768 - +32,767 for a long time, at least since the advent of common 32-bit systems. At least 10-15 years now...
For most non-DOS systems, a C int is -2,147,483,648 to +2,147,483,647. Which includes most computer systems in current use.
Not that using legacy systems is a bad thing, mind you.
It depends if the user was using ' short int ', ' long int ' or ' long long int '.
Because it was older legacy Euphoria code I assumed ' short int '.
20. Re: IDE and eu4
- Posted by euphoric (admin) Jul 13, 2009
- 1272 views
[Win32Lib IDE] ultimately crashes with the error:
C:\win32lib-ide\includes\ide_xpmmer.ew:3214 badly-formed list of parameters - expected ',' or ')' procedure drawShape(int where, int what, int x1, int y1, int x2, int y2, int Dot)
I have the latest Euphoria installed (r2213) as of this moment.
Are you certain of this? What happens when you run the test code from bug 2820451:
procedure bar() end procedure procedure foo( int bar, int what ) end procedure type int( object i ) return integer( i ) end type
Matt, I just tested this at work and I get the same error (here I'm using r2215).
When I run the test code above, nothing happens (I don't get an error).
21. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 13, 2009
- 1198 views
Matt, I just tested this at work and I get the same error (here I'm using r2215).
When I run the test code above, nothing happens (I don't get an error).
Oops. Looks like I fixed it for procedures but not for functions. Watch your commit notifications....
Matt
22. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 13, 2009
- 1213 views
Matt, I just tested this at work and I get the same error (here I'm using r2215).
When I run the test code above, nothing happens (I don't get an error).
Oops. Looks like I fixed it for procedures but not for functions. Watch your commit notifications....
r2216 should fix this now.
Matt
23. Re: IDE and eu4
- Posted by euphoric (admin) Jul 13, 2009
- 1223 views
r2216 should fix this now.
IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow!
24. Re: IDE and eu4
- Posted by DerekParnell (admin) Jul 13, 2009
- 1228 views
IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow!
I'm working on that.
25. Re: IDE and eu4
- Posted by bernie Jul 13, 2009
- 1210 views
IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow!
I'm working on that.
Like I suggested a long time ago that there needs to be a
option that can turn off forward reference scanning after
a library is debugged by it's author.
26. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 13, 2009
- 1211 views
- Last edited Jul 14, 2009
IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow!
I'm working on that.
Like I suggested a long time ago that there needs to be a
option that can turn off forward reference scanning after
a library is debugged by it's author.
Like I asked a long time ago: How could that possibly work?
Matt
27. Re: IDE and eu4
- Posted by DerekParnell (admin) Jul 13, 2009
- 1217 views
- Last edited Jul 14, 2009
IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow!
I'm working on that.
Like I suggested a long time ago that there needs to be a
option that can turn off forward reference scanning after
a library is debugged by it's author.
Like I asked a long time ago: How could that possibly work?
Yeah, I was wondering what difference that would make too? The only thing I can come up with is it would work only for libraries that were specifically written to avoid forward referencing which is NOT how the standard library is intended to be used.
28. Re: IDE and eu4
- Posted by SDPringle Jul 13, 2009
- 1189 views
- Last edited Jul 14, 2009
The standard library often has forward referencing but any legacy EUPHORIA program will ofcourse not be using it and thus there would be no problem. I'd love to have 4.0 forward referencing and the regex stuff in a dll rather than linking statically. However, when an approach that performs so much better than an artistically superior solution one should compromise and give up what is more artisitically superior in favor of what has more practical value.
The question if the interpreter had a 'no-forward-referencing' switch would you be able to cut down this parse time significantly? I guess it would take a significant amount of coding just to find out. If you reduced it by 99% it would still be too slow: 20 seconds. If we don't make this fast here, 4.0 will need pre-compiled headers.
Shawn Pringle
29. Re: IDE and eu4
- Posted by mattlewis (admin) Jul 14, 2009
- 1230 views
The standard library often has forward referencing but any legacy EUPHORIA program will ofcourse not be using it and thus there would be no problem. I'd love to have 4.0 forward referencing and the regex stuff in a dll rather than linking statically. However, when an approach that performs so much better than an artistically superior solution one should compromise and give up what is more artisitically superior in favor of what has more practical value.
I don't think it's going to matter for most programs. The IDE is somewhat of a special case. It's got a lot of code, and really abuses the global namespace. Most files have almost no includes in them.
Did I mention how huge it is? There are several multi thousand line routines. Please reread the last sentence. There are many opportunities to tighten up the code, and it's really quite easy to get the parsing time under control.
Matt