in reply to Re: JAPH with constraints
in thread JAPH with constraints

Uhm, sorry. It was me :) (49)

die$;!~y//.-~/c.$;.([$^=~/./g]&~$").$&.($;&{}).$/

69 for truly EBCDIC:

[]=~/./;$;=$_=$&;$;++for$^F..ord$/;die$;.$_.$&x$^=~/.$/.{}!~/./.$&.$/

Replies are listed 'Best First'.
Re: Re: Re: JAPH with constraints
by behroozi (Beadle) on Jan 05, 2003 at 14:43 UTC
    The first one is very nice! However, the second one contains the variable $^F, which is not allowed by the constraints.

      Well, that ^F can be hardcoded (, "\006") :) But ok, it isn't (67):

      []=~/./;$;=$_=$&;$;++for$^=~/.$/..~-ord$/;die$;.$_.$&.{}!~/./.$&.$/

      Also, "~" in your solution probably should be "\\" because "~" in EBCDIC is lower than alphanumerics.

      It's very interesting what're other ways to get "J" under such constraints. I found only ">" and "?" pair that is on the same distance (1) in both tables, so maybe "K" can be transliterated to "J".

        Actually, my solution is not supposed to work in EBCDIC; I would be very surprised if it printed anything beyond the 'A' and the newline correctly on such systems. However, you deserve high praise (which, as soon as I leave initiate status, I will quantify) for your solution!