Re: [racket-users] stops in Macros that Work Together

2015-07-06 Thread Matthew Flatt
At Mon, 06 Jul 2015 23:24:20 -0400, Ryan Culpepper wrote: > On 07/06/2015 10:04 PM, Anthony Carrico wrote: > > I've been working through Macros that Work Together (on my way to > > working through Sets-of-Scopes). I've come across something that is > > slightly unclear to me in the section on local

Re: [racket-users] Directory not accessible

2015-07-06 Thread David T. Pierson
On Mon, Jul 06, 2015 at 11:53:38PM -0400, Neil Van Dyke wrote: > David T. Pierson wrote on 07/06/2015 11:27 PM: > >As a side note, I tried using file-or-directory-permissions [3] to avoid > >recursing into directories with no read or execute permission, but it > > BTW, before anyone does a lot mor

Re: [racket-users] Directory not accessible

2015-07-06 Thread Neil Van Dyke
David T. Pierson wrote on 07/06/2015 11:27 PM: As a side note, I tried using file-or-directory-permissions [3] to avoid recursing into directories with no read or execute permission, but it BTW, before anyone does a lot more work on filesystem access control semantics... I think the usual case

Re: [racket-users] Directory not accessible

2015-07-06 Thread David T. Pierson
On Mon, Jul 06, 2015 at 02:50:36PM -0700, Russ Abbott wrote: > I installed Racket in a directory for which I have access. Yet when I > attempted to run the example code on the Racket Home page: > > (for ([path (in-directory)] > #:when (regexp-match? #rx"[.]rkt$" path)) > (printf "source f

Re: [racket-users] stops in Macros that Work Together

2015-07-06 Thread Ryan Culpepper
On 07/06/2015 10:04 PM, Anthony Carrico wrote: I've been working through Macros that Work Together (on my way to working through Sets-of-Scopes). I've come across something that is slightly unclear to me in the section on local-expand: E ::= a mapping from name to transform I don't believe t

[racket-users] stops in Macros that Work Together

2015-07-06 Thread Anthony Carrico
I've been working through Macros that Work Together (on my way to working through Sets-of-Scopes). I've come across something that is slightly unclear to me in the section on local-expand: E ::= a mapping from name to transform I don't believe that E is a stack (right?). If it isn't, then in jf

Re: [racket-users] How to specify fallbacks for generic interfaces without going into an infinite loop?

2015-07-06 Thread Alexander D. Knauth
Thanks! On Jul 6, 2015, at 9:53 PM, Jon Zeppieri wrote: > Use define/generic: > > #lang racket/base > > (require racket/generic) > > (define-generics foo > (a foo) (b foo) (c foo) > #:fallbacks > [(define/generic gen-a a) > (define/generic gen-b b) > > (define (a foo) > (displayln

Re: [racket-users] How to specify fallbacks for generic interfaces without going into an infinite loop?

2015-07-06 Thread Jon Zeppieri
Use define/generic: #lang racket/base (require racket/generic) (define-generics foo (a foo) (b foo) (c foo) #:fallbacks [(define/generic gen-a a) (define/generic gen-b b) (define (a foo) (displayln "a-fallback") (gen-b foo)) (define (b foo) (displayln "b-fallback")

[racket-users] How to specify fallbacks for generic interfaces without going into an infinite loop?

2015-07-06 Thread Alexander D. Knauth
What is the proper way to do this? This goes into an infinite loop: #lang racket/base (require racket/generic) (define-generics foo (a foo) (b foo) (c foo) #:fallbacks [(define (a foo) (displayln "a-fallback") (b foo)) (define (b foo) (displayln "b-fallback") (a foo

Re: [racket-users] F1 question

2015-07-06 Thread P J Moy
On Monday, July 6, 2015 at 4:31:56 PM UTC-7, Nadeem Abdul Hamid wrote: > There might be a "Fn" or "Func" key on your keyboard (maybe along the bottom > row, near the "Ctrl", "Alt", etc. keys) that you need to hold down as you > press the F1 key; otherwise it treats the key as some Windows shortcu

Re: [racket-users] F1 question

2015-07-06 Thread Nadeem Abdul Hamid
There might be a "Fn" or "Func" key on your keyboard (maybe along the bottom row, near the "Ctrl", "Alt", etc. keys) that you need to hold down as you press the F1 key; otherwise it treats the key as some Windows shortcut. On Mon, Jul 6, 2015 at 7:22 PM, P J Moy wrote: > Hello. In DrRacket, when

[racket-users] F1 question

2015-07-06 Thread P J Moy
Hello. In DrRacket, whenever I place the cursor on a keyword and press F1, the W8.1 help screen/system comes up (with absolutely useless Windows documentation.) (I've searched for an hlp file, and nothing. Any ideas on what is wrong? Any help would be appreciated. Tx. -- You received this mess

[racket-users] Directory not accessible

2015-07-06 Thread Russ Abbott
I installed Racket in a directory for which I have access. Yet when I attempted to run the example code on the Racket Home page: (for ([path (in-directory)] #:when (regexp-match? #rx"[.]rkt$" path)) (printf "source file: ~a\n" path)) I got this error message. Racket\collects\racket\priv

[racket-users] Re: how to add file types to `raco test`?

2015-07-06 Thread Jack Firth
On Sunday, July 5, 2015 at 4:51:22 PM UTC-7, Matthew Butterick wrote: > `raco test` will automatically test every .rkt and .scrbl file in a > directory. Suppose I make `#lang foo` and thus many of my test files end with > .foo. I would want all .foo files to be automatically tested as well. Is >

Re: [racket-users] garbage collection

2015-07-06 Thread Raoul Duke
whenever I get the itch to dream about gc, inevitably I end up at a paper or other by Bacon; seems like Bacon is one of the go-to guys on GC. random e.g. http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon04Unified.pdf -- You received this message because you are subscribed to the Go

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Laurent
Point in case: Greg Hendershott's recent blog post about adapting struct constructors to use keyword arguments using syntax-parse. http://www.greghendershott.com/2015/07/keyword-structs-revisited.html On Mon, Jul 6, 2015 at 4:35 PM, Alexis King wrote: > I’ll second Stephen’s point about keyword

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Alexis King
I’ll second Stephen’s point about keyword arguments. They’re quite common in idiomatic Racket, and they are probably the most direct way to address the points you’ve mentioned. Another tool that Racket gives you to make scripting very easy is the ability to create fairly expressive DSLs with li

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Stephen Chang
Just realized that the first link is not very useful. These might be more informative: http://docs.racket-lang.org/guide/application.html?q=keyword#%28part._keyword-args%29 http://docs.racket-lang.org/guide/contracts-general-functions.html?q=keyword#%28part._contracts-keywords%29 On Mon, Jul 6, 2

Re: [racket-users] API design 2 -- variadic styles

2015-07-06 Thread Stephen Chang
Racket has linguistic support for keyword arguments, which address many of the issues you raised: http://docs.racket-lang.org/guide/keywords.html Would this help in your case? Additional background: http://www.cs.utah.edu/plt/publications/scheme09-fb.pdf On Mon, Jul 6, 2015 at 10:56 AM, John Car

[racket-users] API design 2 -- variadic styles

2015-07-06 Thread John Carmack
A primary goal of the scripting work is that it should be easy to do easy things. You shouldn't have to specify all the options if you just want to play a sound or show a picture, but you should still be able to get at them when you need them. For the case of a sound effect, all of the followi