This is how a (fully) tacit version of the verb can be produced using the
latest, not yet released, version of Jx based on J806,
JVERSION
Installer: j602a_win.exe
Engine: j806/j64/windows/beta/BEST/Jx/2017-06-29T16:12:38
Library: 6.02.023
( v3=. 'R' =:: ". o ('R'c) , ] )
'R' =:: ".@:('R'"_) , ]
v3 1 2 3 [ R=. 0
0 1 2 3
R
0 1 2 3
and this is the performance comparison,
stp 666
v0 (i.666) [ R=. 0
v1 (i.666) [ R=. 0
v2 (i.666) [ R=. 0
v3 (i.666) [ R=. 0
)
┌────────────────────┬──────┬─────────────┬────────────┐
│Sentence │Space │Time │Space * Time│
├────────────────────┼──────┼─────────────┼────────────┤
│ v0 (i.666) [ R=. 0│18432 │5.03153156e_6│0.0927411898│
├────────────────────┼──────┼─────────────┼────────────┤
│ v1 (i.666) [ R=. 0│36608 │2.10102225e_5│0.769142225 │
├────────────────────┼──────┼─────────────┼────────────┤
│ v2 (i.666) [ R=. 0│567424│0.00164490015│933.355823 │
├────────────────────┼──────┼─────────────┼────────────┤
│ v3 (i.666) [ R=. 0│10496 │5.42623705e_6│0.056953784 │
└────────────────────┴──────┴─────────────┴────────────┘
Apparently this kind of tacit verbs currently cannot be produced with an
official J interpreter without huge potential incurring performance
penalties...
On Wed, Jul 5, 2017 at 7:38 PM, Jose Mario Quintana <
[email protected]> wrote:
> I am glad, thank you for bringing 3!:2 and 3!:1 to my attention.
> There could be a high performance price to pay for going fully tacit from
> half way tacit, not to mention, from explicit (which is another issue):
>
> v0=. 3 : 'R=. R , y'
> v0
> 3 : 'R=. R , y'
>
> v0 1 2 3 [ R=. 0
> 0 1 2 3
>
>
> lrep=: 3 :'5!:5<''y'''
> v1=: [: ". 'R=:R,' , lrep f.
> v1
> [: ". 'R=:R,' , 3 : '5!:5<''y'''
>
> v1 1 2 3 [ R=. 0
> 0 1 2 3
>
>
> nrep=. ('3!:2 a.{~' ,&": a. i. 3!:1)
> v2=: ".@:('R=:R,' , nrep) f.
> v2
> ".@:('R=:R,' , '3!:2 a.{~' ,&": a. i. 3!:1)
>
> v2 1 2 3 [ R=. 0
> 0 1 2 3
>
>
> NB. Beware of line wrapping...
> stp=. ] (([ ((<;._1 '|Sentence|Space|Time|Space * Time') , (,
> */&.:>@:(1 2&{))@:(] ; 7!:2@:] ; 6!:2)&>) (10{a.) -.&a:@:(<;._2@,~) ]) [
> (0 0 $ 13!:8^:((0 e. ])`(12"_)))@:(2 -:/\ ])@:(".&.>)@:((10{a.) -.&a:@
> :(<;._2@,~) ])) ".@:('0( : 0)'"_)
>
>
> stp 666
> v0 (i.666) [ R=. 0
> v1 (i.666) [ R=. 0
> v2 (i.666) [ R=. 0
> )
> ┌────────────────────┬──────┬──────────┬────────────┐
> │Sentence │Space │Time │Space * Time│
> ├────────────────────┼──────┼──────────┼────────────┤
> │ v0 (i.666) [ R=. 0│18432 │6.19968e_6│0.114273 │
> ├────────────────────┼──────┼──────────┼────────────┤
> │ v1 (i.666) [ R=. 0│36608 │3.0683e_5 │1.12324 │
> ├────────────────────┼──────┼──────────┼────────────┤
> │ v2 (i.666) [ R=. 0│567424│0.0021772 │1235.39 │
> └────────────────────┴──────┴──────────┴────────────┘
>
> What I would really like is the functionality of 4 : '(x)=: y' without
> the : and without paying a high performance price... Mind you, I already
> have it :)
>
>
>
> On Wed, Jul 5, 2017 at 4:45 PM, Raul Miller <[email protected]> wrote:
>
>> I am indeed not entirely sure what you are thinking of, but you can do
>> stuff like this:
>>
>> nrep=: '3!:2 a.{~',&":a.i.3!:1
>> ".nrep 1 2 3
>> 1 2 3
>>
>> That said, if you really want 5!:5 functionality but as a verb, and if
>> the use of : to construct that verb is a real problem for you, there's
>> nothing stopping you from re-implementing that aspect of 5!:5 from
>> scratch.
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm