bug#26058: utf16->string and utf32->string don't conform to R6RS

2017-03-16 Thread Taylan Ulrich Bayırlı/Kammer
Andy Wingo writes: > Adopting the behavior is more or less fine. If it can be done while > relying on the existing behavior, that is better than something ad-hoc > in a module. You mean somehow leveraging the existing BOM handling code of Guile (found in the ports code) would be preferable to r

bug#26058: utf16->string and utf32->string don't conform to R6RS

2017-03-14 Thread Taylan Ulrich Bayırlı/Kammer
Andy Wingo writes: > On Mon 13 Mar 2017 19:10, taylanbayi...@gmail.com (Taylan Ulrich > "Bayırlı/Kammer") writes: > >> If I do binary I/O, the following situations are possible: >> >> 1. I'm guaranteed to get any possible bytes that happen to form a val

bug#26058: utf16->string and utf32->string don't conform to R6RS

2017-03-13 Thread Taylan Ulrich Bayırlı/Kammer
Andy Wingo writes: > Hi, > > this is a tricky area that is not so amenable to quick patches :) Have > you looked into what Guile already does for byte-order marks? Can you > explain how the R6RS specification relates to this? > > https://www.gnu.org/software/guile/manual/html_node/BOM-Handling

bug#26059: Sorry about the duplicate.

2017-03-11 Thread Taylan Ulrich Bayırlı/Kammer
Please ignore this, as it's a duplicate of #26058.

bug#26059: utf16->string and utf32->string don't conform to R6RS

2017-03-11 Thread "Taylan Ulrich Bayırlı/Kammer"
See the R6RS Libraries document page 10. The differences: - R6RS supports reading a BOM. - R6RS mandates an endianness argument to specify the behavior at the absence of a BOM. - R6RS allows an optional third argument 'endianness-mandatory' to explicitly ignore any possible BOM. Here's a q

bug#26058: utf16->string and utf32->string don't conform to R6RS

2017-03-11 Thread "Taylan Ulrich Bayırlı/Kammer"
See the R6RS Libraries document page 10. The differences: - R6RS supports reading a BOM. - R6RS mandates an endianness argument to specify the behavior at the absence of a BOM. - R6RS allows an optional third argument 'endianness-mandatory' to explicitly ignore any possible BOM. Here's a q

bug#21887: 'monitor' form broken

2016-06-25 Thread Taylan Ulrich Bayırlı/Kammer
Here's a patch, tested minimally by running (par-for-each (lambda (x) (monitor (sleep 1) (display "foo\n"))) (iota 10)) on a quad-core. Previously it would print the "foo"s in groups of four with a second betwe

bug#21613: Include messes up when compiling file in load path

2016-06-21 Thread Taylan Ulrich Bayırlı/Kammer
Ping with CC to Andy. :-)

bug#22447: (rnrs hashtables): Mutation of immutable hashtable ignored

2016-06-20 Thread Taylan Ulrich Bayırlı/Kammer
Pinging this thread with a (very slightly) updated patch. :-) >From 7f35d515d711e255bba5a89a013d9d92034edf41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Tue, 21 Jun 2016 00:25:19 +0200 Subject: [PATCH] Hashtable-set! errors on immutable hashtable.

bug#22446: (rnrs hashtables): Hash functions of eq? and eqv? hashtables

2016-06-20 Thread Taylan Ulrich Bayırlı/Kammer
Also pinging this thread with a (very slightly) updated patch. :-) >From 17599f6ce7ba0beb100e80455ff99af07333d871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Tue, 21 Jun 2016 00:23:29 +0200 Subject: [PATCH] Hashtable-hash-function returns #f on eq

bug#22446: (rnrs hashtables): Hash functions of eq? and eqv? hashtables

2016-01-24 Thread Taylan Ulrich Bayırlı/Kammer
Here's a patch to fix this. >From a3e5a705aaea725fd75280a27b971d8e45e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sun, 24 Jan 2016 12:23:34 +0100 Subject: [PATCH] Hashtable-hash-function returns #f on eq and eqv tables. * module/rnrs/hashtabl

bug#22447: (rnrs hashtables): Mutation of immutable hashtable ignored

2016-01-24 Thread Taylan Ulrich Bayırlı/Kammer
I forgot to change the test suite accordingly. Here's an updated patch. >From 7483d98cf1e5439ac62ee8da3e216a413853b40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 23 Jan 2016 22:35:24 +0100 Subject: [PATCH 1/2] Hashtable-set! errors on immuta

bug#22447: (rnrs hashtables): Mutation of immutable hashtable ignored

2016-01-23 Thread Taylan Ulrich Bayırlı/Kammer
Sorry about the duplicate bug report; I merged it into this one. Here's the patch again. (Merged report seemed invisible in the web interface.) >From dd6c4bbbe85a57fcbb08bdc7847075bddc1f0d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 23 Jan

bug#22449: (rnrs hashtables): Mutation of immutable hashtable ignored

2016-01-23 Thread "Taylan Ulrich Bayırlı/Kammer"
I couldn't find explicit wording in R6RS on what should happen, but I would generally expect an attempt to mutate an immutable object to raise an error. In Guile, (hashtable-set! (hashtable-copy (make-eq-hashtable)) 'foo 'bar) is silently ignored. Attached is a simple patch that raises an a

bug#22447: (rnrs hashtables): Mutation of immutable hashtable ignored

2016-01-23 Thread "Taylan Ulrich Bayırlı/Kammer"
I couldn't find explicit wording in R6RS on what should happen, but I would generally expect an attempt to mutate an immutable object to raise an error. In Guile, (hashtable-set! (hashtable-copy (make-eq-hashtable)) 'foo 'bar) is silently ignored. Taylan

