[racket-users] "Live" REPL to cooperate with event loops?

2017-12-09 Thread Christopher Lemmer Webber
Hello! I'm fairly new to Racket, but not to Scheme. I'm very impressed with everything that's available. One thing I miss from Guile is the cooperative REPL support: https://www.gnu.org/software/guile/manual/html_node/Cooperative-REPL-Servers.html It's possible to spawn a REPL that runs in s

Re: [racket-users] Is there a predicate for structs in general?

2017-12-09 Thread David Storrs
Ah. Yes, that makes more sense. Thanks. On Sat, Dec 9, 2017 at 3:32 PM, Robby Findler wrote: > One hopefully helpful piece of information is that _all_ values in Racket > are structs. So this predicate is telling you that this kind of value is > revealing its inherent "structness" to you or not

Re: [racket-users] Is there a predicate for structs in general?

2017-12-09 Thread Robby Findler
One hopefully helpful piece of information is that _all_ values in Racket are structs. So this predicate is telling you that this kind of value is revealing its inherent "structness" to you or not. In this case, the struct isn't transparent so it isn't revealing it. (Just like cons pairs don't rev

[racket-users] Is there a predicate for structs in general?

2017-12-09 Thread David Storrs
(struct fruit (name color)) -> (struct? (fruit 'apple 'red)) #f This surprised me. I'm trying to wrap my head around the docs for struct? and struct-info? and not having a lot of success. Is there a way to simply say "is this a struct of some sort?" Context: I'm playing around with structs th

Re: [racket-users] pragmatics of exhaustiveness checking in TR

2017-12-09 Thread Alex Knauth
> On Dec 9, 2017, at 1:04 PM, 'John Clements' via users-redirect > wrote: > > TR doesn’t really do exhaustiveness checking, really, … except sorta. I’m > mostly just writing this to summarize my thinking and to see if there’s > something obvious I’m missing. The Utilities section of the TR

[racket-users] TR can't generate contracts for prefab structs?

2017-12-09 Thread 'John Clements' via users-redirect
It looks to me like TR can’t generate contracts for prefab structs in a way that I would expect it to. Specifically, here’s a TR file and a Racket file that uses a TR-defined prefab structure: makes-foo.rkt: #lang typed/racket (provide (struct-out Foo) get-a-foo) (struct Foo ([a : St

[racket-users] pragmatics of exhaustiveness checking in TR

2017-12-09 Thread 'John Clements' via users-redirect
TR doesn’t really do exhaustiveness checking, really, … except sorta. I’m mostly just writing this to summarize my thinking and to see if there’s something obvious I’m missing. I spent some time this morning debugging code that looked something like this: #lang typed/racket (define-type Format

Re: [racket-users] Assigning actions to any key on a terminal

2017-12-09 Thread Rickard Andersson
> Hi, OK, I'll look for the console API, or installing Linux/BSD on a > virtual machine, or even go experiment with racket/gui, since it's just > a little project mostly for fun. :) > > Greetings > Cleverson > `racket/gui` is amazing and works super well on Windows indeed, so I would definitel