Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

VT100 Screensaver

by kschwab (Vicar)
on Dec 09, 2018 at 21:27 UTC ( #1227018=obfuscated: print w/replies, xml ) Need Help??

Only works on Unix like machines...requires a VT100 compatible terminal like an xterm, and a working "stty" binary. Handles resizing the window while it's running. Ctrl-C to stop it.

#!/usr/bin/perl use warnings;use strict;my($r,$c);$|=1;init(); sub init{print "\ec";($r,$c)=split' ',qx"stty size";$r-=5;$c-=16}; $SIG{INT}= sub{print "\ec\n";exit};$SIG{WINCH}=sub{init()}; $_='!X!E!EIC%IC%IC%!X!ECu#kCD@3ilowg!E!WICD@biloQgIO#kAr@DiloT@/@j'. '@D@j@%IO#myD@gg!QCu#kC%IO#kO#gO#gC%!MIC%!QCu#kC%IO#ne#me#ni%!MICD'. '@f@/iloQK';s/!/4pa/g;s/@/ilp/g;s/#/KW/g;s/%/Ag/g;tr|A-Za-z0-9+/| -_|; @_=split(/\n/,unpack('u',join($',map(chr(32+length($_)*3/4). $_,/(.{1,60})/gs))));print "\ec\e[2J\e[?25l";srand(); for (;;) { my($x,$y)= map{int(rand($_))+1}($c,$r); for(0..4){print "\e[".($y+$_).";${x}H".$_[$_];} select($\,$\,$\,rand(1.2)+.3); for(0..4){print "\e[".($y+$_).";${x}H"." "x16;} }

Replies are listed 'Best First'.
Re: VT100 Screensaver
by bliako (Deacon) on Dec 10, 2018 at 20:21 UTC

    ++

    mmmm yumymu join split mmmm yumyum map select yumyum SIGINT mmmmmm yumyum

    please DO NOT UPVOTE my comment,i have just escaped a house with scooby-do lookalike

      Leave your PC unlocked? :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://1227018]
Approved by Athanasius
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2019-01-19 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    After Perl5, I'm mostly interested in:
































    Results (338 votes). Check out past polls.

    Notices?