[racket] small fun racket tool coding project for someone

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Thu Oct 14 10:46:30 EDT 2010

If anyone wants to get their feet wet using the Check Syntax info, by 
coding a useful little tool...

I'd love to have a command-line tool that read in a Racket source file 
and removed the unnecessary "require"s.  You know, the ones that turn 
red when you hit Check Syntax button in DrRacket.

I have several hundred legacy Scheme files, and perhaps 2/3 of the 
"require"s are unnecessary.  Removing the unnecessary ones manually in 
DrScheme could take a day, but just a few minutes with a scriptable 
command-line filter.

(Probably a lot of these 2/3 are due to refactoring code over time.  And 
I'm guessing that some of it is copy&paste reuse by people who don't 
want to have to iterate multiple times and figure out which "require"s 
they still need before their code will compile.)


Posted on the users mailing list.