I don't have the time to attempt modifications to DrRacket right now. 
Instead I've moved to emacs, which (to the question posed earlier by Robby 
Findler) does have keyboard shortcuts for running the debugger. I'm still 
using racket via emacs' racket-mode but trying to click on the very small 
green circles and rectangles in the DrRacket debug interface was just too 
much. I could probably figure out how to add keyboard shortcuts by 
inspecting the racket-mode code; that may happen later when I know my way 
around scheme/lisp much better.

Thanks for all the help on this thread. It's good to know there are helpful 
people in this community.

On Wednesday, November 3, 2021 at 6:41:55 AM UTC-7 James Zollinger wrote:

> Your explanation of "lambda _" jogged my memory. I'm remembering long ago 
> Haskell learnings where the underscore is used in much the same way.
>
> I'll take a look at the two references you shared. This is a really useful 
> starting point. Thank you again, Laurent.
>
>
> On Tue, Nov 2, 2021 at 5:35 AM Laurent <laurent...@gmail.com> wrote:
>
>> On Mon, Nov 1, 2021 at 11:14 PM James Zollinger <mzo...@gmail.com> wrote:
>>
>>> Thanks for the info, Laurent. I tried the trick outlined in the link you 
>>> sent me on Debian 11 versions of Gnome 3.38.5 (just to test this) and MATE 
>>> 1.24.1-2 (my preferred environment) without any success.
>>>
>>
>> I haven't tried myself. For what it's worth, I wrote another quickscript 
>> called "command palette" that does exactly that, but of course specifically 
>> for DrRacket (*): 
>> https://gist.github.com/Metaxal/d06f50a2534ca229309e71a2d244a912
>>
>> Again it doesn't look into context (right click) menus as they are not 
>> easily accessible.
>>
>> (*) Actually, it could be used with any Racket GUI app!
>>  
>>
>>> My LISP/scheme/racket skills are maturing but I'm not quite ready to 
>>> tackle:
>>>                (when (cons? stat)
>>>                  (make-object menu-item%
>>>                    "Print return value to console" menu
>>>                    (lambda _ (send (get-tab) print-to-console
>>>                                    (string-append "return val = " 
>>> rendered-value)))))
>>> and friends! (What is "lambda _"?!)
>>>
>>
>> Yeah, that can seem weird, but it will make sense. Let me explain in 
>> examples:
>>
>> (define f (lambda (x) (displayln x)))
>> (f 3) ; ok
>> (f 3 4 5) ; not ok
>> (f) ; not ok
>>
>> (define g (lambda (x . rst) (displayln (list x rst))))
>> (g 3) ; ok, equiv to (displayln '(3 ()), rst is the empty list
>> (g 3 4 5) ; ok, equiv to (displayln '(3 (4 5)))
>> (g) ; not ok, needs at least 1 argument
>>
>> (define h (lambda lst (displayln lst)))
>> (h 3) ; equiv to (displayln '(3))
>> (h 3 4 5) ; equiv to (displayln '(3 4 5))
>> (h) ; equiv to (displayln '())
>>
>> Now, `_` is just an identifier like any other, like `lst`, but by 
>> (untold) convention it means "I won't use this argument". So 
>> (define k (lambda _ (displayln "hoy")))
>> (k) ; equiv to (displayln "hoy")
>> (k 3 4 5) ; equiv to (displayln "hoy")
>>  
>>
>>> Any suggestions on how to quickly get up to speed to 
>>> modify debug-tool.rkt beyond reading all of the Racket Documentation 
>>> <https://docs.racket-lang.org/>?
>>>
>>
>> debug-tool.rkt is probably not the best first encounter with Racket. It 
>> draws on many concepts (macros, classes, gui, etc.). Though if you do 
>> manage to make sense of it you may learn a lot :) 
>>
>> For this particular task, even though the file contains "units", I think 
>> you shouldn't have to understand units, but you will certainly have to 
>> understand Racket classes:
>> https://docs.racket-lang.org/guide/classes.html
>> and part of the GUI:
>> https://docs.racket-lang.org/gui/index.html
>>
>> HTH,
>> Laurent
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/69770cba-7aa9-4666-b5f3-5a8d4d81e458n%40googlegroups.com.

Reply via email to