
~in scribble/manual
, I have [edited]~ ~but boolean?
(available in racket/base) is still underlined in red. What am I missing, again?~ raco setup my-pkg
solved it.

Related: How does one use #:escape
in <https://docs.racket-lang.org/scribble/eval.html?q=examples#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29\|examples>
scribble/example
? I though the syntax would be (examples #:eval ev #:hidden #:escape WOO
(WOO `(require racket/string
racket/port
,@mods)))
but that throws WOO: undefined;
cannot reference an identifier before its definition

and when I try to use #,
which is the default, it throws: eval:1:0: unsyntax: illegal outside of quasisyntax
(examples #:eval ev #:hidden
#,(begin (displayln "woo")
`(require racket/string
racket/port
,@mods)))

I’m trying to getting used to the package server https://github.com/racket/racket-pkg-website to look into https://github.com/racket/racket-pkg-website/issues/76 .
I can start the server locally. It lists the packages, I can start the registration process and I see in the terminal the access code. When I complete the registration with the code from the terminal, I get the following stacktrace both in the terminal and in the browser: infrastructure-userdb/registration: Got valid code for "<mailto:sschwarzer@sschwarzer.net\|sschwarzer@sschwarzer.net>"
racket-pkg-website/users: Updating user record "<mailto:sschwarzer@sschwarzer.net\|sschwarzer@sschwarzer.net>"
infrastructure-userdb/db: Updating user '#s(user-info "<mailto:sschwarzer@sschwarzer.net\|sschwarzer@sschwarzer.net>" #"$2y$12$Yv/JNH4tl
LC9NvXIWytllOhjgfK3PjEz69sIwjxIMFWZkcQZxhBq2\0" #hash())
simple-json-rpc: sensitive request "/api/authenticate"
Servlet (@ /register-or-reset;((%22k%22%20.%20%22(52%202%2076361724)%22))) exception:
tcp-connect: connection failed
hostname: localhost
port number: 8445
system error: Connection refused; errno=111
context...:
/home/schwa/sd/racket/current/collects/openssl/mzssl.rkt:1845:0: do-ssl-connect
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:555:3
/home/schwa/sd/racket/current/collects/net/http-client.rkt:67:0: http-conn-open!
/home/schwa/sd/racket/current/collects/net/http-client.rkt:274:0: http-conn-open
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:555:3
/home/schwa/sd/racket/current/collects/net/url.rkt:201:0: <http://getpost-impure-port>
/home/schwa/sd/racket/current/collects/net/url.rkt:271:0: getpost-pure-port
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:489:18
/home/schwa/sd/racket/racket-pkg-website/src/json-rpc.rkt:17:0: simple-json-rpc!
/home/schwa/sd/racket/racket-pkg-website/src/site.rkt:369:0: create-session-after-authentication-
success!
/home/schwa/sd/racket/racket-pkg-website/src/site.rkt:325:0: login-or-register-flow*
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-higher-order.rkt:375:33
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/dispatchers/dispatch-servlets.
rkt:63:2
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/private/dispatch-server-with-c
onnect-unit.rkt:101:2
Any idea how to fix this and continue? I can browse the local package server via https after accepting the self-signed certificate.
What might be related, though, is that I see many of these stacktraces (also before starting the registration process): port->ssl-ports: accept failed (input terminated prematurely)
context...:
/home/schwa/sd/racket/current/collects/openssl/mzssl.rkt:1550:0: wrap-ports
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:555:3
.../private/arrow-higher-order.rkt:375:33
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/private/dispatch-server-with-c
onnect-unit.rkt:87:0: handle-connection/cm27
although in the browser it looks like the requests succeeded, for example, package information is displayed.

From the docs of racketblock
.

Since free-identifier=?
is used, I expect you need to write #'WOO
.

There are two servers: racket-pkg-website and pkg-index/official. The former consults the latter to authenticate (I’m not sure why), so you have to be running both.

I tried this also and failed, but i think it should not be the case anyway because racketblock is already syntax and thus takes syntax objects

You are right, #:escape WOO
ought to do.
(define-syntax (examples stx)
(syntax-parse stx
[(_ (~or (~optional (~seq #:eval eval:expr))
(~optional (~and #:once once-kw))
(~optional (~seq #:escape escape:id))
...))

Is this the “backend server” that’s mentioned in the configuration section of https://github.com/racket/racket-pkg-website#configuration ?

Yes

FWIW, setting the pkg-index server in the config of racket-pkg-website (“frontend server”) to the global server as suggested in the README didn’t work. When submitting the registration code, I got a (shorter) stacktrace (I think 3 or 4 stack levels) in the terminal and in the browser. I don’t have the stacktrace handy anymore.
I’m now running the backend server locally. When submitting the registration code (second part of the registration), I get the stacktrace in the terminal: racket-pkg-website/users: Sending account registration email to "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
infrastructure-userdb/registration: Generated new code b42113444cc857ad0e1f8e2d for "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
racket-pkg-website/users: Checking registration code for "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
infrastructure-userdb/registration: Got valid code for "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
racket-pkg-website/users: Updating user record "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
infrastructure-userdb/db: Updating user '#s(user-info "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>" #"$2y$12$Lt4FasquDvP1TL1gp56TWOa6pp98Dk/fwy236FMRzWmW60FxMWdQ2\0" #hash())
simple-json-rpc: sensitive request "/api/authenticate"
Servlet (@ /register-or-reset;((%22k%22%20.%20%22(4%205%2041013006)%22))) exception:
ssl-connect: connect failed (input terminated prematurely)
context...:
/home/schwa/sd/racket/current/collects/openssl/mzssl.rkt:606:0: error/network
/home/schwa/sd/racket/current/collects/openssl/mzssl.rkt:1550:0: wrap-ports
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:555:3
/home/schwa/sd/racket/current/collects/net/http-client.rkt:67:0: http-conn-open!
/home/schwa/sd/racket/current/collects/net/http-client.rkt:274:0: http-conn-open
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:555:3
/home/schwa/sd/racket/current/collects/net/url.rkt:201:0: <http://getpost-impure-port>
/home/schwa/sd/racket/current/collects/net/url.rkt:271:0: getpost-pure-port
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-val-first.rkt:489:18
/home/schwa/sd/racket/racket-pkg-website/src/json-rpc.rkt:17:0: simple-json-rpc!
/home/schwa/sd/racket/racket-pkg-website/src/site.rkt:369:0: create-session-after-authentication-success!
/home/schwa/sd/racket/racket-pkg-website/src/site.rkt:325:0: login-or-register-flow*
/home/schwa/sd/racket/current/collects/racket/contract/private/arrow-higher-order.rkt:375:33
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/dispatchers/dispatch-servlets.rkt:63:2
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/private/dispatch-server-with-connect-unit.rkt:101:2
write-bytes: output port is closed
output port: #<output-port:SSL tcp-accepted>
context...:
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/http/response.rkt:104:0: output-response-head
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/http/response.rkt:33:4
/home/schwa/sd/racket/current/share/pkgs/web-server-lib/web-server/private/dispatch-server-with-connect-unit.rkt:101:2
racket-pkg-website/users: Checking registration code for "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
infrastructure-userdb/registration: Got invalid code for "<mailto:dummy3@sschwarzer.net\|dummy3@sschwarzer.net>"
At the end it says the code is invalid, but I’m quite sure it’s correct. What’s interesting now is that the above stacktrace appears, I think, more than 10 seconds after submitting the form with the code. So it seems there’s a timeout and the frontend server wrongly concludes that the code was invalid. (But I’m guessing here.)
I don’t see anything printed in the terminal where the backend server runs. But obviously there’s a difference to before in that the stacktrace is different and it appears after a relatively long time. So I assume that there’s at least a low-level network connection established between the frontend and backend server when submitting the registration code, but maybe the SSL connection isn’t established properly.

> There are two servers: racket-pkg-website and pkg-index/official. The former consults the latter to authenticate (I’m not sure why), so you have to be running both. As I understand the documentation, the backend server stores the user data, especially password hashes. So I guess the idea is to be able to separate the actual package handling from the more sensitive user registration and login.