Re: [racket-users] How to delay evaluation of a set! expression

2017-12-21 Thread Deren Dohoda
Vityou, > even though (class ...) expands into a function where method-list is defined. It does not expand into a function where method-list is defined because it does not expand in that way. The macro "define/method" is called with the given syntax and the macro operates on that syntax (it's jus

Re: [racket-users] How to delay evaluation of a set! expression

2017-12-21 Thread Vityou
That works ok but if I want to define a class macro like this: (define-syntax (define/method stx) (syntax-parse stx [(_ method-list (name arg ...) body) #'(begin (define (name arg ...) body) (set! method-list (cons `(name ,name) method-list)))])) (define-syntax (cla

Re: [racket-users] How to delay evaluation of a set! expression

2017-12-21 Thread Deren Dohoda
Hi Vityou, Racket macros are procedures and like all procedures only have access to values in their scope. Conceptually, yes, macros replace code with other code, but how they do this is not like a glorified C preprocessor. One way to manage this: you can move the definition of the procedure "defi

[racket-users] How to delay evaluation of a set! expression

2017-12-21 Thread Vityou
I am trying to make a macro that helps with creating class-like closures. #lang racket (require (for-syntax syntax/parse)) (define-syntax (define/method stx) (syntax-parse stx [(_ (name arg ...) body) #'(begin (define (name arg ...) body) (set! method-list (cons `(n

Re: [racket-users] Re: Confirming when garbage collection runs

2017-12-21 Thread Gustavo Massaccesi
I'm not sure if this is the exact answer to your question, but I hope it helps. This program shows the content of the two vectors, (i.e. ) but when the first vector is freed it displays "goodbye" in the middle of the sequence. So you can see when it was rele

Re: [racket-users] Racket PPA updated for v6.11

2017-12-21 Thread 'Reuben Thomas' via users-redirect
On 4 November 2017 at 17:43, Asumu Takikawa wrote: > Hi everyone, > > The Ubuntu PPA has been updated for v6.11. The PPA is available here: > > https://launchpad.net/~plt/+archive/ubuntu/racket > > It's currently available for zesty and artful. Builds for xenial and trusty > should go up later

Re: [racket-users] Formlets: No binding for 'select-input' without selection and values bound to binding:form

2017-12-21 Thread Jay McCarthy
Hi, I would write this code like this ``` #lang web-server/insta (require web-server/http/bindings web-server/formlets web-server/formlets/lib web-server/formlets/input) (struct stop (id name)) (define stops (list (stop 1 "Foo") (stop 2 "Bar") (stop

Re: [racket-users] OS X: DrRacket leaking windows?

2017-12-21 Thread Greg Hendershott
Trying older things -- Racket 6.7 on macOS 10.11.6 -- I see only a hint of this. I do see the white rectangle (to the right of "MB") get left behind on the desktop when the window is shrunk. But: - I have to drag the window _up_ (not to the left). - I see only _one_ such "dropping" (not a trail

[racket-users] Formlets: No binding for 'select-input' without selection and values bound to binding:form

2017-12-21 Thread Christian
* I have boiled down my problem to the minimal example at the end of the post * Basically, I'm running a formlet form in 'cycles' on itself to filter some list data * on the initial invocation, the bindings in the request are empty, as expected: request bindings: () stop: #f, use-name-filter?: