On Fri, 1 Sep 2017 14:38:21 -0400, Neil Van Dyke
wrote:
> ... *except when a GC cycle kicks in*.
Speaking of web servers and GC ...
I have a http web-server application that needs to be able to up/down
load fairly large files. The application is somewhat memory
constrained, and I'd like to ha
Oh yeah, contention from simultaneous requests, if you're doing that,
can also complicate your numbers. Adjusting `#:scgi-max-allow-wait`
might be a quick way to see whether that changes your numbers. (Hitting
a limit here could give you better numbers, or worse numbers, but
removing a limit
Thank you very much for doing this work, D. Bohdan.
If I'm reading these results quickly, and if my guess about the
distribution is correct, then it looks like Racket SCGI+nginx *might*
actually have the best times of any of your tested combinations *except
when a GC cycle kicks in*.
results
I recommend splitting this macro in two so you don't need to escape out of the
template language:
(define-syntax (macro stx)
(syntax-parse stx
[(_ (var1:id ...) (~and vars (var2:id ...))
#'(begin (macro/var2 (#freeze var1) vars) ...)]))
(define-syntax (macro/var2 stx
(syntax-parse s
Hi, everyone. Long time (occasional) reader, first time writer here.
In the 5.x days I played with Racket's Web servlets and found them slower than
I'd expected. (My exceptions were, admittedly, quite high after seeing how much
better Racket performed at other tasks than your average scripting l
See also `in-syntax`:
http://docs.racket-lang.org/reference/sequences.html?q=in-syntax#%28def._%28%28lib._racket%2Fsequence..rkt%29._in-syntax%29%29
-Philip
On Fri, Sep 1, 2017 at 9:25 AM, Jens Axel Søgaard
wrote:
> One more:
>
> (begin-for-syntax
> (define (in-syntax-list stx) (in-list (synt
One more:
(begin-for-syntax
(define (in-syntax-list stx) (in-list (syntax->list stx)))
(require (for-syntax racket/base ))
(define-syntax (for*/syntax-list stx)
(syntax-case stx ()
[(_for*/syntax-list head (for-clause ...) body-or-break ... body)
#'(datum->syntax #'stx (con
Two variations:
#lang racket
(require (for-syntax syntax/parse))
(define (do-something x y) (displayln (list x y)))
(define-syntax-rule (macro (x ...) ys)
(begin (outer x ys) ...))
(define-syntax-rule (outer x (y ...))
(begin (do-something x y) ...))
(macro (1 2 3) (4 5))
(newline)
(defin
How about:
(define-syntax (macro stx)
(syntax-case stx ()
[(_ (var1 ...) (var2 ...))
#`(begin
#,@(for*/list ((v1 (in-list (syntax->list #'(var1 ...
(v2 (in-list (syntax->list #'(var2 ...)
#`(do-something #,v1 #,v2)))]))
Jos
-Origina
On Fri, Sep 1, 2017 at 5:36 AM, Sam Waxman wrote:
> Lets say I have a macro
>
> (define-syntax (macro stx)
> (syntax-parse stx
> [(_ (var1 ...) (var 2 ...))
> #'(begin
> (begin
>(do-something (#freeze var1) var2)
>...)
> ...)]))
>
> and I want
Matthew,
> If you'd like the test namespace and the test-driving module to share
> the instance of the module that defines `document` (so that they'll
> agree on the data structure), you can use `namespace-attach-module` to
> attach the test-driving module's instance to a newly created namespace.
Lets say I have a macro
(define-syntax (macro stx)
(syntax-parse stx
[(_ (var1 ...) (var 2 ...))
#'(begin
(begin
(do-something (#freeze var1) var2)
...)
...)]))
and I want to iterate first over var2, and then over var1. So if I type
(macro (1 2
12 matches
Mail list logo