Whoa, very nice!
IIUC, you could get rid of syntax-local-eval because you have a sub-macro,
so the overall macro puts the content of id-rename inside a sub-macro that
is then evaluated.
This is also why id is correctly "bound" inside (begin body ...) : after the
first expansion, it is not really b
At Mon, 18 Apr 2011 19:41:18 -0400,
Danny Yoo wrote:
>
> > This program now compiles in approximately 3 seconds on my machine,
> > whereas previously it was more than 2 minutes.
>
> Awesome! I look forward to trying this out. Will this make the
> upcoming Racket release?
Yes.
Vincent
On Mon, Apr 18, 2011 at 7:41 PM, Danny Yoo wrote:
>> This program now compiles in approximately 3 seconds on my machine,
>> whereas previously it was more than 2 minutes.
>
> Awesome! I look forward to trying this out. Will this make the
> upcoming Racket release?
Yes.
--
sam th
sa...@ccs.neu.
> This program now compiles in approximately 3 seconds on my machine,
> whereas previously it was more than 2 minutes.
Awesome! I look forward to trying this out. Will this make the
upcoming Racket release?
_
For list-related administrative tasks
On Mon, Apr 18, 2011 at 2:27 PM, Sam Tobin-Hochstadt wrote:
> On Mon, Apr 18, 2011 at 1:48 PM, Danny Yoo wrote:
>> On Mon, Apr 18, 2011 at 1:38 PM, Danny Yoo wrote:
>>> Hi Sam,
>>>
>>> Ok, I've reduced the example to a smaller, self-contained 188-line
>>> program, with a bunch of type declaratio
At Mon, 18 Apr 2011 13:44:05 -0600, Jay McCarthy wrote:
> I'd like the best of both worlds. I would imagine that this would work
> by having blocked futures be a schedule-able thread so that if they
> need to do unsafe work---and no other Racket thread is
> available---then they could be selected f
I think performance is hard enough that you cannot work from
theoretical concerns, but only from concrete, too slow programs.
Robby
On Mon, Apr 18, 2011 at 3:16 PM, Jay McCarthy wrote:
> 2011/4/18 Robby Findler :
>> So, in that spirit, what is causing your tasks to get stuck? (You can
>> use the
2011/4/18 Robby Findler :
> So, in that spirit, what is causing your tasks to get stuck? (You can
> use the debug log to get some information on this.)
Currently my concern is just theoretical. I'm getting ready to implement it.
Jay
--
Jay McCarthy
Assistant Professor / Brigham Young Universit
On Mon, Apr 18, 2011 at 2:44 PM, Jay McCarthy wrote:
> I have a program that spends most of the time waiting for user
> input/time to advance (think of a World.) I have a computation that I
> can perform at Frame 0, but I don't need the result until Frame 10. I
> will do some work between these fr
I have a program that spends most of the time waiting for user
input/time to advance (think of a World.) I have a computation that I
can perform at Frame 0, but I don't need the result until Frame 10. I
will do some work between these frames.
I'd like to be able to have this computation take place
On Mon, Apr 18, 2011 at 3:02 PM, Jeremiah Willcock wrote:
> Given the following Typed Racket program:
>
> #lang typed/racket
>
> (: greater-than-5? (Any -> Boolean))
> (define (greater-than-5? x)
> (and (integer? x) (> x 5)))
First, you probably want to use `exact-integer?' here, see the TR docs
Given the following Typed Racket program:
#lang typed/racket
(: greater-than-5? (Any -> Boolean))
(define (greater-than-5? x)
(and (integer? x) (> x 5)))
(: equal-to-7? (Any -> Boolean))
(define (equal-to-7? x)
(and (greater-than-5? x) (= x 7)))
I receive the error (highlighting the x in (
Here is an alternative implementation that makes the example you showed
at the very bottom of your emails work. I don't know if its "better" but
using `syntax-local-eval' looks somewhat dangerous to me.
This is mostly straight-forward except that to get the right lexical
scope for `get-x1' we need
On Mon, Apr 18, 2011 at 1:48 PM, Danny Yoo wrote:
> On Mon, Apr 18, 2011 at 1:38 PM, Danny Yoo wrote:
>> Hi Sam,
>>
>> Ok, I've reduced the example to a smaller, self-contained 188-line
>> program, with a bunch of type declarations followed by a trivial
>> function definition:
>
> Ok, reduced fur
Found!
After having read more carefully Eli's very good post (
http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html), it
became clearer that the problem was that the context of the created
identifier was wrong.
Deconstructing and reconstructing the id syntax object did the trick:
(
On Mon, Apr 18, 2011 at 1:38 PM, Danny Yoo wrote:
> Hi Sam,
>
> Ok, I've reduced the example to a smaller, self-contained 188-line
> program, with a bunch of type declarations followed by a trivial
> function definition:
Ok, reduced further to 87 line example. It's short enough that I'll
just em
Hi Sam,
Ok, I've reduced the example to a smaller, self-contained 188-line
program, with a bunch of type declarations followed by a trivial
function definition:
http://hashcollision.org/tmp/test-types.rkt
It's the definition of collect-primitive-command there that takes
several minutes for
On Mon, Apr 18, 2011 at 12:26 PM, Eli Barzilay wrote:
>
> And one more point -- I see this:
>
> (define-struct Rep (seq free-vars free-idxs stx) #:transparent)
> [...]
> (p/c (struct Rep ([seq exact-nonnegative-integer?]
> [free-vars (hash/c symbol? variance?)]
>
At Mon, 18 Apr 2011 12:26:26 -0400,
Eli Barzilay wrote:
>
> But in the TR case the transformation seems fine because
> `filter-equal?' is defined as a simple
>
> (define (filter-equal? a b) (= (Rep-seq a) (Rep-seq b)))
>
> Sam/Vincent: that's probably a good thing to do, and even better --
> g
Thank you all for your help.
Dropping else clause did the trick for the first one. This is great
since it's much more elegant than my second way. (BTW, for that second
way, adding #:servlet-regexp #rx"servlets*" did "fix" my issue the
server not finding /servlets/blog as a static file.)
Going bac
30 minutes ago, Danny Yoo wrote:
>
> diff --git a/collects/typed-scheme/types/filter-ops.rkt
> b/collects/typed-scheme/types/filter-ops.rkt
> index 2d24753..3786840 100644
> --- a/collects/typed-scheme/types/filter-ops.rkt
> +++ b/collects/typed-scheme/types/filter-ops.rkt
> @@ -132,7 +132,11 @@
>
> One hot spot identified: the use of remove-duplicates in the
> definition of -and within typed-scheme/types/filter-ops.rkt is taking
> a significant amount of time.
Ok, code analyzed.
The other part of the -or code that's significantly expensive is the
running optimizations and filtering going
Dear Racket list,
Once again, I need a little help on a macro definition.
I want to define the following (simplified[1]) macro:
(define-syntax-rule/id [*id id-gen*] *body*)
where id is replaced with the result of id-gen inside body.
For example:
(define-syntax-rule/id
[x #'foo]
(begin (defin
> Also, if the part that's slow may well be inferring the type
> parameters to a polymorphic function application, in which case it
> should be easy to work around by explicitly using `inst'.
One hot spot identified: the use of remove-duplicates in the
definition of -and within typed-scheme/types
On Thu, Mar 3, 2011 at 7:33 AM, Don Blaheta wrote:
> Quoth Stephen Chang:
>> I've never seen a dialog box appear behind another window in drracket,
>> but I have on occasion, due to my own doing, lost a dialog box behind
>> another window, and subsequently gotten frustrated when the buttons in
>>
Hi jGc,
It is actually simpler than Noel suggests. Scroll down...
2011/4/16 J G Cho :
> To those familiar with Web Server,
>
> I am a bit lost trying to map servlets to paths. e.g.:
>
> servlet1.rkt should requests to http://localhost:8080/app1
> servlet2.rkt should requests to http://localhost:8
26 matches
Mail list logo