samth
2019-12-20 14:05:18

I’m not sure what you mean. You can have a “foo-more” package that depends on “foo” and then “foo-more” is the “one-stop shop”.


ben
2019-12-20 15:05:10

@alexknauth what did you change to get it working — anything besides using Linux?


alexknauth
2019-12-20 15:23:22

On @capfredf’s comment, I did: • steps 1–6 on the VM so that it uses Linux • before step 7, I compressed the build/site folder into a tgz, copied the tgz to my host computer, and unzipped it in the host • on step 7, I run the python http server on the host using the files copied from the vm On the pkg-build readme instructions on Prerequisites, I did: • steps i-iii normally on the VM • for step iv I was having trouble, my dad helped me do two commands sudo ifconfig ... down and sudo ifconfig ... up where ... is from the interface name, to refresh something after switching the vm to host-only network settings, before running hostname -I to get the IP address • after step iv make sure you can manually ssh into the VM using the IP address you got from step iv • for step v I was also having trouble, so this is where I deleted all previous snapshots called init, before creating the new snapshot called init, otherwise the run.rkt script might use the earlier snapshot not the later one • for step vi it should be made clear that the VM should not be running when you start run.rkt on the host later On the pkg-build readme instructions on Running a Build, I did: • replace the #:name string with the name of the VM as normal • replace the #:host IP address string with the hostname -I after running the … down and … up commands, as I said about step iv of Prerequisites • replace the #:snapshot-url string with the url string returned by the python http server still running on the host, including the port with the colon • replace the #:installer-platform-name string with "localhost" • before running run.rkt on the host, make sure the VM is shut down and the python http server is still running


soegaard2
2019-12-20 16:09:19

@notjack Hi. Replaced the white favicons with gray ones on http://racket-stories.com\|racket-stories.com . Can you test if the new ones work better in Firefox?


alexknauth
2019-12-20 18:08:27

My build just stopped with the error message: >> ======================================== >> Building gtp-pict Restoring snapshot 'installed' (c83a4b4b-29d5-4323-9c1a-6b78d0ede1fd) 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Starting VirtualBox machine "racket-pkg-build" Waiting for VM "racket-pkg-build" to power on... VM "racket-pkg-build" has been successfully started. /usr/bin/ssh -R 18333:localhost:18333 racket@192.168.56.103 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: connect to host 192.168.56.103 port 22: Operation timed out /usr/bin/ssh -R 18333:localhost:18333 racket@192.168.56.103 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: connect to host 192.168.56.103 port 22: Operation timed out /usr/bin/ssh -R 18333:localhost:18333 racket@192.168.56.103 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: connect to host 192.168.56.103 port 22: Operation timed out /usr/bin/ssh -R 18333:localhost:18333 racket@192.168.56.103 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: connect to host 192.168.56.103 port 22: Operation timed out ssh: failed context...: /Users/Alex/Library/Racket/snapshot-7.5.0.13--2019-12-16/pkgs/remote-shell-lib/ssh.rkt:180:2: loop /Applications/Racket/2019-12-16/Racket v7.5.0.13/collects/racket/contract/private/arrow-val-first.rkt:555:3 /Users/Alex/Library/Racket/snapshot-7.5.0.13--2019-12-16/pkgs/pkg-build/main.rkt:882:5 /Users/Alex/Library/Racket/snapshot-7.5.0.13--2019-12-16/pkgs/pkg-build/main.rkt:1065:2: build-pkg-set [repeats 1 more time] /Users/Alex/Library/Racket/snapshot-7.5.0.13--2019-12-16/pkgs/pkg-build/main.rkt:123:0: build-pkgs "/Users/Alex/racket-pkg-build/run.rkt": [running body] temp35_0 for-loop run-module-instance! perform-require! Stopping VirtualBox machine "racket-pkg-build" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%


alexknauth
2019-12-20 18:09:10

This after the ssh step had been successful on a lot of previous packages


ben
2019-12-20 19:21:43

ok, I saw those timeouts too. You can add #:timeout 1500 or something to the run.rkt (and I think that’ll help, but it’s funny this error message doesn’t say how long it waited)


elyandarin
2019-12-20 22:42:14

Question: how would I see what a token-struct contains? Are there some kind of getters/setters? They don’t seem like lists and I’m not sure how Objects/Classes work in Racket… (My new tokenizer produces a lot of whitespace tokens - which are ignored by the parser, but still annoying when I browse tokenizer output. I thought of making something to remove them, but first I have to distinguish them.)


samth
2019-12-20 22:48:56

@elyandarin if you look at https://docs.racket-lang.org/brag/index.html?q=token-struct#%28def._%28%28lib._brag%2Fsupport..rkt%29._token-struct%29%29 it tells you the names of the fields, so the accessors are things like token-struct-type


leif
2019-12-21 01:48:33

@mflatt When a mouse-event% is sent to a canvas% from on-event, is the x and y coordinates for the mouse in canvas coordinates, window coordinates, or something else?


leif
2019-12-21 01:49:30

Likewise for a snip (which also adds snip coordinates, although a thought the x and y came from editor-canvas% coordinates.)


elyandarin
2019-12-21 03:06:43

@samth thanks!


elyandarin
2019-12-21 03:07:26

Newbie question: If I’m adding a variable to a list, and I want nothing to happen, what value should the variable have?


mflatt
2019-12-21 03:08:16

Canvas coordinates.


elyandarin
2019-12-21 03:09:06

I tried setting the variable to null, but now I’ve got ’() added to the list


elyandarin
2019-12-21 03:09:41

Perhaps I shouldn’t use cons ?


mflatt
2019-12-21 03:10:22

Yes: the x and y arguments are in “Display” coordinates, which is canvas coordinates when an editor canvas is the display.


elyandarin
2019-12-21 03:11:51

This is my code, so far: (define (whitespace-remove token-list) (cond [(empty? token-list) null] [else (define x (first token-list)) (define y (if (equal? (token-struct-type x) '\| \| ) null x )) (cons y (whitespace-remove (rest token-list))) ] ))


sorawee
2019-12-21 03:27:36

Not sure if I entirely understand your code, but this should work?

(define (whitespace-remove token-list) (cond [(empty? token-list) null] [else (define x (first token-list)) (if (equal? (token-struct-type x) '\| \|) (whitespace-remove (rest token-list)) (cons x (whitespace-remove (rest token-list))))]))


sorawee
2019-12-21 03:30:28

Note that this is a very common idiom, and there’s a filter / filter-not function that makes this more concise:

(define (whitespace-remove token-list) (filter-not (lambda (x) (equal? (token-struct-type x) '\| \|) token-list))


sorawee
2019-12-21 03:32:08

You can also use for based solution.

(define (whitespace-remove token-list) (for/list ([x token-list] #:unless (equal? (token-struct-type x) '\| \|)) x))


notjack
2019-12-21 04:56:59

Thank you! Replied on the github issue.


notjack
2019-12-21 05:05:11

So a benchmark I wrote while working on a benchmarking library seems to show that even with sequences that contain only 10 elements, vector-ref is on average faster than list-ref. Does that seem right?


jaz
2019-12-21 05:55:15

It does to me. It sounds like you were expecting otherwise?