bug#41354: equal? has no sensible code path for symbols

2021-01-19 Thread David Kastrup
Ludovic Courtès writes: > Hi, > > David Kastrup skribis: > >> Ludovic Courtès writes: > > [...] > >>> Thus we could go with the patch below, though I doubt it would make a >>> measurable difference (and it actually adds tests for other cases). >&

bug#41354: equal? has no sensible code path for symbols

2020-05-28 Thread David Kastrup
Ludovic Courtès writes: > David Kastrup skribis: > >> Ludovic Courtès writes: >> >>> Hi David, >>> >>> David Kastrup skribis: >> >> Symbols comparing as _unequal_ have no special path in equal?. > > I was going to say that th

bug#41354: equal? has no sensible code path for symbols

2020-05-27 Thread David Kastrup
Ludovic Courtès writes: > Hi David, > > David Kastrup skribis: > >> In Scheme, symbols can be compared using eq? for equality. However, >> since they have garbage-collected content attached, they do not meet the >> predicate SCM_IMP in the short-circuit ev

bug#41353: (thunk? (const 1))

2020-05-17 Thread David Kastrup
ments." Note that (thunk? (lambda x x)) also returns #t and that ((const 1)) returns 1. -- David Kastrup

bug#41354: equal? has no sensible code path for symbols

2020-05-17 Thread David Kastrup
of tests and end up in a general structural comparison comparing their underlying string names. This completely sabotages the semantics symbols are intended for. Behavior for eqv? is similar but the fall-through at least is not as expensive as it is for equal? . -- David Kastrup

bug#22630: Bad comment

2016-10-11 Thread David Kastrup
r more so than the former) but might be less confusing to the human reader. Or find a better name for SCM_NUMP in the first place. At any rate, the minimally invasive option would be to restore the original comment albeit with typographic fixes, namely writing `eq?' instead of just eq. -- David Kastrup

bug#17485: Ugh, well...

2016-07-12 Thread David Kastrup
"fixing" only the titular symptom of the quite larger underlying set of problems underlying this issue report. -- David Kastrup

bug#20209: GUILE 2.0.11: crash in set_port_filename_x for bytevector ports

2016-06-23 Thread David Kastrup
Andy Wingo writes: > On Thu 23 Jun 2016 18:59, David Kastrup writes: > >> I don't see anything protecting sym_big or sym_little (more accurately, >> 'big or 'little which are non-immediate SCM values) from collection >> which would make sym_big and sym_l

bug#20209: GUILE 2.0.11: crash in set_port_filename_x for bytevector ports

2016-06-23 Thread David Kastrup
sym_little (more accurately, 'big or 'little which are non-immediate SCM values) from collection which would make sym_big and sym_little useless for comparison. I'm assuming that not the whole bss segment is getting scanned by BoehmGC. -- David Kastrup

bug#20109: Incompatible API change in 2.0 series for string port encoding

2016-06-23 Thread David Kastrup
Andy Wingo writes: > On Fri 17 Apr 2015 07:17, Mark H Weaver writes: > >> David Kastrup writes: >> >>> In 2.0.9, the following patch/code for getting what amounts to a binary >>> string port worked. >>> >>> commit 7f7a124d3470b0d566f796

bug#17485: (srfi srfi-1) reduce-right does not scale, version 2.0.9

2016-06-21 Thread David Kastrup
Andy Wingo writes: > Hi, > > On Tue 13 May 2014 12:47, David Kastrup writes: > >> The following code results in an error: >> >> (use-modules (srfi srfi-1)) >> (reduce-right + 0 (make-list 1 1)) >> >> Backtrace: >> In srfi/srfi-1.scm: >

bug#22630: [PATCH] Let assv/assoc shortcircuit to assq where feasible

2016-02-11 Thread David Kastrup
* libguile/alist.c (scm_sloppy_assv, scm_sloppy_assoc): Shortcircuit to scm_sloppy_assq where feasible (scm_assv, scm_assoc): Shortcircuit to scm_assq where feasible --- libguile/alist.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/libguile/a

bug#20302: Acknowledgement (peek-char messes up file position on binary string ports)

2015-08-31 Thread David Kastrup
> I'll make sure this bug is fixed in 2.0.12. Any perspective on this yet? It's been more than 4 months. -- David Kastrup

bug#17474: Ping?

2015-06-01 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: >> So you think that it will be more "lightweight" if (values) does not >> have an immediate representation but rather creates a multiple-values >> object on the heap? > > I don't have time to continue thi

bug#20302: peek-char messes up file position on binary string ports

2015-04-11 Thread David Kastrup
t))) ;; Outputs b 3 but should output b 13 This is using guile (GNU Guile) 2.0.11 Packaged by Debian (2.0.11-deb+1-1) -- David Kastrup

bug#20209: GUILE 2.0.11: crash in set_port_filename_x for bytevector ports

2015-03-27 Thread David Kastrup
7;s also a rather inscrutable error symptom. Any chance wrong-type-arg can guard against uninitialized/invalid types specifically? There is a reasonably high chance that bad/uninitialized SCM will wash up there. The more thorough way would be to check the type tag to be in valid range before doing any smob callback. -- David Kastrup

bug#20209: GUILE 2.0.11: crash in set_port_filename_x for bytevector ports

2015-03-26 Thread David Kastrup
me crash from Scheme rather than C were not successful. That does not necessarily mean much. It's not hard to guess that this is yet another roadblock on the way to get LilyPond working with GUILE2. Any ideas regarding what may be causing this error and how to work around it? -- David Kastrup

bug#20200: GUILE 2.0.11: open-bytevector-input-port fails to open in binary mode

2015-03-25 Thread David Kastrup
not automagically switch itself away from the nominal #f encoding which is not actually present. Putting (with-fluids ((%default-port-encoding #f)) ...) around the open-bytevector-input-port call results in the output #f #t #xc3 ISO-8859-1 #f ISO-8859-1 #f #x9f ISO-8859-1 #f which actually corresponds to the documentation. -- David Kastrup

bug#20109: Incompatible API change in 2.0 series for string port encoding

2015-03-18 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> Mark H Weaver writes: >> >>> This hack of giving Guile a buffer containing UTF-8, but claiming that >>> it is Latin-1, is not good. It will cause Guile to see non-ASCII >>> characters as garbage

bug#20109: Incompatible API change in 2.0 series for string port encoding

2015-03-17 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> In 2.0.9, the following patch/code for getting what amounts to a binary >> string port worked. >> >> commit 7f7a124d3470b0d566f796e88f4e2ad5aa043f16 >> Author: David Kastrup >> Date: Sun Sep 21

bug#20109: Incompatible API change in 2.0 series for string port encoding

2015-03-15 Thread David Kastrup
In 2.0.9, the following patch/code for getting what amounts to a binary string port worked. commit 7f7a124d3470b0d566f796e88f4e2ad5aa043f16 Author: David Kastrup Date: Sun Sep 21 18:40:06 2014 +0200 Source_file::init_port: Keep GUILEv2 from redecoding string input diff --git a/lily

bug#19883: Smob's mark_smob has become unreliable in Guile 2.x

2015-03-01 Thread David Kastrup
positives when marking. And we are talking about an advertised GUILE feature after all. With regard to "making our life easier": it's a sunk cost since all the work has obviously been done for GUILEv1 already. -- David Kastrup

bug#19883: Smob's mark_smob has become unreliable in Guile 2.x

2015-03-01 Thread David Kastrup
code changes mostly relevant for multithreading These changes have been suggested by Mark H Weaver in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19883#41> -- David Kastrup

bug#19883: Smob's mark_smob has become unreliable in Guile 2.x

2015-03-01 Thread David Kastrup
Mark H Weaver writes: > Hi David, > > Thank you for the minimal test case. This is enormously helpful. > > David Kastrup writes: > >> The symptom likely occurs when an object is collected and consequently >> its free_smob function gets called. > > Afte

bug#19883: Correction for backtrace

2015-02-27 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> Three years ago in August there was a meeting of developers at my house, >> a lot of information was passed around and in a concerted effort >> LilyPond-2.16.0 was released. >> >> Since the

bug#19883: Correction for backtrace

2015-02-26 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> Shrug. I'll put a link to this bug report to a suitable LilyPond issue. > > Thank you. Though I want other LilyPond developers to get involved, and > I’m afraid it would be easy for them to jus

bug#19883: Correction for backtrace

2015-02-26 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> David Kastrup skribis: >>> >>>> This is embarrassing: I used the wrong executable in connection with the >>>> core d

bug#19883: Correction for backtrace

2015-02-25 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> This is embarrassing: I used the wrong executable in connection with the >> core dump. With the matching executable, the coredump makes a lot more >> sense: >> >> #0 0x in

bug#19883: Correction for backtrace

2015-02-16 Thread David Kastrup
:85 (gdb) So the core indeed occurs when trying to call scm_gc_mark on a smob no longer (or not yet?) associated with a valid structure in memory, in a garbage collection apparently triggered during normal allocation of smob data. Sorry for the nonsensical core dump previously. -- David Kastrup

bug#19883: Smob's mark_smob has become unreliable in Guile 2.x

2015-02-16 Thread David Kastrup
86-linux-gnu. The headers are somewhat cooked-down variants (to remove dependencies on other parts of LilyPond) of the Smob organizing classes used in LilyPond. If one wants to compile for Guile v1 for comparison, one probably needs typedef void * scm_t_func; or so somewhere. guile-bug.tgz

bug#18520: string ports should not have an encoding

2014-09-24 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> In Guile 2.0, at the time a string port is opened, the value of the >> fluid %default-port-encoding is used for deciding how to encode the >> string into a byte stream, [...] > > I agree that this was a mista

bug#18520: string ports should not have an encoding

2014-09-23 Thread David Kastrup
ing on LilyPond merely shines a light on it. So please stop painting this as a request for help. It isn't. It is a request for change. The subject line is "string ports should not have an encoding". It isn't "help, I don't understand string ports". -- David Kastrup

bug#18536: [PATCH] Fix unread-string for characters 0x80 <= c < 0xf0 in UTF-8

2014-09-23 Thread David Kastrup
* libguile/ports.c (scm_ungetc_unlocked): Fix bad reencoding. The code (with-input-from-string "" (lambda () (unread-string "\"ä\"" (current-input-port)) (read))) returns "?" instead of "ä". This bug was introduced in commit be7ecef05c1e

bug#18520: string ports should not have an encoding

2014-09-23 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> David Kastrup skribis: >>> >>>>> Line/column info remains identical regardless of the encoding, so I tend >>>>> to

bug#18520: string ports should not have an encoding

2014-09-23 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >>> Line/column info remains identical regardless of the encoding, so I tend >>> to think it’s more robust to use that. >> >> Column info remains identical regardless of the encoding? Since w

bug#18520: string ports should not have an encoding

2014-09-23 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> David Kastrup skribis: >>>> >>>> For error messages, yes. For associating a position in a string with a >>>> previou

bug#18520: string ports should not have an encoding

2014-09-22 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: >> >> For error messages, yes. For associating a position in a string with a >> previously parsed closure, no. > > But wouldn’t a line/column pair be as suitable as a unique identifier as > the positio

bug#17485: [PATCH 2/3] Rewrite take-right, drop-right, drop-right!

2014-09-22 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> Mark H Weaver writes: >> >>> I can take care of doing this myself, and will of course still credit >>> you in whatever manner you prefer, but I've run into a legal problem: we >>> don't cu

bug#18520: string ports should not have an encoding

2014-09-22 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> I'm currently migrating LilyPond over to GUILE 2.0. LilyPond has its >> own UTF-8 verification, error flagging, processing and indexing. > > Do I understand correctly that LilyPond expects Guile

bug#18520: string ports should not have an encoding

2014-09-22 Thread David Kastrup
nd by hardwired UTF-8 in GUILE-2.2. But strings are already decoded characters. Reencoding makes no sense and detaches things like ftell and fseek from the actual input into the port. -- David Kastrup

bug#18520: string ports should not have an encoding

2014-09-22 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> Guile-2.2 does not consult %default-port-encoding but uses UTF-8 >> consistently (I guess, overriding set-port-encoding! will again change >> that). >> >> That still is not satisfactory. F

bug#18520: string ports should not have an encoding

2014-09-21 Thread David Kastrup
But for me, associating encodings for connecting strings to ports does not make sense. The relation is one of characters to characters. -- David Kastrup

bug#17485: [PATCH 2/3] Rewrite take-right, drop-right, drop-right!

2014-09-20 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> * module/srfi/srfi-1.scm (take-right, drop-right, drop-right!): The >> definitions tended to be overly complicate and/or rely on pushing >> material on the VM stack, detrimental to scalability for Guile 2.0

bug#18495: Alternatives!?!

2014-09-18 Thread David Kastrup
SCM_SMOB_OBJECT_N_LOC will be supported for several years? Or is one supposed to use the undocumented SCM_CELL_OBJECT_LOC instead? I don't see any _documented_ accessor to SMOB cell locations that would not be broken in the current source. This is sort of important. -- David Kastrup

bug#18495: [PATCH] Fix SCM_SMOB_OBJECT{_,_0_,_1_,_2_,_3_}LOC

2014-09-18 Thread David Kastrup
* libguile/smob.h (SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_0_LOC) (SCM_SMOB_OBJECT_1_LOC, SCM_SMOB_OBJECT_2_LOC) (SCM_SMOB_OBJECT_3_LOC): These elementary API macros have been broken by commit 56164dc47f6616b359f0ad23be208f01a77b55fa in 2009 Signed-off-by: David Kastrup --- libguile/smob.h

bug#18495: Alternatives?

2014-09-18 Thread David Kastrup
Any suggestions what non-deprecated alternative should be used instead of SCM_SMOB_OBJECT_LOC in the year that it will take until this fix is generally available? -- David Kastrup

bug#18495: [PATCH] Fix SCM_SMOB_OBJECT_LOC

2014-09-18 Thread David Kastrup
* libguile/smob.h (SCM_SMOB_OBJECT_LOC): This elementary API macro has been broken by commit 56164dc47f6616b359f0ad23be208f01a77b55fa in 2009 Signed-off-by: David Kastrup --- libguile/smob.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/smob.h b/libguile/smob.h

bug#17474: Ping?

2014-08-10 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: >> Three months after its original submission with a working patch series, >> this issue is not going anywhere for no discernible reason. > > As I've already said, I'm strongly opposed to your patch series. &g

bug#18223: Duplicate of issue 14792

2014-08-09 Thread David Kastrup
Nala Ginrut writes: > I can't reproduce it, but I'm using the latest mater. Could you provide > your version? My version is 2.0.9, but more importantly my architecture is 32bit. Just add enough zeros to move beyond the largest immediate integer, and you'll likely see the sa

bug#18223: And here's direct proof that the doc is wrong:

2014-08-09 Thread David Kastrup
re is no guarantee just which numbers may be represented by immediate values, there is no context in which an object property on a number may safely be retrieved. -- David Kastrup

bug#18223: Duplicate of issue 14792

2014-08-09 Thread David Kastrup
s may establish arbitrary relations regarding key uniqueness that have no clear relation to the object identity used by garbage collection. -- David Kastrup

bug#17474: Ping?

2014-08-09 Thread David Kastrup
about at least classifying it correctly as being "Patch Available" to make its state more conspicuous? -- David Kastrup

bug#18223: [PATCH] Fix thinko concerning object property docs

2014-08-08 Thread David Kastrup
Numeric values cannot reliably be distinguished using eq? and have no guaranteed object identity. Signed-off-by: David Kastrup --- doc/ref/api-utility.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi index ffdf276

bug#17474: Another point

2014-06-21 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> It is worth pointing out that the current state of Guile is inconsistent >> regarding the return value of control structures: one primitive control >> structure builder is call/cc, and its normal use does not return >

bug#17474: Making *unspecified* equivalent to (values) would seem convenient

2014-06-21 Thread David Kastrup
een major releases. In the current form of the patch, it's surprisingly backwards compatible but of course one would not call it a mere bug fix. It will take a number of major releases to get more than step 1 done. But every journey starts with the first step. -- David Kastrup

bug#17474: Another point

2014-06-21 Thread David Kastrup
/cc (lambda (exit) (exit list) $5 = () -- David Kastrup

bug#17703: (ice-9 curried-definitions) is missing define*-public

2014-06-05 Thread David Kastrup
2:0: source expression failed to match any pattern in form (define (styled-metronome-markup #:optional (glyph-font (quote default))) (lambda* (event context) "What a mess")) -- David Kastrup

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-05 Thread David Kastrup
David Kastrup writes: > David Kastrup writes: > >>> Otherwise, this function looks good to me, but I'd prefer to give it a >>> new name and move it into list.c, rather than extending SRFI-1's >>> 'length+'. > > It's not an "

bug#17147: [PATCH] Add versions of and/or avoiding O(n^2) argument matching

2014-06-04 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> Fixes <http://bugs.gnu.org/17147> >> >> * module/ice-9/boot-9.scm (and, or): Add syntax rules that only do one >> pattern matching operation per and/or rather than per argument. > > Thanks, but I end

bug#17147: [PATCH] Add versions of and/or avoiding O(n^2) argument matching

2014-06-04 Thread David Kastrup
Fixes <http://bugs.gnu.org/17147> * module/ice-9/boot-9.scm (and, or): Add syntax rules that only do one pattern matching operation per and/or rather than per argument. Signed-off-by: David Kastrup --- module/ice-9/boot-9.scm | 26 ++ 1 file changed, 26 inse

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-04 Thread David Kastrup
David Kastrup writes: >> Otherwise, this function looks good to me, but I'd prefer to give it a >> new name and move it into list.c, rather than extending SRFI-1's >> 'length+'. It's not an "extension" of SRFI-1's length+: it just do

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-03 Thread David Kastrup
Mark H Weaver writes: > Hi David, > > David Kastrup writes: > >> * libguile/srfi-1.c (scm_srfi1_length_plus): Previously, length+ >> returned #f for dotted lists. This leaves the user with no efficient >> means for determining the length of dotted lists.

bug#17296: Uh, wrong?

2014-06-03 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: >> So the behavior for length+ on a dotted list is strictly unspecified. >> It is not even stated "it is an error". > > Actually, it is. At the end of the section that defines the "types" > such a &q

bug#17485: [PATCH 3/3] Reimplement reduce-right in srfi-1

2014-06-03 Thread David Kastrup
* module/srfi/srfi-1.scm (reduce-right): Avoid use of drop-right in connection with last as a single upfront reverse is more efficient and simpler to understand. Signed-off-by: David Kastrup --- module/srfi/srfi-1.scm | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a

bug#17485: [PATCH 1/3] Let length+ return the length of dotted lists rather than #f

2014-06-03 Thread David Kastrup
ill happen to accept dotted lists as the shortest list. Previously, this caused an error late during processing. Signed-off-by: David Kastrup --- libguile/srfi-1.c| 28 ++-- module/srfi/srfi-1.scm | 10 +- test-suite/tests/srfi-1.test |

bug#17485: [PATCH 2/3] Rewrite take-right, drop-right, drop-right!

2014-06-03 Thread David Kastrup
exceptions being raised. They rely on length+ returning the length of dotted lists, behavior that is not specified by the SRFI-1 definition but available in GUILE. Signed-off-by: David Kastrup --- module/srfi/srfi-1.scm | 44 test-suite

bug#17296: Uh, wrong?

2014-06-03 Thread David Kastrup
g at is that I was going to submit the following patch as a part of a series fixing other bugs, bugs that I need a working "get the length of a dotted list" operator for. We don't have any such operator in GUILE, and that's awkward. commit 9539272d26f2954a253ed1365a6704ed1

bug#17485: (srfi srfi-1) reduce-right does not scale, version 2.0.9

2014-06-02 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> For all the cleverness involved here, one has to run through the whole >> list anyway. It makes no real sense to do this in this manner. The >> motivation may be to have a warm cache when k is small, but the res

bug#17147: Scalability front and back...

2014-05-13 Thread David Kastrup
`vm-error' with args `(vm-run "VM: Stack overflow" ())'. Using guile --no-auto-compile on the same file, I just get Backtrace: In ice-9/psyntax.scm: 1259: 19 Aborted (core dumped) That's the stable version of GUILE included with Ubuntu 14.04. -- David Kastrup

