Ton Hospel ([EMAIL PROTECTED]) wrote: > In article <[EMAIL PROTECTED]>, > Rick Klement <[EMAIL PROTECTED]> writes: > >> Turn off the computer and go do something else that does not require > >> much thinking. I get most ideas in the shower, in bed just before I go > >> to sleep, or while riding a bike to/from work. (If anyone on fwp lives > >> around Utrecht & drives a car: please be careful during golf games. > >> Thank you.) > > > > I solved wc.pl in the shower. I did most of my improvements on > > even.pl in bed (no, I don't have a computer in there). I found "*1.11%10" > > and how to eliminate the "chop" in, ahem, "another room" of the house :) > > A definite pattern is evolving here. I found most of my optimizations > (the *1.11%10, the s//pop/e, using $` and $&) while riding home from > work on the train.
After a late-ish night staring at my laptop trying to think of a regexp which would pick out "ab" "bc" "cd" pairs into $&, lying in bed half-awake, suddenly /(?=(..))./ occurred to me as an idea exciting enough that I had to wake up fully and try it out immediately. For some reason I'd always previously had the non-zero-width part *before* the zero-width part. > However, the intensive periods after the computer are also needed. The > playing around you do then give you the basic blocks and an appreciation > of what the problem needs. But they suck for the dispassionate and out of > the box thinking part. I'm terrible at the dispassionate thing. The number of times I silently shrieked and cursed in disbelief at those low 50s taunting me from the leaderboard. By the time 50 was broken I'd given up hope altogether :-)
