From: Paul Duncan Date: 2004-09-25T04:47:07+09:00 Subject: [OT] Golfing (was Re: openssl examples and docs) --9j/QU+CmmrcVJkVI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Jamis Buck (jgb3@email.byu.edu) wrote: > Paul Duncan wrote: > >* Jamis Buck (jgb3@email.byu.edu) wrote: >=20 > >>"I use octal until I get to 8, and then I switch to decimal." > > > >Shouldn't that be "until I get to 7"? > > >=20 > Depends on how you are understanding "until". :) Pseudocode: >=20 > i =3D 0 > until i =3D=3D 8 > puts "%o" % i > i +=3D 1 > end > puts "%d" % i I see an opportunity for golfing! puts (0..8).map { |i| (i < 8 ? '%o' : '%d') % i } > It's probably time to change my sig, anyway. I've been getting too many= =20 > raised eyebrows from it. :) It was meant humorously. I think it's funny :D. > --=20 > Jamis Buck > jgb3@email.byu.edu > http://www.jamisbuck.org/jamis >=20 > "I use octal until I get to 8, and then I switch to decimal." --=20 Paul Duncan pabs in #ruby-lang (OPN IRC) http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562 --9j/QU+CmmrcVJkVI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBVHnNzdlT34LClWIRAhbMAJ95Ip0nmmcVX59qx5CyUNoWBTPoswCgrpZB hwe9z9117VeV+ICkedWN3lo= =cEhG -----END PGP SIGNATURE----- --9j/QU+CmmrcVJkVI--