[Jprogramming] Table of Verbs
Raul Miller
rauldmiller at gmail.com
Mon Apr 15 12:23:08 UTC 2013
U=: T (4 :'<y`:0 x'"_ 0&)
U i. 2 2
+---+---+
|2 4|0 2|
| |1 3|
+---+---+
|2 3|_2 |
|0 1| |
+---+---+
--
Raul
On Mon, Apr 15, 2013 at 6:15 AM, km <km at math.uh.edu> wrote:
> Your use of `: is very neat, thank you, but the desired results are those of U below. --Kip
>
> T =: 2 2 $ +/`|:`|.`(-/ .*)
> <"2 (T `: 0) i. 2 2
> +---+----+
> |2 4|0 2 |
> |0 0|1 3 |
> +---+----+
> |2 3|_2 0|
> |0 1| 0 0|
> +---+----+
> <"2 (T `: 0) i. 3 3
> +-------+-----+
> |9 12 15|0 3 6|
> |0 0 0|1 4 7|
> |0 0 0|2 5 8|
> +-------+-----+
> |6 7 8 |0 0 0|
> |3 4 5 |0 0 0|
> |0 1 2 |0 0 0|
> +-------+-----+
>
> U i.2 2
> +---+---+
> |2 4|0 2|
> | |1 3|
> +---+---+
> |2 3|_2 |
> |0 1| |
> +---+---+
> U i. 3 3
> +-------+-----+
> |9 12 15|0 3 6|
> | |1 4 7|
> | |2 5 8|
> +-------+-----+
> |6 7 8 |0 |
> |3 4 5 | |
> |0 1 2 | |
> +-------+-----+
> U
> 2 2 $ +/ ; |: ; |. ; -/ .*
>
>
> Sent from my iPad
>
>
> On Apr 15, 2013, at 4:15 AM, Jan-Pieter Jacobs <janpieter.jacobs at gmail.com> wrote:
>
>> I think the answer can be even more compact using the Evoke Gerund
>> conjunction:
>>
>> T =: 2 2 $ +/`|:`|.`(-/ .*)
>> <"2 (T `: 0) i. 2 2
>> <"2 (T `: 0) i. 3 3
>>
>> Jan-Pieter
>>
>>
>> 2013/4/15 Linda Alvord <lindaalvord at verizon.net>
>>
>>>
>>> A=:i.2 2
>>> <"2 "."1 (>"0 f)(,"1)2 2 1$'A'
>>> ----T----┐
>>> │2 4│0 2 │
>>> │0 0│1 3 │
>>> +---+----+
>>> │2 3│_2 0│
>>> │0 1│ 0 0│
>>> L---+-----
>>>
>>> <"2 "."1 (>"0 f)(,"1)2 2 1$'B'
>>> --------T-----┐
>>> │9 12 15│0 3 6│
>>> │0 0 0│1 4 7│
>>> │0 0 0│2 5 8│
>>> +-------+-----+
>>> │6 7 8 │0 0 0│
>>> │3 4 5 │0 0 0│
>>> │0 1 2 │0 0 0│
>>> L-------+------
>>>
>>>
>>> This is getting closer to the answer. Linda
>>>
>>> -----Original Message-----
>>> From: programming-bounces at forums.jsoftware.com
>>> [mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Linda
>>> Alvord
>>> Sent: Sunday, April 14, 2013 12:15 PM
>>> To: programming at jsoftware.com
>>> Subject: Re: [Jprogramming] Table of Verbs
>>>
>>> You just need to exclude the extra zeros somehow.
>>>
>>> A=:>:i.2 2
>>> f=: 2 2$ '+/';'|:';'|.';'-/ .*'
>>> "."1 (>"0 f)(,"1)2 2 1$'A'
>>> 4 6
>>> 0 0
>>>
>>> 1 3
>>> 2 4
>>>
>>>
>>> 3 4
>>> 1 2
>>>
>>> _2 0
>>> 0 0
>>>
>>> Linda
>>>
>>>
>>> -----Original Message-----
>>> From: programming-bounces at forums.jsoftware.com
>>> [mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Raul Miller
>>> Sent: Sunday, April 14, 2013 11:45 AM
>>> To: Programming forum
>>> Subject: Re: [Jprogramming] Table of Verbs
>>>
>>> Paper and pencil is a powerful tool of thought. I have yet to see an
>>> adequate replacement in any computing environment.
>>>
>>> --
>>> Raul
>>>
>>> On Sun, Apr 14, 2013 at 10:41 AM, km <km at math.uh.edu> wrote:
>>>> It would be nice if there were a simple way to transform your T into U :
>>>>
>>>> U =: 2 2 $ +/ ; |: ; |. ; -/ . *
>>>> U i. 2 2
>>>> +---+---+
>>>> |2 4|0 2|
>>>> | |1 3|
>>>> +---+---+
>>>> |2 3|_2 |
>>>> |0 1| |
>>>> +---+---+
>>>> U i. 3 3
>>>> +-------+-----+
>>>> |9 12 15|0 3 6|
>>>> | |1 4 7|
>>>> | |2 5 8|
>>>> +-------+-----+
>>>> |6 7 8 |0 |
>>>> |3 4 5 | |
>>>> |0 1 2 | |
>>>> +-------+-----+
>>>> U
>>>> 2 2 $ +/ ; |: ; |. ; -/ .*
>>>>
>>>> P.S. I probably should have said "One of Ken's handwritten notes for
>>> Linda".
>>>>
>>>> --Kip
>>>>
>>>> Sent from my iPad
>>>>
>>>>
>>>> On Apr 14, 2013, at 9:40 AM, Dan Bron <j at bron.us> wrote:
>>>>
>>>>> I wasn't wanting any behavior; I was just answering your question.
>>>>> Is
>>> there something else you wanted, having read Ken's paper (i.e. some other
>>> question than how to make a table of verbs in J)?
>>>>>
>>>>> -Dan
>>>>>
>>>>> Please excuse typos; composed on a handheld device.
>>>>>
>>>>> On Apr 14, 2013, at 9:00 AM, km <km at math.uh.edu> wrote:
>>>>>
>>>>>> Is this the behavior you want?
>>>>>>
>>>>>> T =: 2 2 $ +/`|:`|.`(-/ .*)
>>>>>> T i. 2 2
>>>>>> 2
>>>>>> T i. 3 3
>>>>>> 2
>>>>>> T
>>>>>> +-------+---------------+
>>>>>> |+-+---+||: |
>>>>>> ||/|+-+|| |
>>>>>> || ||+||| |
>>>>>> || |+-+|| |
>>>>>> |+-+---+| |
>>>>>> +-------+---------------+
>>>>>> ||. |+-+-----------+|
>>>>>> | ||.|+-------+-+||
>>>>>> | || ||+-+---+|*|||
>>>>>> | || |||/|+-+|| |||
>>>>>> | || ||| ||-||| |||
>>>>>> | || ||| |+-+|| |||
>>>>>> | || ||+-+---+| |||
>>>>>> | || |+-------+-+||
>>>>>> | |+-+-----------+|
>>>>>> +-------+---------------+
>>>>>>
>>>>>> --Kip
>>>>>>
>>>>>> Sent from my iPad
>>>>>>
>>>>>>
>>>>>> On Apr 14, 2013, at 8:36 AM, Dan Bron <j at bron.us> wrote:
>>>>>>
>>>>>>> 2 2 $ +/`|:`|.`(-/ .*)
>>>>>>>
>>>>>>> Please excuse typos; composed on a handheld device.
>>>>>>>
>>>>>>> On Apr 14, 2013, at 8:24 AM, km <km at math.uh.edu> wrote:
>>>>>>>
>>>>>>>> One of Ken's notes shows a "table of verbs". A two by two example
>>>>>>>> in J might be
>>>>>>>>
>>>>>>>> +/ |:
>>>>>>>>
>>>>>>>> |. -/.*
>>>>>>>>
>>>>>>>> How would you implement such a table in J?
>>>>>>>>
>>>>>>>> --Kip Murray
>>>>>>>>
>>>>>>>> Sent from my iPad
>>>>>>>>
>>>>>>>>
>>>>>>>> On Apr 13, 2013, at 11:53 PM, "Linda Alvord"
>>>>>>>> <lindaalvord at verizon.net>
>>> wrote:
>>>>>>>>
>>>>>>>>> Here are some copies of notes that Ken made over the years.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> http://www.jsoftware.com/jwiki/KenIversonNotes-LindaAlvord
>>>>>>>>>
>>>>>>>>> Linda
>>>>>>>> ------------------------------------------------------------------
>>>>>>>> ---- 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
>>>
>>> ----------------------------------------------------------------------
>>> 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
More information about the Programming
mailing list