Polynomial Division Challenge
ncellier at ifrance.com
Thu Jul 12 23:40:47 UTC 2007
For fun, just put a GolfPolynomDivision in VW public store and at squeak
10000 bytes in lengthy VW xml with few comments and lenghty explicit
method variable and class names. 7700 in traditional chunk, test included.
A factor 10 to 20 would be gained without effort, by just renaming.
Then it's getting harder.
Core algorithms for Reading/Dividing/Printing polynoms have to be improved.
Other things make Smalltalk a bad candidate for such silly games.
1) Base library names are long : having something like +, & , or <
instead of aStream nextPutAll: would help shorten a lot.
2) Class creation methods are lengthy...
3) Categories are useless for this kind of test and spoil byte-efficiency...
I did not fulfill stdin/stdout requirement. This is a must add in
Squeak, VW and other Smalltalks.
I feel like best candidate would be GNU smalltalk to compete against
these Ruby/Python/PHP/Perl oriented rules. Beside, it could be automated
on their site.
Of course, as Bert already said, the goal is stupid from the code
quality point of view. It leads to uggly unreadable code. Not the
Smalltalk spirit. But if you want to play, the repository is open for
mmille10 at comcast.net a écrit :
> Ken G. Brown wrote:
> "Here's a chance for you whizzes to give Squeak some positive exposure:
> Polynomial Division Challenge
> Wouldn't it be great to see Squeak in the top spots?"
> Yeah it does look interesting. Unfortunately they don't allow code in any languages besides Perl, PHP, Python, and Ruby. I went to their "submit entry" page, and that's all they allow you to select for the language. There's no "other" category. Pity.
> I mean, it makes sense in a way. They have their language setup all preconfigured so all you have to do is submit code, not the whole development environment, which is essentially what they'd have to allow you to do if they allowed submissions in any language.
> It looks like they have the whole testing setup automated. That's the reason they want input in stdin and output in stdout. They can just run the test as a batch job as soon as you submit your code. You can submit code multiple times as well, and check back and see what their test results were. They limit you to one submission every 2 minutes, so it sounds like the testing goes in rapid fire fashion.
> According to the site, their language selection is actually less restrictive than before. They say Code Golf is based on another site called Perl Golf, which I assume only accepted Perl code.
> In any case, there's nothing saying we couldn't take the problems they pose, write them up in Smalltalk and compete outside the site, comparing against their stats. We just wouldn't be able to submit them to Code Golf. It takes the fun out of it a little when you're essentially preaching to the converted.
>>From what I hear, Smalltalk has gotten exposure in the Code Katas series, which is essentially the same thing, solving problems with code.
> mmille10 at comcast.net
More information about the Squeak-dev