Er... if I remember right, you are not talking about the J we can download from jsoftware.com but your modified version?
Thanks, -- Raul On Sun, Aug 14, 2016 at 11:16 PM, Jose Mario Quintana <[email protected]> wrote: > I forgot to emphasize, is better late than never, that fully fixed tacit > (no compromises) cloak-train compositions can be produced as follows, first > as a higher-order verb, > > ct=. (Cloak@:(]&.:train)@:;:)f. > > (ct 'b./') &.> 17 23 32 33 34 > ┌──────┬──────┬──────┬──────┬──────┐ > │17 b./│23 b./│32 b./│33 b./│34 b./│ > └──────┴──────┴──────┴──────┴──────┘ > > or, if parentheses are (for some reason) a concern, as and adverb, > > Ct=. ct f.adv > > 'b./'Ct&.> 17 23 32 33 34 > ┌──────┬──────┬──────┬──────┬──────┐ > │17 b./│23 b./│32 b./│33 b./│34 b./│ > └──────┴──────┴──────┴──────┴──────┘ > > using the toolkit adverb adv to adverb ct. > > The primitive words ;: provides the means to produce a gerund (in the > form of a list) from a linear sequence of primitives or pro-words. > However, train can take any gerund, or even a non-gerund, representing > any general sentence (as long as the odd one out copula is not directly > involved), that `:6 is able to digest. > > > > On Wed, Aug 3, 2016 at 6:15 PM, 'Pascal Jasmin' via Programming < > [email protected]> wrote: > >> in j805, I get a syntax error with my CloakV verb >> >> train >> ,^:(0:``:)&6 :.(< ,^:(0:`@:) (,'0') ,&< ]) >> >> >> train seems quite useful. tacit verb version of my eval adverb. >> >> >> (train ;:'&o.') >> &o. >> >> so far so good, but this is an adverb. So maybe you intended the left to >> be another adverb >> >> >> CloakV(]&.:)(train ;:'&o.') >> ]&.:CloakV&o. >> >> could almost be right... but its not, and I crashed J trying to fix it. >> So not in a good mood about it. >> >> (CloakV '&o.') each 1 2 3 >> ┌────┬────┬────┐ >> │1&o.│2&o.│3&o.│ >> └────┴────┴────┘ >> >> is nowhere near as good as >> >> >> '&o.'Cloak each 1 2 3 >> ┌────┬────┬────┐ >> │1&o.│2&o.│3&o.│ >> └────┴────┴────┘ >> >> no parens needed. and oa is awesome :P >> >> oa =: 1 :'u Cloak @:' NB. manual a c conjunction version >> >> >> '&o.'Cloak 'ar' oa each 1 2 3 >> '&o.'Cloak '`''''' oa each 1 2 3 NB. same >> >> >> '&o.'Cloak 'ar' oa each '/.'oa 1 2 3 >> 1&o.`(2&o.)`(3&o.)/. >> >> its almost fixed. aar is "semi-tacit" adverb used within Cloak, but its >> just a helper function. so is oa >> >> '/.' 1 : ' u Cloak @:' >> ,^:(0:`/.)@: >> >> But anyways, I really like Cloak adverb. >> >> a different application principle than the double verb, is simply a double >> noun. Which doesn't need any modifiers, and works with dyads. Works for >> testing. But this conjunction is neater than the double verb method (tie >> is structured to work with nouns too) >> >> >> CLapply =: 2 : 'u@:] ''tie''Cloak ''`:6''oa v' >> >> >> 0.25 0.5 0.75 '&o.'Cloak 'ar' oa each '/.'oa '@:(o.@:(%&3))'oa >> CLapply[ 1 2 3 >> 0.258819 >> 0.866025 >> 1 >> >> >> "tacit enough" :P >> >> '&o.'Cloak 'ar' oa each '/.'oa '@:(o.@:(%&3))'oa CLapply[ >> ,^:(0:`(@:(o.@:(%&3))))@:(,^:(0:`/.)@:(,^:(0:`ar)@:(,^:(0:`(&o.)))&.>))@:] >> ,^:(0:`(`:6))@:(,^:(0:`tie)) [ >> >> >> ----- Original Message ----- >> From: Jose Mario Quintana <[email protected]> >> To: Programming forum <[email protected]> >> Sent: Tuesday, August 2, 2016 10:23 PM >> Subject: Re: [Jprogramming] Adverbial Tacit Jym >> >> There is, of course, a tacit "dyad." See below, ... >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 1 2 3 ((Cloak ]&.:train ;:'&o.')&.>@:[ (train@([ ; an)f."0) >> o.@:(%&3)@]) >> 0.25 0.5 0.75 >> 0.258819 0.866025 1 >> >> or, if you prefer, >> >> 1 2 3 ((Cloak ]&.:train ;:'&o.')&.>@:[ (,.@:(train@([ ; an)f."0)) >> o.@:(%&3)@]) >> 0.25 0.5 0.75 >> 0.258819 >> 0.866025 >> 1 >> >> By the way, both verbs are fixed. >> >> >> On Tue, Aug 2, 2016 at 11:25 AM, 'Pascal Jasmin' via Programming < >> [email protected]> wrote: >> >> > text at bottom for spoilers >> > >> > >> > >> > >> > ----- Original Message ----- >> > From: 'Pascal Jasmin' via Programming <[email protected]> >> > To: "[email protected]" <[email protected]> >> > Sent: Tuesday, August 2, 2016 10:21 AM >> > Subject: Re: [Jprogramming] Adverbial Tacit Jym >> > >> > Spoiler >> > >> > a >> > s >> > >> > a >> > >> > v >> > e >> > r >> > b >> > >> > eval =: 1 : ' a: 1 : m' >> > >> > aar =: 1 : 'if. (0=4!:0 ::0:)@:< ''u'' do. if. (2 = 3!:0) m do. q =. m >> > eval else. q =. u end. else. q =. u end. 5!:1 < ''q'' ' >> > >> > >> > Cloak=: aar(0:`)(,^:) >> > >> > 'and or rotate shift signedshift'=. ('b.' Cloak each) 17 23 32 33 34 >> > >> > >> > A very cool thing about Cloak is that the "verbified modifiers" can >> return >> > non nouns, and can box non-noun return values, and =:/=. works >> > automagically. ("0 doesn't work though) >> > >> > >> > Can even do this: >> > >> > >> > '/'Cloak each ('b.' Cloak each) 17 23 32 33 34 >> > ┌──────┬──────┬──────┬──────┬──────┐ >> > │17 b./│23 b./│32 b./│33 b./│34 b./│ >> > └──────┴──────┴──────┴──────┴──────┘ >> > >> > (alternate) >> > >> > '/'Cloak @('b.' Cloak) each 17 23 32 33 34 >> > >> > That format is neither lr nor ar, but they are "real verbs" >> > >> > 0 {:: '/'Cloak @('b.' Cloak) each (17 23 32 33 34) 1 1 >> > 1 >> > >> > an improvement over your/Dan's original Cloak is that you can Cloak an >> > adverb train, and its clean enough to use anonymously. IMO, its easier >> to >> > read if there >> > >> > >> > ('/\'Cloak) @('b.' Cloak) each (17 23 32 33 34) >> > ┌───────┬───────┬───────┬───────┬───────┐ >> > │17 b./\│23 b./\│32 b./\│33 b./\│34 b./\│ >> > └───────┴───────┴───────┴───────┴───────┘ >> > '&o.' Cloak each 1 2 3 >> > ┌────┬────┬────┐ >> > │1&o.│2&o.│3&o.│ >> > └────┴────┴────┘ >> > >> > non cloacked verbs still work with "this data", and `:6 works but `:0 >> > doesn't. >> > >> > ar =: 1 : '5!:1 <''u''' >> > >> > insN =: }:@:,@:([`([ $~ <.&#)@.(>&#) ,.~&>/@:(,&< $~&.> >.&#) ]) >> > >> > (, ar insN '/'Cloak @('b.' Cloak) each (17 23 32 33 34) )(`:6) 1 1 >> > 17 b./ , 23 b./ , 32 b./ , 33 b./ , 34 b./ >> > >> > >> > one way to turn the format into a gerund >> > >> > >> > ('''''`'Cloak@('&o.'Cloak)each 1 2 3)`:0 >> > 1&o.`(2&o.)`(3&o.)`:0 >> > >> > ('''''`'Cloak@('&o.'Cloak)each 1 2 3)/. o. 3 %~ 0.25 0.5 0.75 >> > 0.258819 >> > 0.866025 >> > >> > ----- Original Message ----- >> > From: Jose Mario Quintana <[email protected]> >> > To: Programming forum <[email protected]> >> > Sent: Monday, August 1, 2016 11:33 PM >> > Subject: Re: [Jprogramming] Adverbial Tacit Jym >> > >> > Let us keep the adverbial writing challenges/exercises open (non-tacit >> > solutions are also welcome). Why not? ;) >> > >> > >> > Mapping nouns to proverbs... >> > >> > >> > Exercise 9.0 >> > >> > Produce an adverb boolean such that it maps the b. codes to their >> > corresponding proverbs; thus, >> > >> > 'and or rotate shift signedshift'=. 17 23 32 33 34 boolean >> > >> > NB. Alternatively, (and`or`rotate`shift`signedshift)=. 17 23 32 33 >> 34 >> > boolean if the names >> > NB. and, or, rotate, shift and signedshift are undefined or >> > predefined as verbs >> > >> > NB. 64-bit... >> > assert 48 80187 -: 12345 (and , or) 67890 >> > assert 2468 -:1 rotate 1234 >> > assert 576460752303423102 _386 -: _5 (shift , signedshift) _12345 >> > >> > >> > Exercise 9.1 >> > >> > Produce an adverb circle such that it maps the o. codes to their >> > corresponding proverbs; thus, >> > >> > 'sin cos tan'=. 1 2 3 circle >> > NB. Alternatively, (sin`cos`tan)=. 1 2 3 circle if >> > NB. sin, cos and tan are undefined or predefined as verbs >> > >> > (sin`cos`tan)/. o. 3 %~ 0.25 0.5 0.75 >> > 0.258819 >> > 0.866025 >> > 1 >> > >> > 'asin acos atan'=. (-1 2 3) circle >> > >> > assert (,. -: (asin`acos`atan/.) @: (sin`cos`tan/.)) o. 3 %~ 0.25 0.5 >> > 0.75 >> > >> > >> > ___________________ >> > >> > create a tacit verb parameterized (a double verb) >> > >> > >> > '@:(o.@:(%&3))'Cloak@:('/.'Cloak@:(('''''`'Cloak@('&o.'Cloak)each ))) >> > ,^:(0:`(@:(o.@:(%&3))))@:(,^:(0:`/.)@:(,^:(0:`''`)@(,^:(0:`(&o.)))&.>)) >> > >> > '@:(o.@:(%&3))'Cloak@:('/.'Cloak@:(('''''`'Cloak@('&o.'Cloak)each ))) (1 >> > 2 3) >> > 1&o.`(2&o.)`(3&o.)/.@:(o.@:(%&3)) >> > >> > '@:(o.@:(%&3))'Cloak@:('/.'Cloak@:(('''''`'Cloak@('&o.'Cloak)each )))(1 >> 2 >> > 3) 0.25 0.5 0.75 >> > 0.258819 >> > 0.866025 >> > 1 >> > >> > is there a way to make this expression a dyad instead of a double verb? >> > ie. use x for one parameter (1 2 3) and y for 0.25 0.5 0.75 >> > ---------------------------------------------------------------------- >> > 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 >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
