Hey Robert, Nice to see a fresh approach.
First impressions: I think that the specs require that the result start with the letter after the input (yours starts with the input letter). I get this result 3 :',.^:(''.''e.y)(o-~a.i.0{y)|.26{.a.}.~o=.98-33^96>a.i.0{y' '[' ABCDEFGHIJKLMNOPQRSTUVWXYZ which is an error that caught me as well (should be no output). cheers, bob On 2012-08-27, at 12:00 PM, Robert Cyr wrote: > You can also save a few keystrokes, even ending up with 53 if you do not > name the thing. > > w=:3 : ',.^:(''.''e.y)(d-o)|.26{.a.}.~o=.98-33^96>d=.a.i.0{y' > > Sent from my iPad > > On 2012-08-27, at 14:40, Robert Cyr <robert....@gmail.com> wrote: > > Or simply: > w=: 3 : ',.^:(''.''e.y)(o-~a.i.0{y)|.26{.a.}.~o=.98-33^96>a.i.0{y' > > w 's.' > stuvwxyzabcdefghijklmnopqr > w 'T.' > T > U > V > W > X > Y > Z > A > B > C > D > E > F > G > H > I > J > K > L > M > N > O > P > Q > R > S > > > On Mon, Aug 27, 2012 at 6:27 AM, R.E. Boss <r.e.b...@planet.nl> wrote: > >> Nice solution. >> >> $(,.@]^:('.'e.[)(a.{~,,.~65 97+/i.26)&(1}.26{.[}.~[i.{.@])) '[' >> 25 >> >> $(,.@]^:('.'e.[)(a.{~,,.~65 97+/i.26)&(1}.26{.[}.~[i.{.@])) '[.' >> 25 1 >> >> >> R.E. Boss >> >> >>> -----Oorspronkelijk bericht----- >>> Van: programming-boun...@forums.jsoftware.com [mailto: >> programming-boun...@forums.jsoftware.com] Namens bob therriault >>> Verzonden: maandag 27 augustus 2012 10:16 >>> Aan: programm...@jsoftware.com >>> Onderwerp: Re: [Jprogramming] Print Custom Alphabet >>> >>> Actually the conversion using &. wasn't required. >>> >>> >>> (,.@]^:('.'e.[)(a.{~,,.~65 97+/i.26)&(1}.26{.[}.~[i.{.@])) 'B.' >>> C >>> D >>> E >>> F >>> G >>> H >>> I >>> J >>> K >>> L >>> M >>> N >>> O >>> P >>> Q >>> R >>> S >>> T >>> U >>> V >>> W >>> X >>> Y >>> Z >>> A >>> (,.@]^:('.'e.[)(a.{~,,.~65 97+/i.26)&(1}.26{.[}.~[i.{.@])) 'j' >>> klmnopqrstuvwxyzabcdefghi >>> (,.@]^:('.'e.[)(a.{~,,.~65 97+/i.26)&(1}.26{.[}.~[i.{.@])) '[' >>> >>> #'(,.@]^:(''.''e.[)(a.{~,,.~65 97+/i.26)&(1}.26{.[}.~[i.{.@]))' >>> 58 >>> >>> Cheers, bob >>> >>> On 2012-08-25, at 3:25 AM, Viktor Cerovski wrote: >>> >>>> >>>> >>>> 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 >>> >>> ---------------------------------------------------------------------- >>> 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