[Chicago] Can you write Perl in Python?
Ian Bicking
ianb at colorstudy.com
Tue Dec 27 23:06:25 CET 2005
On 12/27/05, Ian Bicking <ianb at colorstudy.com> wrote:
> An interesting contest. My first simple try came in at 220
> characters, but after trying a bunch of different techniques (most of
> which increased the size) I was only able to get it down to 214
> characters (which is just minor refinements to my first version).
> Using the built-in zlib compression (s.encode('zlib')) I can get that
> in turn down to 175 characters (actually making use of that
> compression is an excersize left to the reader). 140 characters is
> pretty tricky; I'm guessing there's some useful pattern in the data
> for the numbers that could be used.
Well, I figured out how to get it down to 173 characters, but when
compressing it comes out as 174 characters. Damn, I guess I'm just
*barely* better at compression than zlib is. Hmm... after using map
and lambda I can get it down to 155, 153 compressed (two characters of
compression, w00t!). I'm totally stumped on the last 15 characters,
though.
--
Ian Bicking | ianb at colorstudy.com | blog.ianbicking.org
More information about the Chicago
mailing list