Indeed, one can produce many useful tacit adverbs by other means. However,
is there a general method to produce tacit adverbs using current official
interpreters? If worse comes to worse, the adverb hg provides the means do
to so for a vast class of adverbs (yet, there are still, at least, a couple
of cases which are not covered by hg; which ones?).
Often is not difficult to produce tacit adverbs acting on a verb and
produce sentences where there is only one instance of the verb. When the
argument appears more than once, it might not be not so clear. For
example, produce a tacit adverb t0 such that,
erase'u'
u t0
u + 1 % 1 + u
u t0 t0
(u + 1 % 1 + u) + 1 % 1 + u + 1 % 1 + u
] t0 t0 t0 t0 t0 t0 t0 ("0) 1 2 3 4
3.33943969 3.84748866 4.50703342 5.26330573
Yet, I know it can be produced, obeying the rules, via hg. However,
personally, I do not mind to break the rules when there are no adverse
consequences and I would simply write it, using the J Wicked Toolkit, in J
(or Jx) as,
t0=. [: u 'u + 1 % 1 + u' xi q adv
Another example is the one I mentioned in the first post: produce a tacit
adverb t1 such that,
u0`u1`u2`u3`u4`u5`u6 t1
u6@:u5@:u4@:u3@:u2@:u1@:u0
*:`(+/)`-`j.`(^ %:)t1 1 2 3
2.40034j16.7123
(
I just cannot resist mentioning, due to certain similarities, the following
page:
Trains: past, present and future
https://learnenglish.britishcouncil.org/en/magazine/trains-past-present-and-future
)
On Sat, Oct 21, 2017 at 8:25 AM, Erling Hellenäs <[email protected]>
wrote:
> Hi all!
>
> Since the full answers to these seemingly stupid questions are not clear
> to me, I will pose them:
>
> 1. Why shouldn't we just write the adverbs and conjunctions instead of
> producing them this way?
> 2. How does this way to do it compare to creating programs from strings
> with Do(".) ?
>
> ".'f=: +'
>
> 1 f 1
> 2
> ".'f=: /'
>
> +f 1 2 3
> 6
> ".'f=: @:'
>
> +f- 1
> _1
>
> Cheers,
> Erling Hellenäs
>
>
>
> On 2017-10-21 13:34, Erling Hellenäs wrote:
>
>> After executing the modified script the examples in the post worked and I
>> could read it. /Erling
>>
>> On 2017-10-21 12:32, Erling Hellenäs wrote:
>>
>>> Hi all!
>>>
>>> I commented a printout that did not seem to work and modified the script
>>> slightly while hopefully keeping its function.
>>>
>>> 9!:14''
>>> o=. @:
>>> ar=. 5!:1 @:<
>>> a0=. `''
>>> a1=. (@:[) ((<'&')`) (`:6)
>>> a2=. (`(<(":0);_)) (`:6)
>>> NB.(a0=. `'') (a1=. (@:[) ((<'&')`) (`:6)) (a2=. (`(<(":0);_)) (`:6))
>>> ((`'')(((@:[)(&`))(`:6)))((`_)(`:6))
>>> av=. ((ar'a0')`) (`(ar'a1')) (`(ar'a2') ) (`:6)
>>> NB. Adverbing a monadic verb (adv)
>>> assert 1 4 9 -: 1 2 3 *: av
>>> aw=. < o ((0;1;0)&{::) NB. Fetching the atomic representation
>>> a3=. (@: (aw f.)) ('av'f.)
>>> a4=. "_
>>> a5=. `:6
>>> a6=. ((( ar'a4') ; ] ; ( ar'a3')"_) ('av'f.)) (`:6)
>>> hg=. `((ar'a6')`(ar'a5')) (`:6)
>>> assert 1 4 9 -: 1 2 3 ((<'*:') ; ]) hg
>>> erase'a0 a1 a2 a3 a4 a5 a6 ar av aw'
>>>
>>> It then executed nicely.
>>>
>>> Cheers,
>>> Erling Hellenäs
>>>
>>>
>>>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm