Re: [racket-users] Contracts question on structs

2019-02-14 Thread David Storrs
On Fri, Feb 15, 2019 at 12:18 AM David Storrs wrote: > > On Thu, Feb 14, 2019 at 9:08 PM Robby Findler > wrote: > > > > This is what struct/dc is for. Let me know if the docs let you down! > > > > Robby > > This is good to hear about, because I'm actually in the middle of > writing something that

Re: [racket-users] Contracts question on structs

2019-02-14 Thread David Storrs
On Thu, Feb 14, 2019 at 9:08 PM Robby Findler wrote: > > This is what struct/dc is for. Let me know if the docs let you down! > > Robby This is good to hear about, because I'm actually in the middle of writing something that it will help with. Thanks, Robby. One question: Is there a typo in th

Re: [racket-users] issue tracker for course management?

2019-02-14 Thread Jack Rosenthal
On Thu, 14 Feb 2019 at 18:14 -0500, 'John Clements' via Racket Users wrote: > Here’s the question: Do any of you that run classes with multiple > instructors/TAs/etc. use some kind of issue tracker to manage course > issues? Ideally, it would be possible for students to submit issues > but not to s

[racket-users] Re: Autocomplete from a list

2019-02-14 Thread Alex Harsanyi
There are two solutions I can think of: (1) derive combo-field% and override the on-popup method to construct the choice menu dynamically based on what is selected in the combo box field. This has a few disadvantages, namely (a) you have to produce the menu immediately, so if you have to query

Re: [racket-users] Contracts question on structs

2019-02-14 Thread Robby Findler
This is what struct/dc is for. Let me know if the docs let you down! Robby On Thu, Feb 14, 2019 at 7:57 PM Chris GauthierDickey wrote: > I'm wondering if it's possible to have a contract for a struct that only > allows certain kinds of initializations. For example, I have this: > > (provide (co

[racket-users] Contracts question on structs

2019-02-14 Thread Chris GauthierDickey
I'm wondering if it's possible to have a contract for a struct that only allows certain kinds of initializations. For example, I have this: (provide (contract-out [struct Result ((name (or/c Temp? Label?)) (global? boolean?) (value (or/c VarValue? #f)))])) But it's too general. What I'd

Re: [racket-users] Reusing scribble/examples for other languages with external interpreters (Coq)?

2019-02-14 Thread Sorawee Porncharoenwase
I did exactly this, but for Pollen. You will want to create a new subprocess with coqtop -emacs 2>&1. You need -emacs because coqtop alone won’t distinguish the message panel and the context panel, and you need 2>&1 because Racket’s merge-input doesn’t preserve the order when merging stderr and std

[racket-users] issue tracker for course management?

2019-02-14 Thread 'John Clements' via Racket Users
Okay, so this is Racket Users vs. Facebook (I’m asking this question in both places). I think racket-users will win, personally. Sorry for the fairly OT topic. Here’s the question: Do any of you that run classes with multiple instructors/TAs/etc. use some kind of issue tracker to manage course

[racket-users] Reusing scribble/examples for other languages with external interpreters (Coq)?

2019-02-14 Thread William J. Bowman
Does anyone have work adapting or hi-jacking scribble/examples to run code from other languages, particularly for non-sexpr languages that require calling out to an external interpreter? In particular, I want to make it work for Coq programs so I can write nice scribble documents with embedded Coq

[racket-users] Autocomplete from a list

2019-02-14 Thread James Platt
I have a situation where I want a Racket GUI combo-field% (or some other GUI element) to allow the user to select an exact item (uniquely matching a database key) from a list that is too long to display all at once. I'm thinking that some form of auto completion would be best. In Framework, I

Re: [racket-users] Finding the right font%

2019-02-14 Thread Jordan Johnson
Ok, thanks for the replies! —Jordan > On Feb 14, 2019, at 07:57, Matthew Flatt wrote: > > I have noticed that some fonts I used to use became inaccessible on Mac > OS in v7.0, which is when we upgraded Pango. In my case, the relevant > change seems to be that Pango became better at tracking whic

Re: [racket-users] Wishlist for regexen: x mode, named captures, embeddable regexn

2019-02-14 Thread David Storrs
Interesting. Thanks, Greg. On Thu, Feb 14, 2019 at 10:32 AM Jens Axel Søgaard wrote: > > Den tor. 14. feb. 2019 kl. 16.16 skrev Greg Hendershott > : >> >> >> When I do use regexps in Racket, I almost always use them with `match` >> and the `pregexp` pattern, to bind the groups to identifiers. >

Re: [racket-users] Finding the right font%

2019-02-14 Thread Matthew Flatt
I have noticed that some fonts I used to use became inaccessible on Mac OS in v7.0, which is when we upgraded Pango. In my case, the relevant change seems to be that Pango became better at tracking which Mac OS faces are condensed, and it insists on condensed or not matching exactly when you reques

Re: [racket-users] Wishlist for regexen: x mode, named captures, embeddable regexn

2019-02-14 Thread Jens Axel Søgaard
Den tor. 14. feb. 2019 kl. 16.16 skrev Greg Hendershott < greghendersh...@gmail.com>: > > When I do use regexps in Racket, I almost always use them with `match` > and the `pregexp` pattern, to bind the groups to identifiers. > > There is some space between trivial regexps and a full/"real" parser.

Re: [racket-users] Wishlist for regexen: x mode, named captures, embeddable regexn

2019-02-14 Thread Greg Hendershott
I often prefer writing non-trivial SQL as s-expressions (using Ryan's `sql` package). I feel the same way about non-trivial regular expressions, and often use the `rx` macro in Emacs Lisp. In Racket, I tend not to write super complicated regular expressions. For example, I started to write a mar