Re: Golf Scoring Idea

[email protected] (Rafael Garcia-Suarez)
Newsgroups perl.golf
Message-ID <[email protected]>
Benjamin Goldberg wrote in perl.golf :
> This might be a bit of a strange idea, but... suppose that for scoring,
> instead of using total number of bytes for the score, you used the total
> number of opcodes.  The B module, or one of the backends invoked through
> -MO=<whatever>, would be used for finding out this info.

Interesting idea... with less ops, a compiled perl program takes less
memory, and may run faster. Plus, it's a way to learn about the
internals. Would ops that have been optimized to nullops counted in the
final score ? Also, you'll need to standardize to a specific perl
version -- perl 5.8 + ithreads compiles to a different set of opcodes.

'perl -MO=Concise foo.pl | wc -l' should be enough if you don't discard
opcodes. (if not, we can hack a quick module B::CountOpcodes or
whatever. Duh, it would have to handle subroutines and BEGIN blocks
too...)

Just, please don't use the namespace B::Golf for it.

> You would have to forbid the various ways that code can be hidden from
> perl's introspection, but that shouldn't be *too* much of a hardship for
> golfers.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.