News for hackers. Stuff that matters.
Re:A bot fixes spelling mistakes in github readme files by jrockway on Sunday August 28, 2011 @08:22PM (#2935385)
Interesting idea, although it would be nice if Github optionally fixed spelling mistakes for you. Pull requests just for spelling errors have got to be annoying. (I just run flyspell in Emacs, so I never make spelling mistakes. Accept when I use the wrong word.)

The code is also pretty interesting. It's old-style Perl with indirect method calls, bareword filehandles, no "use strict", and so on... but then it uses modules that use Moose and MooseX::Traits. So we have a collection of scripts that look like they are from 1987, but that depend on Moose. Excellent!

(Actually, this inspired me to read the source code for Net::Twitter to see if it was using MooseX::Traits. Turns out they just copy-pasted from an older version of MX::Traits to get their traits functionality. Weird!)

Re:A bot fixes spelling mistakes in github readme files by holdenk on Sunday August 28, 2011 @10:27PM (#2935630)
Sorry the perl code is so poor, it was a post-clubbing quick-hack type project. I'll clean it up when I have some free time again :)
Re:A bot fixes spelling mistakes in github readme files by draegtun on Monday August 29, 2011 @08:45AM (#2936936)
You may find the following CPAN modules helpful when you do your refactoring:

* Net::GitHub - http://p3rl.org/Net::GitHub

* Pithub - http://p3rl.org/Pithub

Re:A bot fixes spelling mistakes in github readme files by holdenk on Thursday September 08, 2011 @02:58AM (#2972918)
Oh excellent. I only looked at Net::GitHub initially, but Pithub looks more interesting.
Re:A bot fixes spelling mistakes in github readme files by rat on Monday August 29, 2011 @03:20AM (#2936300)
I thought using moose turned on warnings+strict(at least its claimed here http://stackoverflow.com/questions/6050031/why-are-use-warni...)
Re:A bot fixes spelling mistakes in github readme files by draegtun on Monday August 29, 2011 @08:35AM (#2936915)
It does. However warnings+strict are lexical so it will only apply to the module or scope where use Moose is put.
Re:A bot fixes spelling mistakes in github readme files by glenjamin on Monday August 29, 2011 @05:24AM (#2936538)
> Accept when I use the wrong word.

I can't tell... was that intentional?

Re:A bot fixes spelling mistakes in github readme files by 6ren on Monday August 29, 2011 @01:13AM (#2936032)
So git becomes the presentation component of a spellchecker - a novel and interesting re-architecture.

You could do similar with peep-hole optimizations, bizarre bots that transform iteration to recursion (and vice versa), transforms to immutability, factoring-out common code, adding automatically constructed test cases ... I wonder what else.

It would be like helpful spam. EDIT or clippy "It looks like you're writing a loop. Would you like help?" Actually, this could be a channel for code analysis as a service. You subscribe (for fee or free), it's all hosted and updated remotely and git-based (github public/private, or self-hosted).

Re:A bot fixes spelling mistakes in github readme files by bigiain on Sunday August 28, 2011 @11:08PM (#2935720)
Is anyone else as amused as I am by the juxtaposition of "I was at jwz's club" immediately followed by "perl and regexes seemed like a good idea"?

(now he's got _two_ problems...)

Re:A bot fixes spelling mistakes in github readme files by bandushrew on Sunday August 28, 2011 @08:35PM (#2935408)
Man, what a fantastic idea. Mildly interesting at the moment, but start running a static analyzer bot over everything, and its golden.

should probably be an opt-in service, but WOW it would rock.

Re:A bot fixes spelling mistakes in github readme files by Mizza on Monday August 29, 2011 @02:10AM (#2936156)
I've been working on something like this recently, but I guess this guy beat me to the punch. Here's my nearly-done rainy day code:

https://github.com/Miserlou/WhitespaceBot (Python)

I'd like to add some security fixing stuff too. There's plenty that can be done here!

Bots are the secret reason why Wikipedia actually works - there's no reason why we can't have the same benefits in open source software.

Re:A bot fixes spelling mistakes in github readme files by holdenk on Monday August 29, 2011 @04:33AM (#2936438)
Your whitespace bot looks nifty :) Will you post the results when you start running it?
Re:A bot fixes spelling mistakes in github readme files by cdcarter on Sunday August 28, 2011 @10:34PM (#2935645)
I can't wait until I get a pull request trying to fix the spelling of my project name.
Re:A bot fixes spelling mistakes in github readme files by Macha on Monday August 29, 2011 @02:54AM (#2936252)
Or for "fixes" like colour/color or centre/center.