Re: [racket] Ensuring data fed to web-server/templates is textual

2012-02-09 Thread Jordan Johnson
On Feb 8, 2012, at 10:17 AM, Jay McCarthy jay.mccar...@gmail.com wrote: web-server/templates uses scribble/text So, if you return a function, then it will be called. I'm not sure I understand the implication: that I could achieve what I'm after by wrapping the images in a function? I'm not

Re: [racket] are people using untyped/snooze?

2012-02-09 Thread Jens Weber
Hello Eduardo and all, I would also really like to get ORM (snooze) running with Racket. Have you found a solution? It's unfortunate that the ORM packet is broken. Database connectivity is such an important aspect of any real world application. Best regards Jens Racket

Re: [racket] Ensuring data fed to web-server/templates is textual

2012-02-09 Thread Eli Barzilay
Yesterday, Jay McCarthy wrote: web-server/templates uses scribble/text So, if you return a function, then it will be called. We could also change scribble/text to support a struct/class property for JIT transformation. Does that sound good? Is that okay with you, Eli? Why a property?

Re: [racket] Ensuring data fed to web-server/templates is textual

2012-02-09 Thread Jay McCarthy
On Thu, Feb 9, 2012 at 11:45 AM, Jordan Johnson j...@fellowhuman.com wrote: On Feb 8, 2012, at 10:17 AM, Jay McCarthy jay.mccar...@gmail.com wrote: web-server/templates uses scribble/text So, if you return a function, then it will be called. I'm not sure I understand the implication: that I

Re: [racket] Ensuring data fed to web-server/templates is textual

2012-02-09 Thread Jay McCarthy
On Thu, Feb 9, 2012 at 12:19 PM, Eli Barzilay e...@barzilay.org wrote: Yesterday, Jay McCarthy wrote: web-server/templates uses scribble/text So, if you return a function, then it will be called. We could also change scribble/text to support a struct/class property for JIT transformation.

Re: [racket] Ensuring data fed to web-server/templates is textual

2012-02-09 Thread Eli Barzilay
A few minutes ago, Jay McCarthy wrote: On Thu, Feb 9, 2012 at 12:19 PM, Eli Barzilay e...@barzilay.org wrote: Yesterday, Jay McCarthy wrote: web-server/templates uses scribble/text So, if you return a function, then it will be called. We could also change scribble/text to support a

[racket] image equality and evaluators

2012-02-09 Thread Jordan Johnson
Hi all, Definitions: #lang racket (require racket/sandbox lang/imageeq) (define ev (make-evaluator '(special beginner) #:requires '(2htdp/image))) Interactions: (image? (ev '(rectangle 2 2 'solid 'blue))) #f (image=? (ev '(rectangle 2 2 'solid 'blue))

Re: [racket] image equality and evaluators

2012-02-09 Thread Eli Barzilay
20 minutes ago, Jordan Johnson wrote: But the REPL renders (ev '(rectangle 2 2 'solid 'blue))) as a picture of a tiny rectangle, as I would expect. How is the above exposing the difference between image=?'s perception of an image, and the object implementing the image? My guess is that the

Re: [racket] image equality and evaluators

2012-02-09 Thread Robby Findler
The structs that are used to represent images are generative and you're getting two different versions of them, one inside the sandbox and one outside. You could do the equality comparison inside the sandbox (the notion of booleans is shared between the sandbox and the outside, unlike images).

Re: [racket] image equality and evaluators

2012-02-09 Thread Robby Findler
On Thu, Feb 9, 2012 at 9:12 PM, Eli Barzilay e...@barzilay.org wrote: The other way is what gets you what you want: you need to use `sandbox-namespace-specs' to make the sandbox share an instance of the necessary modules between your own code and the sandbox, so that structs in the sandbox are

Re: [racket] image equality and evaluators

2012-02-09 Thread Jordan Johnson
Sweet. I'll try that out when I get back to the machine tomorrow. Thanks for the speedy help! Best, jmj -- Sent from my Android phone with K-9 Mail. Robby Findler ro...@eecs.northwestern.edu wrote: On Thu, Feb 9, 2012 at 9:12 PM, Eli Barzilay e...@barzilay.org wrote: The other way is what