After writing Spiro Japh, I wished I had thought to use color. But when ikegami very kindly pointed out to me the existence of the excellent Win32::Console::ANSI module, I created Spiro Japh 2, which works colorfully in both Linux and Windows ...
(You will need to install the Win32::Console::ANSI module to run it under Windows)
#!/usr/bin/perl -w -w -w -w -w
eval{ require Win32::Console::ANSI;
};sub ::{printf @_ } sub sub{
rand 39/999} sub O123 {::
"" ."\e[%d" .";%dH%s" ,@_
;}; sub l234 {O123 $|= 1
,1, "\e[J"} while(1) {
$c or do {::"\e[1" ."".
"" .";%dm", 30+ rand
7 ; l234;$u=&sub ;$v =
&sub ;$ c= 3999 ;$b=qw
/19 9 1/[int rand 3 ]};O123
11*sin( $v* $c)+ 13,39*cos ($u*$c)+41,
qw+J A P H+[$c%4] ;($a++%$b)or$c--;}
Edit by demerphq: restored code tags
Edit by holli: restored [, ] and &'s and fixed links to monastery format
Re: Spiro Japh 2
by udyog (Acolyte) on Sep 08, 2005 at 02:21 UTC
|
Hello Brilliant!!
Its nice one!! Great!!
And, I am very interest to know the Obfuscation code. Is there any tutorial or any other help please.
Thank You.
| [reply] |
|
| [reply] |
|
| [reply] [d/l] |
|
|
Re: Spiro Japh 2
by sh1tn (Priest) on Sep 04, 2005 at 14:09 UTC
|
excellent && of course ++
| [reply] |
Re: Spiro Japh 2
by demerphq (Chancellor) on Sep 05, 2005 at 09:57 UTC
|
A minor comment. We use <code></code> tags here for a reason. People use the site in different ways and like to have control over how code is rendered for them. When you post your code as you have you break this, which people find annoying. Its real easy to see your code as literal text if you use <code> tags even if it doesnt always render exactly as you might like for every users personal settings. But thats the point of personal settings, the user wants to choose and not simply accept what the author is willing to provide.
Anyway, I quite enjoyed the posting. Thanks.
---
$world=~s/war/peace/g
| [reply] [d/l] [select] |
|
I'm sorry, demerphq, I thought that I did use code tags, except for the text preceding the code. The first time I submitted code (and thereafter as well), I used the same formatting tags that another monk had used, and perhaps that's why I didn't get it right -- in the future I'll just use '<code></code>' instead. Anyway, thanks for fixing it!
| [reply] |
Re: Spiro Japh 2
by holli (Abbot) on Sep 03, 2005 at 16:35 UTC
|
| [reply] |
Re: Spiro Japh 2
by QM (Parson) on Sep 15, 2005 at 20:49 UTC
|
Taking that a bit further...
Why have warnings on if it's not warnings clean?
Also, why not print the whole thing instead of the initials? You can probably do way better than this, but I'm just making the suggestion.
#!/usr/bin/perl -- unless don't
eval{ require Win32::Console::ANSI;
};sub ::{printf @_ } sub sub{
rand 39/999} sub O123 {::
"" ."\e[%d" .";%dH%s" ,@_
;}; sub l234 {O123 $|= 1
,1, "\e[J"} while(1) {
$c or do {::"\e[1" ."".
"" .";%dm", 30+ rand
7 ; l234;$u=&sub ;$v =
&sub ;$ c= 3999 ;$b=qw
/19 9 1/[int rand 3 ]};O123
11*sin( $v* $c)+ 13,39*cos ($u*$c)+41,
qw+J u s t A n o t h e r P e
r l H a c k e r+[$c
%21]; ($a++%
$b) or $c--;}
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] [d/l] |
|
I'll be honest with you, I think it's better with with just the letters "JAPH" (or even "Japh"), as there's too much jibberish when you use all 4 words. Additionally, the new picture looks worse, partly since it's -supposed- to be one of the self-generated patterns, and partly because it's just graphically not as good (eg. the dangling 'or' at the bottom looks out-of-place).
But I'll agree with you on the warnings. What happened was that after developing it under Windows, when I tried it the first time on Linux, I didn't actually see the warnings until long after I'd published it.
| [reply] |
|
...the new picture looks worse, partly since it's -supposed- to be one of the self-generated patterns, and partly because it's just graphically not as good (eg. the dangling 'or' at the bottom looks out-of-place).
So reformat it. Seriously, I just took a quick stab at it. I don't have the patience or skills, but I admire them in others.
But I'll agree with you on the warnings. What happened was that after developing it under Windows, when I tried it the first time on Linux, I didn't actually see the warnings until long after I'd published it.
I apologize in advance, but I don't run any program without running perl -c against it first, even for trivial edits. Many programs spew data (or runtime warnings) causing compiler warnings to scroll off the buffer, never to be seen again.
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] |
|
|