#] #] ********************* #] "$d_Qndfs"'array notes.txt' www.BillHowell.ca 02Oct2021 initial # 11Nov2021 content moved to "$d_Qtest"'array- develop notes.txt' # This file should be used for [intoduct, descript, instruct]ions # 08********08 #] +-----+ #] ToDos 17Nov2021 I need operators for conversions between [QNial, HTML, csv, loaddef] tables 17Nov2021 going nested means SQL? 24************************24 # Table of contents, generated with : # $ grep "^#] " "$d_Qndfs"'QNial userWkspSymbol [philos, grammar, design].txt' | sed 's/^#\]/ /' # ********************* # 08********08 #] +-----+ #] Work log 08********08 #] ??Apr2023 08********08 #] ??Apr2023 08********08 #] ??Apr2023 08********08 #] ??Apr2023 08********08 #] ??Apr2023 08********08 #] ??Apr2023 08********08 #] ??Apr2023 08********08 #] 29Mar2023 ary_idxSeq_to_slc IS OP ary idxSeq 08********08 #] 19Nov2021 multiple ways to cut an ary! - instead, just replace [itm, sub]s with [null, other,...]???!?? actual slices are application-dependant qnial> a := 4 4 4 reshape (tell 35) 0 1 2 3 16 17 18 19 32 33 34 0 13 14 15 16 4 5 6 7 20 21 22 23 1 2 3 4 17 18 19 20 8 9 10 11 24 25 26 27 5 6 7 8 21 22 23 24 12 13 14 15 28 29 30 31 9 10 11 12 25 26 27 28 qnial> b := 1 findall a +-----+-----+ |0 0 1|2 1 0| +-----+-----+ qnial> c := EACH (cull sortup) (cols mix b) +---+---+---+ |0 2|0 1|0 1| +---+---+---+ >> Yikes! there are 3 different ways to cull! don't do all, do just one, or may end up with nothing Are they equivalent? I doubt it! Using "invertAxis", cutting from one axis ONLY (minimal data loss) : qnial> d := a|[,,2 3] 2 3 18 19 34 0 15 16 6 7 22 23 3 4 19 20 10 11 26 27 7 8 23 24 14 15 30 31 11 12 27 28 qnial> e := a|[,2 3,] 8 9 10 11 24 25 26 27 5 6 7 8 21 22 23 24 12 13 14 15 28 29 30 31 9 10 11 12 25 26 27 28 qnial> f := a|[1 3,,] 16 17 18 19 13 14 15 16 20 21 22 23 17 18 19 20 24 25 26 27 21 22 23 24 28 29 30 31 25 26 27 28 qnial> EACH (gage shape) d e f +-----+-----+-----+ |4 4 2|4 2 4|2 4 4| +-----+-----+-----+ qnial> EACH (cull sortup (gage shape)) d e f +---+---+---+ |2 4|2 4|2 4| +---+---+---+ qnial> EACH (cull sortup) d e f +-------------------------------------------------------------------+----------------------------------------- |0 2 3 4 6 7 8 10 11 12 14 15 16 18 19 20 22 23 24 26 27 28 30 31 34|5 6 7 8 9 10 11 12 13 14 15 21 22 23 24 2 +-------------------------------------------------------------------+----------------------------------------- ~:~ -------------------+--------------------------------------------------------+ 5 26 27 28 29 30 31|13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31| -------------------+--------------------------------------------------------+ Look at a table : qnial> a := 4 4 reshape (tell 9) 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 qnial> d := a|[1 3,,] ?slice qnial> d := a|[1 3,] 4 5 6 7 3 4 5 6 qnial> d := a|[,0 3] 0 3 4 7 8 2 3 6 Hmm, only for lists is this unambiguous... equivalent link null, but there may be other nulls don't want to remove! I must retain list versions of optrs until I can figure this out!?!?? copy old versions from backups - be careful of recent changes For arys, simple think is to null [itm, sub]s - no change in ary structure This would extend down to lists as well, and only have to link to get rid of nulls 08********08 #] 19Nov2021 when to use ary[,A] forms of optrs - try to express all as ary aryA needed for : mix of subs whose sequence is important? = maybe not? examples : +-----+ join [vertical, horizontal] - returns an array (doesn"t split the array) : aryA_join_vertical IS OP aryL - joins 2D arrays by "stacking-merging" each above next aryA_join_horizontal IS OP aryL - joins 2D arrays by "side-merging" each alongside next 'ary_repeatNumAtimesTo_aryA' 'ary_repeatNumAtimesTo_aryA' not needed for specialised optrs : ary_splitLftRgtTo_midIndxs_subP IS OP ary subP #] 19Nov2021 when to use [chr, str, lst, ary] optrs - try to express all as ary, use transformers try to express all as ary even if compiled QNial optrs are vastly [fater, more efficient] [chr, str] when [ASII, unicode] involved eg [SpcTab, etc] roster dataBase optrs lists of differing length examples? # enddoc