[Chicago] Can you write Perl in Python?

Martin Maney maney at two14.net
Wed Dec 28 08:03:00 CET 2005

On Tue, Dec 27, 2005 at 11:46:10PM -0600, Edward S. Marshall wrote:
> Bah, I'm obviously not a very good Perl programmer, then. 233 characters
> is all I could make myself get it down to tonight, without my head
> exploding, without resorting to map/lambda, and without representing the
> template as a set of numbers. It's still pretty readable; maybe I'll
> take a peek at it tomorrow.

Came back to make sure I had an offering ready to go (the web site
opens at 8:00 tomorrow morning).  Found I'd forgotten one or two ugly
little tweaks (some things make it just too hard to work on the code,
so I was putting them off) and found a spare byte somewhere.  138
bytes, one line. no maps or lambdas at all - had some once, list
comprehensions saved bytes!  I have an idea for a different way of
encoding the table(s) that might be a little shorter overall.  Or not. 
Maybe I'll try it tomorrow, or maybe I'll do something worthwhile

> Good "practice", though. (Or bad, if you consider the goal... :-)

It was interesting - stretched me in a coding direction I haven't much
needed (or missed) in years.  There's value in that, even if the
specific direction is one that is normally best avoided.  It's like the
old saw about how you know when you've really mastered a tool: you know
three interesting ways to misues it.  Tonight I have practiced more
ways of misuing Python than I knew existed!

yawwwwwwwning'ly yours...

Then I can figure out what the information-support needs are and
build a prototype for people to respond to.  This works, because
people generally don't know what they need, but they can tell you
with certainty when you get it wrong.  -- Paul Murphy

More information about the Chicago mailing list