Potential bug with SRFI-19 Time, seconds and nanoseconds flipped

2017-07-16 Thread Christopher Baines
The seconds and nanoseconds fields seem to get swapped around, but I can't quite work out how. See the trace below, the values seem right at the point where # is created, but the final value seems to have the values the wrong way around. GNU Guile 2.2.2 Copyright (C) 1995-2017 Free Software Found

Re: Potential bug with SRFI-19 Time, seconds and nanoseconds flipped

2017-07-16 Thread Christopher Baines
On Sun, 16 Jul 2017 14:06:59 -0400 Mark H Weaver wrote: > Christopher Baines writes: > > The seconds and nanoseconds fields seem to get swapped around, but I > > can't quite work out how. > > Indeed. This was discovered shortly after the 2.2.2 release

[PATCH] Fix texinfo->html for @i, @math, @tie and @dots

2019-06-16 Thread Christopher Baines
I spotted the following warnings when converting some texinfo to HTML (for Guix package descriptions). ;;; WARNING (Don't know how to convert *braces* to HTML) ;;; WARNING (Don't know how to convert dots to HTML) ;;; WARNING (Don't know how to convert i to HTML) ;;; WARNING (Don't know how to conv

[PATCH] Fix texinfo->html for @i, @math, @tie and @dots

2019-06-16 Thread Christopher Baines
* module/texinfo/html.scm (tag-replacements): Add support for i and math, the tags used come from the texinfo documentation. (rules): Convert tie and dots to the appropriate HTML entities. --- module/texinfo/html.scm | 4 1 file changed, 4 insertions(+) diff --git a/module/texinfo/html.scm b

Re: [PATCH] Fix texinfo->html for @i, @math, @tie and @dots

2019-06-18 Thread Christopher Baines
Mark H Weaver writes: > Christopher Baines writes: > >> I spotted the following warnings when converting some texinfo to HTML >> (for Guix package descriptions). >> >> ;;; WARNING (Don't know how to convert *braces* to HTML) >> ;;; WARNIN

[PATCH] http: Support CONNECT and PATCH HTTP methods.

2020-04-10 Thread Christopher Baines
PATCH is described by RFC 5789 and CONNECT is described by RFC 7231. * module/web/http.scm (parse-http-method): Support CONNECT and PATCH. --- module/web/http.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/web/http.scm b/module/web/http.scm index de61c9495..4276e1744 100644 ---

[PATCH] Support cross compilation

2021-02-14 Thread Christopher Baines
With these changes, I was able to cross-compile guile-lib to the GNU Hurd, and use part of the library at least. * configure.ac: Set GUILE_TARGET when cross compiling. * am/guile.mk: Pass GUILE_TARGET to guild compile. --- am/guile.mk | 2 +- configure.ac | 4 2 files changed, 5 insertions(

Re: [PATCH] Support cross compilation

2021-03-09 Thread Christopher Baines
Andy Wingo writes: > Hi :) > > Which library is this for? It doesn't appear to be guile itself. Hey, it's for guile-lib. > On Sun 14 Feb 2021 10:16, Christopher Baines writes: > >> With these changes, I was able to cross-compile guile-lib to the GNU >>

[PATCH] socket: Add IPPROTO_IPV6 and IPV6_V6ONLY.

2022-05-13 Thread Christopher Baines
Add constants to enable setting sockets to be IPv6 only. This is useful if you want to listen on a port via IPv4 and IPv6 as the socket for IPv6 may need setting to be IPv6 only to avoid conflicting with the IPv4 socket. * libguile/socket.c (IPPROTO_IPV6, IPV6_V6ONLY): New constants. --- libguile

[PATCH 1/2] web: Handle ending CRLF (\r\n) for chunked input and output ports.

2022-06-30 Thread Christopher Baines
The chunked transfer encoding specifies the chunked body ends with CRLF. This is in addition to the CRLF at the end of the last chunk, so there should be CRLF twice at the end of the chunked body: https://datatracker.ietf.org/doc/html/rfc2616#section-3.6.1 * module/web/http.scm (make-chunked-in

[PATCH 2/2] web: Don't hide missing data in the chunked input port.

2022-06-30 Thread Christopher Baines
This port is of limited use if it cannot be used reliably. Rather than behaving as if the input has finished when it ends unexpectedly, instead raise an exception. * module/web/http.scm (make-chunked-input-port): Raise an exception on premature termination. (&chunked-input-ended-prematurely): New

Re: [PATCH 1/2] web: Handle ending CRLF (\r\n) for chunked input and output ports.

2022-07-04 Thread Christopher Baines
Ludovic Courtès writes: > Christopher Baines skribis: > >> The chunked transfer encoding specifies the chunked body ends with >> CRLF. This is in addition to the CRLF at the end of the last chunk, so >> there should be CRLF twice at the end of the chu

[PATCH] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-17 Thread Christopher Baines
These are important for reliable networking, since they prevent network operations from hanging indefinitely. * libguile/socket.c (scm_init_socket): Define SO_RCVTIMEO and SO_SNDTIMEO. (scm_getsockopt): Include SO_RCVTIMEO and SO_SNDTIMEO in docstring. (scm_setsockopt): Include SO_RCVTIMEO and SO_

[PATCH v2] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-18 Thread Christopher Baines
These are important for reliable networking, since they prevent network operations from hanging indefinitely. * libguile/socket.c (scm_init_socket): Define SO_RCVTIMEO and SO_SNDTIMEO. (scm_getsockopt): Include SO_RCVTIMEO and SO_SNDTIMEO in docstring. (scm_setsockopt): Include SO_RCVTIMEO and SO_

Re: [PATCH] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-18 Thread Christopher Baines
Thanks for the feedback Maxime, I obviously lost track of some things after letting this patch languish for a while. Maxime Devos writes: > On 17-09-2022 10:05, Christopher Baines wrote: >> + if (ioptname == SO_RCVTIMEO || ioptname == SO_SNDTIMEO) >> +{ >> + SC

[PATCH v3] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-18 Thread Christopher Baines
These are important for reliable networking, since they prevent network operations from hanging indefinitely. * libguile/socket.c (scm_init_socket): Define SO_RCVTIMEO and SO_SNDTIMEO. (scm_getsockopt, scm_setsockopt): Include SO_RCVTIMEO and SO_SNDTIMEO in docstring and handle them. * doc/ref/pos

Re: [PATCH v3] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-10-13 Thread Christopher Baines
Ludovic Courtès writes: > Christopher Baines skribis: > >> These are important for reliable networking, since they prevent network >> operations from hanging indefinitely. >> >> * libguile/socket.c (scm_init_socket): Define SO_RCVTIMEO and >> SO_SNDTIMEO

[PATCH] Fix some invalid unicode handling issues with suspendable ports.

2023-03-17 Thread Christopher Baines
Based on the implementation in ports.c. I don't understand what this code is really doing, but the suspendable ports implementation differs from the similar C code for a couple of inequalities. * module/ice-9/suspendable-ports.scm (decode-utf8, bad-utf8-len): Flip a couple of inequalities. * test

[PATCH] Make get-bytevector-all suspendable.

2023-07-20 Thread Christopher Baines
I'm looking at this since it's used in (web response) read-response-body. * module/ice-9/suspendable-ports.scm (get-bytevector-all): New procedure. (port-bindings): Add it. --- module/ice-9/suspendable-ports.scm | 36 ++ 1 file changed, 36 insertions(+) diff --git a/m

[PATCH] web: Support reading chunked request bodies.

2023-07-20 Thread Christopher Baines
Guile already supports chunked response bodies, but chunked request bodies are allowed as well. This is useful when you're sending an unknown amount of data in the request. * module/web/request.scm (read-request-body): Support the request body being chunked. --- module/web/request.scm | 26 +

[PATCH] Allow specifying the socket style for open-socket-for-uri.

2023-07-20 Thread Christopher Baines
Since this allows specifying additional behaviours for the socket through using SOCK_CLOEXEC and/or SOCK_NONBLOCK (when bitwise or'ed with SOCK_STREAM). Note that Guile/guile-gnutls currently doesn't support performing the TLS handshake on a non-blocking socket, so this currently won't work. * mo

guile-lib logging formatters

2024-04-29 Thread Christopher Baines
Hey! I ran in to some problems with the formatter recently, it seems it's being called with more than 3 arguments since the update to guile-lib 0.2.8. Can you advise on how to approach this? I presume this isn't some internal interface I'm using accidentally? The documentation states: #:form

Re: exception from inside false-if-exception?

2024-04-29 Thread Christopher Baines
Attila Lendvai writes: > dear fellow Guilers, > > context: > > > i'm working on shepherd (with several non-trivial local commits). its > test suite runs clean from a shell, but fails when i try to > `./pre-inst-env guix build -K shepherd@0.10.99-git`. > > > the sympthom: > -