[racket-users] Impersonating a 0-arity function

2015-08-21 Thread Benjamin Greenman
I'd like to change the result of a 0-arity function, but I need help crafting the right magic spell. Here's my attempt -- this even possible? #lang racket/base (struct wrap (vals)) ;; Wrap a list (define (create) '()) (define create-wrap (impersonate-procedure create (lambda ()

[racket-users] macro-generate attribute access?

2015-08-21 Thread Stephen Chang
Is there a way to access an attribute, other than with the . syntax? For example, the following example does not work: #lang racket (require (for-syntax syntax/parse)) (define-syntax (define-stuff stx) (syntax-parse stx [(_ attr-name macro-name) #'(begin (begin-for-syntax

[racket-users] specifying extra compiled collection paths with info.rkt?

2015-08-21 Thread Matthew Butterick
The docs for `compile-collection-zos` [1] say that all files with the extension .rkt, .ss, or .scm in a collection are compiled and that within info.rkt, one can specify paths to omit with `compile-omit-paths`. Is there way to go the opposite direction — specify *extra* files that should be

Re: [racket-users] specifying extra compiled collection paths with info.rkt?

2015-08-21 Thread Matthew Butterick
I've been bumping into variants of this problem — namely, difficulty using special source extensions — across the Racket ecosystem. In addition to this one, [2] Adding file types to `raco test` [3] Persuading DrRacket to handle special source-file extensions Is the underlying problem that I'm

Re: [racket-users] Impersonating a 0-arity function

2015-08-21 Thread Matthew Flatt
At Fri, 21 Aug 2015 12:44:08 -0400, Benjamin Greenman wrote: I'd like to change the result of a 0-arity function, but I need help crafting the right magic spell. Here's my attempt -- this even possible? #lang racket/base (struct wrap (vals)) ;; Wrap a list (define (create) '())

Re: [racket-users] Impersonating a 0-arity function

2015-08-21 Thread Benjamin Greenman
Thank you! On Fri, Aug 21, 2015 at 2:38 PM, Matthew Flatt mfl...@cs.utah.edu wrote: At Fri, 21 Aug 2015 12:44:08 -0400, Benjamin Greenman wrote: I'd like to change the result of a 0-arity function, but I need help crafting the right magic spell. Here's my attempt -- this even possible?

Re: [racket-users] specifying extra compiled collection paths with info.rkt?

2015-08-21 Thread Matthew Flatt
It looks like there's not a way currently, although I think it would make sense to add one. For file extensions generally, I think there should be an info.rkt field to add extensions that are recognized by all tools that apply to all collections. That's a larger project, but it's on my near-term

[racket-users] DrRacket crashing?

2015-08-21 Thread Alexander D. Knauth
I have no idea what's been happening, but in the past half hour or so DrRacket has crashed on me (I think) 6 times. I don't know if this will help but here is what was in the error window that my computer gave me: Process: DrRacket [20469] Path:

Re: [racket-users] specifying extra compiled collection paths with info.rkt?

2015-08-21 Thread Matthew Butterick
No, not as long as you're willing to push the envelope here. Goes without saying. FWIW the Pollen file extensions are not purely cosmetic. The Pollen renderer consumes Pollen source files and uses the extension (pm, pmd, pp, etc) to determine what kind of rendering is necessary. Of course