NB. choices for input are ARGV_j_ or 1!:1[1 NB. These two sentences are one line apiece
,.^:('.'e.t)s{ ::($:&}.)~n+1+{.t i.~s=:a.{~,65 97+/26| i.51[n=:i.25[t=.1!:1[1 NB. rdm ,.^:('.'e.L)(a.{~(_ 65 _ 97{~64 90 96 122&I.)+(26|i._26 25){~32<:@| ]) ::(0&$)a.i.{.L=.1!:1[1 NB. dwl The concept: index into all #a. (256) possible answers. My implementation indexes into 26 partial alphabet sets, adds an ASCII offset depending on the interval, and converts back to text or throws an adversity. Handling the dot input was an after thought because I didn't catch on at first read of problem. Maybe this will inspire you to find a truly short solution. > 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! ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm