1. Bug in Edita Options/Reformat ex.err

Just spotted a bug in the ex.err pre-processing of Edita that I'm too busy/lazy to fix right now, so wondered if anyone (with the sources of Edita already to hand) fancied a little challenge...

The offending program (eaerr.e) is 384 lines long. It mentions eaerr.exw but I lost that a long time ago, though if you take a copy of eaerr.e, define constant charsWide=79 (say) and delete 9 lines at the end (linelengths..end for) it compiles cleanly. Not that I claim it is well written or properly commented.

Note that I haven't managed to create an offending ex.err from OpenEu, but here is one:

C:\Program Files\Phix\p1.exw:5 
attempt to divide by 0 
 
Global & Local Variables 
 
 C:\Program Files\Phix\p1.exw: 
    o = {{0,0,0}, {97'a',98'b',99'c'}, {100'd',101'e',102'f'}} 
    x = "{{0,0,0}, {97'a',98'b',99'c'}, {100'd',101'e',102'f'}}" 
Which, with Options\Reformat ex.err checked, Edita shows as:
C:\Program Files\Phix\p1.exw:5 
attempt to divide by 0 
 
Global & Local Variables 
 
 C:\Program Files\Phix\p1.exw: 
    o = {{0,0,0}, "abc", {1"def"} 
    x = "{{0,0,0}, "abc", {1"def"}" 
Obviously it got "o" wrong, and it mangled "x" when it should be leaving strings as-is.

If no-one's interested I'll get round to it next month, or the month after that...

Pete

new topic     » topic index » view message » categorize

2. Re: Bug in Edita Options/Reformat ex.err

petelomax said...

Just spotted a bug in the ex.err pre-processing of Edita that I'm too busy/lazy to fix right now, so wondered if anyone (with the sources of Edita already to hand) fancied a little challenge...

I was wondering if we could make this into an official contest, along the lines of http://openeuphoria.org/forum/m/113859.wc

You'd get to pick the winning entry, using whatever criteria you wanted, including just going by gut instinct.

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

3. Re: Bug in Edita Options/Reformat ex.err

jimcbrown said...

I was wondering if we could make this into an official contest

Interesting idea, I'd certainly be fine with that.

You could even make the "spec" part of the contest! As in what things it should change and what it should leave alone, who has considered all the cases that need to be considered, and so on. Looking back at what I wrote in 2007, it does not really meet my ideals of clear readable code, which would probably be my main criteria.

Pete

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

4. Re: Bug in Edita Options/Reformat ex.err

Hi Pete, I'd like to take a look but I cannot access the code. Both edita.isgreat.org and phix.isgreat.org redirect me to some ads pages. Do you have another source location for it?

By the way, is the code compatible with Eu3 and/or 4 or is it Phix specific?

Thanks,
Guillermo

Edit: Fixed typo

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

5. Re: Bug in Edita Options/Reformat ex.err

gbonvehi said...

Both edita.isgreat.org and phix.isgreat.org redirect me to some ads pages.

Oh, bit of a panic there, then I found this (from last Tuesday, snipped a fair bit) sitting in my inbox:

Dear valued customer. 
 
 phix.isgreat.org has been changed to phix.is-great.org. 
 
 This email is to notify you of a change to your sub domain name URL ... 
 an issue with search engines and internet quality control ... 
 abuse and problems with banned users ... 
 has required us to unfortunately discontinue the isgreat.org domain name  ... 
 very sorry ... 
 no fault of your website ... 
 We have therefore issued a new domain name ... 
 
 phix.isgreat.org 
 
 Domain has been upgraded and changed to a brand new domain name which is : 
 
 phix.is-great.org 
edita is now, of course, hosted at http://edita.is-great.org

gbonvehi said...

By the way, is the code compatible with Eu3 and/or 4 or is it Phix specific?

It should run fine on all three.

Regards,
Pete

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

6. Re: Bug in Edita Options/Reformat ex.err

I cannot seem to replicate it, unless of course my test program is incorrect, this is the test program:

sequence o 
sequence x 
o = {{0,0,0}, "abc", "def"}  
x = "{{0,0,0}, \"abc\", \"def\"}" 
?1/0 

The ex.err unformatted:

C:\Eu311\edita\p1.exw:5 
attempt to divide by 0  
 
 
Global & Local Variables 
 
 C:\Eu311\edita\p1.exw: 
    o = { 
          {0,0,0}, 
          {97'a',98'b',99'c'}, 
          {100'd',101'e',102'f'} 
        } 
    x = {123'{',123'{',48'0',44',',48'0',44',',48'0',125'}',44',',32' ',34'"', 
97'a',98'b',99'c',34'"',44',',32' ',34'"',100'd',101'e',102'f',34'"',125'}'} 
And the result formatted:
C:\Eu311\edita\p1.exw:5 
attempt to divide by 0  
 
 
Global & Local Variables 
 
 C:\Eu311\edita\p1.exw: 
    o = { 
          {0,0,0}, 
          "abc", 
          "def" 
        } 
    x = "{{0,0,0}, "abc", "def"}" 

Cheers,
Guillermo

Edit: From what I see the ex.err generated by openeuphoria is different and interpreted correctly, are you getting your ex.err from Phix?
Edit2: I tried to download Phix but the file hosting site wanted me to register so I gave up, have you thought on using other software hosting services like the ones dedicated to it tucows.com filetransit.com freewarefiles.com ?

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

7. Re: Bug in Edita Options/Reformat ex.err

gbonvehi said...

I cannot seem to replicate it, the ex.err generated by openeuphoria is different and interpreted correctly, are you getting your ex.err from Phix?

Yes. It might not actually be possible to reproduce this on OpenEu, or it may occur with a few more nesting levels, longer subsequences, or suchlike. My gut feeling is that the extra "\n" are saving it just before it goes wrong. That code hasn't clobbered an error file (to my knowledge) in the past five years, which arguably makes it pretty rare.

gbonvehi said...

I tried to download Phix but...

The "eins035.zip" and "Windows Installer" are hosted directly on edita.is-great.org; they may be a bit slow and/or unreliable and may need a few tries (it is a free host), as you probably found out the "here" and "here" are on 4shared, which I didn't think you had to register on. I will look again, as I usually do, next time I upload something.

Regards,
Pete

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

8. Re: Bug in Edita Options/Reformat ex.err

petelomax said...

Yes. It might not actually be possible to reproduce this on OpenEu, or it may occur with a few more nesting levels, longer subsequences, or suchlike. My gut feeling is that the extra "\n" are saving it just before it goes wrong. That code hasn't clobbered an error file (to my knowledge) in the past five years, which arguably makes it pretty rare.

There's one bug in the wild! :)
If I've time I'll take a look at the code to see if I can see something that may be causing this, probably as you said it's an EOL problem since is the most notable diff between the generated ex.err files.

petelomax said...

The "eins035.zip" and "Windows Installer" are hosted directly on edita.is-great.org; they may be a bit slow and/or unreliable and may need a few tries (it is a free host), as you probably found out the "here" and "here" are on 4shared, which I didn't think you had to register on. I will look again, as I usually do, next time I upload something.

Actually I could download Edita just great from your server, I was trying to get Phix which is only available in 4share.

Cheers,
Guillermo

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

9. Re: Bug in Edita Options/Reformat ex.err

gbonvehi said...

I tried to download Phix but...

gbonvehi said...

I was trying to get Phix

I should learn to read. I put a quick "test <a href=http://phix.is-great.org/phix.zip>Phix.zip</a>" on the download page which should work.

Pete

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

10. Re: Bug in Edita Options/Reformat ex.err

Hi Pete,

I crafted a quick (& pretty dirty) ex.err formatter, it works for both cases mentioned above.
You can find the code here: https://bitbucket.org/gbonvehi/eu4.eaerr2/downloads

If anyone has any suggestion/comment or wants to make a change let me know.
As it is right now, it takes an input filename, reads it, puts nice strings if it should and returns the "corrected" output as a sequence.

Cheers,
Guillermo

PS: Thanks for the edita link, I could download it successfully. I tried to register but it's still pointing to the old site, you should change the url in it too.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu