Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art, started 18 Aug 2001.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
This is not a question ... call me slow if you like...

This is not a question ... call me slow if you like...

alt.ascii-art · 11 messages · 18 Aug 2001 - 22 Aug 2001
Ilmari Karonen <ilt...@sci.invalid> ASCII art 18 Aug 2001 20:45 · permalink · report
[Crossposted to alt.ascii-art.  For those reading this there, the blocks
of line noise we're discussing are obfuscated Perl programs.]

In article <3B7...@earthlink.net>, Benjamin Goldberg wrote:
>Anno Siegel wrote:
>>
>> We can compress better than that.  The banner uses only two characters, so
>> a single bit can tell which.  It's less true than yours (I had to unify the
>> line length) but it fits in four lines:
>> 
>> use MIME::Base64; $vec = decode_base64( q( vMj5OCHni76DRBEhGkVEFCQkMghfKSK+ry
>> IRQ/hSERF9k4giQh SLiCgog+MQopBDRF8CAAAAAAAAAAAAAAAAAAAAAM93gshx0ncGiIIURFFUgj
>> RA9JXg+4LxlQGebwTRF4xvDBAEJYiiqAQFgOBLTxQ5 6UsDAA==));for($i=0;$i<8*length
>> $vec;$i++) { print "\n" unless $i % 67; print vec( $vec, $i, 1) ? '8' : '_' }
>
>And using just uuencoding works even better, and doesn't require an
>external module:
>
>$u=q{M``````````#@1<['"3E?]!TDB@C1*"*B("&10?A*$?%]%8D8PI>*B.B;1!01
>}. q{MHEA$1$$9'(<0A1PB^A(``````````/!\)X@<)WUG@"A(011%)4@#1%\)OB\8
>}. q{<7QG@^480?<'XQ@!!4((HBDI0``B^]$21D[XT````};$j=unpack("u",$u);
>for(0..938){print vec($j,$_,1)?"8":" ";print"\n"unless(($_+1)%67)}

Clever.  Let's see if a fancier font can be made to work:

y/n/\n/,s/\d+/$"x$&/eg,print for qw'n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3
-_)2_|n\__/\_,_|___/\__|2\__,_|_|1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_
)2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n'

Hey, it even fits in three lines.

Actually, the same trick works pretty nicely for any line-style ASCII
art.  For example:

#!/usr/bin/perl
y/~/\n/,s/\d+/$"x$&/eg,print for qw#~19/`.4/`.~18f3\\2,f2\\~6Gee1Brain,2|
4\\/-`\\2\\6The1same1thing1we1do~3what1do1you4i.2_\\';.,X1j6every1night,1
Pinky.~5want1to1do4`:_\\1(2\\1\\',-.3Try1to1take1over~10tonight?3.'"`\\1a
\\eY'1)3the1world!2_,.~21`._"\\`-'1`-/12.-;'2|~23/;-`._.-';\\.8,',"4|~21.
'/3"'3|1`\\.-'""-/1/6j~19,/1/9i,-"8(2,/2/~16.-'1.f9.'12`"/2/~15/1,,/ffj\\
6/10.-"`.'-.'~14/1/_\\`--//)5\\1,--._1.-'_,-';1/~13f2".-"-._;'6`._1_.,-i;
1/_;1/~13`.,'3|;1\\10\\`\\_,/-'2\\'~14.'4l1\\1`.8/"\\1_1\\`2j~14f6:1`-'8`
._;."/`-'~14|6`.15,Z2\\~14l7j13.'/1-1\\`.~13.j.2.3<12(.'4.\\1\\f`.1|\\,'~
12,'1`.2\\1/1\\11`|6\\,'||-:j~10.'2.'\\3Y.2\\___......__\\1._3/`.||~2__..
_,-"1.-"'"")2/'1,'1_10\\1|2/"-.`j""``---.._~4.'_.-'"5/1.("-'-"":\\8._)|_(
__.1"'~3;.'9/-'---"".--"'7/,_,^-._1.)~3`:=.__.,itz1`---._.;'11""6""~##;-)

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post something,
we discuss its implications.  If the discussion happens to answer a question
you've asked, that's incidental."           -- nobull in comp.lang.perl.misc

Neil Franklin <nei...@franklin.ch.remove> ASCII art 18 Aug 2001 22:28 · permalink · report
posting this from alt.ascii-art...

Ilmari Karonen <ilt...@sci.invalid> writes:

> #!/usr/bin/perl
> y/~/\n/,s/\d+/$"x$&/eg,print for qw#~19/`.4/`.~18f3\\2,f2\\~6Gee1Brain,2|
> 4\\/-`\\2\\6The1same1thing1we1do~3what1do1you4i.2_\\';.,X1j6every1night,1
> Pinky.~5want1to1do4`:_\\1(2\\1\\',-.3Try1to1take1over~10tonight?3.'"`\\1a
> \\eY'1)3the1world!2_,.~21`._"\\`-'1`-/12.-;'2|~23/;-`._.-';\\.8,',"4|~21.
> '/3"'3|1`\\.-'""-/1/6j~19,/1/9i,-"8(2,/2/~16.-'1.f9.'12`"/2/~15/1,,/ffj\\
> 6/10.-"`.'-.'~14/1/_\\`--//)5\\1,--._1.-'_,-';1/~13f2".-"-._;'6`._1_.,-i;
> 1/_;1/~13`.,'3|;1\\10\\`\\_,/-'2\\'~14.'4l1\\1`.8/"\\1_1\\`2j~14f6:1`-'8`
> ._;."/`-'~14|6`.15,Z2\\~14l7j13.'/1-1\\`.~13.j.2.3<12(.'4.\\1\\f`.1|\\,'~
> 12,'1`.2\\1/1\\11`|6\\,'||-:j~10.'2.'\\3Y.2\\___......__\\1._3/`.||~2__..
> _,-"1.-"'"")2/'1,'1_10\\1|2/"-.`j""``---.._~4.'_.-'"5/1.("-'-"":\\8._)|_(
> __.1"'~3;.'9/-'---"".--"'7/,_,^-._1.)~3`:=.__.,itz1`---._.;'11""6""~##;-)

neil@chonsp 0:23:18 ~> cat > 1.pl
#!/usr/bin/perl
y/~/\n/,s/\d+/$"x$&/eg,print for qw#~19/`.4/`.~18f3\\2,f2\\~6Gee1Brain,2|
4\\/-`\\2\\6The1same1thing1we1do~3what1do1you4i.2_\\';.,X1j6every1night,1
Pinky.~5want1to1do4`:_\\1(2\\1\\',-.3Try1to1take1over~10tonight?3.'"`\\1a
\\eY'1)3the1world!2_,.~21`._"\\`-'1`-/12.-;'2|~23/;-`._.-';\\.8,',"4|~21.
'/3"'3|1`\\.-'""-/1/6j~19,/1/9i,-"8(2,/2/~16.-'1.f9.'12`"/2/~15/1,,/ffj\\
6/10.-"`.'-.'~14/1/_\\`--//)5\\1,--._1.-'_,-';1/~13f2".-"-._;'6`._1_.,-i;
1/_;1/~13`.,'3|;1\\10\\`\\_,/-'2\\'~14.'4l1\\1`.8/"\\1_1\\`2j~14f6:1`-'8`
_;."/`-'~14|6`.15,Z2\\~14l7j13.'/1-1\\`.~13.j.2.3<12(.'4.\\1\\f`.1|\\,'~
12,'1`.2\\1/1\\11`|6\\,'||-:j~10.'2.'\\3Y.2\\___......__\\1._3/`.||~2__..
_,-"1.-"'"")2/'1,'1_10\\1|2/"-.`j""``---.._~4.'_.-'"5/1.("-'-"":\\8._)|_(
__.1"'~3;.'9/-'---"".--"'7/,_,^-._1.)~3`:=.__.,itz1`---._.;'11""6""~##;-)
neil@chonsp 0:23:29 ~> perl 1.pl | wc
     27     150    1281
neil@chonsp 0:24:39 ~> wc 1.pl
     12      14     830 1.pl
neil@chonsp 0:24:43 ~>

So we get ASCII Art compression from 27 to 12 lines.

Just bad luck for those who do not have an perl interpreter to
decompress it.

And yes, nice Pinky and the Brain picture.


--
Neil Franklin, nei...@franklin.ch.remove http://neil.franklin.ch/
Hacker, Unix Guru, El Eng HTL/BSc, Sysadmin, Archer, Roleplayer
- Intellectual Property is Intellectual Robbery

I get:
Modification of a read-only value attempted at cosik line 2.

perl 5.6.1.

what gives?

Ilmari Karonen <ilt...@sci.invalid> ASCII art 20 Aug 2001 12:45 · permalink · report
In article <9lqtjq$mnd$1...@kujawiak.man.lodz.pl>, Przemyslaw Brojewski wrote:
>I get:
>Modification of a read-only value attempted at cosik line 2.
>
>perl 5.6.1.

Sorry.  Try the one in my .sig -- the original breaks under perl v5.6.

-- 
# Ilmari Karonen -- http://www.sci.fi/~iltzu/
s''n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3-_)2_|n\__/\_,_|___/\__|2\__,_|_|
1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_)2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\
___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n',y/n\n/\n/d,s/\d+/$"x$&/eg,print;

On 20 Aug 2001 11:51:22 GMT, Przemyslaw Brojewski
<bro...@kis.p.lodz.pl> wrote:

>I get:
>Modification of a read-only value attempted at cosik line 2.
>
>perl 5.6.1.
>
>what gives?

OK, you're slow.

Apparently you tried to modify a read-only value
(a value that cannot be written to) in line 2 of cosik 
(whatever that happens to be). Apparently, perl 5.6.1
regards this as a Bad Thing.

From perldoc perldiag

	Modification of a read-only value attempted
	(F) You tried, directly or indirectly, to change the 
	value of a constant. You didn't, of course, try 2 = 1, 
	since the compiler catches that. But an easy way to do 
	the same thing is:

	sub mod { $_[0] = 1 }
	mod(2);
	Another way is to assign to a substr that's off the end 	
	of the string.

Regards,
Helgi Briem

In alt.ascii-art, Ilmari Karonen  <use...@itz.pp.sci.fi> wrote:
> In article <3B7...@earthlink.net>, Benjamin Goldberg wrote:
> >And using just uuencoding works even better, and doesn't require an
> >external module:
[snip]
> Clever.  Let's see if a fancier font can be made to work:
> y/n/\n/,s/\d+/$"x$&/eg,print for qw'n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3
> -_)2_|n\__/\_,_|___/\__|2\__,_|_|1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_
> )2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n'

Which perl? 5.6.0 is giving me "Modification of a read-only value attempted
at - line 1" for that.

I've got this old one, for 5.6.0 or higher, a bit ugly at 5 lines:

@a=([42.110.0.76.78.174.192,42.132.0.170.164.168.160,42.68.0.234.164.236.192,
170.36.0.170.164.168.160.0,68.196.0.170.68.174.160,],,[206.200.0.164.106.236,
,,168.168.0.170.138.138.0,,204.200.0.238.140.204.0,,136.168.0.170.138.138.0,,
142.174.0.170.106.234,],);$/=v36;for$a(@a){for$b(@$a){eval"$/_=sprintf('%vb',
'$b');$/\\=v10";s/\d+/sprintf"%08d",$&/ge;tr;.;;d;tr;10;* ;;print}print q,,};

And years ago I wrote this (in c):

/* if(TERM==ANSI) {cc -Dc=`"\e[32m"` sig.c} else {cc -Dc=\"\" sig.c} */
e(int d){printf("%c",d);}main(){int a=0,b;for(b=141596885;b>8;b>>=4)e(97-(
b>>22)+(b&15));puts(c);for(;a<128;){b="}////+c)cy////*494y////*979y///+e*"
"959*ey///*I5Q*939*I5Qy///*96bI3Qb69y///*!777!y///*Y6kIql6Yy///*A5q+9!,A5"
"9y///+m,YQ-my////-iq~y"[a++];for(;7&b;e("Eli!: MV?JL1m\"P\n"[b-->>3]));}}

Which I see can be converted reasonably well to perl:

sub e{printf"%c",shift}for($b=141596885;$b>8;$b>>=4){&e(97-($b>>22)+($b&15))}$
_="}X/+c)cyX/*494yX/*979yX+e*959*eyX*I5Q*939*I5QyX*96bI3Qb69yX*!777!yX*Y6kIql"
."6YyX*A5q+9!,A59yX+m,YQ-myX/-iq~y";s:X:///:g;@b=/./g;$_=qq'Eli!: MV?JL1m"P\n'
;@e=/./sig;for($a=0;$a<128;){$b=ord$b[$a++];for(;$b&7;){&e(ord$e[($b-->>3)])}}

Elijah
------
#!/usr/bin/perl -w
use Shell;
print(figlet(qw(Just Another Perl Hacker)));
__END__

Przemyslaw Brojewski wrote:

>Modification of a read-only value attempted at cosik line 2.
>
>perl 5.6.1.
>
>what gives?

Put

	(local$_=$_),

in front of it, just before the very first "y".

-- 
	Bart.

In article <3b8...@news.isholf.is>, Helgi Briem wrote:
>On 20 Aug 2001 11:51:22 GMT, Przemyslaw Brojewski
><bro...@kis.p.lodz.pl> wrote:
>
>>I get:
>>Modification of a read-only value attempted at cosik line 2.
>>
>>perl 5.6.1.
>>
>>what gives?
>
>OK, you're slow.

No he's not.  And this was all my mistake, as was the bug.

  1. This is being crossposted.  Przemyslaw is from alt.ascii-art.

  2. He was referring to a JAPH I'd posted.

  3. The subject of this thread came from someone else entirely.


Okay, so he should've quoted my post.  Okay, so Helgi should've checked
the newsgroups list and the beginning of the thread.  And I should've
been more careful in testing my code before posting it.  In the end,
this whole subthread is the result of a series of unfortunate mistakes.

I'd successful crossposted between alt.ascii-art and comp.lang.perl.misc
before, so I didn't see any risk in that.  But I should've realized that
the cultures are different enough that there might be misunderstandings.

(Note for a.a-a readers: comp.lang.perl.misc is a high-volume group.
And yes, we do get people actually asking about bugs in code they're not
willing to show, with totally misleading subject lines.  Some people get
pretty annoyed with it after a while.  Abestos underwear recommended.)

[Followups set to comp.lang.perl.misc ONLY.  Keep this out of a.a-a.]

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post something,
we discuss its implications.  If the discussion happens to answer a question
you've asked, that's incidental."           -- nobull in comp.lang.perl.misc

In article <998...@itz.pp.sci.fi>,
Ilmari Karonen  <use...@itz.pp.sci.fi> wrote:
>In article <9lqtjq$mnd$1...@kujawiak.man.lodz.pl>, Przemyslaw Brojewski wrote:
>>I get:
>>Modification of a read-only value attempted at cosik line 2.
>>
>>perl 5.6.1.
>
>Sorry.  Try the one in my .sig -- the original breaks under perl v5.6.
>
>-- 
># Ilmari Karonen -- http://www.sci.fi/~iltzu/
>s''n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3-_)2_|n\__/\_,_|___/\__|2\__,_|_|
>1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_)2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\
>___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n',y/n\n/\n/d,s/\d+/$"x$&/eg,print;
>


Now, just what do we have to do to turn
those three lines into a perl program?

(especially great would be the exact command line or
lines we must type in.)

Thanks

David

PS: if you could make some of those prior things
work on 5.6.1, it'd be real nice, as we
could *try* them -- which would be fun.

David Combs wrote:

>s''n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3-_)2_|n\__/\_,_|___/\__|2\__,_|_|
> >1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_)2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\
> >___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n',y/n\n/\n/d,s/\d+/$"x$&/eg,print;
> >
> 
> Now, just what do we have to do to turn
> those three lines into a perl program?
> 
> (especially great would be the exact command line or
> lines we must type in.)

Works fine with perl, version 5.005_03.

-- 
Josef Möllers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize
						-- T.  Pratchett

On 22 Aug 2001 09:17:04 GMT, dkc...@panix.com (David Combs) wrote:

> In article <998...@itz.pp.sci.fi>,
> Ilmari Karonen  <use...@itz.pp.sci.fi> wrote:
> >
> >Sorry.  Try the one in my .sig -- the original breaks under perl v5.6.
> >
> >-- 
> ># Ilmari Karonen -- http://www.sci.fi/~iltzu/
> >s''n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3-_)2_|n\__/\_,_|___/\__|2\__,_|_|
> >1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_)2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\
> >___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n',y/n\n/\n/d,s/\d+/$"x$&/eg,print;
> 
> 
> Now, just what do we have to do to turn
> those three lines into a perl program?
> 
> (especially great would be the exact command line or
> lines we must type in.)

Type in 'perl'. That starts up your Perl interpreter and it'll wait for
you to type in a program. Copy-and-paste Ilmari's sig. If on Unix, you
can type Ctrl+D on a line by itself to terminate the program and have it
run. Otherwise, typing __END__ on a line by itself should work.

Cheers,
Philip
-- 
Philip Newton <nos...@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.

About this thread. These messages were posted publicly to the newsgroup alt.ascii-art in 2001 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post