[Jprogramming] My first J conjuction
Linda A Alvord
lindaalvord at verizon.net
Tue Dec 8 06:35:37 UTC 2015
Yes and Me Too
-----Original Message-----
From: programming-bounces at forums.jsoftware.com [mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Don Kelly
Sent: Tuesday, December 8, 2015 12:58 AM
To: programming at jsoftware.com
Subject: Re: [Jprogramming] My first J conjuction
p for Pythagorus theorem?
Don
(apologies for the tree format -I tried to get it to look good but blew it.)
On 12/6/2015 2:36 AM, Linda A Alvord wrote:
> Neat! Guess what p stands for?
>
>
>
> ffp=: 13 : '%:+/*:x,y'
>
> 5!:4 <'ffp'
>
> ┌─ [:
> ├─ %:
> ──┤ ┌─ [:
> │ ├─ / ─── +
> └────┤
> │ ┌─ [:
> └─────┼─ *:
> └─ ,
>
>
>
> Linda
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: programming-bounces at forums.jsoftware.com
> [mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Don
> Kelly
> Sent: Saturday, December 5, 2015 7:23 PM
> To: programming at jsoftware.com
> Subject: Re: [Jprogramming] My first J conjuction
>
>
>
> how about
>
> ff=: 13 : ' +/*:x,y'
>
>
>
> 4 ff 5
>
>
>
> 41
>
>
>
> ff
>
>
>
> [: +/ [: *: , 2 capped forks
>
>
>
>
>
> 5!:4< 'ff'
>
>
>
> *┌─ [: *
>
>
>
> **
>
>
>
> *├─ / ─── + *
>
>
>
> **
>
>
>
> *──┤ *
>
>
>
> **
>
>
>
> *│ ┌─ [:*
>
>
>
> **
>
>
>
> *└─────┼─ *:*
>
>
>
> **
>
>
>
> *└─ , *
>
>
>
>
>
> Don
>
>
>
> On 12/4/2015 7:38 AM, Linda A Alvord wrote:
>
>> g looks more like forks than f:
>>
>> f=: 13 :'x(*:@[ + *:@])y'
>> g=: 13 :'(*:x)+*:y'
>> (4 f 5)-:4 g 5
>> 1
>> 5!:4 <'f'
>> -- *:
>> -- @ -+- [
>> +- +
>> --+ -- *:
>> L- @ -+- ]
>> 5!:4 <'g'
>> -- [:
>> ----+- *:
>> │ L- [
>> --+- +
>> │ -- [:
>> L---+- *:
>> L- ]
>>
>>
>> Linda
>>
>>
>> -----Original Message-----
>> From: <mailto:programming-bounces at forums.jsoftware.com>
>> programming-bounces at forums.jsoftware.com
>> [ <mailto:programming-bounces at forums.jsoftware.com>
>> mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Kip
>> Murray
>> Sent: Friday, December 4, 2015 1:20 AM
>> To: <mailto:programming at jsoftware.com> programming at jsoftware.com
>> Subject: Re: [Jprogramming] My first J conjuction
>>
>> And you can use a fork in the definition of a conjunction:
>>
>> of =: 2 : 'v@[ u v@]'
>> 4 + of *: 5
>> 41
>>
>> On Thursday, December 3, 2015, Kip Murray < <
>> <mailto:thekipmurray at gmail.com> mailto:thekipmurray at gmail.com> <mailto:thekipmurray at gmail.com> thekipmurray at gmail.com> wrote:
>>
>>> A fork is not a conjunction but it shows what you are doing:
>>> 4 (*:@[ + *:@]) 5
>>> 41
>>> On Thursday, December 3, 2015, Lippu Esa <Esa.Lippu at varma.fi
>>> <javascript:_e(%7B%7D,'cvml','Esa.Lippu at varma.fi');>> wrote:
>>>> It is 5:17 AM in Finland and I already have two good answers. Thank
>>>> you David and Pascal!
>>>> It seems that I haven't been using Compose either :) . But at least
>>>> I knew that this is the place to be.
>>>> Thanks again,
>>>> Esa
>>>> -----Original Message-----
>>>> From: < <mailto:programming-bounces at forums.jsoftware.com>
>>>> mailto:programming-bounces at forums.jsoftware.com>
>> <mailto:programming-bounces at forums.jsoftware.com> programming-bounces at forums.jsoftware.com [mailto:
>>>> < <mailto:programming-bounces at forums.jsoftware.com>
>>>> mailto:programming-bounces at forums.jsoftware.com>
>> <mailto:programming-bounces at forums.jsoftware.com>
>> programming-bounces at forums.jsoftware.com] On Behalf Of David Lambert
>>>> Sent: perjantaina 4. joulukuuta 2015 5.14
>>>> To: programming < < <mailto:programming at jsoftware.com>
>>>> mailto:programming at jsoftware.com>
>> <mailto:programming at jsoftware.com> programming at jsoftware.com>
>>>> Subject: Re: [Jprogramming] My first J conjuction I expect you'll
>>>> get many of the same response. Your conjunction is fine, however
>>>> this particular case is so frequent there's a built in conjunction.
>>>> Read "but first",
>>>> x f&g y
>>>> or
>>>> x f&:g y
>>>> the difference being rank. Add but first square:
>>>> 4 +&: *: 5
>>>> 41
>>>> On 12/03/2015 10:05 PM,
>> < <mailto:programming-request at forums.jsoftware.com> mailto:programming-request at forums.jsoftware.com>
>> <mailto:programming-request at forums.jsoftware.com> programming-request at forums.jsoftware.com wrote:
>>>>> Date: Fri, 4 Dec 2015 03:05:50 +0000
>>>>> From: Lippu Esa< < <mailto:Esa.Lippu at varma.fi> mailto:Esa.Lippu at varma.fi> <mailto:Esa.Lippu at varma.fi> Esa.Lippu at varma.fi> To:"
>> < <mailto:programming at jsoftware.com> mailto:programming at jsoftware.com> <mailto:programming at jsoftware.com> programming at jsoftware.com"
>>>>> < < <mailto:programming at jsoftware.com>
>>>>> mailto:programming at jsoftware.com>
>>>>> <mailto:programming at jsoftware.com> programming at jsoftware.com>
>>>>> Subject: [Jprogramming] My first J conjuction
>>>>> Message-ID: <4C1D3F3685BCAE4699AA47F9961903BA33126CC3 at VDOMES02>
>>>>> Content-Type: text/plain; charset="us-ascii"
>>>>> Hello everybody,
>>>>> I realized with some shame that I haven't written a single J
>>>> conjunction - ever. Some adverbs, yes, but they too are newish.
>>>>> I have a recurring need for sentences like (f x) g f y where verb
>>>>> f is
>>>> applied to nouns x and y and dyadic verb g is then applied to the
>>>> two results.
>>>>> and was thinking of something like x f c g y with c being a conjuction.
>>>> This is what was the result:
>>>>> fxgfy=: 2 : 0
>>>>> :
>>>>> (v x) u v y
>>>>> )
>>>>> 4 + fxgfy *: 5 NB. very simple example
>>>>> 4 + fxgfy *: 5
>>>>> 41
>>>>> Is there a more natural J way to do this? What would be a good
>>>>> name for
>>>> this type of conjunction or operation?
>>>>> Esa
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> - For information about J forums see
>>>> < <http://www.jsoftware.com/forums.htm>
>>>> http://www.jsoftware.com/forums.htm>
>> <http://www.jsoftware.com/forums.htm>
>> http://www.jsoftware.com/forums.htm
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> - For information about J forums see
>>>> < <http://www.jsoftware.com/forums.htm>
>>>> http://www.jsoftware.com/forums.htm>
>> <http://www.jsoftware.com/forums.htm>
>> http://www.jsoftware.com/forums.htm
>>> --
>>> Sent from Gmail Mobile
>>
>>
>> --
>> Sent from Gmail Mobile
>> ---------------------------------------------------------------------
>> -
>> For information about J forums see
>> < <http://www.jsoftware.com/forums.htm> http://www.jsoftware.com/forums.htm>
>> <http://www.jsoftware.com/forums.htm>
>> http://www.jsoftware.com/forums.htm
>> ---------------------------------------------------------------------
>> - For information about J forums see
>> <http://www.jsoftware.com/forums.htm>
>> http://www.jsoftware.com/forums.htm
>
>
> ----------------------------------------------------------------------
>
> For information about J forums see
> <http://www.jsoftware.com/forums.htm>
> 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
More information about the Programming
mailing list