Message from discussion
Code golf
Received: by 10.66.85.136 with SMTP id h8mr3500384paz.46.1348964807024;
Sat, 29 Sep 2012 17:26:47 -0700 (PDT)
Path: t10ni23595808pbh.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!news.mi.ras.ru!goblin-spool!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail
From: "James J. Weinkam" <j...@cs.sfu.ca>
Newsgroups: comp.lang.apl
Subject: Re: Code golf
Date: Mon, 24 Sep 2012 12:47:18 -0700
Organization: Aioe.org NNTP Server
Lines: 56
Message-ID: <k3qdc2$210$1@speranza.aioe.org>
References: <8ddfb6bc-c1c1-4d6a-b84e-37d5e08efaa2@googlegroups.com> <6KydnZMn1IOjJKbNnZ2dnUVZ_rOdnZ2d@giganews.com> <K--dnX8scehEgKPNnZ2dnUVZ7qSdnZ2d@bt.com> <L-adnfdV_4cwpKLNnZ2dnUVZ8sidnZ2d@bt.com> <6687f7ad-a0af-4c13-a679-d48989aae184@googlegroups.com> <61b85632-73da-4c0c-8c95-331e2ad0df89@googlegroups.com> <7a705c8a-3c5a-4057-ab3c-fea60c52fa02@googlegroups.com> <k3lbfa$uuo$1@speranza.aioe.org> <2e5259fc-0e77-4146-abc4-f00225bacd54@googlegroups.com> <k3o7es$pdc$1@speranza.aioe.org> <454f7718-674d-409b-9aa9-833c0bc24e22@googlegroups.com>
NNTP-Posting-Host: xBTklJyDWhOEJccjfdB0Jg.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.5) Gecko/20120603 Firefox/10.0.5 SeaMonkey/2.7.2
X-Notice: Filtered by postfilter v. 0.8.2
Bytes: 4433
X-Received-Bytes: 4541
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
david.dooner%upr....@gtempaccount.com wrote:
> All,
>
> If I am not mistaken, the original post provided the following link
>
> http://codegolf.stackexchange.com/questions/7036/print-custom-alphabet
>
> Is this the correct link with all the details? If not, please share th=
e proper link. If so, please share where inputs such as =E2=80=98s.z=E2=80=
=99 and =E2=80=98dc=E2=80=99 are not allowed. Also, if a letter is not f=
ollowed by a period, please indicate where in the challenge that the numb=
er of characters displayed totals 49.
>
> Thanks,
> David
>
>
>
> On Sunday, September 23, 2012 7:54:06 PM UTC-4, James J. Weinkam wrote:=
>> Morten Kromberg wrote:> On Saturday, 22 September 2012 23:44:16 UTC+2=
, James J. Weinkam wrote:>> It looks to me as if your version will accep=
t invalid inputs such as 's.z' and 'Q '.> > Yes, I am not sure how stri=
ct the validation needs to be, perhaps I need to read the original proble=
m statement more carefully. I have looked at it, and the consensus is tha=
t valid input consists of a single upper or lower case alphabetic charact=
er optionally followed by a period. If the input is invalid, nothing what=
ever is to be displayed. If the input is valid the alphabet is to be disp=
layed in the same case as the input character, starting with the characte=
r following the input character and ending with the character just before=
it in cyclic order. If a period was specified, each output character is =
to be displayed by itself on a separate line. If a period was not specifi=
ed, the 25 letters are to be separated by 24 spaces on a single line (49 =
characters in all).> >> Also, I don't understa
nd how the result of rotate becomes a 1 column matrix or where the decisi=
on to display as a row or column occurs.> > Turning the data into a 1 c=
olumn matrix is done by the monadic commabar (=E2=8D=AA - UCS 9066). The =
decision to display as a row or column is a result of padding each row wi=
th either space (UCS 32=3D13+19) or carriage return (UCS 13), before the =
final ravel.> Aha! Another Dyalog feature I didn't know about; that make=
s four now - I learned about guards in dynamic functions, the commute ope=
rator, and the fact the squad can take a partial left argument from Aaron=
Hsu's solution. I have downloaded a copy of the Dyalog Reference Manual =
and skimmed through it. I thought I had spotted most of the differences b=
etween Dyalog and APL2 but more keep cropping up. By the way, when I was =
struggling with guard, that fact that I didn't know what it was called co=
upled with the fact the ':' is not in the symbol index except as a label =
indicator made it hard for me to look it up myself. Thank
s to Aaron for pointing me in the right direction.
>
The statement of the challenge uses the phrase "separated by" not "follow=
ed by." Also, the challenge is accompanied by=20
examples of correct input and the required output. If you highlight the o=
utputs shown you will see that there are no=20
leading or trailing spaces in either format.