ben
2017-1-31 17:41:21

@ben has joined the channel


ben
2017-1-31 17:41:22

@ben set the channel purpose: racket/contract


ben
2017-1-31 17:44:50

hi @robby “quick question”, I’m thinking about changing mk-any/c->boolean-contract so it special-cases predicates like real? instead of just struct predicates


robby
2017-1-31 17:45:01

@robby has joined the channel



ben
2017-1-31 17:45:41

and I tried adding a hashtable with “all the predicates” from racket/base (118 predicates)


ben
2017-1-31 17:46:15

but that made raco setup & the contract tests a bit slower (20s and 7s, but I only took one run)


ben
2017-1-31 17:47:05

question is: do you know what would be good programs to run to see what racket/base predicates get used the most in contracts (and would be worth special-casing)?


ben
2017-1-31 17:47:23

(or generally, what test would convince you — that I should collect data for)


ben
2017-1-31 17:47:38

also


ben
2017-1-31 17:48:08

I was testing “is this a trusted predicate?” with an expr like (hash-contains-key? H real?), where H is a hasheq


ben
2017-1-31 17:48:21

not sure if there’s a better way. (eom)


robby
2017-1-31 18:58:17

Why not do this syntactically


robby
2017-1-31 18:58:17

?


robby
2017-1-31 18:58:50

oh, wait. nevermind.


robby
2017-1-31 18:59:12

I’m very surprised that raco setup got 20s slower. I would have expected no measurable change.


robby
2017-1-31 18:59:59

I think a good approach to decide which contracts to special case would be to just log all of the ones that appear when say, building the docs, starting up drracket, and whatever other of your favorite app startups. Maybe run a pkg-build with that logging turned on and collect the set.


robby
2017-1-31 19:00:04

something like that.


robby
2017-1-31 19:00:40

does that help?


ben
2017-1-31 19:01:08

yeah that’s good, I’ll find some apps


ben
2017-1-31 19:01:25

(drracket, package server)


ben
2017-1-31 21:43:30

also, I did a little experiment with bytecode size vs. optimizations mentioned in the “Inside Racket” talk. Just for fun: \| Racket version \| du -ch ${dir}/**/*.zo \| \|--------------------+-----------------------\| \| 6.8 \| 228 \| \| build-simple-arrow \| 229 \| \| 1 popular key \| 244 \| \| 2 pop. keys \| 244 \| \| 3 pop. keys \| 236 \| \| 4 pop. keys \| 236 \| \| 5 pop. keys \| 236 \| \| 6 pop. keys \| 231 \| \| 7 pop. keys \| 230 \| \| 8 pop. keys \| 229 \| \| 9 pop. keys \| 229 \| \| 10 pop. keys \| 229 \| \| 11 pop. keys \| 228 \| \| 12 pop. keys \| 228 \| (build-simple-arrow = bytecode size when build-simple-arrow is a define-syntax) (pop. keys = number of “popular keys”) sizes are in MB for the main distribution, unzipped the 6.8 release and ran raco setup