I had one more step:

words3=: 13 : ';:'' ''(([: I. tolower = toupper) y)}tolower y'
   (words A)-:words3 A
1

Linda

-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Linda A Alvord
Sent: Thursday, February 4, 2016 2:25 PM
To: [email protected]
Subject: Re: [Jprogramming] k programming challenge

Here's a version of Raul''s "words". 
It eliminates At, Atop, Gerund and Rank.
It should work in JTECH Grade 4.

require'csv web/gethttp'
const=: gethttp 'http://usconstitution.net/const.txt'
words=: [: ;: ' '"_`(I.@:= toupper)`]}~@tolower ]A=:'Sea a Seahorse." "Where?" 
"The Seashore!'
words2=: 13 : ';:'' ''(([: I. tolower = toupper) y)}tolower y'
(words A)-:words2 A

('solution.txt';'|';'') writedsv~ |."1\:~ (<@#/.~,.~.)words const
('solution.txt';'|';'') writedsv~ |."1\:~ (<@#/.~,.~.)words2 const

Maybe you can simplify it. 

Linda

-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Linda A Alvord
Sent: Saturday, January 30, 2016 7:25 AM
To: [email protected]
Subject: Re: [Jprogramming] k programming challenge

The Power of Words!

require'csv web/gethttp'
]A=:'"Sea a Seahorse." "Where?" "The Seashore!'
words=: [: ;: ' '"_`(I.@:= toupper)`]}~@tolower ;:A words A (,.;:A);<,.words A

Linda

-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Brian Schott
Sent: Thursday, January 28, 2016 9:40 AM
To: Programming forum
Subject: Re: [Jprogramming] k programming challenge

Henry,

Yes, your information makes the Dissect much more useful.
I'm sorry for mistaking |. for I. And now I notice that the alternating colors 
of the numbers in that block are signal 2  first single digit numbers, followed 
by double digit numbers. Before I thought they were all double digit and I 
could make no sense of the block.

(I was disappointed in the linewrap problems in your reply so I tried using 
jsoftware.com/forumsearch but unfortunately I could not find my message
there.)

Thanks,


([: ;: ' '"_`(I.@:= toupper)`]}~@tolower)y
+----------------------------------+
                                           |                 y
   |
                                           |                 66
  |
                                           |Though, of course, it's po...
  |
                                           |
   |

 +-----------------+----------------+
                                                             |

 +-----------------+----------------+
                                           |           tolower 1
   |
                                           |though, of course, it's po...
  |
                                           |
   |
                                           |
   |

 +----------------------------------+
                +-+------------+--------+--------------------|
                | |            |        |
 +----------------------------------+
                | |            |        |  |           toupper 1
   |
                | |            |        |  |THOUGH, OF COURSE, IT'S PO...
  |
                | |            |        |  |
   |
         +------+-+-+          |        |  |
   |
         | 1 (m"_) 1|          |        |
 +-----------------+----------------+
         |    atom  |          |        +---------------|    |
         |          |          |
+-------------------+--------------+
         +-----+----+          |         |               0=0
 |
               |               |         |                66
 |
 +-------------+---------------+-+       |0000001000...
|
 |            0 m} 1             |       |
 |
 |              66               |
+-----------------------------+----+
 |though of course it s po...    |               +---------------+     |
 +--------------+----------------+---------------+      I. 1     |     |
                |                                |       12      +-----+
 +--------------+----------------+               |69161720223134 |
 |             ;: 11             |               +---------------+
 |though|of|course|it|s|po...    |
 |                               |
 +-------------------------------+


On Wed, Jan 27, 2016 at 4:26 PM, Henry Rich <[email protected]> wrote:

> That's not |. in the lower-right - it's I.
>
> Dissect displays ~ indirectly: by switching the wiring (for x u~ y) or 
> wiring a result to both x and y (for u~ y).
>
> Here, the display is streamlined considerably: the block for ] is 
> deleted (replaced by a wire) and the verb ' '"_ is shown simply as a 
> constant.  The m} block has a left input from ' '"_, a right input 
> from tolower, and a control input (on the right) from I. .  tolower feeds 
> into 3 blocks:
> toupper, =, and m} .
>
> If you want to see more of the original, you can go to Preferences and 
> check 'Show ][ and 0-9:'.  See if you like that better.
>
> Henry Rich
>
>
>
>> ([: ;: ' '"_`(I.@:= toupper)`]}~@tolower)y
>> +----------------------------------+
>>                                             |                 y
>>     |
>>                                             |                 66
>>    |
>>                                             |Though, of course, it's po...
>>    |
>>                                             |
>>     |
>>
>>   +-----------------+----------------+
>>                                                               |
>>
>>   +-----------------+----------------+
>>                                             |           tolower 1
>>     |
>>                                             |though, of course, it's po...
>>    |
>>                                             |
>>     |
>>                                             |
>>     |
>>
>>   +-----------------+----------------+
>>                                                               |
>>
>>   +-----------------+----------------+
>>                                             |           toupper 1
>>     |
>>                                             |THOUGH, OF COURSE, IT'S PO...
>>    |
>>                                             |
>>     |
>>           +----------+                      |
>>     |
>>           | 1 (m"_) 1|
>>   +-----------------+----------------+
>>           |    atom  |                                        |
>>           |          |
>>   +-------------------+--------------+
>>           +-----+----+                    |               0=0
>>   |
>>                 |                         |                66
>>   |
>>   +-------------+-----------------+       |0000001000...
>> |
>>   |            0 m} 1             |       |
>>   |
>>   |              66               |
>> +-----------------------------+----+
>>   |though of course it s po...    |               +---------------+     |
>>   +--------------+----------------+---------------+      |. 1     |     |
>>                  |                                |       12      +-----+
>>   +--------------+----------------+               |69161720223134 |
>>   |             ;: 11             |               +---------------+
>>   |though|of|course|it|s|po...    |
>>   |                               |
>>   +-------------------------------+
>>
>>
>>
>>
>>
>
> --
(B=)
​​
----------------------------------------------------------------------
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

Reply via email to