I think I remember seeing that somewhere -- maybe in one of the j books? (The j source book?)
-- Raul On Tue, Sep 11, 2018 at 12:43 PM John Baker <[email protected]> wrote: > > What might be of general interest to many is a clear description of how 13 : > converts explicit expressions to tacit. > > I realize we can look up the C code but the same procedure expressed in J > would be highly educational to newcomers and old hands alike. > > Job > > Sent from my iPhone > > > On Sep 11, 2018, at 8:22 AM, Linda Alvord <[email protected]> wrote: > > > > I think the forum would be much more effective if more posts were explicit. > > 13 : . Then new uses could view any tacit impovements. > > > > You wouldn't teach English speaking students Spanish by starting with the > > most complex Spanish sentences you can find. > > > > Also, since I still can't start a new thread, could you move this to a new > > thread? > > > > Linda > > > > a > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sent from my Verizon, Samsung Galaxy smartphone > > -------- Original message -------- > > From: Henry Rich <[email protected]> > > Date: 9/11/18 9:00 AM (GMT-05:00) > > To: [email protected] > > Subject: Re: [Jprogramming] Tacit form: How to handle intermediate > > > > When I first saw the question 'How would you make this tacit' my > > reaction was 'Why would you ever want to, since the explicit version is > > so easy to understand?' > > > > For practice, maybe. That's a good reason. But if you are trying to > > tune up your tacit forms, you really have to get over any aversion to @ > > . The equivalent to > > > > u@v > > > > is > > > > ([: u v)"v > > > > Not only is this butt-ugly, it is not recognized by the interpreter, so > > you miss out on all the fast code for things like <@v ;@:(<@v) etc. > > > > Henry Rich > > > >> On 9/11/2018 5:15 AM, 'Mike Day' via Programming wrote: > >> NB. I've purged most of the earlier posts (below) > >> > >> Martin Kreuzer's original question was how to handle intermediate > >> results! > >> > >> Anyway, staying off topic for now, Ric's tongue-in-cheek proposal is > >> "explicit", > >> but perhaps you wanted something more so, Linda. > >> > >> He's got a point, though - would you like it reexpressed in COBOL? > >> > >> Meanwhile, this _might_ be along the lines you're thinking of: > >> > >> NB. Ric's tacit verb > >> pmt=: {: * 1&{ (([: (% <:) (^~ >:)) * ]) 1200 %~ {. > >> > >> NB. attempt to render it explicit... (explicate it?) > >> pmte =: 3 : 0 > >> 'r t b' =. y % 1200 1 1 > >> NB. OR: b =. {:y [ t =. 1{y [ r =: 1200%~ {:y NB.!!! > >> NB. (^~ >:) ===> > >> incrtot =. t^~1 + r > >> NB. OR: =. (1 + r)^t > >> NB. ([: (% <:) (^~ >:)) ===> incrtot % incrtot - 1 > >> NB. (([: (% <:) (^~ >:)) * ]) ===> (incrtot % incrtot - 1) * r > >> NB. whole thing ===> > >> b * (incrtot % incrtot - 1) * r > >> ) > >> > >> BTW, the fragment, incrtot % incrtot - 1, suggests a further refinement - > >> or is it? - dealing with an intermediate result, anyway! > >> incrtot % incrtot - 1 > >> 1 % 1 - 1 % incrtot > >> % 1 - % incrtot > >> -.&.% incrtot NB. too tacit? > >> > >> NB. Also, my antiallergenic tacit version avoiding @ and @: > >> pmtmd =: [: (*`(] * [: (% <:) (^~ >:))/) 1 1 1200 %~ |. > >> > >> 'r t b'=. 5.75 240 12500 > >> (pmt, pmte, pmtmd) r,t,b > >> 87.7604 87.7604 87.7604 > >> > >> FWIW! > >> > >> Mike > >> > >> > >>> On 11/09/2018 07:58, Ric Sherlock wrote: > >>> Linda, > >>> You may want to define exactly what you mean by "explicitly" and what > >>> you're trying to show/achieve. > >>> Here is a tongue-in-cheek potential solution to your request: > >>> > >>> pmt=: 13 : '({: * 1&{ (([: (% <:) (^~ >:)) * ]) 1200 %~ {.) y' > >>> > >>> On Tue, Sep 11, 2018 at 2:21 PM Linda Alvord <[email protected]> > >>> wrote: > >>> > >>>> Now can someone, not Ric, write his version explicitly. > >>>> > >>>> PMT=: 13 : > >>>> Linda > >>>> > >>>> Sent from my Verizon, Samsung Galaxy smartphone > >>>> > >>>> > >>>> -------- Original message -------- > >>>> From: Ric Sherlock <[email protected]> > >>>> Date: 9/10/18 7:04 PM (GMT-05:00) > >>>> To: Programming JForum <[email protected]> > >>>> Subject: Re: [Jprogramming] Tacit form: How to handle intermediate > >>>> > >>>> Without @, but IMO this is a case where @ definitely improves > >>>> readability! > >>>> > >>>> pmt=: {: * 1&{ (([: (% <:) (^~ >:)) * ]) 1200 %~ {. > >>>> > >>>> > >>>> On Tue, Sep 11, 2018 at 7:06 AM Linda Alvord > >>>> <[email protected]> > >>>> wrote: > >>>> > >>>>> What if I'm allergic to @ ? > >>>>> > >>>>> Linda > >>>>> > >>>>> > >>>>> > >>>>> > >> [snipped the rest - Mike] > >> > >> --- > >> This email has been checked for viruses by Avast antivirus software. > >> https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fantivirus&data=02%7C01%7C%7C064974672be6431a25ce08d617e687bb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636722676213014494&sdata=ofYcP0Uj7fLzjakYGxIugBnfK%2FAQwGdnMOFRkBtHzSY%3D&reserved=0 > >> > >> ---------------------------------------------------------------------- > >> For information about J forums see > >> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C064974672be6431a25ce08d617e687bb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636722676213014494&sdata=vU8NYeNUjakzsUJsio%2FSY4KQEl40V6ivGFxhL4OGHZM%3D&reserved=0 > > > > > > --- > > This email has been checked for viruses by AVG. > > https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com&data=02%7C01%7C%7C064974672be6431a25ce08d617e687bb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636722676213014494&sdata=9CNIyloRCZ2%2B6ZywaukhkhDw9DXg6hMQanBi1gSjXmw%3D&reserved=0 > > > > ---------------------------------------------------------------------- > > For information about J forums see > > https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C064974672be6431a25ce08d617e687bb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636722676213014494&sdata=vU8NYeNUjakzsUJsio%2FSY4KQEl40V6ivGFxhL4OGHZM%3D&reserved=0 > > ---------------------------------------------------------------------- > > 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
