sschwarzer
2022-6-13 11:16:27

I’m writing a Scribble document (scribble/manual) and would like to highlight @racket[curry] as a link. If I use @racket[append] (for example), it’s formatted as a link to the reference manual. On the other hand, @racket[curry] is formatted in a non-proportional font, but not as a link to the reference manual.

I guess the difference comes from append being in racket/base , but curry only in racket/function. However, I had hoped that putting racket/function in the require at the top of the Scribble document, like @(require racket/function racket/list racket/match scribble/example (for-label racket/base)) would be enough, but seemingly it isn’t.


popa.bogdanp
2022-6-13 11:18:23

You need to require racket/function for-label (like you did racket/base).


sschwarzer
2022-6-13 11:21:15

Thank you!

@(require racket/function racket/list racket/match scribble/example (for-label racket/base) (for-label racket/function)) actually works. (I still need the racket/function without for-label for other purposes.)


popa.bogdanp
2022-6-13 11:22:43

You’re welcome. for-label takes one or more require specs, so you could also have written (for-label racket/base racket/function).


sschwarzer
2022-6-13 11:24:33

I just saw that when I checked the documention of for-label after your first reply. :slightly_smiling_face:


sschwarzer
2022-6-13 11:48:38

Is there a more robust way to link to a function’s documentation instead of something like @hyperlink["<https://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Ffunction..rkt%29._curry%29%29>"]{curry}? We have sec-ref for linking to sections; is there something like that for functions (and forms)?


mflatt
2022-6-13 12:37:20

Here’s a little example that seems to work right. Can you tell what might be different in your case?

#lang scribble/manual @(require scribble/example) @examples[ (struct posn (x y) #:transparent #:methods gen:custom-write [(define (write-proc p out mode) (fprintf out "POINT[~a, ~a]" (posn-x p) (posn-y p)))]) (posn 1 2) ]


mflatt
2022-6-13 12:57:07

Just to make sure, this was covered by the answer about @racket[curry], right? That is, @racket[curry] (with a suitable for-label) is the intended way to link to the documentation.


sschwarzer
2022-6-13 14:04:17

Oops, you’re right. I can use that in the context where I need it. :blush:


samth
2022-6-13 14:55:50

That did not fix the problem for me.


laurent.orseau
2022-6-13 14:58:52

oh no… :disappointed:


samth
2022-6-13 15:04:56

I think I found the problem. It’s sometimes running the script with the interactions window focused, so the text goes there.


laurent.orseau
2022-6-13 15:12:41

Ohhh, that should be an easy fix, thank you!


laurent.orseau
2022-6-13 20:02:59

Can you try adding (send (send drr get-definitions-canvas) focus) right after the new (poll-until ...) line please?


laurent.orseau
2022-6-13 20:03:30

I wonder if one is enough, or if I need to add a few more ones a few lines below.


hj93
2022-6-13 23:27:10

how much many requests per second does the racket sever handle? the one built by Dr. McCarthy


samth
2022-6-14 00:22:45

It definitely depends on what you’re doing but I would expect that you could do many requests per second. Recent benchmarks had sub-millisecond response times on average