ben.knoble
2021-9-29 12:09:32

Couldn’t that macro be a function?


joel
2021-9-29 12:36:16

You know what I guess it could :stuck_out_tongue: tired and overthinking it. I guess at first I was wondering if there was a more contract-y way I should be doing it


soegaard2
2021-9-29 13:13:24

My memory fails: Was flip-x and flip-y ever added? https://github.com/racket/pict/issues/29


badkins
2021-9-29 14:53:34

Do you need complex? also? (define (true-number? n) (or (rational? n) (complex? n)))


shu--hung
2021-9-29 14:53:38

I think I was using something like scale –1 1 or scale 1 –1 but can’t remember whether that works for the bounding box


shu--hung
2021-9-29 14:54:44

oh that’s actually in the comments!


badkins
2021-9-29 15:00:54

Oops - isn’t complex? a superset of rational? ?


badkins
2021-9-29 15:02:49

Bah, never mind (complex? +inf.0+1i) => #t


soegaard2
2021-9-29 15:26:20

FWIW there were a bug in my code that @notjack found. But what was it…


soegaard2
2021-9-29 15:26:43

Something about nested uses, I think.


soegaard2
2021-9-29 15:30:21

Good point. In my case real is enough.


samdphillips
2021-9-29 17:01:03

It seems like it would make sense for struct-guard/c to have an optional #:parent argument.


joel
2021-9-29 17:03:15

Even better, if the subtype struct would just automatically use the parent’s guard contract for the arguments that set the inherited elements, and its own for the rest.


joel
2021-9-29 17:04:55

But maybe that gets too complicated for cases where you want to override the parent’s guard (to make it more strict, for example)


philip.mcgrath
2021-9-30 00:18:11

IIUC, the parent’s guard will always be used, but it will report errors in terms of the parent type, rather than the child. (I’m sure there’s room for improvement in struct-guard/c!)


philip.mcgrath
2021-9-30 01:11:38

Re @mflatt “Even a minimal Racket build should at least include base and racket-lib packages.”

I remember seeing sometime in the last few months that this is not always the case. I’ll see if I can find what I wrote at the time, but I believe it some of the distributed versions had no packages. Certainly building from the racket/src directory (essentially what Guix’s racket-minimal package now does) does not install any packages, which is why I could work around the lock issue by deleting the share/racket/pkgs directory, as I wrote in <https://github.com/racket/racket/issues/3851#issuecomment-929793167>.


mflatt
2021-9-30 01:18:22

I see. By “minimal Racket”, I had in mind a distribution like the one called “minimal” on the download page, But now I see that the non-Windows build instructions stop at something even less than that, since the racket-lib package is not installed by the end of make install.


mflatt
2021-9-30 01:20:20

I’m not immediately sure whether the solution is to fully accommodate yet another configuration (smaller than “minimal”) or adjust the build instructions/targets. I’ll take another look tomorrow.