bedeke
2019-10-9 20:47:08

@bedeke has joined the channel


ben
2019-10-9 21:32:35

anyone know where I might find a pict of a mouse pointer?


ben
2019-10-9 21:47:41

well ok, arrowhead helps


sorawee
2019-10-9 22:12:21

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?


sorawee
2019-10-9 22:15:51

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?


mflatt
2019-10-9 22:28:16

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.)


notjack
2019-10-9 22:52:28

Instead of a guide I think the API of subprocess ought to be better


sorawee
2019-10-9 23:01:26

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.


notjack
2019-10-10 00:11:24

What’s a legacy match expander? As in the thing that prop:legacy-match-expander is for.


samdphillips
2019-10-10 00:20:05

Guessing an old mzlib thing


notjack
2019-10-10 02:22:45

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?


notjack
2019-10-10 02:32:54

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)


notjack
2019-10-10 02:42:09

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