bug#17485: (srfi srfi-1) reduce-right does not scale, version 2.0.9

2014-05-13 Thread David Kastrup
se of VM stack buildup. (define (drop-right lis k) (drop lis (- (length lis) k))) should be all that is needed. -- David Kastrup

bug#17474: Making *unspecified* equivalent to (values) would seem convenient

2014-05-12 Thread David Kastrup
l...@gnu.org (Ludovic Courtès) writes: > David Kastrup skribis: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> R5RS defines ‘values’ as: >>> >>> (define (values . things) >>>(call-with-current-continuation >>>

bug#17474: Making *unspecified* equivalent to (values) would seem convenient

2014-05-12 Thread David Kastrup
illing in a different unspecified behavior than throwing an error, but Guile already fills in a different unspecified behavior than throwing an error for multiple values. So this behavior is neither out of line, nor against the standard. It is merely a more convenient behavior for a situation

bug#17474: Making *unspecified* equivalent to (values) would seem convenient

2014-05-12 Thread David Kastrup
does the actual work, the third patch documents the changed semantics. >From 85917446d03e2562b978575b34c1f3dda105c026 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 10 May 2014 16:05:12 +0200 Subject: [PATCH 1/3] Coverage test should not require (if #f #f) to return a value * te

bug#17147: Another idea

2014-05-12 Thread David Kastrup
) (define-syntax or (syntax-rules () ((_) #f) ((_ x ... y) (%cond (x) ... (#t y) and we have no inherently quadratic behavior here since the rules are not applied recursively and the ... pattern is just matched once per construct. -- David Kastrup

bug#13101: Probably duplicate

2014-05-11 Thread David Kastrup
I think this may be related to issue #17147 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17147> as a problem of scale for syntax-case or similar mechanisms. -- David Kastrup

bug#17049: [PATCH v3] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-04-01 Thread David Kastrup
* libguile/list.c (scm_reverse_x): Do not validate first argument to reverse! in advance. Instead undo reversal in error case. Signed-off-by: David Kastrup --- libguile/list.c | 41 - 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a

bug#17147: Performance regression by 3000000% for evaluating "and" form

2014-04-01 Thread David Kastrup
David Kastrup writes: > If Guile is not going to optimize ..., I think it would be good if it > led by example (its sources _are_ going to teach people how to program) > and simply avoided using ... altogether, at the very least where > recursive expansion rules are concerned. &g

bug#17049: [PATCH v2] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-04-01 Thread David Kastrup
ver fixing it yourself. -- David Kastrup

bug#17049: [PATCH v2] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-04-01 Thread David Kastrup
* libguile/list.c (scm_reverse_x): Do not check first argument to reverse! to be a proper list in advance. This provides the performance of a version without validation (tests show a speedup by a factor of 1.8) except for the error case. Signed-off-by: David Kastrup --- libguile/list.c

bug#17096: Guile 1.8: syntax-case messed up when "void" is defined

2014-04-01 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> When running the following program >> >> (define void 6) >> (use-modules (ice-9 syncase)) >> (define-syntax absurd >> (lambda (x) >> (syntax-case x () >> ((_ var) (syntax var

bug#17147: Performance regression by 3000000% for evaluating "and" form

2014-04-01 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> Mark H Weaver writes: >> >>> Okay, good point. Indeed, the expansion time of our 'and' and 'or' >>> macros is quadratic in the number of operands. They are implemented in

bug#17147: Performance regression by 3000000% for evaluating "and" form

2014-03-31 Thread David Kastrup
nd/or (the form generated by or actually seems more prone to buildup and churn). But for syntax replacements in general? Sure. You don't want quadratic behavior in bare-bones replacements like these. -- David Kastrup

bug#17147: Performance regression by 3000000% for evaluating "and" form

2014-03-31 Thread David Kastrup
Mark H Weaver writes: > severity 17147 wishlist > thanks > > David Kastrup writes: > >> The following program goes from 2.3ms execution time to 80s execution >> time when going from Guile-1.8 to current master. >> >> (use-modules (srfi srfi-1

bug#17147: Performance regression by 3000000% for evaluating "and" form

2014-03-31 Thread David Kastrup
t give a clue as to where Guile-v2 is spending all its time. -- David Kastrup

bug#17049: Further change ideas.

2014-03-30 Thread David Kastrup
al error behavior, it would likely make sense to move to the somewhat more specific scm_wrong_type_arg_msg, possibly even for the whole of SCM_VALIDATE_LIST. Of course all this is water under the drawbridge if not even the original patch is going anywhere. -- David Kastrup

bug#17096: Guile 1.8: syntax-case messed up when "void" is defined

2014-03-26 Thread David Kastrup
umented as being anything here... -- David Kastrup

bug#17049: [PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-03-21 Thread David Kastrup
le to complete for continuing. Now that's a somewhat artificial benchmark, but still: almost a factor of 2 for the operation itself is pretty good. -- David Kastrup

bug#17049: [PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-03-21 Thread David Kastrup
infinite loop but arrives back at the start when given an eventually or fully circular list. Because of that, one can save the cost of an upfront proper list check at the price of having to do a double reversal in the error case. Signed-off-by: David Kastrup --- Formatting changes. Also

bug#17049: [PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-03-20 Thread David Kastrup
those memory accesses should by far dominate the timing. And with a large list, all of those data accesses need to get their cache line at a different time. > On Thu 20 Mar 2014 12:23, David Kastrup writes: > >> + /* We did not start with a proper list. Undo the reversal. */ >

bug#17049: [PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-03-20 Thread David Kastrup
infinite loop but arrives back at the start when given an eventually or fully circular list. Because of that, one can save the cost of an upfront proper list check at the price of having to do a double reversal in the error case. Signed-off-by: David Kastrup --- As opposed to the previous patch

bug#17049: PostScriptum:

2014-03-20 Thread David Kastrup
want a patch amended accordingly. -- David Kastrup

bug#17049: [PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST

2014-03-20 Thread David Kastrup
infinite loop but arrives back at the start when given an eventually or fully circular list. Because of that, one can save the cost of an upfront proper list check at the price of having to do a double reversal in the error case. Signed-off-by: David Kastrup --- libguile/list.c | 45

bug#16987: Bad default mantissa width for ~g format string

2014-03-11 Thread David Kastrup
: scheme@(guile-user)> (format #f "~g" (/ 1000 3)) $22 = "600.0" scheme@(guile-user)> (format #f "~S" (/ 1000 3)) $23 = "1000/3" scheme@(guile-user)> -- David Kastrup

bug#15586: Ping?

2013-10-18 Thread David Kastrup
-- David Kastrup

bug#15586: [PATCH] Documentation fix for unfold-right in srfi-1

2013-10-11 Thread David Kastrup
--- doc/ref/srfi-modules.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index d97f498..32ff271 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -677,8 +677,8 @@ Maps each seed value to next

bug#15033: [PATCH] Fix display of symbols containing backslashes

2013-08-06 Thread David Kastrup
Symbols printed with `#{...#}' notation need to double backslashes when displaying as they serve as escape characters when reading. The behavior before this patch is clearly erroneous: GNU Guile 2.0.7 [...] scheme@(guile-user)> (string->symbol "\\(") $1 = #{\\x28;}# scheme@(guile-user)> (symbol->

bug#14792: Actually, this discussion is moot

2013-07-27 Thread David Kastrup
or use in key-weak hash tables. -- David Kastrup

bug#14792: Error in manual "(guile-2) Object Properties"

2013-07-16 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >> Mark H Weaver writes: >> >>> David Kastrup writes: >>> >>>> Mark H Weaver writes: >>>> >>>> object identity is checked by eq? and is conceptually different from >>

bug#14792: Error in manual "(guile-2) Object Properties"

2013-07-16 Thread David Kastrup
Mark H Weaver writes: > Hi David, > > David Kastrup writes: > >> Mark H Weaver writes: >> >>> 'eqv?' is Scheme's fundamental "operational equivalence" predicate. >>> 'eq?' is just an ugly efficiency hack, a poor cous

bug#14792: Error in manual "(guile-2) Object Properties"

2013-07-16 Thread David Kastrup
ject properties? object identity is checked by eq? and is conceptually different from value equality. When calling a thing an "object property", it is not helpful when it does not behave like one. -- David Kastrup

  1   2   >