alexharsanyi
2022-1-20 09:52:40

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.


laurent.orseau
2022-1-20 10:03:59

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



spdegabrielle
2022-1-20 23:20:24

I like the cover


jcoo092
2022-1-20 23:37:09

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


badkins
2022-1-20 23:49:42

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


jcoo092
2022-1-20 23:50:18

It seems to have been different authors adapted it to JS


james275
2022-1-21 00:38:54

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


samdphillips
2022-1-21 00:58:23

capfredf
2022-1-21 01:58:34

@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"


capfredf
2022-1-21 02:02:31

One error that happened before the one above is:


capfredf
2022-1-21 02:02:37

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


mflatt
2022-1-21 02:14:15

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



mflatt
2022-1-21 02:20:04

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


capfredf
2022-1-21 02:23:02

No, it works.


capfredf
2022-1-21 02:24:34

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


capfredf
2022-1-21 02:25:28

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


capfredf
2022-1-21 02:27:57

Hmm, let my try another approach


mflatt
2022-1-21 02:37:13

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?


capfredf
2022-1-21 02:46:16

This indeed gives me the same error


capfredf
2022-1-21 02:47:32

&gt; (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] &gt; ^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


capfredf
2022-1-21 02:48:21

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


capfredf
2022-1-21 02:51:03

I will test it again when my current build finishes


mflatt
2022-1-21 02:53:44

You could use make site SERVER_HOSTS=127.0.0.1 SERVER=127.0.0.1


mflatt
2022-1-21 02:54:07

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