This would be the natural output for a "real" J verb, buy to keep solutions -- 
and code sizes -- comparable, answers in all languages must produce identical 
output. 

-Dan

Please excuse typos; composed on a handheld device.

On Jul 23, 2013, at 1:20 AM, bob therriault <[email protected]> wrote:

> I'm almost embarrassed to suggest this to such an elegant solution, but we 
> can get down to 42 if can leave it in boxed form. 
> 
>   c=:({&' *';2*+/@,%#*#)@:>_2{.\|@j./~@i:@<:
>   c 8
> ┌───────────────┬─────┐
> │    *******    │3.125│
> │ ************* │     │
> │***************│     │
> │***************│     │
> │***************│     │
> │***************│     │
> │ ************* │     │
> │    *******    │     │
> └───────────────┴─────┘
> 
> cheers, bob
> 
> 
> On 2013-07-22, at 9:42 PM, Skip Cave wrote:
> 
>> The J code on SO for odd numbers is missing the ">"
>> 
>> This is what is posted on SO:
>> c=:*:({&' *'@],&":2%(%+/@,))] (|@j./~2&|#])@i:@<:
>> c 13
>> |index error: c
>> 
>> This is what it should be:
>> c=:*:({&' *'@],&":2%(%+/@,))]>(|@j./~2&|#])@i:@<:
>> 
>> Skip
>> 
>> On Mon, Jul 22, 2013 at 9:13 PM, Marshall Lochbaum 
>> <[email protected]>wrote:
>> 
>>> I don't have an SO account, so go ahead and post that. While I'm at it,
>>> I shaved a character off the original by noting that the length of the
>>> circle is half the diameter for even lengths. This doesn't hold for odd
>>> lengths, so it won't help there.
>>> 
>>> c=:({&' *',&":2*+/@,%*:@#)@:>_2{.\|@j./~@i:@<:
>>> 
>>> Marshall
>>> 
>>> On Mon, Jul 22, 2013 at 10:07:57PM -0400, Dan Bron wrote:
>>>> Oh! Nice.  If you have an account on SO feel free to post it, I'll vote
>>> it
>>>> up past my original. If you don't, I'll replace mine with yours and link
>>> to
>>>> your message on the Forum.
>>>> 
>>>> -Dan
>> 
>> 
>> -- 
>> Skip Cave
>> Cave Consulting LLC
>> ----------------------------------------------------------------------
>> 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