Re: [racket-users] http-sendrecv with Google geocode

2015-04-21 Thread George Neuner
Hi Sean, On 4/21/2015 1:46 AM, Sean Kanaley wrote: Just comment out #:data and append it to the url: (http-sendrecv maps.googleapis.com http://maps.googleapis.com/ (string-append http://maps.googleapis.com/maps/api/geocode/json?;

Re: [racket-users] Typed analog of integer-in contract

2015-04-21 Thread Asumu Takikawa
This works though: #lang typed/racket (require mzlib/etc) (define-type NDigit (U 0 1 2 3 4 5 6 7 8 9)) (define-type SDigit (U 'one 'two 'three 'four 'five 'six 'seven 'eight 'nine)) (: f (- NDigit SDigit)) (define (f i) (evcase i [(ann 0 0) (displayln i) 'two] [(ann

[racket-users] convert to/from Sribble

2015-04-21 Thread Gour
Hello, after becoming interested to learn Racket to be used as general-purpose language, I'm considering to use Scribble/Polen for my writing/web projects. However, I'm a bit concerned not finding any converted which could be used to conver markup from/to Scribble which means that using it

[racket-users] exploring sribble @ ... seems this should work but doesn't ..

2015-04-21 Thread thomas.lynch
Tyring to use '@' to run a command on a string, fails: racket@ (displayln hello) hello racket@ (require scribble/base) racket@ @displayln{hello} @displayln: undefined; cannot reference undefined identifier context...: /usr/share/racket/collects/racket/private/misc.rkt:87:7 racket@ hello:

Re: [racket-users] Typed analog of integer-in contract

2015-04-21 Thread Matthias Felleisen
#lang typed/racket (define-type NDigit (U 0 1 2 3 4 5 6 7 8 9)) (define-type SDigit (U 'zero 'one 'two 'three 'four 'five 'six 'seven 'eight 'nine)) (: to-string (- NDigit SDigit)) (define (to-string i) (case i [(0) (displayln i) 'zero] [(1) (displayln i) 'zero] [(2) (displayln

Re: [racket-users] http-sendrecv with Google geocode

2015-04-21 Thread George Neuner
Hi Sean, Even weirder when I tried this morning your string-append solution - which I had left in place - worked immediately with no changes from last night. The only thing different is I had closed DrRacket before going to bed and reopened it this morning. Maybe something was wonky in

Re: [racket-users] convert to/from Sribble

2015-04-21 Thread Neil Van Dyke
Gour wrote on 04/21/2015 06:50 AM: Another way to get to lots of different formats from Scribble would be to make Scribble generate more-plain HTML5 (i.e., less tag-heavy than in its normal HTML output, throwing away a lot of the info), and then use that as a source format for other

[racket-users] scribble confusion ...

2015-04-21 Thread thomas.lynch
Manual says: remember that the Scribble is just an alternate for S-expressions Please pardon the question .. ah then what good is it? We already have S-expressions. Perhaps it looks a lot nicer? .. but if that works for scribble, do we need one of these looks nicer rewrites for the

Re: [racket-users] reading writing the preamble of an XML file

2015-04-21 Thread Matthew Butterick
Yes, I packaged the logic described by Jay into some utility functions in my sugar/xml module to make it easier to read write an XML file with its prolog: http://pkg-build.racket-lang.org/doc/sugar/#%28part._.X.M.L%29 On Tue, Apr 21, 2015 at 7:25 AM, Nadeem Abdul Hamid nad...@acm.org wrote:

Re: [racket-users] convert to/from Sribble

2015-04-21 Thread Matthias Felleisen
We'd love to have an additional renderer for Scribble. On Apr 21, 2015, at 7:05 AM, Neil Van Dyke n...@neilvandyke.org wrote: Gour wrote on 04/21/2015 06:50 AM: Another way to get to lots of different formats from Scribble would be to make Scribble generate more-plain HTML5 (i.e., less

Re: [racket-users] Typed analog of integer-in contract

2015-04-21 Thread Leif Andersen
You could use a union type, but I’m not sure if a large union type would work well in terms of performance? I don't think this will work. This takes a long time to run (although I'm not sure how much of this is the macro expansion). Anyway, if it takes this long on a union type with 1