Re: [racket] What is a comparable rkt code for curl command with HTTP Auth?

2012-01-07 Thread Neil Van Dyke
Two things to do: 1. "base64-encode" produces a newline at the end, which you probably want to remove somehow: #lang racket/base (require net/base64) (base64-encode #"user:pwd") ;==> #"dXNlcjpwd2Q=\r\n" (regexp-replace #rx#"[\r\n]+$" (base64-encode #"user:pwd") "") ;==> #"dXNlcjpwd2Q=" 2. Y

[racket] What is a comparable rkt code for curl command with HTTP Auth?

2012-01-07 Thread J G Cho
I am trying to see if I can do the following curl cmd (from Parse.com REST API) in rkt using (require net/*). (To eventually use it from WebServlet and not from my desktop where curl would suffice.) export APPLICATION_ID="your application id" export MASTER_KEY="your master key" curl --user $APPLI

Re: [racket] Bug in window<%> is-shown?

2012-01-07 Thread Matthew Flatt
At Sat, 7 Jan 2012 15:58:31 +0200, Tomi Neste wrote: > I noticed that sending is-shown? to a GUI object returns #t even when > the parent top level window is invisible (and correctly returns #f for > is-shown?). What I understood from the documentation the child objects > should always return #f wh

Re: [racket] mime/multipart parsing

2012-01-07 Thread Matthew Flatt
Looking at this again, I see that `net/mime' expects a complete message --- header and body, but no extra prefix --- so there shouldn't be a "--9nbsYRvJBLR..." line before the "Content-Type" header. By itself, that line is essentially being ignored as an ill-formed header element. Adding a blank li

Re: [racket] clarification for a Typed Racket error?

2012-01-07 Thread Sam Tobin-Hochstadt
This is clearly a bug -- the code ought to typecheck just fine. I'll take a look at it. On Fri, Jan 6, 2012 at 2:24 AM, Erik Silkensen wrote: > Hi, > > I was wondering if someone could help me understand the problem with the > following code? > > (struct: obj ([a : Integer] [b : Symbol])) > > (

Re: [racket] mime/multipart parsing

2012-01-07 Thread Jordan Schatz
Thank you Matthew, The message I was using did have CRLF line endings, but it had one too many: -- #lang racket (require net/mime) (define message-string (let ([sep "\r\n"]) (string-append sep ;;This message starts

Re: [racket] how to display formlets inside templates

2012-01-07 Thread keyd...@gmx.de
Thanks so much Jay, that helps :-) Ciao, Sigrid Am 06.01.2012 um 19:57 schrieb Jay McCarthy: > formlet-display returns a forest of xexprs > > Templates are about writing the text directly as a string. > > Whenever you want to include any non-string content in a template, > you'll need to rend

[racket] Nightly build page not working

2012-01-07 Thread Nadeem Abdul Hamid
The nightly build download pages are not working - instead of controls to select and download installers, all that appears is {{{CONTENTS}}} and {{{VERSION}}} strings. Racket Users list: http://lists.racket-lang.org/users

[racket] Bug in window<%> is-shown?

2012-01-07 Thread Tomi Neste
Hi! I noticed that sending is-shown? to a GUI object returns #t even when the parent top level window is invisible (and correctly returns #f for is-shown?). What I understood from the documentation the child objects should always return #f when a parent is invisible/closed? This happens at least w

[racket] getting complete paths to Racket executables

2012-01-07 Thread Neil Van Dyke
How do I get the complete path to Racket executables like "raco", in a portable way? More precisely, I would like to get the complete path of the Racket executable currently being used. (From there, it would be good enough just to look for an executable of the desired name, like "raco", in th