RE: Question about handling SIGINT properly in Guile

2024-04-17 Thread Vijay Marupudi
Here's another simple reproduction, Guile's own webserver module (use-modules (web server)) (define (handler request body) (values '((content-type . (text/plain))) "Hello, World!")) (run-server handler) It needs two SIGINTs to properly end the program. I think I'm encountering a bu

RE: Question about handling SIGINT properly in Guile

2024-04-15 Thread Vijay Marupudi
Hi Maxime, Thank you for your thoughts! The documentation of libc suggests that the signal handler is run before any system call return EINTR, so I think Guile should have added the handler to the 'pending list' before the call to sleep returns. https://www.gnu.org/software/libc/manual/html_node

Re: Question about handling SIGINT properly in Guile

2024-04-13 Thread Vijay Marupudi
> So there is two things with signals. First, when a process get a signal > queued, the OS only deliver the signal -- at least on linux -- when > going back to user-space. Typically, before the process get > re-scheduled or after a system call. So sending a signal is not > immediate. Furthermor

Question about handling SIGINT properly in Guile

2024-04-13 Thread Vijay Marupudi
Hello folk of guile-user, I am trying to create a simple Guile program that continues to perform a task until an interrupt signal is sent. However, I am unable to deterministically end the program when SIGINT is sent, as the interrupt handler does not run soon after the call to (sleep ...) ends.

Re: bytevector-string-ref

2022-12-18 Thread Vijay Marupudi
tf{8,16,32}->string) in the past, but those patches have not gotten any attention yet. Attaching them again here to (hopefully) revive them. >From c6be127b4818d43a0244592c18a52de113d3ff08 Mon Sep 17 00:00:00 2001 From: Vijay Marupudi Date: Thu, 20 Jan 2022 22:19:25 -0500 Subject: [PATCH 1/2] Al

Re: code review request

2022-02-26 Thread Vijay Marupudi
> I get a result I don't understand: this return 2 values Reading the source code, the second value is an implementation detail, keeping track of the visited directories. > One is expected, it's the one I wanted to produce Great! I would ignore the second value, because it is a by product of the

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Vijay Marupudi
Ognen Duzlevski writes: > Have you tried Racket? If you haven't - try that and you will find > recommending Guile to beginners to be much easier ;). On a serious note, > there are other schemes that have their own package managers (e.g. > Racket). I have, but I like Guile better, and want everyo

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Vijay Marupudi
Hello all, I am similarly impressed by Guile Hall and wish for its continued development and success. > PyPI is a good example for the kind of problems that all language > package managers end up having. Language package managers have no way > of clearly expressing dependencies that are not writ

Re: reserved-keyword in macro

2022-02-02 Thread Vijay Marupudi
Hi Damien, I tried to run the code you provided. I ran - (define-syntax <- (syntax-rules ($bracket-apply$) ((_ ($bracket-apply$ container index) expr) (let ((value expr)) ;; to avoid compute it twice (cond ((vector