A hint and a solution for the Exercise 1.1.0.2 follow after the alerts.
F i r s t c o m e s t h e h i n t . . .
F i r s t c o m e s t h e h i n t . .
F i r s t c o m e s t h e h i n t .
F i r s t c o m e s t h e h i n t
F i r s t c o m e s t h e h i n
F i r s t c o m e s t h e h i
F i r s t c o m e s t h e h
F i r s t c o m e s t h e
F i r s t c o m e s t h e
F i r s t c o m e s t h
F i r s t c o m e s t
F i r s t c o m e s
F i r s t c o m e s
F i r s t c o m e
F i r s t c o m
F i r s t c o
F i r s t c
F i r s t
F i r s t
F i r s
F i r
F i
F
Notice the equivalence: u Y <-> ( (u@:]) )~ Y . For example,
(*: -: (*:@])~) 1 2 3
1
F o l l o w e d b y a s o l u t i o n . . .
F o l l o w e d b y a s o l u t i o n . .
F o l l o w e d b y a s o l u t i o n .
F o l l o w e d b y a s o l u t i o n
F o l l o w e d b y a s o l u t i o
F o l l o w e d b y a s o l u t i
F o l l o w e d b y a s o l u t
F o l l o w e d b y a s o l u
F o l l o w e d b y a s o l
F o l l o w e d b y a s o
F o l l o w e d b y a s
F o l l o w e d b y a
F o l l o w e d b y a
F o l l o w e d b y
F o l l o w e d b y
F o l l o w e d b
F o l l o w e d
F o l l o w e d
F o l l o w e
F o l l o w
F o l l o
F o l l
F o l
F o
F
a1x1x0x2=. (@:])(($:~@:{. + $:~@:{:) :)
NB. u @:{. + u @:{:
*: a1x1x0x2
($:~@:{. + $:~@:{:) :(*:@:])
*: a1x1x0x2 3 4 5 6
45
Adding a complication...
a1x1x0x2=. (@:])($:~@:($:~@:{. + $:~@:{:) :)
NB. u @:(u @:{. + u @:{:)
*: a1x1x0x2
$:~@:($:~@:{. + $:~@:{:) :(*:@:])
*: a1x1x0x2 3 4 5 6
2025
On Thu, Apr 14, 2016 at 12:36 PM, Jose Mario Quintana <
[email protected]> wrote:
> I think you meant (balancing the parentheses),
>
> *: ((+&)/(@({. , {:))) 3 4 5 6
> 45
>
> which is a clever solution for the particular form u@{. + u@{: . The
> question is: Can you extend your refactoring approach to deal with other
> more complicated forms (for example, u@:(u@:{. + u@:{:) , etc. )? The
> $: trick can deal with the latter form easily, but mind you, for instance,
> the form u^:_1@: (u@:{. + u@:{:) would introduce further complications.
>
>
>
> On Wed, Apr 13, 2016 at 9:15 PM, 'Pascal Jasmin' via Programming <
> [email protected]> wrote:
>
>> I think I'm cheating because I'm not using $:
>>
>> what I meant by refactoring 1 : 'u@{. + u@{:'
>>
>>
>>
>> *: ((+&)/(@({. , {:)) 3 4 5 6
>> 45
>>
>>
>>
>>
>>
>> ----- Original Message -----
>> From: Jose Mario Quintana <[email protected]>
>> To: Programming forum <[email protected]>
>> Sent: Wednesday, April 13, 2016 7:33 PM
>> Subject: Re: [Jprogramming] Adverbial Tacit Jym
>>
>> Pascal, you are right about the example. Allow me to be more specific by
>> labeling the cases:
>>
>> Exercise 1.1.0
>>
>> - 1.1.0.0 Provide an example of the method when there are multiple
>> instances of u
>>
>> - 1.1.0.1 Provide an example of the method when u is monadic and the
>> product (u a) is dyadic
>>
>> - 1.1.0.2 Provide an example of the method when u is monadic and the
>> product is also monadic
>>
>> - 1.1.0.3 Provide an example of the method when u is dyadic and the
>> product is dyadic
>>
>> The generic form u@{. + u@{: corresponds to the case 1.1.0.2 when
>> there
>> are two instances of u. The challenge is to exhibit an adverb, say,
>> a1x1x0x2 such that, for example,
>>
>> *: a1x1x0x2 3 4 5 6
>> 45
>>
>> by means of the method (i.e., using the same kind of trick).
>>
>>
>> A m i n o r h i n t f o l l o w s . . .
>> A m i n o r h i n t f o l l o w s . .
>> A m i n o r h i n t f o l l o w s .
>> A m i n o r h i n t f o l l o w s
>> A m i n o r h i n t f o l l o w
>> A m i n o r h i n t f o l l o
>> A m i n o r h i n t f o l l
>> A m i n o r h i n t f o l
>> A m i n o r h i n t f o
>> A m i n o r h i n t f
>> A m i n o r h i n t
>> A m i n o r h i n t
>> A m i n o r h i n
>> A m i n o r h i
>> A m i n o r h
>> A m i n o r
>> A m i n o r
>> A m i n o
>> A m i n
>> A m i
>> A m
>> A
>> A
>>
>>
>> #(5!:5)<'a1x1x0x1' NB. The tally of the lr of one solution...
>> 28
>>
>> Incidentally, when u is a large verb and there are multiple instances of
>> it, this kind of solutions produce thrifty verbs. The caveat, because
>> their reliance on $:, is that cannot be embedded in within a fixed tacit
>> verb... Unless, they are wearing a suit of armor!
>>
>>
>> On Tue, Apr 12, 2016 at 2:32 PM, 'Pascal Jasmin' via Programming <
>> [email protected]> wrote:
>>
>> >
>> >
>> > > Provide an example of the method when there are multiple instances of
>> u
>> >
>> > Not sure how here, except where 1 : 'u@{. + u@{:' could be refactored
>> > into a single u, and then use $:
>> >
>> > Very interested in understanding other 3 examples.
>> >
>> >
>> > ----- Original Message -----
>> > From: Jose Mario Quintana <[email protected]>
>> > To: Programming forum <[email protected]>
>> > Sent: Tuesday, April 12, 2016 10:17 AM
>> > Subject: Re: [Jprogramming] Adverbial Tacit Jym
>> >
>> > Anyone that wants to know the answer can find the original one [0]
>> written
>> > almost 10 years ago!
>> >
>> > Sorry Dan, here there are more minor hints ;)
>> >
>> > The importance of this solution is that illustrates a fairly general and
>> > straightforward method for writing of a very common form: u a where u
>> is a
>> > verb and its product (u a) is also a verb.
>> >
>> > This a bonus exercise:
>> >
>> > Exercise 1.1.0
>> >
>> > - Provide an example of the method when there are multiple instances
>> of u
>> >
>> > - Provide an example of the method when u is monadic and the product
>> (u
>> > a) is dyadic
>> >
>> > - Provide an example of the method when u is monadic and the product is
>> > also monadic
>> >
>> > - Provide an example of the method when u is dyadic and the product is
>> > dyadic
>> >
>> >
>> >
>> > [0] [Jprogramming] Tacit adverb definitions?
>> > http://www.jsoftware.com/pipermail/programming/2006-July/002627.html
>> >
>> > On Tue, Apr 12, 2016 at 8:50 AM, Dan Bron <[email protected]> wrote:
>> >
>> > > Pascal wrote:
>> > > > for clarity, the answer is,
>> > >
>> > > No hints, please! Anyone who wants to know the answer can just scroll
>> > down
>> > > in Raul’s original message.
>> > >
>> > > -Dan
>> > > ----------------------------------------------------------------------
>> > > 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
>>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm