Re: [racket-users] transparency of structs?

2019-09-07 Thread Ben Greenman
I see the same results on Racket 7.0 and 6.5, so I don't think
anything has changed.

Maybe the trouble is that (make-inspector) makes a subinspector of
(current-inspector), which has the same value for both the main module
& the submodules.

Switching to (make-sibling-inspector) causes (struct? an-s) to return #f

-- 
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/CAFUu9R4%2BZ-CzmGCx7rZhcqanJXNpTJsyXEB52_bHRT_FC%3DqTqA%40mail.gmail.com.


Re: [racket-users] no TR support for streams?

2019-09-07 Thread Alex Knauth

> On Sep 6, 2019, at 1:04 PM, 'John Clements' via Racket Users 
>  wrote:
> 
> Perhaps I just don’t know how to search the racket docs correctly, but IIUC 
> there’s no support for Streams in the current TR implementation? I just want 
> to use stream-cons, empty-stream, stream-first, and stream-rest. I guess the 
> easy workaround is just to use thunks to roll my own stream, but I’m 
> wondering if I’m missing something obvious?

You can wrap `stream-cons`, etc. in contracts and keep the original stream data 
type, but it's trickier than wrapping a normal function, and involves:
 - an untyped file which imports the macros and exports "function-ized" 
versions of the macros
 - a typed file which imports those function-ized things with require/typed, 
then exports new versions of the macros in terms of the functions

And looks something like like these two files:
; untyped-stream-function-ized.rkt
#lang racket
(provide stream-cons/fn)
(require racket/stream)
(define (stream-cons/fn a b)
  (stream-cons (a) (b)))

; typed-stream.rkt
#lang typed/racket
(provide stream-cons)
(require/typed "untyped-stream-function-ized.rkt"
  [stream-cons/fn (All (a) (-> (-> a) (-> (Sequenceof a)) (Sequenceof a)))])
(define-simple-macro (stream-cons a b)
  (stream-cons/fn (thunk a) (thunk b)))

This is the strategy I used for my `typed-racket-stream` repository:
https://github.com/AlexKnauth/typed-racket-stream 


I wanted to do this instead of "rolling my own" stream library because I wanted 
to be able to share the same stream data-structure as existing untyped racket 
files.

Alex Knauth

-- 
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/50960124-B18A-445F-9511-5899E60D9A86%40knauth.org.


Re: [racket-users] [ANN] Racket-on-ChezScheme docker images now available

2019-09-07 Thread Sage Gerard
Super exciting news. Thank you for sharing!

 Original Message 
On Sep 7, 2019, 2:42 PM, Jack Firth wrote:

> Thanks to the [hard work of Bogdan 
> Popa](https://github.com/jackfirth/racket-docker/pull/34), you can now run 
> Racket-on-ChezScheme inside docker containers using the 
> [jackfirth/racket](https://hub.docker.com/r/jackfirth/racket/) DockerHub 
> repository. The ChezScheme image variants are tagged as 
> jackfirth/racket:{version}-cs or jackfirth/racket:{version}-cs-full, 
> depending on whether you want the minimal installation of Racket or the full 
> installation. For example, this command:
>
>   docker run -it jackfirth/racket:7.4-cs
>
> ...will pull the minimal Racket-on-ChezScheme 7.4 image and run a REPL inside 
> it. Note that running on ChezScheme is only possible for version 7.4 and 
> above. For more information about the Racket images, see the 
> [jackfirth/racket-docker](https://github.com/jackfirth/racket-docker) GitHub 
> repository.
>
> --
> 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/fd9a44f8-1897-4d93-a429-3cb2e40950df%40googlegroups.com](https://groups.google.com/d/msgid/racket-users/fd9a44f8-1897-4d93-a429-3cb2e40950df%40googlegroups.com?utm_medium=email&utm_source=footer).

-- 
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/ayj7nBiQUZF_RlpPiLdYId-DD7MZyLctVLb1BAdUD0m4H7SLCwcFsyrDjmXha6iD3sHhAzsqGFErt9kcnyjqOXJPHnT4eF0h5cTHNBuL3P4%3D%40sagegerard.com.


[racket-users] [ANN] Racket-on-ChezScheme docker images now available

2019-09-07 Thread Jack Firth
Thanks to the hard work of Bogdan Popa 
, you can now run 
Racket-on-ChezScheme inside docker containers using the jackfirth/racket 
 DockerHub repository. The 
ChezScheme image variants are tagged as jackfirth/racket:{version}-cs or 
jackfirth/racket:{version}-cs-full, depending on whether you want the 
minimal installation of Racket or the full installation. For example, this 
command:

  docker run -it jackfirth/racket:7.4-cs

...will pull the minimal Racket-on-ChezScheme 7.4 image and run a REPL 
inside it. Note that running on ChezScheme is only possible for version 7.4 
and above. For more information about the Racket images, see the 
jackfirth/racket-docker  GitHub 
repository.

-- 
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/fd9a44f8-1897-4d93-a429-3cb2e40950df%40googlegroups.com.