#] #] ********************* #] "$d_Qroot""help - [develop, debug, error list, etc]/0_QNial error list.txt" # 13Apr2018 initial # most points below taken from "/media/bill/PROJECTS/Qnial/0_QNial notes.txt" # see also '0_QNial notes.txt' 26M2020 I should migrate material from that file to here to add loaddef comments as each [expression (IS), operator(IS OP)] is loaded : qnial> add_ISOP_debug (link d_Qndfs 'filename') the operator must be preceded by a comment line of standard format the comment in turn provides lightning fast Unix cmd extraction of comments (eg lists of operators) 08********08 # Table of Contents generated by : # $ grep "^#]" "$d_Qroot""help - [develop, debug, error list, etc]/0_QNial error list.txt" | sed 's/#] / /' >"$d_Qroot"'help - [develop, debug, error list, etc]/0_QNial errorL TblOfContents.txt' # ********************* 24************************24 08********08 #] ?A - maybe a string conversion lacking? 07Jan2022 maybe a string conversion lacking? 08********08 #] [?address, ?addresses, ?path, ?slice] - indexing validity Q'Nial dictionary v7 The index used in selecting a part of an array must be an expression that evaluates to a valid address. An invalid index returns a fault as follows: Indexing Method Fault A@I ?address A#I ?addresses A@@P ?path A|I ?slice 08********08 #] Bad symbol : 08Nov2020 strList#pathsIndxs := pathList ; >> should be : lineList#pathsIndxs := pathList ; >> this solved the problem 24************************24 #] ?assignment to referenced name: - 16Feb07 'Laskar - prepsub.ndf' can't do EXTERNALs for variables that are assigned!!! see Telor It seems to me that this is a Q'Nial interpreter error, as I should be able to declare a variable as an EXTERNAL, and yet still assign values or use it at will. Work-around: I had to assign the variables within the Tlor operation that used them. This isn't going to help with more general situations! 24************************24 #] ?eof encountered - 16Feb07 building Laskar project It seems that the host command doesn't work at all. Very invonvenient (eg setting default directory). Work-around: None so far. 08********08 #] executable drives - can't do with FAT32? 05May2016 make "/media/bill/USB DISK/Qnial/nial" executable Maybe USB memory can't be the "host" of executables? Go back to simply using nial within /home/bill/Qnial 24************************24 #] ?expecting end of block: ; - 14Jan2020 I checked for missing ';', unbalanced ' - no workee >> I had defined an operator with arguments, but it wasn't supposed to have them (IS, not IS OP) 20Nov2020 caused using EACHLEFT rather than EACH 24************************24 #] ?expecting expression: 10Oct2020 - maybe first time I've seen this, in nay case I can't remember it from 'website urls.ndf' p_out := link d_temp 'website_link_counts bash output.txt' ; finn := open p_linkTypeL "r ; WHILE (~= ??eof (fname := readfile finn)) DO % write link 'wc -l "' (link d_webRaw fname) '" ' ; host (link 'wc -l "' (link d_webRaw fname) '" >"' p_out '" ') ; tbl_linkCnt := f_read_tabTable p_out ; counts := first cols tbl_linkCnt ; shaper := (gage shape tbl_linkCnt) / 2 ; fails := sum (EACH tonumber ((tell shaper) choose (first cols count)) ) ; OKs := (EACH tonumber ((tell shaper) choose (first cols count)) ) ; total := sum fails OKs counts ; tbl_tots := 3 2 reshape fails 'failed links' OKs 'OK links' total 'total number of targeted links' ; write tbl_linkCnt ; write counts shaper OKs ; write merge_2_1 tbl_linkCnt tbl_tots ; ENDWHILE ; EACH close finn fout ; originally error with : fails := sum (EACH tonumber ((tell shaper) choose (first cols count)) ) ; >> commented out, then : ?expecting expression: ; OKS := <08********08> ( EACH TONUMBER >> so seems to come from previous code, independent of line where fail occurs tbl_linkCnt outputs OK comment out : % fails := sum (EACH tonumber ((tell shaper) choose (first cols count)) ) ; % OKs := (EACH tonumber ((tell shaper) choose (first cols count)) ) ; % total := sum fails OKs counts ; % tbl_tots := 3 2 reshape fails 'failed links' OKs 'OK links' total 'total number of targeted links' ; write tbl_linkCnt ; write counts shaper OKs ; % write counts shaper OKs ; % write merge_2_1 tbl_linkCnt tbl_tots ; >> now loaddefs OK, return is OK The revised code worked !!??? tbl_linkCnt := f_read_wcTable p_out ; % write tbl_linkCnt ; t1_rows := first (gage shape) tbl_linkCnt ; tell_half_rows := tell (floor (t1_rows / 2)) ; counts := EACH tonumber (first cols tbl_linkCnt) ; % EACH write counts tell_half_rows ; fails := sum (tell_half_rows choose counts) ; OKs := sum ((tell_half_rows + 1) choose counts) ; total := sum fails OKs ; tbl_tots := 3 2 reshape fails 'failed links' OKs 'OK links' total 'total number of targeted links' ; merge_2_1 tbl_linkCnt tbl_tots >> I had made many mistakes, mixing data types and structures. I guess QNial picked it up, which surprises me. 08********08 #] File [open, close] wait too short - crashes QNial - 12Sep2016 removes_extract : crashed QNial yet still produced output files (PROBLEM : too short a wait between closing & opening files (same file?) host 'sleep 2s' seemed to solve it 08********08 #] Fault trapping within Operators - 02May10 I am using linux's "ls" command to see is a filename being assigned is unique. However, when I try to trap this condition with "isfault", Nial stops processing with the fault! /home/bill/nial/v6testing/0a_notebook.txt 7. Command line options OK -s supresses fault triggering THIS WORKED!!: command line nial -s !!!! 08********08 #] IS vs IS OP #] 14Mar2020 see [MindCode basics.ndf, MindCode [arith, trig] tests.ndf] see "$d_Qndfs"'MindCode/[MindCode basics.ndf, code develop_test/MindCode [arith, trig] tests.ndf]' caused by mismatch of net_cycle (IS vs IS OP)? : +--+ net_cycle p_netMindCode ; should be : net_cycle ; +--+ >> nyet - this didn't fix it #] 07Mar2020 - wouldn't work because net_cycle wasn't complete, didn't load : % generally, numerical values are updated ; net_cycle netPhrase ; 08********08 #] j index failures - 14Apr2018 in QNial, "j" indicates a complex number, so be careful when using it for indexing! QNial7 doesn't seem to properly implement complex numbers? 08********08 #] loaddef required twice 15Mar2020 I had to load 'MindCode [arith, trig] tests.ndf' twice!?!?! I think I've run into this before - might be undefinable? 24************************24 #] ?local in nonlocal list OK, I had repeated a variable in both [LOCAL, NONLOCAL] but couldn't see it (brain dead) 24************************24 #] ?L - logic error Summary of items below :: 11Oct2021 it turns out that ?L was the result of using a list of boolean as a test condition, or something like that 03Mar2024 same issue with isVerBar? +-----+ 18Oct2021 pth_isEmpty IS OP pth { IF (AND (pth_exists "p_old pth) (= 0 (pth_size pth))) THEN l ELSE o ENDIF } qnial> pth_isEmpty '/media/bill/Dell2/Website - raw/Qnial/code develop_test/fileops/test input files/' ?L +-----+ 16Oct2021 path_exists IS OP typer path { LOCAL noError paty typet result ; NONLOCAL p_temp ; % ; noError := l ; paty := path ; result := null ; % a new [path, subDir] is truncated to the already-existing directory ; IF (= "d_old typer) THEN typet := '-d' ; ELSEIF (= "p_old typer) THEN typet := '-f' ; ELSEIF (= "d_new typer) THEN typet := '-d' ; paty := ((last last findall `/ paty) + 1) take paty ; ELSEIF (= "p_new typer) THEN typet := '-d' ; paty := (( last findall `/ paty) + 1) take paty ; ELSE result := fault (link '?path_exists error : unrecognized typet' typer) ; noError := o ; ENDIF ; % ; IF noError THEN IF flag_break THEN BREAK ; ENDIF ; result := first host_result (link '[ ' typet ' "' paty '" ] && echo l || echo o ' ) ; ENDIF ; boolean result } +-----+ 11Oct2021 it turns out that ?L was the result of using a list of boolean as a test condition, or something like that I changed (EACH isAtom ary) -> (OR EACH isAtom ary) ary_to_list IS OP ary { IF (EACH isAtom ary) THEN ary ELSE listA := EACH ary_to_list ary ; shapeA := gage shape listA ; IF (= null shapeA) THEN shapeA := 1 ; ENDIF ; (* shapeA) reshape listA ; ENDIF } qnial> a +---+-----+ |hot|cold | +---+-----+ |big|small| +---+-----+ qnial> ary_to_list a ?L +-----+ 03Nov2015 Arguments like a list of Booleans cause this? convert list to single boolean, eg IF (OR lloolo) THEN 24Sep2018 something ?[in, in_string, find_Howell] returned a list - I changed operator (as it only gave first occurence anyways) 17Jan2021 YIKES!! why the ?L : ?.. ( Vx @ ( I_param I_particle ) > Maxv ) -->[nextv] ?.. Vx @ ( I_param I_particle ) > Maxv -->[nextv] ?.. I_param I_particle -->[nextv] 0 0 o o ?L >> I haNO idea, but code seems to work for now?! 08********08 #] Memory pigs to clean up - 16Aug2017 19:17 DesktopSetup (13Apr2018 - is this still a problem?) Periodically, I'll have to flush the log file : 24************************24 #] ?missing_op triggered in: - 28May07 building Paillard project The right number of parameters with the right values were input. I forget what the problem was (arguments to a function out of whack). 08********08 #] ?op_parameter 13Jan2021 Bug hunt link d_Qndfs 'optimize - particle swarm.ndf' +-----+ ?.. Error := apply Optrphr Xx | [ , I_particle ] -->[nextv] ?op_parameter -->[nextv] optrPhr UWS_L2error >> I can't see why the error ?op_parameter apply optrPhr xx|[,i_particle] >> problem with variable not defined locally? +-----+ 17Jan2021 -->[nextv] apply '*' 5 6 ?apply requires a pair -->[nextv] apply '*' (5 6) 30 STUPID ME!!! Problem was an undefined variable several optrs down, away from the "apply" That cost me 1 day or more of stup searching!!! 08********08 #] RaspPi startup failures : - 13Apr2018 RaspPi - seemed to be lack of memory, so close some LibreCalc files & OK 24************************24 #] Re-classify [IS OP, IS, TR] & visa-versa 23Oct2016 Nial Manual p61 erase A Erase the variable or definition specified by the phrase A. Leave the phrase A in the symbol table with its role unchanged but change its value to one of ?no_value, No_expr, no_op or NO_TR depending on the role of A. This operation is used at top level to remove a user defined object from the current workspace. It permits the use of the identifier for a different purpose but not a differ­ent role. It cannot be used to erase a name in a local scope. 24************************24 #] Segmentation fault # strings_between is NOT used by : strOld_sub_strNew_in_strFull IS OP strOld strNew strFull #] 23Apr2020 arises with 'Website updates.ndf' strings_between IS OP strStrt strEndr strIn - extracts all sub-strings in StrIn bracketed by Tests : strings_between '"' '"' 'My name is "Sue", how do you do?' +---+ |Sue| +---+ >> ?? this should be a simple string!? (maybe it's double nested? only one fit) strings_between '"' '"' 'My name is "Sue, how do you do?' sh: 1: Syntax error: Unterminated quoted string NOT isinteger ((gage shape find_string '"' 'My name is "Sue, how do you do?') / 2) >> I added the flag_pairs part to strings_between. Seems to work #] 12Feb2018 arises within strings_between after several (15-20?) lines have been read strings_between IS OP strStrt strEndr strIn - extracts all sub-strings in StrIn bracketed by [strStrt,strEndr] Finalisation of full list $ cd "/media/bill/PROJECTS/2017 NIPS Long Beach, California/" $ cat "0_NIPS 2017 Proceedings page-1 papers.txt" "0_NIPS 2017 Proceedings page-2 papers.txt" "0_NIPS 2017 Proceedings page-2a papers.txt" "0_NIPS 2017 Proceedings page-3 papers.txt" "0_NIPS 2017 Proceedings page-4 papers.txt" "0_NIPS 2017 Proceedings page-5 papers.txt" >"0_NIPS 2017 URLs all.txt" Then manually add papers that were removed above Total lines in file = 679 compared to 7284 - 6606 + 1 = 679 OK, I've got them all!! WHY was this such a problem? - "bye" is corrupted - "misses" aren't always reproducible, etc etc - illegal characters? $ cd "/media/bill/PROJECTS/2017 NIPS Long Beach, California/" $ grep "\0" "0_NIPS 2017 Proceedings page.html" many (say 1/2) of lines have nulls 08********08 #] Tabs in a string entered on command line cause qnial to produce directory listings!!?!! # 22Apr2018 (but not from a file?) 08********08 #] ?tokens left: what does this mean? (pre-define of optr missing, ...) 07Nov2022 loaddefs : ?tokens left: TITLL @ KEYAXI <***> ARY_ITM_GET_IDXL KEYTIT ) <<< loading ended : types.ndf I dunno yet... variables seem pre-defined, ary_itm_get_idxL is defined before tbl_keyAxiTit_selAxiTitL_compatible so that shouldn't be a problem "$d_Qndfs" 'QNial setup - header.ndf' added pre-define : ary_itm_get_idxL IS OP ary itm { null } >> problem solved!!! 08********08 #] ?undefined identifier: % ; +-----+ #] 02Apr2024 fault msg has comment line (as earlier examples) >>>>>> loading start : arrays nested/arrays nested- testOptrs.ndf ?undefined identifier: % first, fun testSimple ; ... and diff file ... >>> loading start : arrays nested byVal/arrays nested- zByVal testOptrs.ndf ?undefined identifier: % first, fun testSimple ; look for mis-spelled [op, var] : 'QNial setup.ndf' - should loaddef generic test op file BEFORE actual test-data files Howell_core_tests := ... (link d_Qtest 'QNial test optrs.ndf') >> OK, now works! loaddef missing after quick changes made to 'QNial setup.ndf' Howell_core_tests lst +-----+ #] 09Oct2021 loading pWebWorkL_change_headFoot pathList_backupTo_dir This had been replaced in file_ops.ndf: #! 06Sep2021 for deletion : pathList_backupTo_dir_z IS z_pathL_backupTo_dirFlat >> fixed & works!! +-----+ #] 11Apr2018 had loadded many times without problems over the last week, so why now the problem? Problem with : ?undefined identifier: % ; I've often had this problem in the past, but can't remember the [cause, remedy] Removing this "spacer line" doesn't help - the next line then becomes the problem. This time, it occurred for two operators in "translate symbols.ndf", one of which is : translate_file IS OP pname_inn pname_prep pname_out { LOCAL fin fot i line_in n_fLine textnew ; NONLOCAL sym_chars trans_old trans_new trans_msg trans_rows ; % ; sed_prep_file pname_inn pname_prep ; fin := open pname_prep "r ; fot := open pname_out "w ; % ; n_fLine := 0 ; WHILE (~= ??eof (line_in := readfile fin)) DO textnew := line_in ; write link (string n_fLine) 'a ' textnew ; FOR i WITH (tell trans_rows) DO sed_expr := link '"s/\([^' sym_chars ']\)\(' trans_old@i '\)\([^' sym_chars ']\)/\1' trans_new@i '\3/g"' ; IF (< i 2) THEN write link 'sed_expr : ' sed_expr ; ENDIF ; IF (< i 2) THEN write link 'FOR 1= ' textnew ; ENDIF ; textnew := translate_sed sed_expr textnew ; IF (< i 2) THEN write link 'FOR 2= ' textnew ; ENDIF ; ENDFOR ; write link (string n_fLine) 'b ' textnew ; writefile fot textnew ; n_fLine := n_fLine + 1 ; ENDWHILE ; % ; EACH close fin fot ; } This had loadded many times without problems over the last week, so why now the problem? Related to same problem : ?undefined identifier: % ; ?undefined identifier: 'trans_long_out.txt' ; TRANSLATE_FILE_LONG <08********08> PNAME_DIFF PNAME_INN >> bye QNial, then re-starting doesn't help. see "/media/bill/PROJECTS/Qnial/MY_NDFS/translate symbols - coding development.txt" +-----+ #] 13Apr2018 QNial file "/media/bill/PROJECTS/Qnial/MY_NDFS/strings.ndf" # 13Apr2018 Example for project "Lucas Universal Force" # find_chrs_special_file flag_chrs_include chrs_set fname_in find_chrs_special_fTest IS find_chrs_special_file o chrs_writing '/media/bill/PROJECTS/Qnial/MY_NDFS/translate symbols.ndf' >> empty return, which confirms that no "strange or illegal" characters are corrupting the looadefs of "/media/bill/PROJECTS/Qnial/MY_NDFS/translate symbols.ndf" >> however, the Greek character epsilon (UNICODE) should have failed? +-----+ #] 13Apr2018 14:22 Now what??? Maybe the Greek symbols [θ,φ] are causing the trouble? But θ works OK with sed and sed_file? >> Actually, I haven't checked that !!! BUT - earlier loaddefs were OK even with theta in the symbols-to-be-replaced. qnial> loaddefs link d_Qnial_mine 'translate symbols.ndf' >> loading translate symbols.ndf test9 ?undefined identifier: % ; test99 ?undefined identifier: 'trans_file_out.txt' ; TRANSLATE_FILE <08********08> PNAME_INN PNAME_PREP ?undefined identifier: % ; ?undefined identifier: 'trans_long_out.txt' ; TRANSLATE_FILE_LONG <08********08> PNAME_DIFF PNAME_INN ?undefined identifier: 'translate symsCheck Lucas.txt' ; TRANSLATE_FILE <08********08> FNAME_INN <<<<< done loading translate symbols.ndf errors found: 5 >> same problem! Try with original copy of QNial7_RapsPi >> both old & new versions look the same, swap anyways +-----+ #] 15Aug2017 11:59 ?undefined identifier: problem While revamping "/media/bill/HOWELL_BASE/Qnial/MY_NDFS/USB workspace loads.ndf", the following error appeared during loaddefs : ?undefined identifier: IF = ORIENT <08********08> "landscape THEN S_WIDTH As per 03Sep2016 (see below) this seems to be a QNial quirk. However, it seems to me that ther were specific causes, but I just can't remember where I saw that and what the causes were. % asssign winConfig structure components ; sp_ winConfig "w_computer computer ; sp_ winConfig "w_orientn orientation ; sp_ winConfig "w_utils wConfig_util ; sp_ winConfig "w_text wConfig_text ; sp_ winConfig "w_LibOff wConfig_LO ; sp_ winConfig "w_ToDos wConfigToDos ; sp_ winConfig "w_Calendar wConfigCalendar ; sp_ winConfig "w_MnthCnt wConfigMnthCnt ; >> Probably caused by not having completed the definition of sp_ - so it wasn't in the workspace!???!!! 08********08 03Sep2016 "?undefined identifier: % [mark, cull, sort] emails ; " I've had this headached several times, and forget the [problem, solution] !! If I remember correctly, it's a Qnial quirk? clearws, re-load >> didn't work I just re-programmed a bit and the problem disappeared (must have been stray character?) 24********************************24 #] ?unexpected token or eol: (example : EACHLEFT IN STR <08********08> ) ) THEN) - 07Mar2020 weird one again : first version doesn't work, second does???!!! +-----+ nowTrig IS OP netID { NONLOCAL trigPatL inHistL ; = trigPatL@netID (cull sort (second inHistL@netID)) } +-----+ nowTrig IS OP netID { NONLOCAL trigPatL inHistL ; = trigPatL@netID (cull sort second inHistL@netID ) } +-----+ - 29Jul-01Aug2018 very [frustrating,IMPORTANT] loaddefs problem to track down! see "/media/bill/PROJECTS/Qnial/code development/symbols fix- develop.txt" 01Aug2018 12:02 YIKES!!!!!!!!!!!!!!!!!!! ?? !!!!!!!!!!!!!!!!!!!!!!!!!!!! I re-defined QNial operator "in" as a LOCAL variable!!!! IDIOT!!!! 24********************************24 #] User priviledges for drive - 05May2016 Moved QNial onto my USB memory stick to make it easy to change between computers (desktop, laptop, other [individual, organisation] nial won't run - insufficient priviledges. Try chown to clearly make it me who owns sudo -i chown --recursive bill:bill "/media/bill/USB DISK/Qnial/z_Old" >> OK - that worked. 08********08 #] writefile only works to stdout!! 26Mar2020 - I noticed this before, can't find notes see also '0_QNial lessons.txt' # enddoc