Where are the solutions? That's the fun thing about Perl golf is seeing how people did it in X characters. Without solutions...well, I don't see the point.
This awesomeness unexpectedly sucked away half my afternoon. Not really sure whether to be upset about it our not. :)<p>Only thing is that the key counting doesn't seem to be consistent. :\ Using the command history seems to really, really screw with the counts. I thought it counted up all the characters in the submitted command, but this doesn't seem to be the case. I submitted an 18 for the "Sort and add attributes" challenge, then realized that the text for the new key is longer than that. :\<p>I'm not really clear on what "counts" as a keypress (shift key? colon for commands? Paste commands? Esc?) and I haven't been able to get any of my "scores" to match up with the count in my head.<p>All that aside, this is a barrel of fun, and I'm sure these kinks will get worked out.
This is one of the most wonderfully geeky things I have ever seen. The analogy to golf is exceptionally well-drawn, too! It might be entertaining if you developed the parallel even more, perhaps by adapting some of The Rules of Golf to your project.
I held the title on "Brackets or Braces?" [0] for a good seven minutes with a 44 character solution [1], only to be ousted by @ryanmusicman with 42. Can anyone see an obvious way to improve mine?<p>[0]: <a href="http://vimgolf.com/challenges/4d1a522ea860b7447200010b" rel="nofollow">http://vimgolf.com/challenges/4d1a522ea860b7447200010b</a><p>[1]: <a href="https://gist.github.com/757767" rel="nofollow">https://gist.github.com/757767</a>
Ugh.. wanted to play with it, but after three years, there still isn't a simple way to get Ruby and Gems working nicely with modern Ruby apps on OSX. Searching for ways to update show a variety of hacks, each uglier than the last. Of course, I could always build it from source.. ::sigh::
Ha, I just started working on the same exact project a few weeks ago. Great minds think alike, I guess. I'm taking a different approach, so I'll still launch it to see what people think.<p>I brought up this idea in a "gamification of software development" talk I gave last April.
Looks like Tim Pope started playing. He's talking about the "anti cheat" mechanisms on twitter: <a href="http://twitter.com/tpope/status/19900265129836544" rel="nofollow">http://twitter.com/tpope/status/19900265129836544</a>
Until somebody can come up with at least some method of restricting vim scripting, the results are useless(one can easily only use 4 key strokes by key mapping as you can see). But, on the other hand, you can't just disable vim from loading scripts, because there's no point in mastering the plain old vim without any plugins, custom key mappings and such.
You should really make some challenges that require the users to pass multiple tests with the same script. Sure, you can solve the reformat/refactor challenge by<p><pre><code> jd2jVjj=f(ci)*a^]jcfda.join(',')^]
</code></pre>
but it wont generalize anywhere. Having a full script though that will detect and do that automagically, now there's the fun part.
Here's my Flodder Challenge (<a href="http://vimgolf.com/challenges/4d1a4f2ba860b744720000bf" rel="nofollow">http://vimgolf.com/challenges/4d1a4f2ba860b744720000bf</a>) solution:<p><pre><code> ~wqave~2wq@aw2@ab~ws**^]l~fe~ww@afg@aZZ
</code></pre>
(where ^] is an esc). Currently gets a score of 41 (although I only count 38 keystrokes...)
Only scored a 27 on the 'Reverse characters in a line' challenge...<p>I was trying to do this:<p><pre><code> :s/./&\r/g|g/^/m0|j!
</code></pre>
However, that causes a to be before b for some reason.<p>So I ended up doing:<p><pre><code> :s/./&\\r/g|g/^/m0\rV}gJ
</code></pre>
Anyone know why appending j! joins everything correctly except a and b?
You can also use Vi for hundreds of challenges at <a href="http://golf.shinh.org" rel="nofollow">http://golf.shinh.org</a> alot of the newer challenges are stale but some of the older ones are gold.
Is there anything to stop people form just writing a macro beforehand that does each task? I'm guessing that's how the guy who 4 keystrokes on Simple Text Editing accomplished that.