Live data from Hacker News

VimGolf.com - real Vim ninjas count every keystroke

vimgolf.com

41–50 of 86 posts

Re: VimGolf.com - real Vim ninjas count every keystroke

#41
post #2

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.

I'm logging the solutions, but in real MVP fashion... not showing them just yet. Need to bootstrap a vimscript parser first. If anyone is up for it, would love some help with the client/parser: https://github.com/igrigorik/vimgolf

Is the parser for deconstructing the solutions? That'd be a useful feature to have along with the solutions themselves.

Re: VimGolf.com - real Vim ninjas count every keystroke

#42
post #20

Earlier quoted context omitted.

Nice! qa/v YpJDq@a@a

Arg, the fact that Y and yy are synonyms always messes me up. Why can't it be like c/C/cc and d/D/dd?

Because then it would be consistent ;-)

Of course I have remapped Y to be consistent with C, D, etc.

Re: VimGolf.com - real Vim ninjas count every keystroke

#44
post #39

Earlier quoted context omitted.

I'm logging the solutions, but in real MVP fashion... not showing them just yet. Need to bootstrap a vimscript parser first. If anyone is up for it, would love some help with the client/parser: https://github.com/igrigorik/vimgolf

MVP meaning 'Most Valuable Player'?

Minimum Viable Product

Re: VimGolf.com - real Vim ninjas count every keystroke

#45
post #28

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.

I've been trying with editing the file in another editor, then :e! :wq which seems to give 17/18 score mostly.

I love this idea and love the challenge, but would love to make it less hackable as well.

Re: VimGolf.com - real Vim ninjas count every keystroke

#48
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

    jd2jVjj=f(ci)*a^]jcfda.join(',')^]
but it wont generalize anywhere. Having a full script though that will detect and do that automagically, now there's the fun part.

Re: VimGolf.com - real Vim ninjas count every keystroke

#50
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?

[0]: http://vimgolf.com/challenges/4d1a522ea860b7447200010b

[1]: https://gist.github.com/757767

Post reply on HN