1. Euphoria 4.1 Linux 64-bit errors.
- Posted by K_D_R Nov 17, 2012
- 2017 views
Considering that Euphoria 4.1 hasn't even been released yet, is it appropriate/beneficial for me to report errors I encounter here like this?
Sanity.ex fails at 4%
ken@ken-OptiPlex-360:~/euphoria/bin$ eui bugreport.ex Version ---------------------------- 4.1.0 development (5838:c4cf83a3db32, 2012-11-13 01:38:17) Operating System ---------------------------- Platform: Linux, Build: ken-OptiPlex-360, 3.5.0-18-generic:0 Include Directories ---------------------------- 1: /home/ken/euphoria/bin 2: /home/ken/euphoria/include 3: /home/ken/euphoria/include EUDIR ---------------------------- /home/ken/euphoria PATH ---------------------------- /home/ken/euphoria/bin:/home/ken/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
eui sanity.ex Euphoria SANITY TEST ... 4% /home/ken/euphoria/include/std/error.e:52 in procedure crash() sanity tests failed at line number shown in ex.err ... called from /home/ken/euphoria/demo/sanity.ex:911 in procedure machine_level() ... called from /home/ken/euphoria/demo/sanity.ex:1139 in procedure sanity() ... called from /home/ken/euphoria/demo/sanity.ex:1181 --> See ex.err ken@ken-OptiPlex-360:~/euphoria/demo$
-- ex.err /home/ken/euphoria/include/std/error.e:52 in procedure crash() sanity tests failed at line number shown in ex.err fmt = {115's',97'a',110'n',105'i',116't',121'y',32' ',116't',101'e',115's', 116't',115's',32' ',102'f',97'a',105'i',108'l',101'e',100'd',32' ',97'a', 116't',32' ',108'l',105'i',110'n',101'e',32' ',110'n',117'u',109'm',98'b', 101'e',114'r',32' ',115's',104'h',111'o',119'w',110'n',32' ',105'i',110'n', 32' ',101'e',120'x',46'.',101'e',114'r',114'r'} data = {} msg = {115's',97'a',110'n',105'i',116't',121'y',32' ',116't',101'e',115's', 116't',115's',32' ',102'f',97'a',105'i',108'l',101'e',100'd',32' ',97'a', 116't',32' ',108'l',105'i',110'n',101'e',32' ',110'n',117'u',109'm',98'b', 101'e',114'r',32' ',115's',104'h',111'o',119'w',110'n',32' ',105'i',110'n', 32' ',101'e',120'x',46'.',101'e',114'r',114'r'} ... called from /home/ken/euphoria/demo/sanity.ex:911 in procedure machine_level() addr = <no value> dest = <no value> src = <no value> x = <no value> ... called from /home/ken/euphoria/demo/sanity.ex:1139 in procedure sanity() s1 = { {65'A',7,66'B',7,67'C',7}, {100'd',7,101'e',7,102'f',7} } s2 = { {65'A',7,66'B',7,67'C',7}, {100'd',7,101'e',7,102'f',7} } j = 0 z = <no value> k = <no value> ... called from /home/ken/euphoria/demo/sanity.ex:1181 Public & Export & Global & Local Variables /home/ken/euphoria/include/std/types.e: Defined_Sets = { {98'b',99'c',100'd',102'f',103'g',104'h',106'j',107'k', 108'l',109'm',110'n',112'p',113'q',114'r',115's',116't',118'v',119'w',120'x', 121'y',122'z',66'B',67'C',68'D',70'F',71'G',72'H',74'J',75'K',76'L',77'M', 78'N',80'P',81'Q',82'R',83'S',84'T',86'V',87'W',88'X',89'Y',90'Z'}, {97'a',101'e',105'i',111'o',117'u',65'A',69'E',73'I', 79'O',85'U'}, { {48'0',57'9'}, {65'A',70'F'}, {97'a',102'f'} }, {32' ',9,10,13,11,160}, { {32' ',47'/'}, {58':',63'?'}, {91'[',96'`'}, {123'{',126'~'} }, { {32' ',126'~'} }, { {32' ',126'~'}, {32' ',32' '}, {9,9}, {10,10}, {13,13}, {8,8}, {7,7} }, { {97'a',122'z'} }, { {65'A',90'Z'} }, { {48'0',57'9'}, {97'a',122'z'}, {65'A',90'Z'} }, { {48'0',57'9'}, {97'a',122'z'}, {65'A',90'Z'}, {95'_',95'_'} }, { {97'a',122'z'}, {65'A',90'Z'} }, { {0,127} }, { {0,31}, {127,127} }, { {48'0',57'9'} }, { {33'!',126'~'} }, { {0,255} }, {95'_'}, {1,0} } /home/ken/euphoria/include/std/datetime.e: yydiff = 80'P' /home/ken/euphoria/include/std/memconst.e: DEP_really_works = 0 use_DEP = 1 FREE_RID = 2 kernel_dll = <no value> memDLL_id = <no value> VirtualAlloc_rid = <no value> VirtualLock_rid = <no value> VirtualUnlock_rid = <no value> VirtualProtect_rid = <no value> GetLastError_rid = <no value> GetSystemInfo_rid = <no value> /home/ken/euphoria/include/std/memory.e: edges_only = <no value> check_calls = 1 VirtualFree_rid = <no value> /home/ken/euphoria/include/std/machine.e: FREE_ARRAY_RID = 1 page_size = 4096 /home/ken/euphoria/include/std/io.e: mem0 = 44457984 mem1 = 44457985 mem2 = 44457986 mem3 = 44457987 /home/ken/euphoria/include/std/scinot.e: NATIVE_FORMAT = 3 /home/ken/euphoria/include/std/get.e: input_file = 3 input_string = {35'#',54'6',52'4',32' '} string_next = 5 ch = 32' ' leading_whitespace = 1 /home/ken/euphoria/include/std/datetime.e: month_names = { {74'J',97'a',110'n',117'u',97'a',114'r',121'y'}, {70'F',101'e',98'b',114'r',117'u',97'a',114'r',121'y'}, {77'M',97'a',114'r',99'c',104'h'}, {65'A',112'p',114'r',105'i',108'l'}, {77'M',97'a',121'y'}, {74'J',117'u',110'n',101'e'}, {74'J',117'u',108'l',121'y'}, {65'A',117'u',103'g',117'u',115's',116't'}, {83'S',101'e',112'p',116't',101'e',109'm',98'b',101'e', 114'r'}, {79'O',99'c',116't',111'o',98'b',101'e',114'r'}, {78'N',111'o',118'v',101'e',109'm',98'b',101'e',114'r'}, {68'D',101'e',99'c',101'e',109'm',98'b',101'e',114'r'} } month_abbrs = { {74'J',97'a',110'n'}, {70'F',101'e',98'b'}, {77'M',97'a',114'r'}, {65'A',112'p',114'r'}, {77'M',97'a',121'y'}, {74'J',117'u',110'n'}, {74'J',117'u',108'l'}, {65'A',117'u',103'g'}, {83'S',101'e',112'p'}, {79'O',99'c',116't'}, {78'N',111'o',118'v'}, {68'D',101'e',99'c'} } day_names = { {83'S',117'u',110'n',100'd',97'a',121'y'}, {77'M',111'o',110'n',100'd',97'a',121'y'}, {84'T',117'u',101'e',115's',100'd',97'a',121'y'}, {87'W',101'e',100'd',110'n',101'e',115's',100'd',97'a', 121'y'}, {84'T',104'h',117'u',114'r',115's',100'd',97'a',121'y'}, {70'F',114'r',105'i',100'd',97'a',121'y'}, {83'S',97'a',116't',117'u',114'r',100'd',97'a',121'y'} } day_abbrs = { {83'S',117'u',110'n'}, {77'M',111'o',110'n'}, {84'T',117'u',101'e'}, {87'W',101'e',100'd'}, {84'T',104'h',117'u'}, {70'F',114'r',105'i'}, {83'S',97'a',116't'} } ampm = { {65'A',77'M'}, {80'P',77'M'} } /home/ken/euphoria/include/std/filesys.e: STAT_VER = 0 my_dir = -2 InitCurDir = {47'/',104'h',111'o',109'm',101'e',47'/',107'k',101'e',110'n', 47'/',101'e',117'u',112'p',104'h',111'o',114'r',105'i',97'a',47'/',100'd', 101'e',109'm',111'o',47'/'} file_counters = {} /home/ken/euphoria/include/std/pretty.e: pretty_end_col = <no value> pretty_chars = <no value> pretty_start_col = <no value> pretty_level = <no value> pretty_file = <no value> pretty_ascii = <no value> pretty_indent = <no value> pretty_ascii_min = <no value> pretty_ascii_max = <no value> pretty_line_count = <no value> pretty_line_max = <no value> pretty_dots = <no value> pretty_line_breaks = <no value> pretty_printing = <no value> pretty_fp_format = <no value> pretty_int_format = <no value> pretty_line = <no value> /home/ken/euphoria/include/std/serialize.e: mem0 = 44462080 mem1 = 44462081 mem2 = 44462082 mem3 = 44462083 mem4 = 44462084 mem5 = 44462085 mem6 = 44462086 mem7 = 44462087 /home/ken/euphoria/include/std/text.e: lower_case_SET = {} upper_case_SET = {} encoding_NAME = {65'A',83'S',67'C',73'I',73'I'} /home/ken/euphoria/include/std/convert.e: mem = 45072384 decimal_mark = 46'.' /home/ken/euphoria/include/std/eumem.e: ram_space = {} ram_free_list = 0 free_rid = 6 /home/ken/euphoria/include/std/primes.e: list_of_primes = {2,3} /home/ken/euphoria/include/std/map.e: threshold_size = 23 /home/ken/euphoria/include/std/graphcst.e: true_fgcolor = {0,4,2,6,1,5,3,7,8,12,10,14,9,13,11,15,16,20,18,22,17, 21,19,23,24,28,26,28,25,29,17,31} true_bgcolor = {0,4,2,6,1,5,3,7,8,12,10,14,9,13,11,15,16,20,18,22,17, 21,19,23,24,28,26,28,25,29,17,31} /home/ken/euphoria/include/std/image.e: fn = <no value> error_code = <no value> numXPixels = <no value> numYPixels = <no value> bitCount = <no value> numRowBytes = <no value> /home/ken/euphoria/include/std/win32/msgbox.e: lib = <no value> msgbox_id = <no value> get_active_id = <no value> /home/ken/euphoria/demo/sanity.ex: y = { {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001}, {1.5,-3.5,10000000000,-1e+20,0,0.0001} } color = 1 rp = <no value> eubin = {47'/',104'h',111'o',109'm',101'e',47'/',107'k',101'e',110'n', 47'/',101'e',117'u',112'p',104'h',111'o',114'r',105'i',97'a',47'/',100'd', 101'e',109'm',111'o'}
2. Syncolor errors in 4.1 Linux 64-bit
- Posted by K_D_R Nov 17, 2012
- 2017 views
In another thread I reported problems with single and double quotes as well as the symbol "#".
Likewise, the backtick symbol is not displayed in ed.ex:
-- copied from ed.ex -- menus.ex Esc for commands include GtkEngine.e ------------------------------------------------------------------------ -- A 'template' for starting your own menus ------------------------------------------------------------------------ integer screen_state = FALSE constant docs = <u><b>Menus</b></u> This is a template to give you a headstart on writing your own programs constant win = create(GtkWindow)
This is the same code loaded in gedit:
-- copied from gedit: -- menus.ex include GtkEngine.e ------------------------------------------------------------------------ -- A 'template' for starting your own menus ------------------------------------------------------------------------ integer screen_state = FALSE constant docs = ` <u><b>Menus</b></u> This is a template to give you a headstart on writing your own programs. ` constant win = create(GtkWindow)
I just noticed in the preview that openeuphoria.org's syncolor file fails to recognize the closing backtick and so all the text following the initial backtick is colored green. This is what happens in one of my modified versions of ed.ex from a previous release - prior to syncolor.e using the file tokenize.e.
Kenneth Rhodes
3. Re: Syncolor errors in 4.1 Linux 64-bit
- Posted by K_D_R Nov 18, 2012
- 1965 views
-- syncolor.e elsif class = tokenize:T_KEYWORD then seg_flush(KEYWORD_COLOR) elsif class = tokenize:T_BUILTIN then -- seg_flush(KEYWORD_COLOR) --<----------keyword color "flushed" should be: seg_flush(BUILTIN_COLOR)
4. Re: Syncolor errors in 4.1 Linux 64-bit
- Posted by SDPringle Nov 18, 2012
- 1899 views
Please report all errors you find with 4.1. I know I do. [Edit: tense change] :)
5. Re: Syncolor errors in 4.1 Linux 64-bit
- Posted by SDPringle Nov 18, 2012
- 1917 views
I have just tried this with 4.1 (Alternative Literals Branch) 32-bit Windows. Same problem. I cannot see the back tick in ed.ex.
Shawn
6. syncolor.e + tokenize.e = an absolute disaster
- Posted by K_D_R Nov 18, 2012
- 1931 views
Euphoria 3.1 ed.ex shrouded = ed.il = 64k, syncolor.e file = 8k Euphoria 4.1 ed.ex shrouded = ed.il = 260k, syncolor.e file + tokenize.e = 36k 260/64 = 4.33 36/8 = 4.5
The current windows version of syncolor.e which includes tokenize.e provides multi-line string support and multi-line comments which were not supported in the Euphoria 3.1 version of these files. However; under Linux in ed.ex all the initial entry of these "tokens" (`, ", /*) are not displayed, nor is any text following them displayed, until a corresponding closing symbol is entered. Additionally, under Linux, the two initial symbols of the SHEBANG line, #!, are not visible when entered and remain invisible.
I have a version of syncolor.e which does not include tokenize.e, but on Linux it does handle the SHEBANG line and all the other symbols mentioned above correctly - and it does it in about 1/3 to 1/4 the code. I believe it was from Euphoria 4.0.3., perhaps it was from an earlier release.
Kenneth Rhodes
reference: http://openeuphoria.org/ticket/507.wc
7. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by SDPringle Nov 18, 2012
- 1878 views
Where is this syncolor.e from? Could you post a link to a pastey bin here?
Shawn
8. Re: Syncolor errors in 4.1 Linux 64-bit
- Posted by jimcbrown (admin) Nov 18, 2012
- 1930 views
I have just tried this with 4.1 (Alternative Literals Branch) 32-bit Windows. Same problem. I cannot see the back tick in ed.ex.
Shawn
Have you tried hitting two back ticks in a row?
Obviously, this isn't the smartest way to handle errors from the tokenizer, but this can be worked around with the following patch: (note that the entire line will lose colour, however)
--- a/include/euphoria/syncolor.e +++ b/include/euphoria/syncolor.e @@ -178,6 +178,9 @@ line = tokenize:tokenize_string(pline, token) -- TODO error checking? + if line[2] != 0 then + return append(color_segments, {NORMAL_COLOR, pline}) + end if line = line[1] current_color = DONT_CARE seg = 1 @@ -197,7 +200,7 @@ seg_flush(KEYWORD_COLOR) elsif class = tokenize:T_BUILTIN then - seg_flush(KEYWORD_COLOR) + seg_flush(BUILTIN_COLOR) elsif class = tokenize:T_IDENTIFIER then seg_flush(NORMAL_COLOR)
9. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by mattlewis (admin) Nov 18, 2012
- 1903 views
Where is this syncolor.e from? Could you post a link to a pastey bin here?
It comes with euphoria. It's at include/euphoria/syncolor.e.
Matt
10. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by K_D_R Nov 19, 2012
- 1866 views
Syncolor.e from Euphoria 4.0.4 works perfectly.
Which begs the question... Why has perfectly functioning code been replaced with bloated (+200k), obfuscated, buggy code?
Kenneth Rhodes
11. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by jimcbrown (admin) Nov 19, 2012
- 1843 views
Syncolor.e from Euphoria 4.0.4 works perfectly.
Which begs the question... Why has perfectly functioning code been replaced with bloated (+200k), obfuscated, buggy code?
Kenneth Rhodes
What's taking up 200k?
12. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by mattlewis (admin) Nov 19, 2012
- 1851 views
Syncolor.e from Euphoria 4.0.4 works perfectly.
Which begs the question... Why has perfectly functioning code been replaced with bloated (+200k), obfuscated, buggy code?
Like Jim, I'm not sure what +200K refers to. The combination of tokenize.e and syncolor.e are about 1400 lines (including white space and comments) for a total of about 31K.
It's been a while, but IIRC (and I wasn't directly involved), the goal was to move some more old C code into easier to maintain euphoria code. Obviously, the transition has introduced some regressions.
Matt
13. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by K_D_R Nov 19, 2012
- 1850 views
- Last edited Nov 20, 2012
Like Jim, I'm not sure what +200K refers to. The combination of tokenize.e and syncolor.e are about 1400 lines (including white space and comments) for a total of about 31K.
It's been a while, but IIRC (and I wasn't directly involved), the goal was to move some more old C code into easier to maintain euphoria code. Obviously, the transition has introduced some regressions.
Matt
I stand corrected - 31k, then... syncolor.e sans tokenize.e = 8.3k: 31k/8.3k = 3.74, nearly %375 of the original code size.
Here are some ed.ex routines to deal with syncolor.e's current problems:
-- ed.ex routines to automate insertion of matching closing tokens for -- multi-line comments, single quote marks, double quote marks, -- & multi-line quote (backtick) marks: -- Once you insert these routines in the list of elsif clauses -- found in the procedure "get_escape", -- you can execute them by typing ESC + / or ', ", or `. -- You will have to press the return/enter to complete execution of the command, -- unless you enter the token in the list of "hot-keys" found in the line: command = key_gets("hcqswnedfrlm/`\'\"", {}) & ' ' -- which is located earlier in the procedure. elsif command[1] = '/' then add_queue("/* */" & repeat(ARROW_LEFT,3)) elsif command[1] = '\'' then add_queue("\' \'" & repeat(ARROW_LEFT,2)) elsif command[1] = '\"' then add_queue("\" \"" & repeat(ARROW_LEFT,2)) elsif command[1] = '`' then add_queue("` `" & repeat(ARROW_LEFT,2))
Kenneth Rhodes
14. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by mattlewis (admin) Nov 20, 2012
- 1809 views
Like Jim, I'm not sure what +200K refers to. The combination of tokenize.e and syncolor.e are about 1400 lines (including white space and comments) for a total of about 31K.
It's been a while, but IIRC (and I wasn't directly involved), the goal was to move some more old C code into easier to maintain euphoria code. Obviously, the transition has introduced some regressions.
Matt
I stand corrected - 31k, then... syncolor.e sans tokenize.e = 8.3k: 31k/8.3k = 3.74, nearly %375 of the original code size.
Here are some ed.ex routines to deal with syncolor.e's current problems:
I've been taking a look at syncolor/tokenize. I think that tokenize was written with the idea that it would be working with correct euphoria code, which is obviously inappropriate for a text editor. I've got some updates that I think fix the issues with quotes and shebangs. They just need some more testing to make sure I didn't break something else.
Matt
15. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by mattlewis (admin) Nov 20, 2012
- 1799 views
I've been taking a look at syncolor/tokenize. I think that tokenize was written with the idea that it would be working with correct euphoria code, which is obviously inappropriate for a text editor. I've got some updates that I think fix the issues with quotes and shebangs. They just need some more testing to make sure I didn't break something else.
I just pushed up those changes. ed.ex doesn't handle multi-line quotes properly, because it colors lines independently, so it doesn't know that it's inside of a string. Strange things happen with /* */ style quotes, too. In particular, if you hit enter after starting one, the line below disappears.
Matt
16. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by mattlewis (admin) Nov 20, 2012
- 1798 views
I've been taking a look at syncolor/tokenize. I think that tokenize was written with the idea that it would be working with correct euphoria code, which is obviously inappropriate for a text editor. I've got some updates that I think fix the issues with quotes and shebangs. They just need some more testing to make sure I didn't break something else.
I just pushed up those changes. ed.ex doesn't handle multi-line quotes properly, because it colors lines independently, so it doesn't know that it's inside of a string. Strange things happen with /* */ style quotes, too. In particular, if you hit enter after starting one, the line below disappears.
OK, /* */ style comments should be better now. The actual multi-line stuff isn't properly colored (for them or strings), but they don't eat lines now.
Matt
17. Re: syncolor.e + tokenize.e = an absolute disaster
- Posted by K_D_R Nov 20, 2012
- 1748 views
I've been taking a look at syncolor/tokenize. I think that tokenize was written with the idea that it would be working with correct euphoria code, which is obviously inappropriate for a text editor. I've got some updates that I think fix the issues with quotes and shebangs. They just need some more testing to make sure I didn't break something else.
I just pushed up those changes. ed.ex doesn't handle multi-line quotes properly, because it colors lines independently, so it doesn't know that it's inside of a string. Strange things happen with /* */ style quotes, too. In particular, if you hit enter after starting one, the line below disappears.
OK, /* */ style comments should be better now. The actual multi-line stuff isn't properly colored (for them or strings), but they don't eat lines now.
Matt
Thanks, Matt. I know I moan and groan a lot, but as I have said before, I do understand and appreciate that you guys are constantly pouring time into OpenEuphoria by the bucketfulls.
Kenneth Rhodes