in reply to My first JAPH

I haven't quite got it - are you attacking the prng?


I humbly seek wisdom.

Replies are listed 'Best First'.
Re^2: My first JAPH
by cuber (Acolyte) on Oct 30, 2007 at 16:06 UTC

    Sorry, my English isn't very good. What do you mean?

    --
    Johannes Laire

      PRNG: Pseudo Random Number Generator

      I don't quit understand how the rand function works in this JAPH. That's part of what makes it a cool JAPH; I don't quite understand it.


      I humbly seek wisdom.

        Ah, thanks!

        The key idea is that if you print a string of length n, then "\r", and then a string of length n-1, the last char of the first string remains visible.

        The loop just prints random strings of length $" (followed by "\r") until the last char matches the corresponding char in "Just another Perl hacker,". Then $" is decremented, and this is repeated until $" is zero. The explanation might or might not help.

        I got somewhat esoteric ideas when golfing this and the final JAPH is indeed quite difficult to understand; even for me, after not thinking about it for a while.

        --
        Johannes Laire