Re: [Jprogramming] if (a v) were a valid expression...
Thank you Pepe, Another option that would seem more useful/general (a v v2 v3) captures u into the full argument u`v`v2`v3 a (a n) would if n not gerund, u`(n ar) a, and if n is a gerund u`n a (a n v2 v3 v4) would ar n if not gerund, and then produce u`n`v2`v3`v4 a This would allow for easy strand notation, with any termination character. a (norv) can return (a gerund) to continue parsing Any train combo/rearrangement can be done with f g h ==> f ((@.0 1 2) g h) (a1 v) a2 is usefully separated into a1 as the parsing guard/validator with initial parameters, and a2 as the final processing function. This allows for any of the original and option 2 alternatives with much more flexibility. I was asking for custom parser utilities, and not for J to change its parsing. On Wednesday, May 6, 2020, 05:02:09 p.m. EDT, Jose Mario Quintana wrote: A0 V1 adv (x A0) V1 http://www.jsoftware.com/pipermail/programming/2016-March/044744.html On Wed, May 6, 2020 at 4:42 PM 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > I cannot find what (a v) did back then. > > > > Early J had a complete language of bidents/tridents. It was beautiful > and powerful. Not five people understood it. It was removed in J5, > never to return. > > Henry Rich > > On 5/6/2020 3:00 PM, 'Pascal Jasmin' via Programming wrote: > > what should (a v) do? (if it were valid) > > > > then what would (a v v) or (a v v v) do? > > > > option 1: change v into an adverb (letting it return functions or > return an lr that will be evaled to any form of speech), and then run v 'a' > > > > option 2: Compose v on (u a). (a v) remains an adverb. > > > > btw, there is a missing composition operator in J. I'd suggest O. (on) > as a conjunction where O. allows for both dyadic u and v. > > > > O. =: (u@:v) : ([ u v) > > > > so option 2 above would be v O. (u a) . This doesn't seem useful > because you could just write the adverb a ( v O.) for the same result. A > generalization of option 2 is there is some implied conjunction partially > bound to v that gets executed in (a v) > > > > Where option 2 gets interesting is in the expression > > > > v1 (a1 v2) (a2 v3) > > > > There is no reason to write such an expression if the intent were for v1 > to be an argument to the adverb (a1 v2) if there is an implied conjunction > meaning. Instead the above example would be a multi adverb where > parameters are "templated in" > > > > u1 u2 (v1 (a1 v2) (a2 v3)) ==> v1 v2 O.(u1 a1) v3 O.(u2 a2 ) > > > > > > Any other options/proposals? > > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > -- > This email has been checked for viruses by AVG. > https://www.avg.com > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] if (a v) were a valid expression...
On Wed, May 6, 2020 at 3:05 PM 'Pascal Jasmin' via Programming wrote: > what should (a v) do? (if it were valid) What should 7 { 2 3 5 do (if it were valid)? But, also, should it be valid? If so, why? Thanks, -- Raul -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] if (a v) were a valid expression...
A0 V1 adv (x A0) V1 http://www.jsoftware.com/pipermail/programming/2016-March/044744.html On Wed, May 6, 2020 at 4:42 PM 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > I cannot find what (a v) did back then. > > > > Early J had a complete language of bidents/tridents. It was beautiful > and powerful. Not five people understood it. It was removed in J5, > never to return. > > Henry Rich > > On 5/6/2020 3:00 PM, 'Pascal Jasmin' via Programming wrote: > > what should (a v) do? (if it were valid) > > > > then what would (a v v) or (a v v v) do? > > > > option 1: change v into an adverb (letting it return functions or > return an lr that will be evaled to any form of speech), and then run v 'a' > > > > option 2: Compose v on (u a). (a v) remains an adverb. > > > > btw, there is a missing composition operator in J. I'd suggest O. (on) > as a conjunction where O. allows for both dyadic u and v. > > > > O. =: (u@:v) : ([ u v) > > > > so option 2 above would be v O. (u a) . This doesn't seem useful > because you could just write the adverb a ( v O.) for the same result. A > generalization of option 2 is there is some implied conjunction partially > bound to v that gets executed in (a v) > > > > Where option 2 gets interesting is in the expression > > > > v1 (a1 v2) (a2 v3) > > > > There is no reason to write such an expression if the intent were for v1 > to be an argument to the adverb (a1 v2) if there is an implied conjunction > meaning. Instead the above example would be a multi adverb where > parameters are "templated in" > > > > u1 u2 (v1 (a1 v2) (a2 v3)) ==> v1 v2 O.(u1 a1) v3 O.(u2 a2 ) > > > > > > Any other options/proposals? > > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > -- > This email has been checked for viruses by AVG. > https://www.avg.com > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] if (a v) were a valid expression...
I cannot find what (a v) did back then. Early J had a complete language of bidents/tridents. It was beautiful and powerful. Not five people understood it. It was removed in J5, never to return. Henry Rich On 5/6/2020 3:00 PM, 'Pascal Jasmin' via Programming wrote: > what should (a v) do? (if it were valid) > > then what would (a v v) or (a v v v) do? > > option 1: change v into an adverb (letting it return functions or return an > lr that will be evaled to any form of speech), and then run v 'a' > > option 2: Compose v on (u a). (a v) remains an adverb. > > btw, there is a missing composition operator in J. I'd suggest O. (on) as a > conjunction where O. allows for both dyadic u and v. > > O. =: (u@:v) : ([ u v) > > so option 2 above would be v O. (u a) . This doesn't seem useful because you > could just write the adverb a ( v O.) for the same result. A generalization > of option 2 is there is some implied conjunction partially bound to v that > gets executed in (a v) > > Where option 2 gets interesting is in the expression > > v1 (a1 v2) (a2 v3) > > There is no reason to write such an expression if the intent were for v1 to > be an argument to the adverb (a1 v2) if there is an implied conjunction > meaning. Instead the above example would be a multi adverb where parameters > are "templated in" > > u1 u2 (v1 (a1 v2) (a2 v3)) ==> v1 v2 O.(u1 a1) v3 O.(u2 a2 ) > > > Any other options/proposals? > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- This email has been checked for viruses by AVG. https://www.avg.com -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] if (a v) were a valid expression...
Early J had a complete language of bidents/tridents. It was beautiful and powerful. Not five people understood it. It was removed in J5, never to return. Henry Rich On 5/6/2020 3:00 PM, 'Pascal Jasmin' via Programming wrote: what should (a v) do? (if it were valid) then what would (a v v) or (a v v v) do? option 1: change v into an adverb (letting it return functions or return an lr that will be evaled to any form of speech), and then run v 'a' option 2: Compose v on (u a). (a v) remains an adverb. btw, there is a missing composition operator in J. I'd suggest O. (on) as a conjunction where O. allows for both dyadic u and v. O. =: (u@:v) : ([ u v) so option 2 above would be v O. (u a) . This doesn't seem useful because you could just write the adverb a ( v O.) for the same result. A generalization of option 2 is there is some implied conjunction partially bound to v that gets executed in (a v) Where option 2 gets interesting is in the expression v1 (a1 v2) (a2 v3) There is no reason to write such an expression if the intent were for v1 to be an argument to the adverb (a1 v2) if there is an implied conjunction meaning. Instead the above example would be a multi adverb where parameters are "templated in" u1 u2 (v1 (a1 v2) (a2 v3)) ==> v1 v2 O.(u1 a1) v3 O.(u2 a2 ) Any other options/proposals? -- For information about J forums see http://www.jsoftware.com/forums.htm -- This email has been checked for viruses by AVG. https://www.avg.com -- For information about J forums see http://www.jsoftware.com/forums.htm
[Jprogramming] if (a v) were a valid expression...
what should (a v) do? (if it were valid) then what would (a v v) or (a v v v) do? option 1: change v into an adverb (letting it return functions or return an lr that will be evaled to any form of speech), and then run v 'a' option 2: Compose v on (u a). (a v) remains an adverb. btw, there is a missing composition operator in J. I'd suggest O. (on) as a conjunction where O. allows for both dyadic u and v. O. =: (u@:v) : ([ u v) so option 2 above would be v O. (u a) . This doesn't seem useful because you could just write the adverb a ( v O.) for the same result. A generalization of option 2 is there is some implied conjunction partially bound to v that gets executed in (a v) Where option 2 gets interesting is in the expression v1 (a1 v2) (a2 v3) There is no reason to write such an expression if the intent were for v1 to be an argument to the adverb (a1 v2) if there is an implied conjunction meaning. Instead the above example would be a multi adverb where parameters are "templated in" u1 u2 (v1 (a1 v2) (a2 v3)) ==> v1 v2 O.(u1 a1) v3 O.(u2 a2 ) Any other options/proposals? -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Fwd: problem with math/uu
Thank you very much. Mario Ian Clark schrieb am Mi., 6. Mai 2020, 13:43: > Addon: math/uu fixed… > > 'm^2' uu '1 cm cm' > > 1.0E-4 m² > > 'm^2' uu '1 cm^2' > > 1.0E-4 m² > > VERSION_uu_ > > 2.1.26 > > > Please update addon: math/uu > > On Tue, 5 May 2020 at 05:52, Ian Clark wrote: > > > Thanks for pointing this out. > > It appears math/uu is reading 'cm^2' as: c(m^2) instead of: (cm)^2 > > The bug affects every use of a scaling prefix (c, m, …) together with a > > power. > > I'll get to work on a fix for this. > > > > > > On Tue, 5 May 2020 at 00:37, Tom Arneson wrote: > > > >> I see the same problem in both Windows and Android j901/j64/android > >> > >> > >> > -- Original Message --From: Mario C < > mc235...@gmail.com>To: > >> programming@jsoftware.comDate: May 4, 2020 at 4:49 PMSubject: > >> [Jprogramming] problem with math/uu > >> > load 'math/uu' NB. math/uu 2.1.24 > >> > There is a difference between > >> > 'kN' uu '10990 bar cm cm'109.9 kN > >> > and > >> > 'kN' uu '10990 bar cm^2'10990 kN > >> > Only the first solution is correct. > >> > Engine: j901/j64avx/windowsRelease-e: commercial/2020-01-29Library: > >> 9.01.23 > >> > But both work fine with Android (math/uu 2.1.24):Engine: > >> j901/j32/androidRelease-e: commercial/2020-02-09T15:23:16Library: > 9.01.22 > >> > > >> > Mario--For > >> information about J forums see http://www.jsoftware.com/forums.htm > >> -- > >> For information about J forums see http://www.jsoftware.com/forums.htm > >> > > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Fwd: problem with math/uu
Addon: math/uu fixed… 'm^2' uu '1 cm cm' 1.0E-4 m² 'm^2' uu '1 cm^2' 1.0E-4 m² VERSION_uu_ 2.1.26 Please update addon: math/uu On Tue, 5 May 2020 at 05:52, Ian Clark wrote: > Thanks for pointing this out. > It appears math/uu is reading 'cm^2' as: c(m^2) instead of: (cm)^2 > The bug affects every use of a scaling prefix (c, m, …) together with a > power. > I'll get to work on a fix for this. > > > On Tue, 5 May 2020 at 00:37, Tom Arneson wrote: > >> I see the same problem in both Windows and Android j901/j64/android >> >> >> > -- Original Message --From: Mario C To: >> programming@jsoftware.comDate: May 4, 2020 at 4:49 PMSubject: >> [Jprogramming] problem with math/uu >> > load 'math/uu' NB. math/uu 2.1.24 >> > There is a difference between >> > 'kN' uu '10990 bar cm cm'109.9 kN >> > and >> > 'kN' uu '10990 bar cm^2'10990 kN >> > Only the first solution is correct. >> > Engine: j901/j64avx/windowsRelease-e: commercial/2020-01-29Library: >> 9.01.23 >> > But both work fine with Android (math/uu 2.1.24):Engine: >> j901/j32/androidRelease-e: commercial/2020-02-09T15:23:16Library: 9.01.22 >> > >> Mario--For >> information about J forums see http://www.jsoftware.com/forums.htm >> -- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] value error using math/uu in v8.07 *Console*
in addon: math/uu all calls to "wd" have been removed. This should fix the value error when running under jconsole. Please update: math/uu. Version number is now: 2.1.26. On Wed, 6 May 2020 at 11:54, Martin Kreuzer wrote: > 1 > Confirming that in JConsole (under WX_64 with J > v8.07_64) I get the same results: > > load 'math/uu/' > > wd_uu_=. ] NB. or [ > > uu '*ssic 0' > 0 > 'deg' uu '1 rad' > 57.2958 deg > > 2 > Adding the line in question to the 'uu.ijs' script, like so: > > \" > ... > [71] cocurrent 'uu' > [72] > [73] wd_uu_=: ] > ... > "\ > > works fine here. > > -M > > At 2020-05-06 05:35, you wrote: > >I notice that assigning "wd" to "[" or "]", in the "uu" coclass, > >avoids the spurious "msgs" problem. > > > >On Wed, May 6, 2020 at 1:33 AM Devon McCormick > wrote: > > >I mostly use jconsole and have occasionally run into "wd" problems since > > >this is the window driver defined in the Qt code. > >Typically I get around > it by assigning "wd" to "[" or "smoutput". > >This works for the "uu" code, > e.g. > > >load 'e:\users\owner\j901\addons\ide\qt\qt.ijs' > > >cocurrent 'uu' > > >wd=: smoutput > > >'deg' uu '1 rad' > > >msgs > > >msgs > > >57.2958° > > > >It does give the spurious "msgs" output, though. > > > > > >On Tue, May 5, 2020 at 2:36 PM Martin Kreuzer > > wrote: > >> Ian - >> >> > >Sorry for the delay; was on telephone support > >all afternoon. >> >> In JConsole v8.07 (32- and > >64-bit), there's no >> more reaction to the two > >lines you wanted me to test > >than: >> _ NB. Cursor on the following > >line ... >> >> wd_z_ =: ] >> wd_uu_ =: > >] >> _ >> >> The line >> >> cocurrent > >'uu' >> >> I remember it being suggested (a year > >ago, during >> a discussion with Tom A) to try > >in case the addon won't start at all. >> Haven't > >used it on a regular basis. >> >> Thanks for the > >hint about the lab. >> And feel free to ask for > >any more tests if it deems neccessary... >> >> > >-M >> >> ps: >> As always, I beg your pardon for > >the weird >> formatting below (which is most > >probably due to >> my not having converted to a > >more modern mail client.) >> >> At 2020-05-05 > >14:20, you wrote: >> >Thanks Martin. I'll look > >into these too. They all give me bad > >feelings. >> >I think I know what's going wrong. > >In >> >particular, if math/uu ever calls wd > >under jconsole then it'll die. >> >I'd like to > >know what happens (under jconsole ONLY) after > >you have >> entered: >> >wd_z_ =: > >] >> >and/or: >> > wd_uu_ =: ] >> >BTW: you > >shouldn't do:cocurrent 'uu' > >… >> >odd things may occasionally happen if > >you do. >> >There's a verb: uu_z_ which is a > >cover for uu_uu_ >> >There's a lab for math/uu, > >or ought to be, which uses it the recommended >> > >way. >> >> >> >On Tue, 5 May 2020 at 14:30, > >Martin Kreuzer >> > >wrote: > >> >Hi all - > > 1 > This is the > >behaviour I've >> >observed here ... > J v8.07 > >64-bit Console under >> >Windows 10 > >(1909) 64-bit > > > >load >> >'~addons/math/uu/uu.ijs' > > >VERSION_uu_ > >> >2.1.24 > cocurrent > >'uu' > 'deg' uu '1 >> >rad' > |value error: > >wd > | wd'msgs' > > >> >2 > Used to work > >fine in J v8.06 32-bit Console >> >under Vista > >32-bit > > > >load >> >'~addons/math/uu/uu.ijs' > > >VERSION_uu_ > >> >2.1.11 > cocurrent > >'uu' > uu '*ssig 3' > >> >3 > uu '*ssic > >0' > 0 > 'deg' uu '1 >> >rad' > 57.296 > >deg > > 3 > Works as expected in >> >both 32- > >and 64-bit JQt Terminals. > > Q: >> >Anybody any > >ideas? Did I miss something? > > >> >Thanks, > > >-M > > >> >-- > > >> > > For > >information about J forums > >see >> >http://www.jsoftware.com/forums.htm > >> > > >-- > > >> >For information about J forums see > >http://www.jsoftware.com/forums.htm >> >> > >-- > > >> For information about J forums see > >http://www.jsoftware.com/forums.htm >> > > > > >-- > > Devon McCormick, CFA > > Quantitative > >Consultant > > -- Devon McCormick, CFA > >Quantitative Consultant > >-- > >For information about J forums see http://www.jsoftware.com/forums.htm > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] value error using math/uu in v8.07 *Console*
1 Confirming that in JConsole (under WX_64 with J v8.07_64) I get the same results: load 'math/uu/' wd_uu_=. ] NB. or [ uu '*ssic 0' 0 'deg' uu '1 rad' 57.2958 deg 2 Adding the line in question to the 'uu.ijs' script, like so: \" ... [71] cocurrent 'uu' [72] [73] wd_uu_=: ] ... "\ works fine here. -M At 2020-05-06 05:35, you wrote: I notice that assigning "wd" to "[" or "]", in the "uu" coclass, avoids the spurious "msgs" problem. On Wed, May 6, 2020 at 1:33 AM Devon McCormick wrote: > I mostly use jconsole and have occasionally run into "wd" problems since > this is the window driver defined in the Qt code. Typically I get around > it by assigning "wd" to "[" or "smoutput". This works for the "uu" code, > e.g. > load 'e:\users\owner\j901\addons\ide\qt\qt.ijs' > cocurrent 'uu' > wd=: smoutput > 'deg' uu '1 rad' > msgs > msgs > 57.2958° > > It does give the spurious "msgs" output, though. > > On Tue, May 5, 2020 at 2:36 PM Martin Kreuzer wrote: > >> Ian - >> >> Sorry for the delay; was on telephone support all afternoon. >> >> In JConsole v8.07 (32- and 64-bit), there's no >> more reaction to the two lines you wanted me to test than: >> _ NB. Cursor on the following line ... >> >> wd_z_ =: ] >> wd_uu_ =: ] >> _ >> >> The line >> >> cocurrent 'uu' >> >> I remember it being suggested (a year ago, during >> a discussion with Tom A) to try in case the addon won't start at all. >> Haven't used it on a regular basis. >> >> Thanks for the hint about the lab. >> And feel free to ask for any more tests if it deems neccessary... >> >> -M >> >> ps: >> As always, I beg your pardon for the weird >> formatting below (which is most probably due to >> my not having converted to a more modern mail client.) >> >> At 2020-05-05 14:20, you wrote: >> >Thanks Martin. I'll look into these too. They all give me bad feelings. >> >I think I know what's going wrong. In >> >particular, if math/uu ever calls wd under jconsole then it'll die. >> >I'd like to know what happens (under jconsole ONLY) after you have >> entered: >> >wd_z_ =: ] >> >and/or: >> > wd_uu_ =: ] >> >BTW: you shouldn't do:cocurrent 'uu' >> >odd things may occasionally happen if you do. >> >There's a verb: uu_z_ which is a cover for uu_uu_ >> >There's a lab for math/uu, or ought to be, which uses it the recommended >> way. >> >> >> >On Tue, 5 May 2020 at 14:30, Martin Kreuzer >> wrote: > >> >Hi all - > > 1 > This is the behaviour I've >> >observed here ... > J v8.07 64-bit Console under >> >Windows 10 (1909) 64-bit > > load >> >'~addons/math/uu/uu.ijs' > VERSION_uu_ > >> >2.1.24 > cocurrent 'uu' > 'deg' uu '1 >> >rad' > |value error: wd > | wd'msgs' > > >> >2 > Used to work fine in J v8.06 32-bit Console >> >under Vista 32-bit > > load >> >'~addons/math/uu/uu.ijs' > VERSION_uu_ > >> >2.1.11 > cocurrent 'uu' > uu '*ssig 3' > >> >3 > uu '*ssic 0' > 0 > 'deg' uu '1 >> >rad' > 57.296 deg > > 3 > Works as expected in >> >both 32- and 64-bit JQt Terminals. > > Q: >> >Anybody any ideas? Did I miss something? > > >> >Thanks, > -M > > >> >-- >> > > For information about J forums see >> >http://www.jsoftware.com/forums.htm > >> >-- >> >For information about J forums see http://www.jsoftware.com/forums.htm >> >> -- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > > > -- > > Devon McCormick, CFA > > Quantitative Consultant > > -- Devon McCormick, CFA Quantitative Consultant -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm