
Hi @laurent.orseau, you asked earlier about the renderer2d
objects. I cleaned up my notes and put them up as a wiki page here: https://github.com/racket/plot/wiki/Renderer2D-Notes, hopefully you’ll find them useful.

Thanks @alexharsanyi that’s very useful indeed. I have a better sense of the renderer2d
struct now


I like the cover

Hmmm… I think I have mixed feelings about this… Also, on the topic of Javascript:

Strange that they did a JavaScript version before a Python version considering they switched from Scheme to Python.

It seems to have been different authors adapted it to JS

They use simplified subsets of JS, sort of like the beginner languages in HTDP


@mflatt I get the following error when I run make site
racket/bin/racket -G build/user/config -X racket/collects -A build/user -MCR /root/racket-src/build/zo: -l- distro-build/assemble-site "build/site.rkt" "default" "racket"
Assembling site as build/site
Building catalog from build/built
Copying build/log
web "log"
Copying build/installers
copy-directory/files: encountered path that is neither file nor directory
path: build/installers
context...:
/root/racket-src/racket/collects/racket/file.rkt:114:2: loop
body of "/root/racket-src/build/user/8.4.0.3/pkgs/distro-build-server/assemble-site.rkt"

One error that happened before the one above is:

if [ -d ".git" ]; then git update-server-info ; fi
racket/bin/racket -G build/user/config -X racket/collects -A build/user -MCR /root/racket-src/build/zo: -l distro-build/serve-catalog "build/site.rkt" "default" "localhost" 9440 racket/bin/racket -G build/user/config -X racket/collects -A build/user -MCR /root/racket-src/build/zo: -l- distro-build/drive-clients -M "build/site.rkt" "default" localhost 9440 "localhost" "main-distribution main-distribution-test" "" "Racket" racket racket
Generating default README
tcp-listen: listen failed
hostname: localhost
port number: 9440
system error: Cannot assign requested address; errno=99
context...:
/root/racket-src/build/user/8.4.0.3/pkgs/web-server-lib/web-server/private/dispatch-server-with-connect-unit.rkt:49:10
/root/racket-src/build/user/8.4.0.3/pkgs/compatibility-lib/mzlib/kw.rkt:468:41: run-server
[2022-01-21T00:42:42] The server time is now Friday, January 21st, 2022 12:42:42am
Logging build: localhost (log: build/log/localhost)
Build FAILED for "localhost"
Duration for localhost: 00:00:33

There should be more information about why the client part failed in “build/log/localhost”. (And the later error is because that failed.)


Looks like the problem really was in trying to create a listener at port 9440. Does just (tcp-listen 9440)
fail?

No, it works.

also, why does tcp-connect get the error : Cannot assign requested address
?

in case you are wondering, I am using docker with a clean image to run make site

Hmm, let my try another approach

The cannot assign requested address
is from tcp-listen
, but I guess it’s more specifically (tcp-listen 9440 5 #t "localhost")
. Does adding the "localhost"
matter?

This indeed gives me the same error

> (tcp-listen 9440 5 #t "localhost")
; tcp-listen: listen failed
; address: localhost
; port number: 9440
; system error: Cannot assign requested address; errno=99
; [,bt for context]
> ^D
root@b7152c06eb21:/# python3 -m http.server --bind localhost 9440
Serving HTTP on 127.0.0.1 port 9440 (<http://127.0.0.1:9440/>)
So I guess python3 is doing a different magic trick here

(tcp-listen 9440 5 #t "127.0.0.1")
is fine

I will test it again when my current build finishes

You could use make site SERVER_HOSTS=127.0.0.1 SERVER=127.0.0.1

I vaguely remember that there can be an issue with localhost
in Docker containers (but you may know more than me about that)