
Ok.

Can someone point me to an example (Scribble) of a @defproc
returning multiple values? I have:
@defproc[(shape [thing type]) integer? integer?]{...}
And that fails because the result is too many values. I’m not sure how to get that to work?


(values integer? integer?)
is what you want.

Use (values integer? integer?)
. I don’t see that it’s documented anywhere, so I’ll make a note to fix that.

thanks!

Another scribble question: is there a way to have comments show up in a @racketblock[]
?


ty sir

Apropos Scribble.
In the documentation for Sketching, I like to show both the code and the resulting image using the examples
form. I found this way to do it:
@examples[#:label #f #:eval se
(stroke 204 102 0)
(eval:alts (rect 15 20 70 60)
(begin (rect 15 20 70 60) (send dc get-bitmap)))]
Is there a way that’s doesn’t require me to repeat the last expression twice?

on topic of docs, raco docs <word>
has kind of stopped working for me: it opens file:///Users/Knoble/Library/Racket/8.0/doc/search/index.html?q=define-values
(this was with raco docs define-values
), but it’s just a blank page. Used to work fine. Did I run a raco
command and bork something?

Does file:///Users/Knoble/Library/Racket/8.0/doc/search/index.html
otherwise look fine?

Can you make the result pict-convertible?

A little more context.
Before each example, I make a blank bitmap and set the parameter current-dc
.
@examples[#:hidden #:eval se
(current-dc (new-bitmap-dc 100 100))
<some default settings go here>]
Then commands like stroke
and rect
draw on the drawing context in dc
.
In the example I’d like the result on the screen to be:
(stroke 204 102 0)
(rect 15 20 70 60)
<the resulting bitmap>
That is, I want the result of `(send dc-bitmap)
(the bitmap shows up fine in the output)
to be shown but not the command itself.
The only Scribble construct I could find, that were close were
(eval:alts …).
But
eval:alts` always shows the first alternative.

That is a roundabout way of saying, I’d like to write: @examples[#:label #f #:eval se
(stroke 204 102 0)
(rect 15 20 70 60)
(eval:show-result (send dc get-bitmap))]

The contents are @soegaard2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<http://www.w3.org/TR/html4/loose.dtd>">
and that’s it

I have no idea how this happened though

I was working on a new local package and it’s possible I inadvertently ran some odd command…

Maybe raco setup
can fix it?

raco setup --doc-index
I think. That happens to me every few months and I can never remember how to fix.

Beautiful, thanks Sam!

That went on my list of “problems I spent too much time solving” so I won’t forget

@samth another raco make
question for you (thread)

~/herbie $ raco make src/herbie.rkt
~/herbie $ racket src/herbie.rkt report /tmp/test.fpcore /tmp/out
<runs for a while>
instantiate-linklet: mismatch;
reference to a variable that is not exported;
possibly, bytecode file needs re-compile because dependencies changed
name: get-parametric-operator13.1
exporting instance: "/Users/pavpan/herbie/src/syntax/syntax.rkt"
importing instance: "/Users/pavpan/herbie/src/web/plot.rkt"
context...:
body of "/Users/pavpan/herbie/src/web/plot.rkt"
.../racket/lazy-require.rkt:89:13: get-sym
/Applications/Racket v8.2/collects/racket/promise.rkt:65:10
/Applications/Racket v8.2/collects/racket/promise.rkt:45:2
/Applications/Racket v8.2/collects/racket/lazy-require.rkt:109:6
body of (submod "/Users/pavpan/herbie/src/herbie.rkt" main)
~/herbie $ raco make src/web/plot.rkt
~/herbie $ racket src/herbie.rkt report /tmp/test.fpcore /tmp/out
<works>

Here it seems like lazy-require
isn’t properly signaling to raco make
somehow

I think that’s related to what we discussed recently

And I should be able to finish that PR soon

Got it