bug#22446: (rnrs hashtables): Hash functions of eq? and eqv? hashtables

2016-01-23 Thread "Taylan Ulrich Bayırlı/Kammer"
Per R6RS, the following forms should return #f: (hashtable-hash-function (make-eq-hashtable)) (hashtable-hash-function (make-eqv-hashtable)) but in Guile they return procedures. Taylan

bug#21887: 'monitor' form broken

2015-11-12 Thread Taylan Ulrich Bayırlı/Kammer
It seems that the 'monitor' form is currently a no-op. The form (par-for-each (lambda (x) (monitor (foo))) xs) should be functionally equivalent to (let ((mutex (make-mutex))) (par-for-each (lambda (x)

bug#15602: Possible work-around

2015-11-06 Thread Taylan Ulrich Bayırlı/Kammer
A possible work-around seems to be to use 'load' or 'load-compiled' on a module file after compiling it. As far as I understand, the problem is that Guile somehow ends up with a "degenerate" version of the module in the run-time after it's compiled but not fully loaded, so we alleviate that by exp

bug#21613: Include messes up when compiling file in load path

2015-10-04 Thread Taylan Ulrich Bayırlı/Kammer
taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes: > This seems to be related to 'compile-file' setting > '%file-port-name-canonicalization' to 'relative', but I don't know > what the correct fix is. With the following trivial

bug#21613: Include messes up when compiling file in load path

2015-10-04 Thread Taylan Ulrich Bayırlı/Kammer
When a file to be compiled, A.scm, contains (include "B.scm"), the compiler fails to find B.scm if the directory containing A and B are in Guile's load path. Here's a shell transcript showcasing the bug: --- snip --- $ mkdir test $ echo '(include "test2.scm")' > test/test1.scm $ echo '(display "f

bug#21379: datum->syntax chokes on lists of syntax objects

2015-09-02 Thread Taylan Ulrich Bayırlı/Kammer
Mark H Weaver writes: > How about changing the first formal argument name to 'template-id' and > changing the words "syntax object" to "identifier"? > > Thanks! >Mark Sure, updated patch attached. Taylan >From 2ba9474dc8e2a56524d8c6c2f640fb3fb35b2d14 Mon Sep 17 00:00:00 2001 From:

bug#21378: R6RS guard's else chokes on multiple expressions

2015-08-30 Thread Taylan Ulrich Bayırlı/Kammer
Please ignore this bug report, since it was my fault. I had a foreign (rnrs exceptions) library in my load-path that took precedence. Sorry about the noise. Taylan

bug#21379: datum->syntax chokes on lists of syntax objects

2015-08-30 Thread Taylan Ulrich Bayırlı/Kammer
Apparently there's two ways to represent a list syntax object: (datum->syntax #'x '(a b c)) => #(syntax-object (a b c) ((top)) (hygiene guile-user)) i.e. a syntax object vector with a list payload, and #'(a b c) => (#(syntax-object a ((top)) (hygiene guile-user)) #(syntax

bug#21378: R6RS guard's else chokes on multiple expressions

2015-08-29 Thread Taylan Ulrich Bayırlı/Kammer
It seems that whatever macro tries to match the guard expression's else-clause, fails to do so when the clause contains more than one expression, and so adds a default "else re-raise" clause after the existing else clause. I couldn't figure out where this happens. I grepped the whole source tree

bug#21347: include-from-path and relative paths in load-path

2015-08-25 Thread Taylan Ulrich Bayırlı/Kammer
When there are relative paths in the load-path, `include-from-path' seems to always interpret them relative to the directory of the file in which the `include-from-path' is called, instead of relative to the current working directory in effect when Guile is started. Transcript: --- SNIP --- tayla

bug#18932: string->number errors on e.g. "1e400xyz"

2014-11-03 Thread "Taylan Ulrich Bayırlı/Kammer"
When string->number is given a number in scientific notation with a very high exponent, it errors with "value out of range." I don't know if that is acceptable, but what seems unacceptable is that it errors even if the string contains further characters and is thus not a valid number; R5RS says th

bug#18914: 2.0.11 REPL server listens on 127.0.0.1 but not "localhost"

2014-11-02 Thread Taylan Ulrich Bayırlı/Kammer
writes: > Seems to work fine on master I just built from the master branch to be sure and can still reproduce. > Maybe try strace, possibly limiting it with -e connect, to reveal what > it's actually doing. Not sure what I should be looking for, but there is no connect() call, no occurrence of

bug#18914: 2.0.11 REPL server listens on 127.0.0.1 but not "localhost"

2014-10-31 Thread Taylan Ulrich Bayırlı/Kammer
writes: > I wonder, could localhost be resolving to your ethernet IP address? > Or maybe resolving to an IPv6 address? tub@taylan:~$ nslookup localhost Server: 127.0.0.1 Address:127.0.0.1#53 Name: localhost Address: 127.0.0.1 tub@taylan:~$ The local DNS server is dnsmasq. >

bug#18914: 2.0.11 REPL server listens on 127.0.0.1 but not "localhost"

2014-10-31 Thread "Taylan Ulrich Bayırlı/Kammer"
After starting 'guile --listen', I can connect to it via 127.0.0.1 but not "localhost": "Ncat: Connection refused." I don't know if listening on "localhost" by default has any security implications? Shell 1: tub@taylan:~$ guile --listen GNU Guile 2.0.11 Copyright (C) 1995-2014 Free Software Fou