Re: GNU Guile 2.1.7 released (beta), SOCK_NONBLOCK

2017-02-21 Thread Andy Wingo
Hi! On Sat 18 Feb 2017 15:34, Matt Wette writes: >> On Feb 18, 2017, at 2:31 AM, Andy Wingo wrote: >> >> We are pleased to announce GNU Guile release 2.1.7. >> >> Guile 2.1.7 is the seventh pre-release in what will eventually become >> the 2.2 release series. We encourage you to test this re

Re: `bytevector-length' doesn't accept a shared array from a bytevector

2017-02-21 Thread Daniel Llorens
On 21 Feb 2017, at 19:51, Diogo F. S. Ramos wrote: >> On 21 Feb 2017, at 14:21, Diogo F. S. Ramos wrote: >> >>> I want to take the length of a shared array, but `bytevector-length' >>> throws an error claiming the shared array isn't a bytevector, even >>> though it prints the error argument as

[PATCH] Fix bug #24816: open-string-output-port extraction thunk does not truncate string port as expected by R6RS in Guile 2.1.7

2017-02-21 Thread Freja Nordsiek
Patch for bug #24816: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24816 Patch is for Guile 2.1.7.1 (problem dates back at least as far as 2.1.4). Problem is that the extraction thunk returned by open-string-output-port in module "rnrs io ports" does not truncate the string port as expected by R

Re: `bytevector-length' doesn't accept a shared array from a bytevector

2017-02-21 Thread Diogo F. S. Ramos
> On 21 Feb 2017, at 14:21, Diogo F. S. Ramos wrote: > >> I want to take the length of a shared array, but `bytevector-length' >> throws an error claiming the shared array isn't a bytevector, even >> though it prints the error argument as one. >> >> I am using Guile 2.0.11, Debian Stable package

Re: mkostemp portability issues

2017-02-21 Thread Greg Troxel
Matt Wette writes: >> On Feb 20, 2017, at 6:39 PM, Greg Troxel wrote: >> + open_flags = O_APPEND|O_DIRECT|O_SHLOCK|O_EXLOCK|O_SYNC|O_CLOEXEC; > > I think you meant `&=‘ Thanks, fixed. Interestingly most of the tests passed with the wrong code. (There is an issue, but it seems like a test a

Re: `bytevector-length' doesn't accept a shared array from a bytevector

2017-02-21 Thread Daniel Llorens
On 21 Feb 2017, at 14:21, Diogo F. S. Ramos wrote: > I want to take the length of a shared array, but `bytevector-length' > throws an error claiming the shared array isn't a bytevector, even > though it prints the error argument as one. > > --8<---cut here---start---

`bytevector-length' doesn't accept a shared array from a bytevector

2017-02-21 Thread Diogo F. S. Ramos
I want to take the length of a shared array, but `bytevector-length' throws an error claiming the shared array isn't a bytevector, even though it prints the error argument as one. --8<---cut here---start->8--- scheme@(guile-user)> ,use (rnrs bytevectors) scheme@

[PATCH 2/6] Remove documentation on uniform-vector-read!, uniform-vector-write

2017-02-21 Thread daniel . llorens
From: Daniel Llorens * NEWS: Add specific removal notice. * doc/ref/api-data.texi: Remove documentation on uniform-vector-read!, uniform-vector-write. --- NEWS | 7 +++ doc/ref/api-data.texi | 33 - 2 files changed, 7 insertions(+), 33 dele

Better support for non-zero lower bound arrays [v2]

2017-02-21 Thread daniel . llorens
This patchset improves the support for non-zero lower bound arrays. Specifically, the functions sort, sort!, restricted-vector-sort!, array-slice-for-each, and truncated-print from (ice-9 pretty print) now support non-zero lower bound arrays. The patchset also adds support for bitvectors in trunca

[PATCH 6/6] Remove scm_generalized_vector_get_handle

2017-02-21 Thread daniel . llorens
From: Daniel Llorens This was deprecated in 2.0.9 (118ff892be199f0af359d1b027645d4783a364ec). * libguile/bitvectors.c (scm_bitvector_writable_elements): Replace scm_generalized_vector_get_handle. Remove unnecessary #includes. * libguile/vectors.c (scm_vector_writable_elements): Replace scm

[PATCH 4/6] Support non-zero lower bounds in array-slice-for-each

2017-02-21 Thread daniel . llorens
From: Daniel Llorens * libguile/array-handle.c (scm_array_handle_writable_elements): Fix error message. * libguile/array-map.c (scm_array_slice_for_each): Support non-zero lower bounds. Fix error messages. * test-suite/tests/array-map.test: Test scm_array_slice_for_each with non-zero lower

[PATCH 5/6] Fix bitvectors and non-zero lower bound arrays in truncated-print

2017-02-21 Thread daniel . llorens
From: Daniel Llorens * module/ice-9/arrays.scm (array-print-prefix, array-print): New private functions. * libguile/arrays.c (scm_i_print_array): Reuse (array-print-prefix) from (ice-9 arrays). Make sure to release the array handle. * module/ice-9/pretty-print.scm (truncated-print): Support

[PATCH 1/6] Replace uniform-vector-read benchmark with bytevector-io benchmark

2017-02-21 Thread daniel . llorens
From: Daniel Llorens * benchmark-suite/benchmarks/uniform-vector-read.bm: Remove; uniform-vector-read! and uniform-vector-write were deprecated in 2.0 and are have been removed in 2.1. * benchmark-suite/benchmarks/bytevector-io.bm: New benchmark. * benchmark-suite/Makefile.am: Run the new ben

[PATCH 3/6] Fix sort, sort! for arrays with nonzero lower bound

2017-02-21 Thread daniel . llorens
From: Daniel Llorens * module/ice-9/arrays.scm (array-copy): New function, export. * module/Makefile.am: Install (ice-9 arrays). * doc/ref/api-data.texi: Add documentation for (ice-9 arrays). * libguile/quicksort.i.c: Use signed bounds throughout. * libguile/sort.c (scm_restricted_vector_sort_x):