bob therriault-2 wrote:
> 
> Actual 66 character version after eliminating unnecessary conversions from
> a. and back
> 
> (,.@]^:('.'e.[)(a{~(>:i.25)+(a=.a.{~,65 97+/26|i.51)i.{.)) ::(0$]) 'e.'
> 
> Surprisingly, removing assignments makes it one character longer
> 
> (,.@]^:('.'e.[)(a.{~,65 97+/26|i.51)&([{~(>:i.25)+[i.{.@])) ::(0$]) 'e'
> 
They can be of equal length if [i.{.@] is replaced by (i.{.) as in

(,.@]^:('.'e.[)(a.{~,65 97+/26|i.51)&([{~(>:i.25)+(i.{.))) ::(0$]) 'e'

which can be furthermore shortened by 2 characters by replacing
 
  ([{~(>:i.25)+[i.{.@])

with

  (25{.[|.~1+(i.{.))

giving  

(,.@]^:('.'e.[)(a.{~,65 97+/26|i.51)&(25{.[|.~1+(i.{.))) ::(0$]) 'e'


> cheers, bob
> 
> On 2012-08-24, at 5:16 PM, bob therriault wrote:
> 
>> 67 characters with same issue that Raul mentions that argument would need
>> to be quoted.
>> 
>> (,.@]^:('.'e.[)(a.{~a{~(>:i.25)+(a=.,65 97+/26|i.51)i.a.i.{.)) ::(0$])   
>> 'f'
>> 
>> spaced below for legibility
>> 
>> (,.@]^:('.'e.[)              (a.{~a{~(>:i.25)+(a=.,65
>> 97+/26|i.51)i.a.i.{.))     ::      (0$])
>> decision output          generate  list                                      
>>                         
>> input error
>> 
>> cheers, bob
>> 
>> On 2012-08-24, at 12:16 PM, Raul Miller wrote:
>> 
>>> I'm not sure how to express that here.
>>> 
>>> Consider, for example:
>>>  ,.^:('.'e.t)s{ ::($:&}.)~n+1+{.t i.~s=:a.{~,65 97+/26|i.51[n=:i.25[t=.
>>> 
>>> Here, I need would need quotes around the argument.  And, it's still
>>> 70 characters.
>>> 
>>> -- 
>>> Raul
>>> 
>>> On Fri, Aug 24, 2012 at 3:01 PM, Roger Hui <rogerhui.can...@gmail.com>
>>> wrote:
>>>> I think it is customary to assume that the input is just an argument. 
>>>> The
>>>> q solution so assumes.
>>>> 
>>>> 
>>>> 
>>>> On Fri, Aug 24, 2012 at 11:38 AM, Raul Miller <rauldmil...@gmail.com>
>>>> wrote:
>>>> 
>>>>> On Fri, Aug 24, 2012 at 2:00 PM, Roger Hui <rogerhui.can...@gmail.com>
>>>>> wrote:
>>>>>> http://codegolf.stackexchange.com/questions/7036/print-custom-alphabet
>>>>>> 
>>>>>> The gauntlet is thrown!
>>>>> 
>>>>> The best I can see, right now, is:
>>>>>  ,.^:('.'e.t)s{ ::($:&}.)~n+1+s i.{.t=.1!:1##s=:a.{~,65
>>>>> 97+/26|i.51[n=:i.25
>>>>> 
>>>>> And this is 74 characters long -- 42% longer than another entry.
>>>>> 
>>>>> Note that I am using something like 9 characters for the action of
>>>>> reading input, and another 10 to give an empty result in an adverse
>>>>> case.
>>>>> 
>>>>> --
>>>>> Raul
>>>>> ----------------------------------------------------------------------
>>>>> 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
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Print-Custom-Alphabet-tp34345428s24193p34347462.html
Sent from the J Programming mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to