pnwamk
2018-4-28 13:51:59

prefab-key sanity check please! Does this seem like a reasonable predicate to determine if a prefab key corresponds to prefab structs which have 1 or more mutable fields: (define (prefab-key-with-mutable-fields? key) (match key [(? symbol?) #f] [(list-rest _ mutable-flds _) (not (eqv? 0 (vector-length mutable-flds)))]))


ryanc
2018-4-28 14:17:54

@pnwamk I think that will miss the case when it has mutable fields but they are inherited from the parent struct type.


pnwamk
2018-4-28 14:19:23

@ryanc ah, thanks!


pnwamk
2018-4-28 14:19:47

Is there a lot of duplicated boilerplate code floating around the racket repositories to work with prefabs?



pnwamk
2018-4-28 14:20:17

and am trying to wrap my head around the prose in the Racket reference and all this code :persevere:


pnwamk
2018-4-28 14:28:03

I’m tempted to start w/ a PR adding a grammar of valid prefab-keys to the reference…


ryanc
2018-4-28 14:28:48

I don’t know how much there is for prefabs. I haven’t often had to care what the structure of a prefab key was. My personal hobgoblin is module paths and module path indexes. I keep resolving to write the one true module path conversion/canonicalization library … “when I get time”.


ryanc
2018-4-28 14:29:24

For this particular question, you could also convert it to a struct-type and then use struct-type-info, I think.


dedbox
2018-4-28 16:02:46

Did you figure this out?


dedbox
2018-4-28 16:03:04

I’m trying to understand how provide/require are implemented.


aydar.js
2018-4-28 19:04:52

@aydar.js has joined the channel


notjack
2018-4-28 20:30:48

Yes please, if I don’t get to it first


notjack
2018-4-28 20:31:46

I’ve gotten a few questions answered but they mostly just led me to more questions


notjack
2018-4-28 20:33:08

Trying to work out how to get contract-out to play nicely with my syntax annotations project