Duck images

Hi,

Phil Tomson recently suggested developing a duck image to represent ruby
instead of the standard red stone thing.

Nikolai Weibull said this has been proposed before, but copyright
encumbrance has been an issue.

Phil said why the lucky stiff has talent. [ruby-talk:121973]

Why the lucky stiff drew what is apparently The Only Copyrightless Duck In
Recent History:
http://www.whytheluckystiff.net/
An awesome anatid AFAICS.

My ducks are essentially copies of why's.

This is my first small contribution:
http://www.dave.burt.id.au/ruby/duck.ico
(16x16x4bit and 32x32x4bit)

The second is post-scripted as a sig should be.

Cheers,
Dave

_ ___
/ \ / \
\. |: cc|
(.|:,---,
(.|: \ c|
(. y-'
  \ _ /
   m m

Hi,

Phil Tomson recently suggested developing a duck image to represent ruby
instead of the standard red stone thing.

This may help.

  http://www.whyaduck.com/index.htm

Nikolai Weibull said this has been proposed before, but copyright
encumbrance has been an issue.

Phil said why the lucky stiff has talent. [ruby-talk:121973]

Why the lucky stiff drew what is apparently The Only Copyrightless Duck In
Recent History:
http://www.whytheluckystiff.net/
An awesome anatid AFAICS.

My ducks are essentially copies of why's.

This is my first small contribution:
http://www.dave.burt.id.au/ruby/duck.ico
(16x16x4bit and 32x32x4bit)

The second is post-scripted as a sig should be.

Cheers,
Dave

_ ___
/ \ / \
\. |: cc|
(.|:,---,
(.|: \ c|
(. y-'
  \ _ /
   m m

That is one messed up rabbit!

In fact, that's *no* sig. This is a sig!

                            .~NM.
                           +::o:+
                          .M::::. ,...
                          .:::D::MMM::=:MM .
                          .::m:::~:::~D:=DN:M
        ..M+:M: +:M:::MM,8:::M?::::,O
      .M::::~:$M .::7MMMMM:~:::::M,:Z:,M
    .M~:::::8~:M? .:N~DM::::::,:,:=:,M
  .M::::::::::DOM .:m:D=O:,::,:,+
.M::::::::::~=D: DM88:8:?:::,=M,:,:,.
.N::?:::::::=::ND .=M:::$:,::::MMMMM,MMM,.
.D=::+::::::+?8:M .=.M~:8IN:::,:M,MMM,MMMM,.
..M::?~~::::::~?M 8.M+NMN::::,M::~MM,MM,D.
    ..MM::::::OD:D .MD~~M:::::=MMMM,MMM,I
       MO:::::7+$~ .ZOZ~::::::,7::,MM,M .MM.
      .:8::::::$Z~ .~::~::::::::::,: .M:?:,Z,.
      ~:M::::::$~~ 8~:~8:::::::::MM~M::=:?+7I,::MMMD,M.
       :I$~::::~D:. ~~O:M8:,::::$,?MM:,::,ND:::MMM=~,.
      .M:~:$::::?: .M$Z8N::::::::::m::::::::=,MMMN=Z,.
       .DN:~:::~:~. .M8~N$:7:::::,M~N::::::?::,MMMDO?M,.
          .M$:::~:, .M8:::::=:,:::,+::::::::,~MMD~8N=,?
          .~:::~~M? .II?:D::::::::,::m::::::m:MMM,MN?,M
         .=:N::~:?: $:IMM?M:~,:~:+::,:m::::::,MMD+888,.
         M:Z~?~::~, MDMI~:8~:::::~:,:: .~:,:MMMNMOM~,M
         M:N:~:::I. .::?:N8:~88:~~::,:M .:,:MMMMM,M,$.
         .:$~:::?~ .M::$Z:~~:::D~=::::,M .I:,MMMMMM,
         ..M~:::m:M.M:M:OO8=::::~:M,::::7 M,7ZN,M.
            ...:~NO~$:8~:::~$=~~:~::::::. M,7.
              M:::::8=8:~::::::~~::::::+.
             .I:I~~::::=:::::::D:::::::M
              .=~MNI:~:~:::Z:I:?:::::::D.
               M:~::~:Z::~+:::O=::::::Z.
                N:7:8Z$:~~~~:8~:+::::~M
                 M:::I:::+:::::?:::::M
                 .$N~=~:I:?N:::::::~N8.
                 .M~~MZ~:~=::OM=~:~M:~M
                 .OD~~~:~NMMO+?MM=:::::M
                   M~::~~~~ +M::,:.M .
                   .DDN.,MM .M?M.M
                    . . . .
                                                            
                                             GlassGiant.com

Now that's a duck! Can we call him Type?

:slight_smile: Do you Ruby?

···

On Monday 06 December 2004 12:37 am, Dave Burt wrote:

---
also try:
-http://jpg2asc.hierklikken.com/
-http://www.text-image.com/
-Image2Ascii Competition 2001 (specail delivery for JEGII)

In article <vcSsd.61264$K7.35690@news-server.bigpond.net.au>,

Hi,

Phil Tomson recently suggested developing a duck image to represent ruby
instead of the standard red stone thing.

Well, or maybe in addition to the red stone thing... a duck to represent
duck typing.

Nikolai Weibull said this has been proposed before, but copyright
encumbrance has been an issue.

Phil said why the lucky stiff has talent. [ruby-talk:121973]

Why the lucky stiff drew what is apparently The Only Copyrightless Duck In
Recent History:
http://www.whytheluckystiff.net/
An awesome anatid AFAICS.

What is that fox (I'm assuming that's a fox) on the back of the duck
represent? Is he whispering in the duck's ear? I just get the feeling
that the fox (if it is a fox) has some deep psychological meaning perhaps
representing the duck's deap-seated, primordial fear of foxes. Perhaps
it is the Fox of static typing? (appologies, Why, if it's not a fox)

My ducks are essentially copies of why's.

This is my first small contribution:
http://www.dave.burt.id.au/ruby/duck.ico
(16x16x4bit and 32x32x4bit)

The second is post-scripted as a sig should be.

Cheers,
Dave

_ ___
/ \ / \
\. |: cc|
(.|:,---,
(.|: \ c|
(. y-'
\ _ /
  m m

I dunno. Looking at this ASCII version, I see a squirrel.

Phil

···

Dave Burt <dave@burt.id.au> wrote:

I think the escape code "\e[;11H" is valid(works with xterm and Terminal.app(mac os x panther)) but I'm not sure.
Replace it with "\e[0;11H" if it doesn't work.

108 byte (with newline)

i=1;loop{puts"\e[2J\e[;11H_\n%9s(*)____,\n%9s(` =~~/
#{'~^~'[i%=2,2]*9}"%[i>0?'<':'Quack! >',''];i+=sleep 1}

109 byte (without newline)

i=1;loop{puts"\e[2J\e[;11H_\n%9s(*)____,\n%9s(` =~~/\n#{'~^~'[i%=2,2]*9}"%[i>0?'<':'Quack! >',''];i+=sleep 1}

my new sig : (200byte)
"jp6iSZmkLp5ISZlEiW5C".unpack("m")[0].unpack("C*").map{|x|x.chr}.join.
unpack("B*")[0].scan(/.{24}/){i=7;$&.scan(/..../){print\
"\e[3#{i-=1};1;40m ";$&.each_byte{|z|print" #"[z-?0,1]*2}};puts"\e[0m"}
(200 byte)

Jannis Harder

"jp6iSZmkLp5ISZlEiW5C".unpack("m")[0].unpack("C*").map{|x|x.chr}.join.
unpack("B*")[0].scan(/.{24}/){i=7;$&.scan(/..../){print\
"\e[3#{i-=1};1;40m ";$&.each_byte{|z|print" #"[z-?0,1]*2}};puts"\e[0m"}
(200 byte)

#!/usr/local/bin/ruby
# Copyright (c) 2000 Brian Fundakowski Feldman
# All rights reserved.

···

#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: img2ascii.rb,v 1.5 2000/11/01 06:06:14 green Exp green $
#
# Convert an image into greyscale ASCII art.
#
# usage: img2ascii.rb [-hr] [-w width] [-a aspect] file

require 'GD'
require 'getopts'

scrnwidth = 80
aspect_ratio = 6.0 / 10.0

def usage(string = nil)
  puts "error: " + string if string
  $stderr.puts "usage: #{$0} [-hr] [-w width] [-a aspect] file"
  exit 1
end

usage("invalid option") if !getopts("hr", "a:", "w:")
if $OPT_w
  scrnwidth = $OPT_w.to_i
  if scrnwidth <= 1
    usage("bad width")
  end
end
if $OPT_a
  $OPT_a.gsub(/[[:space:]]/, '') =~
    /^([[:digit:]]+\.?[[:digit:]]*?)(\/([[:digit:]]+\.?[[:digit:]]*))?$/
  usage("bad number") if !$1 || $1.to_f == 0.0 || ($3 && $3.to_f == 0.0)
  aspect_ratio = $3 ? ($1.to_f / $3.to_f) : $1.to_f
  usage("negative ratio") if aspect_ratio == 0.0
end

usage("no file name") if !(name = ARGV.shift)
case name
when /\.jpe?g$/i
  img = GD::Image.newFromJpeg(open(name, 'r'))
when /\.png$/i
  img = GD::Image.newFromPng(open(name, 'r'))
when /\.xbm$/i
  img = GD::Image.newFromXbm(open(name, 'r'))
when /\.xpm$/i
  img = GD::Image.newFromXpm(open(name, 'r'))
else
  usage("invalid file name")
end

gradient =
  ' .\'`,^:";~-_+<>i!lI?/\|()1{}[]rcvunxzjftLCJUYXZO0Qoahkbdpqwm*WMB8&%$#@'
gradient.reverse! if !$OPT_r
width, height = img.bounds
nwidth = [width, scrnwidth].min
# useful ratios
# xterm: 6x13, netscape <pre>: 6x10
nheight = (height.to_f * aspect_ratio * (nwidth.to_f / width.to_f)).to_i
usage("width too small") if nwidth <= 0
usage("height too small") if nheight <= 0

$stderr.printf("%s: %d x %d, %d colors -> %d x %d\n", name, width, height,
  img.colorsTotal, nwidth, nheight)

nimg = GD::Image.new(nwidth, nheight)
img.copyResized(nimg, 0, 0, 0, 0, nwidth, nheight, width, height)

if $OPT_h
  filters = [[/[[:space:]]*$/, ''], [/&/, '&amp;'], [/</, '&lt;'],
    [/>/, '&gt;'], [/\[/, '&#91;'], [/\]/, '&#93']]
else
  filters = [[/[[:space:]]*$/, '']]
end

(0...nheight).each {|h|
  line = (0...nwidth).collect {|w|
    pixcolor = nimg.getPixel(w, h)
    colors = nimg.red(pixcolor) + nimg.green(pixcolor) + nimg.blue(pixcolor)
    gradient[((colors.to_f / 765.1) * gradient.size).floor, 1]
  }.join
  filters.each {|*r| line.gsub!(r[0], r[1])}
  puts line
}

OK, here's another ASCII-style Ruby Duck (Type), this time using Jave (it's
really good!)

                                ,_"oY/…
                                d/ d,`.|
                                Y' ' _, …__
                               >. Y\/o/P\d|'Y8`Y\\._
                               '`'.PPPYY ''==oo ,… '\\_
        ,_.Y-Yb\. | /\`"-Ybd`." --`YY. .| "\.
     _,/"' `.\Y\ .',8Y\o-Y88''' ''-Y.–=. `.
   ,P"' '\P\\O| ,',8/ //' ``'' ' `\
,/ 'Y '\8 ,b'8``'b.' |.
…/ \| | /'P.\ `/O' ,/±. ,__ ||
/ . \' \|\ `| '|'\ \/ /8888\. ,d88| |
\ \.-' / 'b|. /||'.',P / .Y/8|\8| .88P88 ,|
`o_'`',_. | \`| |Y/||b_8YY |''''/8| |'Y'88| |'
  'YP…_` | //,| 8|Y/P\' |bob888' |ob88" ./
      ./` \|,/| ||o|| | \8/P' `8 _ /' ___
      /'`` ' '|| ||/|\/| '""" '' /' _,Y-'','"\.
      > ' ' |\ ||//.V' _,.ooo-----/\-"'d _/ob. \.
     '|,P' . |Y|8 ||| |8, ,Y 88b8' ' _ `' ,/88888|'|
      \.'\/ . |\|8 | |`|| ' `/'Y88' `'/ ,8888//8| \
       \_ '"., '/|| / b | ,d\/ ,888888 P /
        `"P._ |/ 8| /,. '' || .8888YY8\| |
           ,/' | P8 ||/| \ ' \. /888P8PP'' ||
          ,'._. | \| ||||// ' . `\. ` |8888YP'`` |'
         // Y. \/ | 8,||||\\. . '\P. /888888/d' ,/
         >' ' |' ||b| |/| ||\\Y'`… /''\. 88888888\|./
         \||`-' '|88 ,8` / ||| ' ,| `.' 88888888`,/'
          \.-,\_/ |/| /'\\ \P/. ' || `. 'P8888'",/
          '"P.___., /o_/'\|O8 ""\_ ' '' _| `\_ '`/P`_/
              ''8 "\o ,| Vd' '` ` / 'Y…''
               >> ''\\^d' ,|
                \ , , '`'' ||
                \|'\P… ' ' ` 8
                `\ '… ' |. ` |/
                 `\ /'`,` ' '' _ . ,' ,8'
                  `\. ' ' . /'
                    '8\_' ` /. ,/8.
                    >>.'\\… _. / .Y'. _/P''\.
                     \. '""-P…___o.//"' '\.
                     `\. || '\`_ ,Pd|
                      '.'…, ,-/ \.P,/d8'
                       \' `/ 'P' '

Phil Tomson wrote:

What is that fox (I'm assuming that's a fox) on the back of the duck represent? Is he whispering in the duck's ear? I just get the feeling that the fox (if it is a fox) has some deep psychological meaning perhaps representing the duck's deap-seated, primordial fear of foxes. Perhaps it is the Fox of static typing? (appologies, Why, if it's not a fox)

It's an upright horse. His name is Audie the Upright Horse. He's the duck's owner. And, yes, of course he has deep psychological meaning that ranges from a harsh criticism of existensialism to my own childhood fear of broken calculators. It's all there.

But, Great Coats! That huge ascii duck is marvellous. You done it well, Dave Burt.

_why

Which is why is so perfect for representing duck typing. Is it a squirrel? Is
it a rabbit? No! Its Type, the shape-shifting duck!

What a master of disguise! Check him out with his bifocals on:

/ \ / \
\. |:-OO-|
(.|:,---,
(.|: \ c|
(. y-'
\ _ /
m m

T.

···

On Monday 06 December 2004 12:52 pm, Phil Tomson wrote:

> _ ___
>/ \ / \
>\. |: cc|
> (.|:,---,
> (.|: \ c|
> (. y-'
> \ _ /
> m m

I dunno. Looking at this ASCII version, I see a squirrel.

In article <c5Ysd.61656$K7.46804@news-server.bigpond.net.au>,

···

Dave Burt <dave@burt.id.au> wrote:

OK, here's another ASCII-style Ruby Duck (Type), this time using Jave (it's
really good!)

                               ,_"oY/..
                               d/ d,`.|
                               Y' ' _, ...__
                              >. Y\/o/P\d|'Y8`Y\\._
                              '`'.PPPYY ''==oo ,.. '\\_
       ,_.Y-Yb\. | /\`"-Ybd`." --`YY. .| "\.
    _,/"' `.\Y\ .',8Y\o-Y88''' ''-Y.--=. `.
  ,P"' '\P\\O| ,',8/ //' ``'' ' `\
,/ 'Y '\8 ,b'8``'b.' |.
./ \| | /'P.\ `/O' ,/+-. ,__ ||
/ . \' \|\ `| '|'\ \/ /8888\. ,d88| |
\ \.-' / 'b|. /||'.',P / .Y/8|\8| .88P88 ,|
`o_'`',_. | \`| |Y/||b_8YY |''''/8| |'Y'88| |'
'YP.._` | //,| 8|Y/P\' |bob888' |ob88" ./
     ./` \|,/| ||o|| | \8/P' `8 _ /' ___
     /'`` ' '|| ||/|\/| '""" '' /' _,Y-'','"\.
     > ' ' |\ ||//.V' _,.ooo-----/\-"'d _/ob. \.
    '|,P' . |Y|8 ||| |8, ,Y 88b8' ' _ `' ,/88888|'|
     \.'\/ . |\|8 | |`|| ' `/'Y88' `'/ ,8888//8| \
      \_ '"., '/|| / b | ,d\/ ,888888 P /
       `"P._ |/ 8| /,. '' || .8888YY8\| |
          ,/' | P8 ||/| \ ' \. /888P8PP'' ||
         ,'._. | \| ||||// ' . `\. ` |8888YP'`` |'
        // Y. \/ | 8,||||\\. . '\P. /888888/d' ,/
        >' ' |' ||b| |/| ||\\Y'`.. /''\. 88888888\|./
        \||`-' '|88 ,8` / ||| ' ,| `.' 88888888`,/'
         \.-,\_/ |/| /'\\ \P/. ' || `. 'P8888'",/
         '"P.___., /o_/'\|O8 ""\_ ' '' _| `\_ '`/P`_/
             ''8 "\o ,| Vd' '` ` / 'Y....''
              >> ''\\^d' ,|
               \ , , '`'' ||
               \|'\P.. ' ' ` 8
               `\ '.. ' |. ` |/
                `\ /'`,` ' '' _ . ,' ,8'
                 `\. ' ' . /'
                   '8\_' ` /. ,/8.
                   >>.'\\.. _. / .Y'. _/P''\.
                    \. '""-P...___o.//"' '\.
                    `\. || '\`_ ,Pd|
                     '.'.., ,-/ \.P,/d8'
                      \' `/ 'P' '

This is the one we should dig up whenever anyone posts something about
adding static typing to Ruby. :wink:

Phil

Cool! Did you submit to the contest?

···

On Monday 06 December 2004 06:17 am, Dave Burt wrote:

#!/usr/local/bin/ruby
# Copyright (c) 2000 Brian Fundakowski Feldman
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF # SUCH DAMAGE.
#
# $Id: img2ascii.rb,v 1.5 2000/11/01 06:06:14 green Exp green $
#
# Convert an image into greyscale ASCII art.
#
# usage: img2ascii.rb [-hr] [-w width] [-a aspect] file

require 'GD'
require 'getopts'

scrnwidth = 80
aspect_ratio = 6.0 / 10.0

def usage(string = nil)
puts "error: " + string if string
$stderr.puts "usage: #{$0} [-hr] [-w width] [-a aspect] file"
exit 1
end

usage("invalid option") if !getopts("hr", "a:", "w:")
if $OPT_w
scrnwidth = $OPT_w.to_i
if scrnwidth <= 1
  usage("bad width")
end
end
if $OPT_a
$OPT_a.gsub(/[[:space:]]/, '') =~
   /^([[:digit:]]+\.?[[:digit:]]*?)(\/([[:digit:]]+\.?[[:digit:]]*))?$/
usage("bad number") if !$1 || $1.to_f == 0.0 || ($3 && $3.to_f == 0.0)
aspect_ratio = $3 ? ($1.to_f / $3.to_f) : $1.to_f
usage("negative ratio") if aspect_ratio == 0.0
end

usage("no file name") if !(name = ARGV.shift)
case name
when /\.jpe?g$/i
img = GD::Image.newFromJpeg(open(name, 'r'))
when /\.png$/i
img = GD::Image.newFromPng(open(name, 'r'))
when /\.xbm$/i
img = GD::Image.newFromXbm(open(name, 'r'))
when /\.xpm$/i
img = GD::Image.newFromXpm(open(name, 'r'))
else
usage("invalid file name")
end

gradient =
  ' .\'`,^:";~-_+<>i!lI?/\|()1{}rcvunxzjftLCJUYXZO0Qoahkbdpqwm*WMB8&%$#@'
gradient.reverse! if !$OPT_r
width, height = img.bounds
nwidth = [width, scrnwidth].min
# useful ratios
# xterm: 6x13, netscape <pre>: 6x10
nheight = (height.to_f * aspect_ratio * (nwidth.to_f / width.to_f)).to_i
usage("width too small") if nwidth <= 0
usage("height too small") if nheight <= 0

$stderr.printf("%s: %d x %d, %d colors -> %d x %d\n", name, width, height,
  img.colorsTotal, nwidth, nheight)

nimg = GD::Image.new(nwidth, nheight)
img.copyResized(nimg, 0, 0, 0, 0, nwidth, nheight, width, height)

if $OPT_h
filters = [[/[[:space:]]*$/, ''], [/&/, '&amp;'], [/</, '&lt;'],
   [/>/, '&gt;'], [/\[/, '&#91;'], [/\]/, '&#93']]
else
filters = [[/[[:space:]]*$/, '']]
end

(0...nheight).each {|h|
line = (0...nwidth).collect {|w|
  pixcolor = nimg.getPixel(w, h)
  colors = nimg.red(pixcolor) + nimg.green(pixcolor) + nimg.blue(pixcolor)
  gradient[((colors.to_f / 765.1) * gradient.size).floor, 1]
}.join
filters.each {|*r| line.gsub!(r[0], r[1])}
puts line
}

0>
   `O
^^^^^^^^^^^^^^^^^^
Quack.

shouldn't that be:

      0< quack
   `O
^^^^^^^^^^^^^^^^^^

···

On Tue, 7 Dec 2004 04:13:22 +0900, Michael DeHaan <michael.dehaan@gmail.com> wrote:

      0>
   `O
^^^^^^^^^^^^^^^^^^
Quack.

It's not mine - I just found it lying around on the web.

"trans. (T. Onoma)" <transami@runbox.com> wrote in message
news:200412061355.57624.transami@runbox.com...

···

Cool! Did you submit to the contest?

On Monday 06 December 2004 06:17 am, Dave Burt wrote:
> #!/usr/local/bin/ruby
> ...

Michael DeHaan wrote:
[...]

I got an idea...

duck.rb (188 Bytes)

···

--
Florian Frank

YES! Anyone want to golf the duck down further? On second
thought, golf should never be played with ducks, it's too cruel.
Canada geese maybe :slight_smile:

···

On Tue, 7 Dec 2004 04:38:51 +0900, pat eyler <pat.eyler@gmail.com> wrote:

shouldn't that be:

      0< quack
   `O
^^^^^^^^^^^^^^^^^^

On Tue, 7 Dec 2004 04:13:22 +0900, Michael DeHaan > <michael.dehaan@gmail.com> wrote:
> 0>
> `O
> ^^^^^^^^^^^^^^^^^^
> Quack.
>
>

pat eyler ha scritto:

shouldn't that be:

      0< quack
   `O
^^^^^^^^^^^^^^^^^^

people, I love this place.

Cool thing!

···

On Tue, 7 Dec 2004 07:00:10 +0900 Florian Frank <flori@nixe.ping.de> wrote:

Michael DeHaan wrote:
[...]

I got an idea...

--
Brian Schröder
http://www.brian-schroeder.de/

That's awesome.

···

On Tue, 7 Dec 2004 07:00:10 +0900, Florian Frank <flori@nixe.ping.de> wrote:

Michael DeHaan wrote:
[...]

I got an idea...

--
Florian Frank

s="\033[2J\033[0;0H _\n Quack! >(')____,\n (` =~~/\nv^v^v^v^v^`---'v^v^v^v^";(1..(1/0.0)).each{|i|s[23,6]=(i%2)==0?"Quack!":" "*6;s.tr!('>v^^v<','<^vv^>');puts s;sleep 1}

I took this to play a bit with golfing and here are my first ever golfs:

# Franks original Version: 186 Bytes
s="\033[2J\033[0;0H _\n Quack! >(')____,\n (`
=~~/\nv^v^v^v^v^`---'v^v^v^v^";(1..(1/0.0)).each{|i|s[23,6]=(i%2)==0?"Quack!":"
"*6;s.tr!('>v^^v<','<^vv^>');puts s;sleep 1}

# Shortened and enhanced: 178 Bytes
s="\e[2J\e[0;0H _\n Quack! >(*)____,\n (`
=~~/\nv^v^v^v^v^`---'v^v^v^v^";i=0;loop{s[23,6]=(i+=1)%2==0?'Quack!':'
'*6;s.tr!(t="*.>v^<,°",t.reverse);puts s;sleep 1}

# Packed (RLE): 205 Bytes
s="\e[2J\e[0;0H"+" 30_\n 21Quack! >(*)_4,\n 29(` =~2/\nw15`-3'w15\n
w33".gsub(/(.)(\d+)/){$1*$2.to_i}.gsub('w','v^');i=0;loop{s[63,6]=(i+=1)%2==0?
'Quack!':' '*6;s.tr!(t="*.>v^<,°",t.reverse);puts s;sleep 1}

I enhanced the original version to waggle with the tail and blinker with the
eyes. I could shorten the original by immense 8 bytes. I then tried to rle
encode the string, but this resulted only in obfuscation, not in improved
shortness. But in the rle compressed version I could expand the Type's world
immensely without a lot of size penalty. So now Type has a big and even nearly
two dimensional sea to swim while paying only 19 additional bytes.

So it should be clear why type waggles it tail :wink:

cheers,

Brian

···

On Tue, 7 Dec 2004 07:00:10 +0900 Florian Frank <flori@nixe.ping.de> wrote:

Michael DeHaan wrote:
[...]

I got an idea...

--
Florian Frank

--
Brian Schröder
http://www.brian-schroeder.de/

gabriele renzi wrote:

pat eyler ha scritto:

shouldn't that be:

      0< quack
   `O
^^^^^^^^^^^^^^^^^^

people, I love this place.

I'm amazed at the progress that has been made in just the last 12 hours. If you'd like to start using any of these ducks, in the form of a one-line signature, here's a DRb line:

  ruby -rdrb -e 'DRb.start_service;duck=DRbObject.new(nil,"druby://whytheluckystiff.net:6503");puts duck.daves'

Several other ducks are available at this service, try "puts duck.toms" or "puts duck.on_the_water". For a complete list: "puts duck.list".

Think of it. In time, we could amass ducks to use them as currency on the global markets. I think we can take Switzerland.

_why