Raul wrote: "Reading your original email again, it looks like you meant this:"
Right, a2 is meant to be a pro-adverb for a (tacit) solution. Raul also wrote: "I hope you'll forgive the sloppiness in my attempts." I appreciate the thought but there is really nothing to forgive. On Sun, Apr 24, 2016 at 10:50 PM, Raul Miller <[email protected]> wrote: > Ah, good point. > > Using the definition of a2 from earlier in this thread: > > a2=. (`(<(":0);_)) (`:6) > rscan=. 1 : '((>: - m |&# y) |. m)/y' > (+`%`* rscan\. ,: +`%`* a2\.) 1 2 3 4 5 6 7 > |domain error > | (+`%`*rscan\.,: +`%`*a2\.)1 2 3 4 5 6 7 > > Hmm... probably not what you meant. > > Reading your original email again, it looks like you meant this: > > rscan=. 1 : '((>: - m |&# y) |. m)/y' > a2=.rscan > (+`%`* rscan\. ,: +`%`* a2\.) 1 2 3 4 5 6 7 > 1.16185 0.16185 12.3571 4.11905 0.119048 42 7 > 1.16185 0.16185 12.3571 4.11905 0.119048 42 7 > > I hope you'll forgive the sloppiness in my attempts. > > Thanks, > > -- > Raul > > > On Sun, Apr 24, 2016 at 7:57 PM, Jose Mario Quintana > <[email protected]> wrote: > > Apparently that is a peculiar difficulty. I have no issues when I plug > my > > solution in for a2. One would get a syntax error if a2 were left > > undefined but you tried to plug a potential solution in... Did you not? > > > > > > On Sat, Apr 23, 2016 at 3:13 AM, Raul Miller <[email protected]> > wrote: > > > >> Another difficulty, however, is stuff like this: > >> > >> rscan=. 1 : '((>: - m |&# y) |. m)/y' > >> (+`%`* rscan\. ,: +`%`* a2\.) 1 2 3 4 5 6 7 > >> |syntax error > >> | ( +`%`*rscan\.,:+`%`*a2\.)1 2 3 4 5 6 7 > >> > >> -- > >> Raul > >> > >> > >> On Fri, Apr 22, 2016 at 8:42 PM, Jose Mario Quintana > >> <[email protected]> wrote: > >> > There is a reason why the exercises 2 and 3 (described in [0]) are > >> > difficult. The Toolkit adverbs , hg and adv, facilitate the > production > >> of > >> > adverbs which are capable to render whatever explicit adverbs can; > >> however, > >> > when the explicit adverbs produce verbs (e.g., u rscan) and the > arguments > >> > of these verbs (e.g., y) are also referred within the definition of > the > >> > explicit adverbs (e.g., 1 : '((>: - m |&# y) |. m)/y') then the > >> > straightforward way to produce tacit adverbs via hg or adv is not > >> > satisfactory because the products (e.g., u (1 : '((>: - m |&# y) |. > >> m)/y')) > >> > involve unresolved explicit definitions. > >> > > >> > The following are hints to find (fully tacit) solutions for these > >> > particular exercises; however, they can be applied to similar tasks. > >> > Moreover, general solutions for this kind of situation are possible > >> using a > >> > tool that will be shown in the near future (stay tuned). > >> > > >> > H > >> > i > >> > n > >> > t > >> > s > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > . > >> > > >> > > >> > > >> > > >> > > >> > Exercise 2. Notice that: > >> > > >> > +`-`*`% &( ( ([ |.~ >: o - o (|&#)) ; an y))\. 1 2 > 3 4 > >> 5 > >> > 6 7 8 > >> > ┌─────────┬───────────────────┐ > >> > │┌─┬─┬─┬─┐│┌─┬───────────────┐│ > >> > ││-│*│%│+│││0│1 2 3 4 5 6 7 8││ > >> > │└─┴─┴─┴─┘│└─┴───────────────┘│ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬─────────────┐ │ > >> > ││*│%│+│-│││0│2 3 4 5 6 7 8│ │ > >> > │└─┴─┴─┴─┘│└─┴─────────────┘ │ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬───────────┐ │ > >> > ││%│+│-│*│││0│3 4 5 6 7 8│ │ > >> > │└─┴─┴─┴─┘│└─┴───────────┘ │ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬─────────┐ │ > >> > ││+│-│*│%│││0│4 5 6 7 8│ │ > >> > │└─┴─┴─┴─┘│└─┴─────────┘ │ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬───────┐ │ > >> > ││-│*│%│+│││0│5 6 7 8│ │ > >> > │└─┴─┴─┴─┘│└─┴───────┘ │ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬─────┐ │ > >> > ││*│%│+│-│││0│6 7 8│ │ > >> > │└─┴─┴─┴─┘│└─┴─────┘ │ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬───┐ │ > >> > ││%│+│-│*│││0│7 8│ │ > >> > │└─┴─┴─┴─┘│└─┴───┘ │ > >> > ├─────────┼───────────────────┤ > >> > │┌─┬─┬─┬─┐│┌─┬─┐ │ > >> > ││+│-│*│%│││0│8│ │ > >> > │└─┴─┴─┴─┘│└─┴─┘ │ > >> > └─────────┴───────────────────┘ > >> > > >> > (Incidentally, this suggests a potential alternative sequential > approach > >> > that one could follow if the verbs within the gerund were very > expensive > >> to > >> > compute.) > >> > > >> > > >> > Exercise 3. > >> > > >> > These are some hints for some solutions: > >> > > >> > 0. Use hg or adv to produce directly the form > >> > [`([: I. u -:"_1 _ ])`(u"_)} (see Raul's ritemT adverb [1]) > >> > > >> > 1. Notice that ([`([:I. u -:"_1 _ ])`(u"_)}) (tie&''adv) is a > >> > gerund associated to the verb [`([: I. u -:"_1 _ ])`(u"_)} . > >> > What remains to be accomplished is to replace the instances of > >> > u in the gerund by the argument of the adverb. > >> > > >> > 2. Use one the the combinations mentioned in [2] > >> > > >> > 3. There is, at least, another approach. > >> > > >> > > >> > References > >> > > >> > [0] [Jprogramming] Adverbial Tacit Jym > >> > > >> http://www.jsoftware.com/pipermail/programming/2016-March/044692.html > >> > > >> > [1] [Jprogramming] Replace Items > >> > > >> http://www.jsoftware.com/pipermail/programming/2016-March/044625.html > >> > > >> > [2] [Jprogramming] Adverbial Tacit Jym -spoilered > >> > > >> http://www.jsoftware.com/pipermail/programming/2016-April/045003.html > >> > > >> > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
