Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art.animation, 24 Aug 2000.
Re: Please wait... [was: Perl - Blinking Text]

Re: Please wait... [was: Perl - Blinking Text]

In article <967...@itz.pp.sci.fi>,
    Ilmari Karonen  <use...@itz.pp.sci.fi> wrote:

: Twirling batons are rather cliche, though.  If you're going to have
: your users staring at a "please wait" message, the least you could do
: is make it a little bit interesting.

How about this?

    sub bubbles {
        my @bubble = (' ', '.', 'o', 'O');
        my $len = 10;
        my $tank = join '',
                   map $bubble[rand @bubble],
                   1 .. $len;

        my $tmp;
        while (1) {
            print "\rPlease wait $tank";

            $tank =~ s/(OO+)/$tmp = ' ' x length $1;
                             substr($tmp, rand length $1, 1) = 'O';
                             $tmp/eg;

            $tank =~ s/oo/     rand() < 0.5 ? 'O ' : ' O'/eg;
            $tank =~ s/\.\./   rand() < 0.5 ? 'o ' : ' o'/eg;
            $tank =~ s/Oo/     rand() < 0.5 ? 'O ' : ' O'/egi;
            $tank =~ s/\.o|o\./rand() < 0.5 ? 'o ' : ' o'/eg;
            $tank =~ s/\.O|O\./rand() < 0.5 ? 'oO' : 'Oo'/eg;

            while (rand() < 0.6) {
                substr($tank, rand $len, 1) = $bubble[rand @bubble];
            }

            select undef, undef, undef, 0.2;
        }
    }

Greg
-- 
Windows was created to keep the stoopid people away from Unix, you know.
An "MS advocate" is already beneath contempt.
    -- Tom Christiansen

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd588,7ad72948312cb279
X-Google-Attributes: gidfd588,public
X-Google-Thread: fa0ae,85d37e30d034d7ec
X-Google-Attributes: gidfa0ae,public
From: gba...@HiWAAY.net (Greg Bacon)
Subject: Re: Please wait... [was: Perl - Blinking Text]
Date: 2000/08/24
Message-ID: <sqa...@corp.supernews.com>#1/1
X-Deja-AN: 661976215
References: <200...@ng-ch1.aol.com> <spi...@corp.supernews.com> <967...@itz.pp.sci.fi>
X-Complaints-To: new...@supernews.com
X-Eric-Conspiracy: There is no conspiracy.
Organization: Eric Conspiracy Secret Labs
Reply-To: Greg Bacon <gba...@hiwaay.net>
Newsgroups: comp.lang.perl.misc,alt.ascii-art.animation
Originator: gba...@HiWAAY.net (Greg Bacon)
About this message. This message was posted publicly to the newsgroup alt.ascii-art.animation in 2000 and is 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 the author? 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