Re: [racket] editing racket code effectively

2011-11-15 Thread John Clements
On Nov 15, 2011, at 6:22 PM, Tom McNulty wrote: > Be sure to check out the following doc, there are lots of useful bindings for > efficient editing. > > http://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html?q=keybindings > > For printf statements in particular: > >> C-c C-l : wraps a

Re: [racket] editing racket code effectively

2011-11-15 Thread Tom McNulty
Be sure to check out the following doc, there are lots of useful bindings for efficient editing. http://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html?q=keybindings For printf statements in particular: > C-c C-l : wraps a let around the sexpression following the insertion point > and p

Re: [racket] editing racket code effectively

2011-11-15 Thread Neil Van Dyke
David Vanderson wrote at 11/15/2011 09:04 PM: And if I want to disable the printf, put "#;" in front: (if (integer? 1) (begin #;(printf "calling bar") (bar)) (baz)) Is that how you would do it? Pretty much, although my habits are from before "#;", I usually have more line breaks, an

Re: [racket] editing racket code effectively

2011-11-15 Thread Grant Rettke
Hi David, I found all of the following helpful. http://www.wisdomandwonder.com/article/59/drsync-automatically-synchronize-file-changes-in-drscheme-v370-and-above http://www.wisdomandwonder.com/link/49/using-schemes-eval-in-sandbox http://www.wisdomandwonder.com/article/139/working-with-drschem

Re: [racket] editing racket code effectively

2011-11-15 Thread Matthias Felleisen
On Nov 15, 2011, at 9:09 PM, David Vanderson wrote: > Or rename "tee" to a different function that returns v without the displayln? It's easy to modify the function appropriately. _ For list-related administrative tasks: http://lists.racke

Re: [racket] editing racket code effectively

2011-11-15 Thread David Vanderson
On 11/15/2011 06:05 PM, Matthias Felleisen wrote: I prefer to use a function that is in one of my standard libraries: (define (tee tag v) (displayln `(,tag ,v)) v) To use it, wrap an expression like this to see what its value is: (tee 'find-best-strategy-1 (find-best-strateg

Re: [racket] editing racket code effectively

2011-11-15 Thread Asumu Takikawa
On 2011-11-15 17:33:55 -0800, David Vanderson wrote: > I always seem to be fighting to make sure the parens are balanced, > both in DrRacket and Vim. For vim, there are plugins that add paren-based editing. One example is Slimv (which does a lot more but contains a paredit script): http://www.vim.

Re: [racket] editing racket code effectively

2011-11-15 Thread David Vanderson
On 11/15/2011 05:45 PM, Neil Van Dyke wrote: David Vanderson wrote at 11/15/2011 08:33 PM: - how to add temporary debugging statements I usually use "log-debug" or "printf". See the documentation for how to make "log-debug" appear if you're running outside of DrRacket. So if I have: (if

Re: [racket] editing racket code effectively

2011-11-15 Thread Matthias Felleisen
On Nov 15, 2011, at 8:33 PM, David Vanderson wrote: > - how to add temporary debugging statements I prefer to use a function that is in one of my standard libraries: (define (tee tag v) (displayln `(,tag ,v)) v) To use it, wrap an expression like this to see what its value is: (tee 'f

Re: [racket] editing racket code effectively

2011-11-15 Thread Neil Van Dyke
David Vanderson wrote at 11/15/2011 08:33 PM: - how to add temporary debugging statements I usually use "log-debug" or "printf". See the documentation for how to make "log-debug" appear if you're running outside of DrRacket. - how to temporarily comment out some code Try "#;" to commend

[racket] editing racket code effectively

2011-11-15 Thread David Vanderson
Question for those who work in Racket on a day-to-day basis: How can I edit Racket code more effectively? To be more concrete, two speedbumps I'm hitting are: - how to add temporary debugging statements - how to temporarily comment out some code I always seem to be fighting to make sure the