[racket] bracket conversion?

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Thu Nov 22 14:45:02 EST 2012

That sounds like a great option "from the quick hacks dept" as you say ;)

Anyway, I was wondering whether that wouldn't be something that makes sense for DrRacket to have at some point. Just like you can configure default spacing for specific keywords.

Thanks to all!

-- Éric


On Nov 22, 2012, at 3:41 PM, Eli Barzilay wrote:

> Two days ago, Eric Tanter wrote:
>> Thanks John, that's very helpful!
>> 
>> Any idea about a whole-file racketify in DrRacket?
> 
> From the quick hacks dept, which I think is very applicable to such
> jobs of converting lots of code: what I do in these cases is first
> create a file that holds all of the files that you need to convert.
> Then I use Emacs with lots of (regexp) searching and keyboard macros.
> For example, instead of a keybinding, I just record one key that looks
> for "(let ((" then another key that fixes the paren shapes.
> 
> Having it all in a single file makes it easy to do this in a
> semi-automated way: it's obviously not a proper solution, but if the
> process is easy enough to the point of a quick glance and a keypress,
> then the overall effort is much smaller than writing a proper code
> refactoring tool which is at risk of being a single-use thing anyway.
> 
> After that's done, I extract the files.  (I have a small script that
> creates a text file from a bunch of given files, runs a command on
> that file, and then extracts the modified files back to where they
> were.  It makes it easy to do global edits like spell checking, tabs,
> etc.)
> 
> (Oh, and I should of course say that this depends on having a very
> convenient way to deal with keyboard macros, something that Emacs in
> its default configuration doesn't have.)
> 
> -- 
>          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                    http://barzilay.org/                   Maze is Life!
> 



Posted on the users mailing list.