Re: [racket] Randomized bisimulation tests and Metropolis-Hastings random walk

2013-01-05 Thread Neil Toronto
Thanks for the pointers! I can't use David Van Horn's because it's untyped, and I need to use this in Typed Racket. (No polymorphic, opaque types, and if I use the `struct' form in `require/typed', I'd get the performance problems I just wrote about on the dev list.) Last time I checked Hari

Re: [racket] JSON datetime value?

2013-01-05 Thread Michael Wilber
(sorry for the duplicate) JSON doesn't specify a way of encoding dates. See http://json.org/ You have to convert your date to a string first, like this: racket> (jsexpr->string (date->string (current-date))) "\"Sat Jan 05 11:20:35-0700 2013\"" Your Javascript code can then just parse the JSON st

[racket] JSON datetime value?

2013-01-05 Thread Limbo Peng
Hi, I want to convert some datetime values to JSON, but the json library doesn't seem to support it: (require srfi/19) (require json) (jsexpr->string (current-date)) ; it complains: ;; write-json: expected argument of type ;; given: (tm:date 56100 33 12 1 6 1 2013 2