Re: [racket-users] Contracts for (partially) specifying dictionary key -> value-predicates

2020-10-31 Thread Ben Greenman
On 10/31/20, jackh...@gmail.com wrote: > I'm not sure, but I have a feeling Ben's suggestion to make them functions > instead of macros wasn't about the performance implications of macros. Right. I was only thinking that macros are hard to build on. But then, I can use dictof/proc here. -- You

Re: [racket-users] Should I be posting questions about Racket in us...@racket-lang.org?

2020-10-31 Thread Robby Findler
Yes. On Sat, Oct 31, 2020 at 9:36 AM Don Green wrote: > Should I be posting questions about Racket in us...@racket-lang.org? > > -- > 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

Re: [racket-users] Re: large hash/dc errors (was: Contracts for (partially) specifying dictionary key -> value-predicates)

2020-10-31 Thread Robby Findler
I'm still thinking about Ben's example but I'm seeing the description right at the top in the examples below. What am I missing? Robby #lang racket (module m racket (provide (contract-out [f (->i ([x integer?]) #:pre/desc (x) (or (> x 5) "must be

[racket-users] Should I be posting questions about Racket in us...@racket-lang.org?

2020-10-31 Thread Don Green
Should I be posting questions about Racket in us...@racket-lang.org? -- 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. T

[racket-users] Re: hash-filter: PR or not PR

2020-10-31 Thread unlimitedscolobb
On Saturday, October 31, 2020 at 10:32:22 AM UTC+1 jackh...@gmail.com wrote: > This is definitely a useful thing to have and I've wanted it myself > before. However I'm generally of the opinion that we should avoid making > more collection manipulation functions that are unnecessarily specialize

[racket-users] Re: large hash/dc errors (was: Contracts for (partially) specifying dictionary key -> value-predicates)

2020-10-31 Thread jackh...@gmail.com
I have the same issue for ->i contracts. I'll write multiple #:pre/desc checks with nice messages, which are promptly rendered useless by the fact that ->i prints out the whole contract instead of just the precondition check that failed. On Friday, October 30, 2020 at 7:16:59 PM UTC-7 Ben Greenm

Re: [racket-users] Contracts for (partially) specifying dictionary key -> value-predicates

2020-10-31 Thread jackh...@gmail.com
I'm not sure, but I have a feeling Ben's suggestion to make them functions instead of macros wasn't about the performance implications of macros. I think it was about this particular symmetry: - A (list 1 'apple "banana") is a (list/c number? symbol? string?) - A (hash 'a 1 'b "foo") is a (dicto

Re: [racket-users] Re: Help implementing an early return macro

2020-10-31 Thread jackh...@gmail.com
Wow, these are a lot of great responses. First of all, *awesome* job Ryan. That implementation is exactly what I needed to figure out. I'm definitely starting there first. > Are you looking for `let/ec`? I'd forgotten about that one. That has the *syntax* I want. However my issue with continua

[racket-users] Re: hash-filter: PR or not PR

2020-10-31 Thread jackh...@gmail.com
This is definitely a useful thing to have and I've wanted it myself before. However I'm generally of the opinion that we should avoid making more collection manipulation functions that are unnecessarily specialized to one type of collection. I'd like to see functions that operate on all sequence