[racket-users] Re: Portable version for Windows

2020-05-15 Thread Marcio Andrey Oliveira
The original article can be found here: 
https://www.wisdomandwonder.com/link/5656/portable-racket-for-windows-users.

I cloned it to my own repository (
https://github.com/plicatibu/racket-portable) and you can get the installer 
of the portable version 7.7.0 here: (
https://github.com/plicatibu/racket-portable/releases/)

Best regards.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/badcdd2e-eba6-42fd-95e4-92df70591be7%40googlegroups.com.


[racket-users] Re: Trouble shooting net/http-client

2020-05-15 Thread je back
Sam: Thanks for the link to the source

Jon: I didn't include an example in my original post because the call is 
for obtaining an authorization token from a private server which made it 
awkward to share. But, thanks to your example, I pursued coming up with a 
good example and managed to get my original snippet working. I've pasted 
the  example with the test server I used below.  I found this server 
(httpbin.org) helpful because it echos the data element that it received -- 
this enabled me to sort out my typos...

Jan Erik

#lang racket
(require net/http-client json)
(let* ((user "test_user")
(password "test_password")
(ht (hasheq 'client_id "test_client" 'grant_type "Bearer" 'username 
user 'password password)))
  (define-values (status headers in)
  (http-sendrecv "httpbin.org"
 "/post"
 #:ssl? #t
 #:version "1.1"
 #:method "POST"
 #:data (jsexpr->string ht)
 #:headers (list "Content-Type: application/json")))
(displayln status)
(displayln headers)
(displayln (port->string in))
(close-input-port in))


On Friday, May 15, 2020 at 3:57:52 PM UTC-4, je back wrote:
>
> I'm having trouble with formatting the #:data parameter to a http-sendrecv 
> request.  If I insert the string literal after #:data "my string" it works, 
> if I bind the string to a symbol (define my-string "my string") and call 
> with #:data my-string i get an error from the severs: HTTP/1.1 400 Bad 
> Request .  Is there a way to echo or examine the request as sent? 
>
> Also, I can't figure out where the source code for this library is located.
>
> Thanks,
> Jan Erik
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/71ab7c4d-cd3a-49ea-94a4-82f8316465e3%40googlegroups.com.


[racket-users] Re: raco pkg migrate previous versions

2020-05-15 Thread evdubs
If you're running Linux or (I assume) OS X, I think you might be able to 
just do the following:

$ ls ~/.racket

For me, that shows folders for Racket versions that include raco pkg install 
packages. Maybe that's sufficient?

Evan

On Friday, May 15, 2020 at 6:55:34 AM UTC-10, Curtis Dutton wrote:
>
> Is there a way to view the previous versions that were installed from raco 
> using raco pkg migrate?
>
> I always find myself trying to guess the previous version number after an 
> upgrade to migrate from. Does raco pkg have the ability to list previously 
> instlalled versions like drracket does?
>
>
> Thanks,
>Curt
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/e89f3dd8-3da7-4ae8-b229-a70353825c3a%40googlegroups.com.


Re: [racket-users] Trouble shooting net/http-client

2020-05-15 Thread Jon Zeppieri
I can't reproduce this with a simple example.

```
#lang racket/base

(require net/http-client)

(define data "hello world!")

(http-sendrecv "postman-echo.com"
   "/post"
   #:ssl? #f
   #:method #"POST"
   #:data data)
```

Maybe you could post your code?

- Jon


On Fri, May 15, 2020 at 3:57 PM je back  wrote:
>
> I'm having trouble with formatting the #:data parameter to a http-sendrecv 
> request.  If I insert the string literal after #:data "my string" it works, 
> if I bind the string to a symbol (define my-string "my string") and call with 
> #:data my-string i get an error from the severs: HTTP/1.1 400 Bad Request .  
> Is there a way to echo or examine the request as sent?
>
> Also, I can't figure out where the source code for this library is located.
>
> Thanks,
> Jan Erik
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/b786e6fa-512b-4694-885a-afde1a011cf1%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAKfDxxxQ-LA9ood8n5xca3jQf-ux%3DcWfPFwb2G-ijVeVreKhvQ%40mail.gmail.com.


Re: [racket-users] Trouble shooting net/http-client

2020-05-15 Thread Sam Tobin-Hochstadt
The source code is here:
https://github.com/racket/racket/blob/master/racket/collects/net/http-client.rkt

Sam

On Fri, May 15, 2020 at 3:57 PM je back  wrote:
>
> I'm having trouble with formatting the #:data parameter to a http-sendrecv 
> request.  If I insert the string literal after #:data "my string" it works, 
> if I bind the string to a symbol (define my-string "my string") and call with 
> #:data my-string i get an error from the severs: HTTP/1.1 400 Bad Request .  
> Is there a way to echo or examine the request as sent?
>
> Also, I can't figure out where the source code for this library is located.
>
> Thanks,
> Jan Erik
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/b786e6fa-512b-4694-885a-afde1a011cf1%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BbYgz35ZN8ZSe8B_Njspet0n9kK%3DEtsvH-5ob_Y9YyQWg%40mail.gmail.com.


[racket-users] Trouble shooting net/http-client

2020-05-15 Thread je back
I'm having trouble with formatting the #:data parameter to a http-sendrecv 
request.  If I insert the string literal after #:data "my string" it works, 
if I bind the string to a symbol (define my-string "my string") and call 
with #:data my-string i get an error from the severs: HTTP/1.1 400 Bad 
Request .  Is there a way to echo or examine the request as sent? 

Also, I can't figure out where the source code for this library is located.

Thanks,
Jan Erik


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/b786e6fa-512b-4694-885a-afde1a011cf1%40googlegroups.com.


[racket-users] Re: Portable version for Windows

2020-05-15 Thread Marcio Andrey Oliveira
Never mind. I found a template for creating it.

Best regards.

Em quinta-feira, 14 de maio de 2020 14:35:43 UTC-3, Marcio Andrey Oliveira 
escreveu:
>
> Hi.
>
> I'm wondering if there is either any portable version or an easy way to 
> use install Racket in an pen drive.
>
> Thank you in advance.  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/8988c9e1-9f3f-4fe2-93ff-75355bc31616%40googlegroups.com.


[racket-users] raco pkg migrate previous versions

2020-05-15 Thread Curtis Dutton
Is there a way to view the previous versions that were installed from raco
using raco pkg migrate?

I always find myself trying to guess the previous version number after an
upgrade to migrate from. Does raco pkg have the ability to list previously
instlalled versions like drracket does?


Thanks,
   Curt

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAPChLEqeQO0VVH3yTxFWYhGoUAj8hHJxEpcm8Oyc06RhtNj99Q%40mail.gmail.com.


Re: [racket-users] SOLVED BUT needs documentation change: printing structures in typed Racket

2020-05-15 Thread Sam Tobin-Hochstadt
I've updated the docs.

On Fri, May 15, 2020 at 10:33 AM Hendrik Boom  wrote:
>
> On Fri, May 15, 2020 at 10:07:31AM -0400, Sam Tobin-Hochstadt wrote:
> > Generics are not supported yet; you need to use structure type
> > properties, like this:
> >
> > #lang typed/racket/base
> >
> > (: parameter-print : Any Output-Port Any -> Any)
> > (define (parameter-print v p b) (fprintf p "hi\n"))
> >
> > (struct parameter
> >   ([type : String] [name : Symbol] [len : (Option String)] [const? :
> > Boolean] [stars : Integer])
> >   #:property prop:custom-write  parameter-print)
>
> Thank you.  That worked.
>
> But according to section 2.5 of the typed Racket reference, #:property
> is not one of the allowed options in struct.
>
> Perhaps the documentation needs to be updated/
>
> -- hendrik
>
> >
> > On Fri, May 15, 2020 at 8:00 AM Hendrik Boom  wrote:
> > >
> > > How does one provide a method to print strutures in typed Racket?
> > >
> > > (struct parameter
> > >
> > >   ([type : XML] [name : Symbol] [len : (Option String)] [const? : 
> > > Boolean] [stars : Integer])
> > >   #:methods gen:custom-write [(define write-proc parameter-print)]
> > >   )
> > >
> > > seems not to work.  But something like this did work in untyped Racket.
> > > Is there some other way to do this?
> > >
> > > -- hendrik
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Racket Users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an 
> > > email to racket-users+unsubscr...@googlegroups.com.
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/racket-users/20200515120026.ski2o43crgtnsnr3%40topoi.pooq.com.
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZFMR0evj%2B%3DcoeQaaQ602f7rGj76HtNc7N3bswipH7aEg%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/20200515143347.ceg34vkaelx6sdu2%40topoi.pooq.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BbxDsNAaDGHbEpaJj_%2BN9_v0ZO%3D3xgo8%2BMR6EE_1rKpTA%40mail.gmail.com.


[racket-users] SOLVED BUT needs documentation change: printing structures in typed Racket

2020-05-15 Thread Hendrik Boom
On Fri, May 15, 2020 at 10:07:31AM -0400, Sam Tobin-Hochstadt wrote:
> Generics are not supported yet; you need to use structure type
> properties, like this:
> 
> #lang typed/racket/base
> 
> (: parameter-print : Any Output-Port Any -> Any)
> (define (parameter-print v p b) (fprintf p "hi\n"))
> 
> (struct parameter
>   ([type : String] [name : Symbol] [len : (Option String)] [const? :
> Boolean] [stars : Integer])
>   #:property prop:custom-write  parameter-print)

Thank you.  That worked.

But according to section 2.5 of the typed Racket reference, #:property 
is not one of the allowed options in struct.

Perhaps the documentation needs to be updated/

-- hendrik
 
> 
> On Fri, May 15, 2020 at 8:00 AM Hendrik Boom  wrote:
> >
> > How does one provide a method to print strutures in typed Racket?
> >
> > (struct parameter
> >
> >   ([type : XML] [name : Symbol] [len : (Option String)] [const? : Boolean] 
> > [stars : Integer])
> >   #:methods gen:custom-write [(define write-proc parameter-print)]
> >   )
> >
> > seems not to work.  But something like this did work in untyped Racket.
> > Is there some other way to do this?
> >
> > -- hendrik
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/20200515120026.ski2o43crgtnsnr3%40topoi.pooq.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZFMR0evj%2B%3DcoeQaaQ602f7rGj76HtNc7N3bswipH7aEg%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20200515143347.ceg34vkaelx6sdu2%40topoi.pooq.com.


Re: [racket-users] printing structures in typed Racket

2020-05-15 Thread Sam Tobin-Hochstadt
Generics are not supported yet; you need to use structure type
properties, like this:

#lang typed/racket/base

(: parameter-print : Any Output-Port Any -> Any)
(define (parameter-print v p b) (fprintf p "hi\n"))

(struct parameter
  ([type : String] [name : Symbol] [len : (Option String)] [const? :
Boolean] [stars : Integer])
  #:property prop:custom-write  parameter-print)

On Fri, May 15, 2020 at 8:00 AM Hendrik Boom  wrote:
>
> How does one provide a method to print strutures in typed Racket?
>
> (struct parameter
>
>   ([type : XML] [name : Symbol] [len : (Option String)] [const? : Boolean] 
> [stars : Integer])
>   #:methods gen:custom-write [(define write-proc parameter-print)]
>   )
>
> seems not to work.  But something like this did work in untyped Racket.
> Is there some other way to do this?
>
> -- hendrik
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/20200515120026.ski2o43crgtnsnr3%40topoi.pooq.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZFMR0evj%2B%3DcoeQaaQ602f7rGj76HtNc7N3bswipH7aEg%40mail.gmail.com.


Re: [racket-users] at sign in scribble

2020-05-15 Thread Sorawee Porncharoenwase
See
https://docs.racket-lang.org/scribble/reader.html?q=escape#%28part._.The_.Scribble_.Syntax_at_a_.Glance%29

Either of this works:
- @bold{a@"@"b}
- @bold|{a@b}|



On Fri, May 15, 2020 at 5:04 AM Hendrik Boom  wrote:

> I hae not been able to figure out from the scribble documentation how to
> produce a document containing an at sign.
>
> Just putting the desired at sign into the source file of course doesn't
> work, since the at-reader intercepts it.
>
> -- hendrik
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/20200515120418.yunluqvjoshcf4lj%40topoi.pooq.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CADcueguGREyxJAqGnP5YfwZow7QwojmmVsGNoMGAa%2BDKLsDKQQ%40mail.gmail.com.


[racket-users] at sign in scribble

2020-05-15 Thread Hendrik Boom
I hae not been able to figure out from the scribble documentation how to 
produce a document containing an at sign.

Just putting the desired at sign into the source file of course doesn't 
work, since the at-reader intercepts it. 

-- hendrik


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20200515120418.yunluqvjoshcf4lj%40topoi.pooq.com.


[racket-users] printing structures in typed Racket

2020-05-15 Thread Hendrik Boom
How does one provide a method to print strutures in typed Racket?

(struct parameter
 
  ([type : XML] [name : Symbol] [len : (Option String)] [const? : Boolean] 
[stars : Integer])
  #:methods gen:custom-write [(define write-proc parameter-print)]
  )

seems not to work.  But something like this did work in untyped Racket.
Is there some other way to do this?

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20200515120026.ski2o43crgtnsnr3%40topoi.pooq.com.