Re: [racket-users] Macros crossing documentation-time and run-time phases

2019-03-18 Thread Philip McGrath
On Mon, Mar 18, 2019 at 9:14 AM Matthew Flatt wrote: > I wonder whether the solution is an extension of `scribble/lp2` to > support a `require-for-chunk` form where `chunk` records any such > imports in its context and adds then to the stitched-together program. > > (require-for-chunk (only-in

[racket-users] Re: What is the best way to "raco make" all *.rkt files in a directory tree?

2019-03-18 Thread Brian Adkins
Hmm... for some reason, I thought there were some "loopholes" where this wouldn't work, but I just modified an HTML template that is included by another template that is rendered by a function in a file included by my main app, and it worked as expected. However, I did lose the -j 8 parallel

[racket-users] Re: ANN: RacketCon Keynote Speakers; You won't believe #9!

2019-03-18 Thread Lehi Toskin
A clickbait title about workshops!? That might just make me "Come and see." ;) On Monday, March 18, 2019 at 10:31:55 AM UTC-7, Jay McCarthy wrote: > > This year from July 8th to the 14th is Racket Week. Come and see. > > During the body of the week are the school workshops. Come and see. > >

Re: [racket-users] Re: Simple conditional in web template

2019-03-18 Thread Brian Adkins
Thanks, once I removed the initial , it worked fine. Way too much extra punctuation for my taste, but it's a good workaround for now until I can come up with something more concise. @(if #t @`{ This will be displayed if true } @`{ This will be displayed if false })

[racket-users] ANN: RacketCon Keynote Speakers; You won't believe #9!

2019-03-18 Thread Jay McCarthy
This year from July 8th to the 14th is Racket Week. Come and see. During the body of the week are the school workshops. Come and see. https://school.racket-lang.org/ Afterwards is RacketCon itself, for two days. Come and see. https://con.racket-lang.org/ We're happy to announce that the

Re: [racket-users] Accomodation on the Racket School 2019 page

2019-03-18 Thread Matthew Flatt
Hi Chris, Stay turned for more information. There will be space for all Racket School attendees, so you don't have to worry about claiming space early. Matthew At Mon, 18 Mar 2019 12:15:05 -0400, Christopher Lemmer Webber wrote: > According to https://school.racket-lang.org/#accommodation >

Re: [racket-users] Accomodation on the Racket School 2019 page

2019-03-18 Thread Jay McCarthy
What we have done in the past is gathering a list of who wants the subsidized housing, then collect the fee from them (last year it was $40 per night), and directly negotiate with the housing. We need to arrange it with them so that all our people are in roughly the same building and not too

[racket-users] Accomodation on the Racket School 2019 page

2019-03-18 Thread Christopher Lemmer Webber
According to https://school.racket-lang.org/#accommodation there's subsidized lodgin at the University of Utah dorms. Sounds great! But it's not really clear to me which buildings it would be at or where I should contact them. Maybe this is useful info to clarify on the website? I see that

Re: [racket-users] Re: Simple conditional in web template

2019-03-18 Thread Philip McGrath
I don't use `include-template` (I've come to love x-expressions), but I believe this would work: @,(if #true @`{ This will be displayed if true } @`{ This will be displayed if false }) -Philip On Mon, Mar 18, 2019 at 11:48 AM Jérôme Martin wrote: > > On Monday, March 18, 2019

Re: [racket-users] Re: Racket News - Issue 4

2019-03-18 Thread Matt Jadud
I'd be willing to pitch in some text around the thinking about the 'tbl' library for introductory data work, so that people might push back on it. Or, it would at least give a coherent surface for some conversation around collaboration. If not next issue, at some point. Or, not. I'm flexible. It

[racket-users] Re: Simple conditional in web template

2019-03-18 Thread Jérôme Martin
On Monday, March 18, 2019 at 4:45:19 PM UTC+1, Brian Adkins wrote: > > Yes, using code would certainly make some things easier, but for the > moment, I'm looking for a template solution. > Oh sorry, I didn't quite catch that! I never used templates, so I don't know. -- You received this

[racket-users] Re: Simple conditional in web template

2019-03-18 Thread Jérôme Martin
Some precisions: You ever need to have a "p" procedure to generate the paragraph (for example from html-lib) or quote it in my example, otherwise it won't work. The trick is to use a quasiquotation (backtick) to render your HTML template, and unquote (comma) to put logic in the template. On

[racket-users] Re: Simple conditional in web template

2019-03-18 Thread Brian Adkins
Yes, using code would certainly make some things easier, but for the moment, I'm looking for a template solution. On Monday, March 18, 2019 at 11:41:41 AM UTC-4, Jérôme Martin wrote: > > (define (my-server-response show-cat?) > (response/xexpr > `(div ([class "my-content"]) > ,(if

[racket-users] Re: Simple conditional in web template

2019-03-18 Thread Jérôme Martin
(define (my-server-response show-cat?) (response/xexpr `(div ([class "my-content"]) ,(if show-cat? (p "Welcome to my blog about cats!") (p "This blog is definitely not about cats.") On Monday, March 18, 2019 at 4:26:16 PM UTC+1, Brian Adkins wrote: > > How

[racket-users] Simple conditional in web template

2019-03-18 Thread Brian Adkins
How would one translate the following Ruby template into a Racket web template (including multiple lines for the if and else clauses) ? <% if true %> This will be displayed if true <% else %> This will be displayed if false <% end %> I've read a fair amount of doc and was

[racket-users] Guards and R7RS

2019-03-18 Thread jmhuffle
Dear Racket users of the #!r7rs modules, It seems to me that there is an error with R7RS' "guard" special form. The reference manual reads that "raise-continuable" is called with a raised object not handled by a "guard" special form. But, if I try: (with-exception-handler (lambda (x) 'gotcha)

[racket-users] Promises and Racket's dialects

2019-03-18 Thread jmhuffle
Dear Racket users, Within the documentation or elsewhere on Internet, is there a survey about the different ways of implementing promises in Racket and its dialects. I know that there are several ways, especially about recursive promises, but I am puzzled. For example: (define x 0) (define

Re: [racket-users] Struct subtype with default/fixed value of super-type

2019-03-18 Thread Marc Kaufmann
While I did know that I could define my own, I was going to do it while providing-out another function make-fish and make-shark, but it's nice to know that this allows me to locally define make-fish, while it looks to the outside like (fish ...). Thanks to including sufficient numbers of mundane

[racket-users] Re: Racket News - Issue 4

2019-03-18 Thread Jérôme Martin
Thank you so much for this! If I can suggest a project for next month's spotlight: - Christopher Lemmer Webber, co-editor of the ActivityPub specs, is working on a distributed social network library based on Racket: https://gitlab.com/spritely It's still in early development, but I think

Re: [racket-users] Struct subtype with default/fixed value of super-type

2019-03-18 Thread Jérôme Martin
Once you discover that the default constructor for a struct is just a simple procedure that was generated for you, it's not that big of deal to just make your own and export it like this: (provide (except-out (struct-out fish) fish) (rename-out (make-fish fish))) All the code relying on it

Re: [racket-users] Macros crossing documentation-time and run-time phases

2019-03-18 Thread Matthew Flatt
Just to make sure we're on the same page, it seems like your example fails for the same reason that #lang scribble/lp2 @(require racket/string) @(chunk <*> string-join) fails. That `require` turns out to do nothing, and there's no binding of `string-join` in the "phase" of the program is that

Re: [racket-users] Struct subtype with default/fixed value of super-type

2019-03-18 Thread Marc Kaufmann
Yes, I saw that, the problem is that I want to be able to set a (potentially different) default value for the sub-type shark than for the sub-type guppy. So if I set the value to 'big for all `fish`, then I can't do that. Essentially, I'd need an #:auto for every sub-type, but the #:auto refers to

[racket-users] Re: London Racket Meet-up ?

2019-03-18 Thread Jérôme Martin
Interested! To make it worth the trip, I'd suggest we put up a list of topics to discuss, so that people can ponder whether they should buy an expensive ticket to go there. I'd suggest the following topics I'd be glad to talk about: - Innovative use of syntax-parse, with tips and tricks to

[racket-users] Macros crossing documentation-time and run-time phases

2019-03-18 Thread Philip McGrath
Racket makes it easy to write macros that mix run-time code with various compile-time phases, using lexical scope to refer unambiguously to the correct binding for each identifier, including bindings that are not directly exported. Macro-generating macros are a great example, in that they expand