Not sure if this shorter or exaclty correct, but it may be a starting point...
    (65 96 +"0 1 i.26) (13&|."1)@:[} i.128

On Tue, Oct 20, 2009 at 1:24 PM, Michael Dykman <[email protected]> wrote:
> umm..wrong example:
>
>
> rot13 =: (13 & (+:@[ | +)) &.((-&97)@(a.&i.))
> rot13 'apple'
> nccyr
>
>
>  - md
>
> On Tue, Oct 20, 2009 at 1:22 PM, Michael Dykman <[email protected]> wrote:
>> Here is one that works on lower case alone..
>>
>>   rot13 =: (13 & (+:@[ | +)) &.((-&97)@(a.&i.))
>>   rot13 apple
>>
>>
>> On Tue, Oct 20, 2009 at 12:51 PM, Raul Miller <[email protected]> wrote:
>>> When reading http://www.miranda.org/~jkominek/rot13/
>>> I noticed they had a K implementation, but not a J
>>> implementation.
>>>
>>> I tried my hand, and I can not quite match the K
>>> implementation for conciseness.
>>>
>>> rot13=: {&((+...@#)65 13 13 6 13 13 133#7$0 13 _13)&.(a.&i.)
>>>
>>> I searched the forums and did not find anything shorter.
>>>
>>> I think we should have a more concise way of
>>> expressing the constant
>>>   (+...@#)65 13 13 6 13 13 133#7$0 13 _13
>>> perhaps something which uses amend?
>>>
>>> That said, you should probably not try this:
>>>   q:A.(+...@#)65 13 13 6 13 13 133#7$0 13 _13
>>> unless you are prepared to use jbreak.
>>>
>>> --
>>> Raul
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>>
>>
>>
>> --
>>  - michael dykman
>>  - [email protected]
>>
>> "May you live every day of your life."
>>    Jonathan Swift
>>
>
>
>
> --
>  - michael dykman
>  - [email protected]
>
> "May you live every day of your life."
>    Jonathan Swift
> ----------------------------------------------------------------------
> 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