AG=Alex Gian,DM=Devon McCormick, DB=me

AG>  Thanks Dan and Devon

If it interests you, those two responses illustrated the two "digitization"
approaches you outlined, respectively:

AG>  the more common repeated integer division

DB>  10&#.^:_1

This phrase is (strictly) arithmetic, which is why I prefer it.  (By the
way, you might get more use out of it if you spelled _1 as _1:  , so you
will require parenthesis less often.)

AG>  the Perl-like conversion to a string 
AG>  which is then split or "exploded"

DM>      ".&>&.>":&.>nums
DM>  +-+-+---+-----+-------+
DM>  |0|1|1 1|1 0 1|1 2 3 4|
DM>  +-+-+---+-----+-------+

Another way to phrase this is  "."0@":  (which formulation is supported by
special [fast] code [2] ).

But since we're talking about Jems today, let's try to find something a
little more lovely:

                   ,.&.": 1000
        1 0 0 0  

Arie Groeneveld came up with it in [1] . It perfectly illustrates (actually
epitomizes) the Perl approach of projection into the string domain,
transformation, and return.  Definitely a Jem.  

-Dan

[1]  "."0@":
http://www.jsoftware.com/pipermail/programming/2008-August/011601.html
[2]  Special code for http://www.jsoftware.com/help/release/digits10.htm 




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

Reply via email to