[Bug-apl] I just can't help myself
Hello Jürgen I've been working on two projects utl, my utility workspace with better documentation and better function names and lpr, a workspace to print directly from apl. Now I've melted down the interpretor so I've sent three logs. I'm not sending all the workspace I loaded to create these files. I have updated the repository and one may clone it: git clone https://git.code.sf.net/p/apl-library/code apl-library-code When you look at all this can you consider a few issues? I've defined a function lpr∆USLetter which returns a lexicon that i need to for the unix pr and lpr commands. Could you write one for the usual a sized paper sheets? I started down that road and tripped on my uncontrollable urge to do arithmetic. I couldn't figure how the priinters work as none of the a sizes seem to easily divided into points. Here in Pennsylvania where we cling to all sorts of ancient biases one inch = 72 points and thus 12 point type is equal to one sixth of an inch and one letter size page has 66 lines per inch. Could you also look at date.apl? I've defined a lexicon date-delta-US which in addition to the American month, weekday names defines day_pos, month_pos, and year_pos for those who feel that days come before months. Thanks for all your help Bill )load 1 lpr DUMPED 2018-10-08 09:54:47 (GMT-4) DUMPED 2018-10-07 08:46:49 (GMT-4) DUMPED 2018-09-18 11:05:59 (GMT-4) DUMPED 2018-08-18 16:48:59 (GMT-4) )copy 1 wp DUMPED 2018-09-18 10:07:43 (GMT-4) DUMPED 2018-09-18 10:07:43 (GMT-4) DUMPED 2018-09-18 10:07:43 (GMT-4) DUMPED 2018-09-18 11:05:59 (GMT-4) DUMPED 2018-10-02 12:58:04 (GMT-4) htmlâa htmlâb htmlâblockquote htmlâbody htmlâcaption htmlâcite htmlâdiv htmlâem htmlâfooter htmlâh1 htmlâh2 htmlâh3 htmlâh4 htmlâh5 htmlâhead htmlâheader htmlâhr htmlâhtml htmlâi htmlâli htmlâlink htmlânav htmlâp htmlâpre htmlâ span htmlâstrong htmlâstyle htmlâtd htmlâth htmlâthead htmlâtr htmlâtitle htmlâtable htmlâthead htmlâbr htmlâhr htmlâmeta DUMPED 2018-09-18 10:07:43 (GMT-4) DUMPED 2018-08-18 16:48:59 (GMT-4) âutlâhelpFns ¨ (fns[;1 2]â§.='wp')â¿fnsâânl 2 INDEX ERROR utlâhelpFns[3] msgâ(utlâtrim¨â[2]((1,â§\'â'=1âsrc[;1])â¿src),âTC[3]),âTC[3] ^ ^ src )sic âutlâhelpFns ¨ (fns[;1 2]â§.='wp')â¿fnsâânl 3 INDEX ERROR utlâhelpFns[3] msgâ(utlâtrim¨â[2]((1,â§\'â'=1âsrc[;1])â¿src),âTC[3]),âTC[3] ^ ^ src fns clââmax fns html5âclosedTagList html5âtagList wpâdefaultcss xmlâwhitespace )fns FIO FIOâSockHelper FIOâaccept FIOâaccess FIOâbindFIOâchdir FIOâclear_statisticsFIOâconnect FIOâerrno FIOâexecve FIOâfclose FIOâfeof FIOâferror FIOâfflush FIOâfgetc FIOâfgets FIOâfile_errno FIOâfiles_in_directory FIOâfopen FIOâfopen_ro FIOâfprintf FIOâfprintf_stderr FIOâfread FIOâfscanf FIOâfseek_cur FIOâfseek_end FIOâfseek_set FIOâfstat FIOâfsync FIOâftell FIOâfwrite FIOâfwrite_utf8 FIOâget_dyadic_thresholdFIOâget_monadic_threshold FIOâget_statistics FIOâgetcwd FIOâgetpeername FIOâgetsockname FIOâgetsockopt FIOâgettimeofday FIOâgmtime FIOâlisten FIOâlocaltime FIOâmkdir FIOâmkdir_777 FIOâmktime FIOâpclose FIOâpopen FIOâpopen_roFIOâprintf FIOâreadFIOâread_directory FIOâread_file FIOâread_lines FIOârecvFIOârename FIOârmdir FIOâselect FIOâsendFIOâsend_utf8 FIOâset_dyadic_thresholdFIOâset_monadic_threshold FIOâsetsockopt FIOâsocket FIOâsscanf FIOâstrerror FIOâunlink FIOâwrite FIOâwrite_lines FIOâwrite_utf8 FIOâmetadatahtmlâa htmlâb htmlâblockquote htmlâbody htmlâbr htmlâcaptionhtmlâcite htmlâdivhtmlâem htmlâfooter htmlâh1 htmlâh2 htmlâh3 htmlâh4 htmlâh5 htmlâhead htmlâheader htmlâhr htmlâhtml htmlâi htmlâli htmlâlink htmlâmeta htmlânavhtmlâp htmlâpre
Re: [Bug-apl] bad character in execute+
Hello Jürgen, compile fails with Executable.cc: In member function 'void Executable::setup_lambdas()': Executable.cc:529:46: error: no matching function for call to 'Executable::setup_one_lambda(ShapeItem&, int&)' b = setup_one_lambda(b, ++lambda_num) - 1; // -1 due to ++b in loop(b) above ^ In file included from Executable.cc:22: Executable.hh:164:14: note: candidate: 'ShapeItem Executable::setup_one_lambda(ShapeItem, ShapeItem, int)' ShapeItem setup_one_lambda(ShapeItem b, ShapeItem end, int lambda_num); ^~~~ Executable.hh:164:14: note: candidate expects 3 arguments, 2 provided Executable.cc: At global scope: Executable.cc:543:1: error: no declaration matches 'ShapeItem Executable::setup_one_lambda(ShapeItem, int)' Executable::setup_one_lambda(ShapeItem b, int lambda_num) ^~ In file included from Executable.cc:22: Executable.hh:164:14: note: candidate is: 'ShapeItem Executable::setup_one_lambda(ShapeItem, ShapeItem, int)' ShapeItem setup_one_lambda(ShapeItem b, ShapeItem end, int lambda_num); ^~~~ Executable.hh:38:7: note: 'class Executable' defined here class Executable ^~ Thanks, Hans-Peter Am 01.10.18 um 17:17 schrieb Juergen Sauermann: > Hi Kacper, > > thanks, fixed in *SVN 1082*. > > /// Jürgen > > > > On 10/01/2018 01:11 AM, Kacper Gutowski wrote: >> On Sun, Sep 30, 2018 at 03:42:53PM -0600, Nathan Rogers wrote: >>> When using the diamond operator, the repl returns "bad character in >>> execute+" >>> >>> simple example: \ >>> {1:2◊3} >>> Bad char in execute+ >> Lambda syntax in GNU APL isn't compatible with Dyalog's, and you can't >> use diamond within it. But the diamond here is a red herring. >> It's the colon that causes the error before getting to the diamond: >> >> : >> Bad char in execute+ >> {1⋄2} >> Unbalanced curly bracket+ >> >> It more-or-less works as expected. The former is because : is not a >> valid token outside of defined functions where it is used for labels. >> The later is because it's interpreted as two separate statements split >> by diamond. >> >> I think the )MORE messages for parse errors could be improved, though. >> Now it just repeats "Bad char in execute". It would be more informative >> to say which character is the offending one. >> >> -k >> >> >
Re: [Bug-apl] bad character in execute+
Hi Hans-Peter, it looks like you compile an new Executable.hh with an old Executable.cc. The current executable looks - apart from other differences - like this: ... line 546: Assert(end != -1); b = setup_one_lambda(b, end, ++lambda_num) - 1; // -1 due to ++b in loop(b) above ... Best Regards, /// Jürgen On 10/08/2018 10:08 PM, Hans-Peter Sorge wrote: Hello Jürgen, compile fails with Executable.cc: In member function 'void Executable::setup_lambdas()': Executable.cc:529:46: error: no matching function for call to 'Executable::setup_one_lambda(ShapeItem&, int&)' b = setup_one_lambda(b, ++lambda_num) - 1; // -1 due to ++b in loop(b) above ^ In file included from Executable.cc:22: Executable.hh:164:14: note: candidate: 'ShapeItem Executable::setup_one_lambda(ShapeItem, ShapeItem, int)' ShapeItem setup_one_lambda(ShapeItem b, ShapeItem end, int lambda_num); ^~~~ Executable.hh:164:14: note: candidate expects 3 arguments, 2 provided Executable.cc: At global scope: Executable.cc:543:1: error: no declaration matches 'ShapeItem Executable::setup_one_lambda(ShapeItem, int)' Executable::setup_one_lambda(ShapeItem b, int lambda_num) ^~ In file included from Executable.cc:22: Executable.hh:164:14: note: candidate is: 'ShapeItem Executable::setup_one_lambda(ShapeItem, ShapeItem, int)' ShapeItem setup_one_lambda(ShapeItem b, ShapeItem end, int lambda_num); ^~~~ Executable.hh:38:7: note: 'class Executable' defined here class Executable ^~ Thanks, Hans-Peter Am 01.10.18 um 17:17 schrieb Juergen Sauermann: Hi Kacper, thanks, fixed in *SVN 1082*. /// Jürgen On 10/01/2018 01:11 AM, Kacper Gutowski wrote: On Sun, Sep 30, 2018 at 03:42:53PM -0600, Nathan Rogers wrote: When using the diamond operator, the repl returns "bad character in execute+" simple example: \ {1:2◊3} Bad char in execute+ Lambda syntax in GNU APL isn't compatible with Dyalog's, and you can't use diamond within it. But the diamond here is a red herring. It's the colon that causes the error before getting to the diamond: : Bad char in execute+ {1⋄2} Unbalanced curly bracket+ It more-or-less works as expected. The former is because : is not a valid token outside of defined functions where it is used for labels. The later is because it's interpreted as two separate statements split by diamond. I think the )MORE messages for parse errors could be improved, though. Now it just repeats "Bad char in execute". It would be more informative to say which character is the offending one. -k signature.asc Description: OpenPGP digital signature