SPOILER ALERT!

- Exercise 0.  Solutions in

32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
 9
 8
 7
 6
 5
 4
 3
 2
 1
 0

a0=. "_

a0=. (] ; (<'"') ; (an _)c) Adv

   where an=. <@:((,'0') ,&< ]) atomizes a noun and Adv is defined in a
Tacit Toolkit post [0]

a0=. rank&_ f.adv

   where rank and adv are defined in a Tacit Toolkit post [1]

Discussion

The first solution is the most obvious, concise and efficient.  It
illustrates one of the only two possible forms for producing tacit adverbs:
fixing one argument of a conjunction (the other one is a train of adverbs).

The second solution illustrates the Adv "Holy Grail" ;).  Beginners and
intermediate tacit writers do not be intimidated by its definition.  Do not
try to understand its inner works yet either, for now just think of it as
if Adv were a cover pro-adverb for a primitive.  How does Adv work?  Adv
provides the atomic representation of the argument, say u, of a0 to the
verb (] ; (<'"') ; (an _)c), which in turn produces a gerund representing
the u"_ form and Adv applies (`:6) before delivering the final product.

Note that Adv is not exactly what Dan requested (see the post [2]); Adv
goes ahead and applies (`:6) at the end because that is usually what one
would like to do.  One the one hand, Dan has a point requesting to delay
the train operation because if the product is an adverb or a conjunction it
cannot be passed to another adverb but its atomic representation could.
One the other hand, one can deliver the atomic or gerundial representation
instead of the actual word simply by putting  an@:  at the left-hand side
of the controlling verb to neutralize the trailing train operation of Adv.

The third solution illustrates the use of a Sorcerer's Cauldron ;).  Again,
it is better at this point to pretend that adv is a cover pro-adverb for a
wicked primitive (actually, Jx supports it directly).  How does adv work?
The adverb adv provides directly the argument, say u, of a0 to the verb
 rank&_  (yes, tacit verbs can take verbs, even adverbs and conjunctions,
as arguments as far as current official J interpreters are concerned) which
in turn produces the form u"_ (yes, tacit verbs can produce verbs, even
adverbs and conjunctions, as arguments as far as current official J
interpreters are concerned) and adv delivers it directly as the final
product.  How does the verb  rank&_  work?  It takes the argument u, noun
or verb, directly which becomes the left argument of the verbed conjunction
", that is, the pro-verb rank, and produces  u"_ .

I know, I know, using Adv and adv in this situation is overkill, akin to
killing flies (and mosquitoes) with a gun.  Yet, it can be done with the
right gun and it is a lot of fun (intended pun)!  See the link [3]; the 2.0
version works like a charm :)  In any case, wicked heavy guns for the
official interpreters are coming soon and I thought it might be a good idea
to start with a very simple, humble looking, yet awesome adverb: "_.

Why entertaining rank infinity?

I am fond of it.  Why?  In the Post (and even during the) Golden Age it was
far from clear, to say the least, that adverbial tacit programming was
complete in the sense that given an explicit adverb there was always a way
to write a tacit adverb which could, in principle, produce whatever the
explicit adverb could.  Although the adverb  "_  had been known and used
for a very long time before, early in the Summer of 2009, a trailing
suggestion about using the rank conjunction in a novel fashion within the
adverbial and conjunctional context was proposed by Neville Holmes [4]

   If a concern is that a noun is brought in where a verb is needed
   then maybe the rank operator could be implied to do a conversion.

That was the first of a quick series of events and within a month it was
clear, at least to some of us,  that adverbial programming was complete
after all, even if it could become quite cumbersome.  Near the end of this
brief period of time a beautiful butterfly spread its wings [5] and the
wicked approach to adverbial (and conjunctional) tacit writing is one of
that butterfly effects.  (Yet, hurdles remained, for example, when a verb
was the product of a tacit adverb, could its argument(s) be accessed within
a tacit context?)

It is not a coincidence that "_ is the foundation for Adv and adv.

References

[0] [Jprogramming] Tacit Toolkit (was dyadic J)
    http://www.jsoftware.com/pipermail/programming/2015-December/043678.html

[1] [Jprogramming] Tacit Toolkit (was dyadic J)
    http://www.jsoftware.com/pipermail/programming/2015-December/043757.html

[2] [Jprogramming] Tacit Toolkit (was dyadic J)
    http://www.jsoftware.com/pipermail/programming/2015-December/043663.html

[3] NEW! - Bug-A-Salt Gun Test & Review
    https://www.youtube.com/watch?v=JmqTHLn1JWg

[4] [Jprogramming] Third argument
    http://www.jsoftware.com/pipermail/programming/2009-July/015588.html

[5]
    http://www.jsoftware.com/pipermail/general/2009-August/033221.html


On Sun, Mar 13, 2016 at 10:59 PM, Jose Mario Quintana <
[email protected]> wrote:

> Welcome to the Adverbial (and Conjunctional) Tacit Jymnasium :)
>
> Orthodox and wicked routines will be practiced here for those interested
> in developing adverbial (and conjunctional) tacit muscles.  Official
> interpreters will be the standard equipment; however, Unbox, Jx, and other
> J interpreters (including Golden Age J interpreters), as well as Toolkits ,
> see for example [0], and alike (e.g., the tacit translator), are in general
> more than acceptable although occasionally some restrictions might be
> imposed aiming to develop certain muscles.  Since adverbial (and
> conjunctional) tacit writing can (following two closely related approaches)
> be reduced to verbal tacit writing, this is also a place to exercise verbal
> tacit muscles.  In addition, some adverbs (and conjunctions) which will be
> eventually shown here can provide general support for producing tacit
> verbs, adverbs and conjunctions.
>
> Instructors will describe an exercise and, unless otherwise specified in
> advance, will be prepared to show at least one way to perform it if patrons
> (including other instructors) have not performed the exercise after a
> reasonable time; alright, they have bragging rights either way ;)  The
> exercises would typically involve producing adverbs with bonus points for
> producing fixed versions of the adverbs and their products.  Exercises are
> not required to be brand new.  Given credit to the originators of certain
> techniques is not necessary (but you know who you are and bragging is
> allowed).  Spoiler alerts by instructors and patrons will be appreciated.
>
> Instructors (Dan, Thomas et al. are you listening?), not to mention
> patrons (including beginners), are all very welcome here.  How long will
> the Jym remain open?  Indefinitely, as long as there enough patrons and
> instructors or we are kicked out of here.
>
> Let us start with a few exercises with different degrees of difficulty
> (feel free to ask any questions just be patient with me, sometimes I
> disappear for a few days):
>
>
> - Exercise 0.  Rank infinity
>
> Produce a (tacit, of course) adverb  a0  such that  u a0  produces  u"_
>  where u is a noun or a verb, for example,
>
>    u a0
> u"_
>
>    *:@:(+/) a0
> *:@:(+/)"_
>
>    u=. 1 2 3
>
>    u a0
> 1 2 3"_
>
>    1 2 3 a0
> 1 2 3"_
>
>
> - Exercise 1.  Operating on the first and last items
>
> Produce an adverb a1 such that  u a1 produces  {. u {:  where u is a verb,
> for example,
>
>    erase'u'
> 1
>
>    u a1
> {. u {:
>
>    * a1
> {. * {:
>
>    * a1 2 3 5 7
> 14
>
>
> - Exercise 2. Back insert
>
> Produce an adverb a2 which is a tacit counterpart of the explicit adverb
> rscan, see [1],
>
>    rscan=. 1 : '((>: - m |&# y) |. m)/y'
>
> for example,
>
>    (+`%`*   rscan\. ,:  +`%`*   a2\.)  1 2 3 4 5 6 7
> 1.16184971 0.161849711 12.3571429 4.11904762 0.119047619 42 7
> 1.16184971 0.161849711 12.3571429 4.11904762 0.119047619 42 7
>
>    (+`-`*`% rscan\. ,:  +`-`*`% a2\.)  1 2 3 4 5 6 7 8
> _0.6 1.6 0.8 3.75 _0.25 5.25 0.875 8
> _0.6 1.6 0.8 3.75 _0.25 5.25 0.875 8
>
>
> - Exercise 3.  Replace items
>
> Produce an adverb a3 which is a tacit counterpart of the explicit adverb
> ritem, see [2],
>
> ritem =: 1 : (':' ; 'x (I.m-:"_1 _ y) } m')
>
> for example,
>
> C=. 3 4$i.8
> A=. i.3 2 4
>
> assert 9 8 7 6 (C ritem -: C a3) 0 1 2 3
> assert (100%i.2 4) (A ritem -: A a3) 16+i.2 4
>
>
> References
>
> [0] [Jprogramming] Tacit Toolkit (was dyadic J)
>
> http://www.jsoftware.com/pipermail/programming/2015-December/043757.html
>
> [1] [Jprogramming] Am I understanding m/y ?
>
> http://www.jsoftware.com/pipermail/programming/2016-February/044483.html
>
> [2] [Jprogramming] Replace Items
>     http://www.jsoftware.com/pipermail/programming/2016-March/044625.html
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to