bug#43364: with-output-to-port works with file ports

2024-04-24 Thread Tony Garnock-Jones
This is a nice idea. The way Racket does it is to make with-output-to-string cooperate with system: (with-output-to-string (lambda () (system "date"))) but a quick check shows that Guile does not yet have such cooperation in place. Would that be a good place to start looking? Tony On

bug#43364: with-output-to-port works with file ports

2024-04-23 Thread Fabio Natali
Dear All , I've been encountering a few times the need for a procedure like 'system' or 'system*' but that might be capable of capturing the output of the program that's being called. While this is something that can be solved with a simple 'open-pipe*' wrapper, the pattern seems relatively

bug#43364: with-output-to-port works with file ports

2023-09-08 Thread Ricardo Wurmus
Felix Lechner via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" writes: > Hi, > > In an interesting (or perhaps maddening) inconsistency, > 'with-output-to-port' captures stdout from system* here > > (call-with-output-file "/tmp/test.log" > (lambda (port) >

bug#43364: with-output-to-port works with file ports

2023-09-08 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
Hi, In an interesting (or perhaps maddening) inconsistency, 'with-output-to-port' captures stdout from system* here (call-with-output-file "/tmp/test.log" (lambda (port) (with-output-to-port port (lambda () (system* "mktemp" "-d") but 'with-output-to-string' does