Re: [racket] with-handlers string->xexpr fail

2010-10-22 Thread scouic
i've understood, big thanks for your help ! have a nice day, -mw _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] with-handlers string->xexpr fail

2010-10-22 Thread David Van Horn
On 10/22/10 5:38 PM, scouic wrote: I thought invalid-xexpr?was necessarily a boolean returning # t or # f ... thank you very much for your explanation David exn:invalid-xexpr? is a predicate: it's a function that can be applied to any value and it will return either #t or #f. It returns #t on

Re: [racket] with-handlers string->xexpr fail

2010-10-22 Thread scouic
I thought invalid-xexpr? was necessarily a boolean returning # t or # f ... thank you very much for your explanation David _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] with-handlers string->xexpr fail

2010-10-22 Thread David Van Horn
On 10/22/10 5:12 PM, scouic wrote: Hi, i learn with-handlers mechanism, and i don't understand what's wrong in this piece of code ? #lang racket (require xml) (define a-good-string "hi there!") (define a-bad-string "hi there!") (define (panoramix s) (with-handlers ((exn:invalid-xexpr? (lamb

[racket] with-handlers string->xexpr fail

2010-10-22 Thread scouic
Hi, i learn with-handlers mechanism, and i don't understand what's wrong in this piece of code ? #lang racket (require xml) (define a-good-string "hi there!") (define a-bad-string "hi there!") (define (panoramix s) (with-handlers ((exn:invalid-xexpr? (lambda (e) 'UFO))) (string->xexpr s)))

Re: [racket] wxme-port -> string error

2010-10-22 Thread Robby Findler
This is a shortcoming in the current 2htdp/image. It is on my list. Robby On Friday, October 22, 2010, Todd O'Bryan wrote: > I should mention, this is using the latest nightly build and I got the > error when I did > > (read-assignment-file "/path/to/valid/racket/file.rkt") > > Todd > > On Fri,

Re: [racket] wxme-port -> string error

2010-10-22 Thread Todd O'Bryan
I should mention, this is using the latest nightly build and I got the error when I did (read-assignment-file "/path/to/valid/racket/file.rkt") Todd On Fri, Oct 22, 2010 at 10:57 AM, Todd O'Bryan wrote: > I'm trying to read a student program (which might include images or > not) as text, just s

Re: [racket] Box: When and why?

2010-10-22 Thread Joe Marshall
>> Racket is call-by-value. Period. Always. -- Matthias On Thu, Oct 21, 2010 at 6:38 PM, Shriram Krishnamurthi wrote: > There is a variation on what Matthias said, which is when you need a > shared structure whose value changes but whose representation may > contain immutable constants. I disag

Re: [racket] Box: When and why?

2010-10-22 Thread Raoul Duke
On Fri, Oct 22, 2010 at 5:09 AM, Shriram Krishnamurthi wrote: > There is no STM in Racket, so I don't see the relation.  In a > transactional world, you need to know what "that" means.  In Racket, > there's no cleverness. > > The refs in Clojure may be more akin to the boxes in FrTime. ah! thank

Re: [racket] Adding OS X linker options using raco exe

2010-10-22 Thread Norman Gray
Matthew, hello. On 2010 Oct 22, at 14:45, Matthew Flatt wrote: > `raco exe' doesn't use the system linker (in the sense of `ld') at all. > It clones an existing binary and then adds an extra load command by > manipulating the Mach-O format directly. Flags added by `++exf', > meanwhile, are flags

[racket] wxme-port -> string error

2010-10-22 Thread Todd O'Bryan
I'm trying to read a student program (which might include images or not) as text, just so I can look at it. I tried this: #lang racket (require wxme) (define/contract (read-assignment-file path) (-> (or/c string? path-string?) bytes?) (let* ([the-path (if (path-string? path)

[racket] ICFP 2011: Call for Workshop Proposals

2010-10-22 Thread Wouter Swierstra
CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2011 16th ACM SIGPLAN International Conference on Functional Programming September 19 - 21, 2011 Tokyo, Japan http://www.icfpconference.org/i

Re: [racket] Adding OS X linker options using raco exe

2010-10-22 Thread Matthew Flatt
`raco exe' doesn't use the system linker (in the sense of `ld') at all. It clones an existing binary and then adds an extra load command by manipulating the Mach-O format directly. Flags added by `++exf', meanwhile, are flags to the embedded `racket' or `gracket' in the executable. I'm not sure ho

Re: [racket] Box: When and why?

2010-10-22 Thread Shriram Krishnamurthi
There is no STM in Racket, so I don't see the relation. In a transactional world, you need to know what "that" means. In Racket, there's no cleverness. The refs in Clojure may be more akin to the boxes in FrTime. Shriram On Fri, Oct 22, 2010 at 3:47 AM, Raoul Duke wrote: > On Thu, Oct 21, 201

Re: [racket] Box: When and why?

2010-10-22 Thread Raoul Duke
On Thu, Oct 21, 2010 at 6:38 PM, Shriram Krishnamurthi wrote: > There is a variation on what Matthias said, which is when you need a > shared structure whose value changes but whose representation may > contain immutable constants. akin to http://clojure.org/refs ? __