1. IDE and eu4

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

new topic     » topic index » view message » categorize

2. Re: IDE and eu4

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

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

3. Re: IDE and eu4

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

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

4. Re: IDE and eu4

ChrisB said...

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

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

5. Re: IDE and eu4

mattlewis said...

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

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

6. Re: IDE and eu4

AndyDrummond said...

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

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

7. Re: IDE and eu4

mattlewis said...

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.

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

8. Re: IDE and eu4

bernie said...

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 blink

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

9. Re: IDE and eu4

bernie said...
mattlewis said...

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

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

10. Re: IDE and eu4

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

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

11. Re: IDE and eu4

mattlewis said...

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. smile

I don't want to duplicate Derek's [current?] efforts.

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

12. Re: IDE and eu4

bernie said...
mattlewis said...

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.

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

13. Re: IDE and eu4

euphoric said...

Would love to have an SVN repository to which I could make beneficial code changes. smile

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.


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

14. Re: IDE and eu4

DerekParnell said...
euphoric said...

Would love to have an SVN repository to which I could make beneficial code changes. smile

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...

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

15. Re: IDE and eu4

euphoric said...

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/

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

16. Re: IDE and eu4

SDPringle said...

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

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

17. Re: IDE and eu4

ChrisB said...

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

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

18. Re: IDE and eu4

euphoric said...
mattlewis said...

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

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

19. Re: IDE and eu4

jaygade said...

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 '.

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

20. Re: IDE and eu4

mattlewis said...
euphoric said...

[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).

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

21. Re: IDE and eu4

euphoric said...

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

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

22. Re: IDE and eu4

mattlewis said...
euphoric said...

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

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

23. Re: IDE and eu4

mattlewis said...

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! grin

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

24. Re: IDE and eu4

euphoric said...

IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow! grin

I'm working on that.

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

25. Re: IDE and eu4

DerekParnell said...
euphoric said...

IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow! grin

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.

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

26. Re: IDE and eu4

bernie said...
DerekParnell said...
euphoric said...

IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow! grin

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

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

27. Re: IDE and eu4

mattlewis said...
bernie said...
DerekParnell said...
euphoric said...

IDE now works for me. It's amusing how long it takes for the interpreted source to start up. Wow! grin

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.

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

28. Re: IDE and eu4

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

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

29. Re: IDE and eu4

SDPringle said...

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu