Re: [racket] puzzled by what (send key-event get-key-code) returns

2014-02-25 Thread Tom Dean
Ahh, I thought they were bound together in some sort of a mysterious structure. Thanks. On Tue, Feb 25, 2014 at 4:53 PM, Jay McCarthy wrote: > When you press a key, say A, and then release it, there are two > key-events that are registered. The first has "get-key-code" as #\A. > The second has "

Re: [racket] puzzled by what (send key-event get-key-code) returns

2014-02-25 Thread Jay McCarthy
When you press a key, say A, and then release it, there are two key-events that are registered. The first has "get-key-code" as #\A. The second has "get-key-code" 'release and #\A is returned by get-release-key-code. Jay On Tue, Feb 25, 2014 at 5:49 PM, Tom Dean wrote: > If I create an instance

[racket] puzzled by what (send key-event get-key-code) returns

2014-02-25 Thread Tom Dean
If I create an instance of canvas% or editor-canvas% like (define THE-CANVAS (new (class editor-canvas% (super-new) ;; Key handler for key-stroke input: (define/override (on-char key-event)

Re: [racket] [Racket Syntax] Check if identifier is lexically bound

2014-02-25 Thread Chrisophe Vandenberghe
Hi, I found a solution to the first problem where the parameter of the method are now recognised as "lexically bound". However, it seems like a dirty hack as i have to pass the arg list explicitly when checking the body expressions. Furthermore, this does not solve the issue when methods conta

Re: [racket] Documenting Redex forms with Scribble

2014-02-25 Thread Asumu Takikawa
On 2014-02-25 11:40:22 -0500, Jonathan Schuster wrote: >Are there any Scribble forms for documenting Redex metafunctions and >judgments? I'm putting together a redex-extras package that has several >generic utilities I've found useful throughout my model, but I'm not sure >how to do

Re: [racket] Documenting Redex forms with Scribble

2014-02-25 Thread Robby Findler
There aren't, unfortunately. Robby On Tue, Feb 25, 2014 at 10:40 AM, Jonathan Schuster wrote: > Are there any Scribble forms for documenting Redex metafunctions and > judgments? I'm putting together a redex-extras package that has several > generic utilities I've found useful throughout my mode

[racket] Documenting Redex forms with Scribble

2014-02-25 Thread Jonathan Schuster
Are there any Scribble forms for documenting Redex metafunctions and judgments? I'm putting together a redex-extras package that has several generic utilities I've found useful throughout my model, but I'm not sure how to document them. Racket Users list: http://lists.racke

[racket] [Racket Syntax] Check if identifier is lexically bound

2014-02-25 Thread Chrisophe Vandenberghe
Hey guys, (first time poster) I have been learning how the Racket Syntax Framework works and trying to make a custom language. What I am currently trying to make is a small Object Oriented language which has classes and so on. I don't want to use the built-in classes as I want to alter the OO

Re: [racket] macro for define-values?

2014-02-25 Thread Laurent
Eric's solution is probably the best one, but using `define-values` can still be made a bit simpler: (define-syntax-rule (ref name ...) (define-values (name ...) (values (void 'name) ...))) since `void` takes a variable number of arguments and discards them. Laurent On Tue, Feb 25, 2014 at 8:16