IRC channel logs
2023-03-07.log
back to list of logs
<old>unmatched-paren: Procedure capture their environment when declared. Calling a procedure with another environment seems like it would break the fundamental idea of lexical scoping <old>My assumption hhere is that you want: (define (get-x) x) <old>Then: (call-with-environment (some-environment-with-x=10) get-x) => 10 <old>Then: (call-with-environment (some-environment-with-x=100) get-x) => 100 <old>To do that I guess you could like others suggested, evaluate the quoted expression in the environment, thus creating a new procedure that will capture x in the good environment <old>otherwise. you would have to mutate the captured environment or change its reference in the procedure <old>maybe that's not what you were asking, in that case just ignore me :-) <cow_2001>okay, spawned process espeak-ng turns into a zombie process for some reason after it is piped some text <jpoiret>old: maybe you could consider using a reader monad? <jpoiret>i know it's not very schemey but it does seem like the right abstraction for the task <jpoiret>oops, that's the wrong person, it should be unmatched-paren instead <old>cow_2001: When a process die, it goes in zombie state. The parent has to wall `waitpid' on the PID of the child to rip it <old>if the parent dies before that, the fallen child is re-parent to the init process (PID 1) that usually loop with `wait' on any available PID to rip <old>what primitive in Guile did you used for spawning espeak-ng? <old>`spawn' returns a PID <old>After writing to the pipe, i.e. communicating your intent to the child, you have to wait for it to terminate <old>by calling `waitpid' <old>an example is shown in the manual as of 3.0.9 <cow_2001>i don't want to terminate it, just want it to wait for another put-string into its pipe <cow_2001>i want the parent to loop over a fifo file, and whenever it get-line, to pass the that line to the espeak-ng input pipe <cow_2001>it mysteriously works on python but not here. no clue why <old>for starter why are you forcing output on an input fifo? <old> (force-output fifo-port) <old>O_NONBLOCk is maybe not what you wnat <old>the child process will try to read and the system call will return EWOULDBLOCK <old>perhaps it then simply exit, thus the zombie state <jlicht>Is the date metadata entry supposed to be mandatory for posts in haunt? <dthompson>jlicht: I wouldn't say it's strictly mandatory but there's plenty of default behavior that does things like sort chronologically <jlicht>dthompson: thanks! I ran into some crashes when running haunt build for posts that had no date. Either way, I sent you a small patch that I'm locally using for now <dthompson>jlicht: oh cool, thanks! I'll take a look later1 <jlicht>don't feel pressured to accept it; I'll have to add dates to my files at some point in the future either way ;)