6:11:57no-defun-allowed(loop named read-loop do (loop for i = 0 to 10 do (if (listen output) (return) (sleep 0.1) finally (return-from read-loop)) do (write-line (read-line output))) is the best I can think of immediately
6:14:47seokHm, I simply did (loop until (not (listen *output*)) .....)
6:16:35seokseems to be just 2x whatever the cost of only doing (read-line)
6:18:25no-defun-allowedNot in a tight loop like that. If you have a SLEEP form, the CL system gives up its CPU time so it's more likely the subprocess gets to be run, and in the millions of LISTEN calls the CL process will do, only a few will result in T in your case.
6:19:28aethseok: why :until (not ...) and not :while?
6:31:05seokHm, maybe it's a thing with uiop:launch-program
6:31:29seokbut the process output stream works a bit different from what I would expect
6:32:12seokOnly 3 or 4 lines are output at a time if I don't read from the output
6:32:43seokGuess it is just better to have a process always to running to catch all the outputs
6:38:46pjbseok: listen only guarantees one character on the stream. So you can use only read-char, unless you accept to be blocked again.
6:39:29seokpjb: how can I listen for a line? IE line with nil or newline at the end
6:40:35pjbseok: and when reading from a file or frmo a terminal, you will probably have buffering from the system or the drivers (eg. line buffering on terminals), listening on a character will stop at the end of the line, so you cannot listen to characters until you type RET in the terminal.
6:40:52pjbseok: listen is for asynchronous I/O. Just use READ-LINE to read a line.
6:41:20seokThis is asynchronous, it's stream from a uiop:launch-program
6:41:40seokoutput is (uiop:process-info-output process)
6:41:54pjbseok: if the terminal is in raw mode (no buffering), then something like (loop while (listen *terminal-io*) collect (read-char *terminal-io*)) will probably return only one character, since the user cannot type fast enough for listen to return true the second time.
6:42:22pjbseok: for the pipe/socket stream, you need to know whether it's buffered or not.
15:25:22afidegnumyou mean those chapters are also not available as ebooks in amazon store?
15:28:28Bikethe whole book isn't available as an ebook, and they don't sell chapters individually.
15:29:23Bikehoyte seems fairly smalltime. you could maybe just email him and ask if he offers a pdf or something you could buy, since he does have some chapters as html