http://www.perlmonks.org?node_id=605575


in reply to Re^6: 5x6-bit values into/out of a 32-bit word
in thread 5x6-bit values into/out of a 32-bit word

Jeez man, did you forget to take your medication or something? Of course there was no context to conclude anything, since "How would you do this in Perl" doesn't give us very much to go on. Is it any wonder that you only received two and a half responses (I count ikegami's as a half, I don't think (s)he'd mind).

Normally, these sorts of challenges draw dozens of different responses, and there is much to study and learn. I don't know if it's the general decline of Perlmonks, the fact that you posted the question on a weekend, or that that the question sucked, but I was very surprised that only two useful responses were made.

So of the two responses, I came up with what I thought was a nice solution that plays to Perl's strengths, short, idiomatic and easily reused in other contexts. I conceived with absolutely not the slightest consideration to performance issues, and people are giving me grief about premature optimisation? Give me a break.

I contended that Thelonius's solution should be flagged with a red flag, because it contains repetitive code that could be factored out (and Thelonius admits that the point is generally valid). In the absence of any other hints whatsoever in the initial post as to what purpose this code server, I maintain that my solution is better. It may well be that Thelonius's solution is technically superior, performs better and so on. But you gave no method for discriminating between proposed solutions and now you're moaning about premature "generalisation". Yeah right. Remind me not to reply to your questions in the future.

• another intruder with the mooring in the heart of the Perl