samth
2017-9-13 17:37:35

@florence you’re the relevant person for the pict test timeouts on drdr, right?


samth
2017-9-13 17:37:50

Is there anything I can do to help you debug those (such as access to the drdr machine)?


robkuz
2017-9-13 19:17:17

Is there a possibility to implement generic interfaces after one has defined a struct. Ok, since this is Lisp anything is possible … but is there a well defined way (maybe documented even?)


robkuz
2017-9-13 19:18:38

Sofar all examples first define the interface and then implement that interface while defining the struct. I know it must be possible as @lexi.lambda must have done something with the generic/collections


notjack
2017-9-13 19:58:35

@robkuz it’s possible but not with normal structs, you’ll have to add an indirection later on top of them that supports it. And it probably wouldn’t work with normal struct properties


lexi.lambda
2017-9-13 20:21:45

@robkuz racket/generic doesn’t really allow that. I wrote a multimethod package that allows that sort of thing, but it’s pretty half-baked.


stamourv
2017-9-13 20:45:35

@robkuz: You can, by adding a #:defaults clause when defining the interface.


lexi.lambda
2017-9-13 20:51:23

@stamourv …but then it’s an O(n) predicate lookup instead of a hash lookup. :(


stamourv
2017-9-13 20:53:13

Yes, but I’d expect n to be pretty small in most cases. And it would be a struct type property lookup otherwise, which I don’t think involves hashing.


lexi.lambda
2017-9-13 20:54:08

oh, right. that’s even better—I would hope struct properties are constant time.


samth
2017-9-13 20:54:51

@stamourv @lexi.lambda pretty sure it’s a hash table


stamourv
2017-9-13 20:55:37

As in, struct type properties are stored in a hash table?



stamourv
2017-9-13 20:57:07

Ah, look at that. Didn’t expect that.


lexi.lambda
2017-9-13 20:57:27

totally out of curiosity, what did you expect it to be?


stamourv
2017-9-13 20:59:28

Alist?


stamourv
2017-9-13 20:59:50

The number of properties a struct type has would typically be small, I’d imagine.


notjack
2017-9-13 21:31:51

what’s a good way to make a struct safe for users to use without breaking if you add more fields while still allowing them to define subtypes of the struct?


notjack
2017-9-13 21:35:17

I’m okay with field name overlap between sub and supertypes breaking clients, I just don’t want adding any field at all to break them


apg
2017-9-13 21:35:20

that’s a great question that i’m interested in, too


apg
2017-9-13 21:35:40

there’s some really funky stuff when you want to use #:super around struct copy and such


notjack
2017-9-13 21:35:40

it comes up a lot and it’s the thing that frustrates me most about structs


florence
2017-9-13 21:49:31

@samth I can reproduce the timeouts locally (on my linux desktop only), but the stacktraces are not really helpful, and im not sure how to proceed. It’s somehow related to: the JIT, unsafe-fl operations, and futures.


florence
2017-9-13 21:49:53

The test case is a small one, involving just the blur function, (which uses unsafe-fl and futures)


florence
2017-9-13 21:51:27

its hard to minimize further b/c inlining the blur function and modifying it in seemingly any way decreases the probability that the program will freeze


samth
2017-9-13 21:53:37

@florence For that sort of thing, rr is very nice because you can just run the program repeatedly until failure, and then debug the failed one


florence
2017-9-13 21:55:38

it also will likely go away with the upcoming chez rewrite so its been fairly low priority.

I never got rr to work, but the programs actually just locked up so I was able to attach gdb. It tends to get stuck in seeming arbitrary functions who’s names suggest they have to do with allocation iirc.


florence
2017-9-13 21:57:09

I could also just disable the pict tests that call jack-o-lantern and blur for now to make drdr shut up, since the bug is ages old anyways


florence
2017-9-13 21:57:13

@samth ^


samth
2017-9-13 21:58:21

what didn’t work on rr?


samth
2017-9-13 21:58:40

also just disabling those tests would be good since that would reduce the hang-rate on drdr


florence
2017-9-13 22:04:55

There wasn’t something prebuilt for my platform and I never got building from source working I think? Idr its been like a year since ive looked at this.

I’ll update the issue and disable the tests when I get home.


sinanargun48
2017-9-14 06:10:57

@sinanargun48 has joined the channel