I had actually forgotten that $s ends up with 10 at the end. Having briefly played with getting it to print I must have just forgotten that I'd left it there. This is of course evidence of similar laziness to that which left me without the comma. Your calculation of the value to append a comma is much appreciated and shall be included. In the end, I suppose matching the classic "Just another Perl hacker," is more satisfying than getting the newline to print. ++, naturally.
On the subject of satisfaction, I'm caught between being happy and unsatisfied with this. Part of me knows that I'm just a young'un (read: college student) who'll learn more later and write bigger (okay, not much bigger) and better JAPHs (and, you know, actual code), but part of me is quite unsatisfied with the mundanity of this. It seems very simple to my mind to just slap some ASCII values together and print them with chr. (I hadn't wanted to write this in the original node since it seemed as though it would be too much in the vein of "here's something that I feel is inadequate, please let me make excuses about it." Instead it just encouraged me to obfuscate it more before posting.)
Too bad that even avoiding copy and paste, one doesn't get any better at JAPHs or obfuscation by typing out classic code, like students of music or painting copying and recopying great works of art by hand. I guess I'll keep on studying the examples of other, better monks, and actually try to understand them.
| [reply] |
Instead of a newline, you can try appending a "\e[E". It will work on some terminals, and doesn't have low characters. (It might not work on windows, but there it's less important because DOS shells traditionally output a newline before the prompt while unix shells don't. The only problem is that it might print some junk characters.)
| [reply] [d/l] |
| [reply] |
print 4
Meets spec for the problem of Adding 2 + 2. I suppose this meets spec for a JAPH. I'm still working on breaking down your latest, and enjoying it thoroughly.
| [reply] [d/l] |