***chris is now known as Guest2326
***Guest2326 is now known as chrislck
***roptat is now known as Guest8033
***Server sets mode: +ntz
<lampilelo>so open-pipe* with OPEN_BOTH is kinda useless if the process expects eof in the input before outputing stuff, it would be nice if close-output-port and close-input-port did something else than just close-port to input/output ports <civodul>lampilelo: hi! no good solution, shutdown(2) is not applicable here unfortunately <civodul>i think i solved it before though but i can't remember how <lampilelo>maybe open-process should be exported and documented <lampilelo>because my version with a pipeline looks like a hack <civodul>yeah, we need better interfaces in this area <lampilelo>yeah, i feel like every time i use (ice-9 popen) i have to solve the same issues over and over again <civodul>maybe we should start anew, with a new module, exposing an interface known to have passed the test of time, like that of Racket maybe <lampilelo>i think just making close-(input|output)-port work on bidi ports and documenting it would be enough, although these functions are part of r6rs, so i don't really know <civodul>lampilelo: the only syscall that lets you close just one end of a connection is shutdown(2) though <civodul>we'd need to expose the fact that there are in fact two pipes (two ports) ***Avichi is now known as Avici
<sneek>I've been running for 4 days <sneek>This system has been up 6 weeks, 15 hours, 54 minutes <lampilelo>lechner: you know, there's a lot of functions on that page and there is an example as well, so you need to be more specific on what you want to do <lechner>lampilelo: thanks for making me look at the examples. i had missed the scm_call_1. is there an scm_call_3, as well? <lechner>lampilelo: thanks! i just found it via google. duckduckgo did not find it. i think that'swhat i'm looking for <lampilelo>lechner: it would probably be easier to browse the documentation using 'info guile' or emacs info-mode <lampilelo>lechner: because scm_c_public_lookup() returns a variable holding a reference to the function, so you need to dereference it before the call, you can use scm_c_public_ref() to do it in one go <lechner>thanks. i'm a scheme noobie. just using a variable does not produce its value? <lampilelo>it's like returning *var in C, you need to do var->fun to access what's inside the var object <lechner>maybe my question is why scm_call_1 does not do that for you <lampilelo>or perhaps var->value would be a better analogy <lampilelo>yeah, but in scheme value of a variable can be a procedure or anything else, since it's a lisp-1 <lampilelo>and scm_call doesn't dispatch on a type, it's pretty low level <dsmith-work>lechner: ISTR some kind of argv->list function. Maybe it was in Scheme? <dsmith-work>lechner: There is scm_makfromstrs in libguile/strings.c <lampilelo>lechner: regardless, you shouldn't make a list by repeatedly calling scm_append, you should use scm_cons instead and if you must have it in the same odrer as the input, reverse the for loop or use scm_reverse (or scm_reverse_x to destructively alter the list) <lechner>lampilelo: ah, yes. i could not find it in the docs <lampilelo>scm_append will walk over the whole list every time and then put stuff at the end of it, so calling it in a loop has pretty bad algorithmic complexity <lechner>hi, do i have to worry about freeing those SCM vars, or just C strings?