@bedeke has joined the channel
anyone know where I might find a pict of a mouse pointer?
well ok, arrowhead helps
Despite the fact that I have been using subprocess, I constantly feel I didn’t use it correctly. I feel it would be very helpful if there’s a guide. Some of my questions: - Should I always subprocess-kill at the end? - Should I always subprocess-wait at the end? - If I read from the port, do I still need subprocess-wait? - What’s the common idiom for using subprocess with thread and without thread? - When should I close-input-port/close-output-port (after or before subprocess-wait/subprocess-kill)? - Could close-input-port/close-output-port cause a subprocess termination? - Is it possible to cause a broken pipe error?
Also, a question for the subprocess implementation: why do we need to close-input-port and close-output-port manually? Can’t we have a form that does that automatically, just like with-input/output-from/to-file?
I recommend system* with redirection by setting current-output-port and/or current-input-port or by using functions like with-output-to-file or with-output-to-string.
No, don’t use subprocess-kill unless you really want to (try to) forcibly terminate a process. It’s normally best to use subprocess-wait to make sure a process has exited. I’m not sure what you have in mind about subprocess and thread. For most purposes, close the output port for the process’s stdin as soon as you have no more data to send it, and wait for the process to exit before closing the input ports for the process’s stdout and stderr. (Those guidelines are more about how OS processes work than anything Racket specific.)
Instead of a guide I think the API of subprocess ought to be better
Ah, and that’s what make-pipe is for. You can parameterize current-output-port to the output port, and then read from the corresponding input port.
What’s a legacy match expander? As in the thing that prop:legacy-match-expander is for.
Guessing an old mzlib thing
So I forked a package in the main distribution and want to edit it. How to I remove the version of the package I have installed currently and instead install my fork?
Here are the things I tried, none of which worked: raco pkg update --clone pict
raco pkg update --clone ./pict
raco pkg update --scope installation --clone ./pict
raco pkg update --scope installation --lookup --clone ./pict
raco pkg update --scope installation --link ./pict (this was after I cloned my fork into a folder on my computer using GitHub Desktop)
got it working: the problem was I was assuming the root directory of the pict repo was the package, but actually it isn’t because pict, pict-lib, pict-test, etc. are each in their own folder in the repo