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 frequent in Guix, which is where I
noticed it. I suggested that some variant of such a wrapper could be
added to '(guix build utils)'⁰.

In reply to my post, it was brought to my attention that the problem
might be addressed at the Guile level and pointed me to this bug report.

I thought of sending a quick follow-up here to see if there's any rough
consensus on a possible way of addressing this - or why it might be
difficult or potentially not worth the effort.

Thanks, all best, Fabio.

⁰ https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00199.html


-- 
Fabio Natali
https://fabionatali.com





bug#70534: eval-string: wrong environment for compilation

2024-04-23 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
Hi!

I'm pretty sure there is a bug in (ice-9 eval-string) implementation.

If #:compile? is true it doesn't pass current module to the
read-and-compile procedure which in my opinion leads to undesired
behavior:
This code snippet doesn't work
--8<---cut here---start->8---
(let ((module (current-module)))
  ((@ (ice-9 eval-string) eval-string)
   "(define-syntax-rule (comment . _) #f)"
   #:module module
   #:compile? #t)
  ((@ (ice-9 eval-string) eval-string)
   "(comment 1 2 3)"
   #:module module
   #:compile? #t))
--8<---cut here---end--->8---

While this one does
--8<---cut here---start->8---
(let ((module (current-module)))
  ((@ (ice-9 eval-string) eval-string)
   "(define-syntax-rule (comment . _) #f) (comment 1 2 3)"
   #:module module
   #:compile? #t))
--8<---cut here---end--->8---

Fix should be pretty easy. Let me know if it's indeed unintended and
I'll send the patch

-- 
Best Regards,
Nikita Domnitskii