Re: R6RS exception printing -- take #2

2011-01-31 Thread Andreas Rottmann
Andreas Rottmann writes: > Hi! > > I've started refreshing the patch[0] to improve exception presentation for > R6RS exceptions, initially discussed in [1]. I'd like to solicit > clarification on a few points. > Sorry, forgot the link (it's both the same URL): [0] [1] http://thread.gmane.org/gm

R6RS exception printing -- take #2

2011-01-31 Thread Andreas Rottmann
Hi! I've started refreshing the patch[0] to improve exception presentation for R6RS exceptions, initially discussed in [1]. I'd like to solicit clarification on a few points. To recap, it was agreed to add something like the following internal API to boot-9.scm: exception-printer := port key

Re: Relocatable installation

2011-01-31 Thread Jan Nieuwenhuizen
Andy Wingo schreef op ma 31-01-2011 om 22:30 [+0100]: > May I suggest then a bit more rigor in the choice of paths. Sure. > What paths does Guile use? Good question. I'm rather new to 1.9 series. > Are they entirely taken from argv0 The only thing this reloc patch takes from argv0 is BINDIR

Re: Equality predicates, signed zeroes, R5RS and R6RS

2011-01-31 Thread Mike Gran
> From:Mark H Weaver > To:Mike Gran > Cc:"guile-devel@gnu.org" > Sent:Monday, January 31, 2011 2:42 PM > Subject:Re: Equality predicates, signed zeroes, R5RS and R6RS > > Mike Gran writes: > > As an aside, as of a couple of months ago, it was possible to create > > the following seven versions

Re: Equality predicates, signed zeroes, R5RS and R6RS

2011-01-31 Thread Mark H Weaver
Mike Gran writes: > As an aside, as of a couple of months ago, it was possible to create > the following seven versions of zero in Guile using the default reader. > > 0, ±0.0, ±0.0±0.0i Really? I don't understand how this could have happened. mem2complex uses scm_make_rectangular to create com

Re: Relocatable installation

2011-01-31 Thread Jan Nieuwenhuizen
Ludovic Courtès schreef op ma 31-01-2011 om 23:09 [+0100]: > I mean, if this feature goes in, then ‘configure’ should check whether > this incantation is supported (it may not work with combinations other > than GCC + GNU ld) and give up if it’s not. Yes, I understand. > When it’s supported, ‘li

Re: Relocatable installation

2011-01-31 Thread Ludovic Courtès
Hi! Jan Nieuwenhuizen writes: > Ludovic Courtès schreef op ma 31-01-2011 om 22:00 [+0100]: > > Hi, > >> Your patch lacks this RPATH magic, though. > > Yes, we have that in our GUB cross build system. Possibly this > is a thing/feature request for libtool. > >> Perhaps it should check >> whether

Re: Equality predicates, signed zeroes, R5RS and R6RS

2011-01-31 Thread Mike Gran
> From:Mark H Weaver > To:guile-devel@gnu.org > Cc:Andy Wingo ; Taylor R Campbell > Sent:Monday, January 31, 2011 11:53 AM > Subject:Equality predicates, signed zeroes, R5RS and R6RS > > An issue has come to my attention that deserves wider discussion. > > Since at least Guile 1.8, (= 0.0 -0.0

Re: Relocatable installation

2011-01-31 Thread Ludovic Courtès
Hello! Jan Nieuwenhuizen writes: > Ludovic Courtès schreef op za 29-01-2011 om 22:39 [+0100]: [...] >> I’m not sure about this patch. My feeling is that it would take more >> than this to allow Guile to be truly relocatable, e.g., all of >> $GUILE_LOAD_PATH, $GUILE_LOAD_COMPILED_PATH, $LD_LIB

two more mingw patches: guile runs in wine

2011-01-31 Thread Jan Nieuwenhuizen
Hi With these two patches, Guile runs in Wine (the interactive mode still has problems but Schikkers-List runs) and LilyPond also starts to run. I realise that one of these is a pure gnulib thing, you may or may not want to include it until gnulib includes [something like] this. At least, now yo

Re: Relocatable installation

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 21:55, Jan Nieuwenhuizen writes: >> What about the extensions paths? Are all paths from libpath.h >> relocatable? > > Good question, we [LilyPond installs] never needed/used those, > I guess. I can imagine that more paths need to be added, this > was sufficient for guile-1.8,

Re: Relocatable installation

2011-01-31 Thread Jan Nieuwenhuizen
[cc: list] Ludovic Courtès schreef op ma 31-01-2011 om 22:00 [+0100]: Hi, > Your patch lacks this RPATH magic, though. Yes, we have that in our GUB cross build system. Possibly this is a thing/feature request for libtool. > Perhaps it should check > whether ‘-Wl,-rpath='$ORIGIN/../lib'’ works

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Mark H Weaver
Andy Wingo writes: > I did apply it, but it made the test cases start to fail, because > numbers.test is loaded after ecmascript.test, and: > > scheme@(guile-user)> ,L ecmascript > Happy hacking with ECMAScript! To switch back, type `,L scheme'. > ecmascript@(guile-user)> true * true;

Re: Relocatable installation

2011-01-31 Thread Jan Nieuwenhuizen
Andy Wingo schreef op ma 31-01-2011 om 21:50 [+0100]: Hi Andy, > What about the extensions paths? Are all paths from libpath.h > relocatable? > > Curiously yours, Good question, we [LilyPond installs] never needed/used those, I guess. I can imagine that more paths need to be added, this was s

Re: Relocatable installation

2011-01-31 Thread Andy Wingo
Heya Jan, On Mon 31 Jan 2011 21:26, Jan Nieuwenhuizen writes: > I realised we need GUILE_LOAD_COMPILED_PATH too. Added that > in this new patch. I added a bit more explanation: this should > be used together with a sane -rpath $ORIGIN/../lib build. What about the extensions paths? Are all pa

Re: cross building 1.9.14 for mingw

2011-01-31 Thread Ludovic Courtès
Hi Jan, Jan Nieuwenhuizen writes: > Ludovic Courtès schreef op za 29-01-2011 om 22:34 [+0100]: [...] >> Hmm could it be that there was a typo? Here running ‘git-version-gen’ >> outside of a Git tree works fine: >> >> $ guile/build-aux/git-version-gen .tarball-version s/foo/bar/ >> UNKNOW

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 21:30, Mark H Weaver writes: > Andy Wingo writes: >> I did apply it, but it made the test cases start to fail, because >> numbers.test is loaded after ecmascript.test, and: >> >> scheme@(guile-user)> ,L ecmascript >> Happy hacking with ECMAScript! To switch back, type

Re: [PATCH] Possible Documentation Fix

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 20:54, Noah Lavine writes: > How about this language? Looks great to me! Would you mind submitting an updated patch? Also, if you like, please add yourself to the Guile group on savannah. Let Ludo and I know when/if you've done this and we'll be happy to add you there. Let'

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Mark H Weaver
Andy Wingo writes: > I did apply it, but it made the test cases start to fail, because > numbers.test is loaded after ecmascript.test, and: > > scheme@(guile-user)> ,L ecmascript > Happy hacking with ECMAScript! To switch back, type `,L scheme'. > ecmascript@(guile-user)> true * true;

Re: Relocatable installation

2011-01-31 Thread Jan Nieuwenhuizen
Ludovic Courtès schreef op za 29-01-2011 om 22:39 [+0100]: Hi Ludovic, > I’m not sure about this patch. My feeling is that it would take more > than this to allow Guile to be truly relocatable, e.g., all of > $GUILE_LOAD_PATH, $GUILE_LOAD_COMPILED_PATH, $LD_LIBRARY_PATH, > etc. would have to wor

Raising negative numbers to an inexact integer

2011-01-31 Thread Mark H Weaver
Hello all, I have a local branch which allows Guile to represent non-real complex numbers with inexact zero imaginary part, such as 1.0+0.0i. Currently, Guile automatically converts these numbers into reals. As pointed out by Taylor Campbell and others, it is important to distinguish -1.0+0.0i f

Re: cross building 1.9.14 for mingw

2011-01-31 Thread Jan Nieuwenhuizen
Ludovic Courtès schreef op za 29-01-2011 om 22:34 [+0100]: Hi Ludovic, > OK but all the modules listed after ‘accept’ above are needed too, > right? Yes, sure. > Hmm could it be that there was a typo? Here running ‘git-version-gen’ > outside of a Git tree works fine: > > $ guile/build-aux/g

Re: Odd Behavior

2011-01-31 Thread Noah Lavine
Wow, great! On Mon, Jan 31, 2011 at 3:12 PM, Andy Wingo wrote: > On Mon 31 Jan 2011 19:44, Noah Lavine writes: > >> ;;; compiling test.scm >> ;;; WARNING: compilation of test.scm failed: >> ;;; key wrong-type-arg, throw_args (#f "Wrong type to apply: ~S" (#f) (#f)) >> hello, world! > > Now it do

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 18:35, Mark H Weaver writes: > Andy Wingo writes: >>> The last patch might be slightly controversial. Although it does not >>> make `integer-expt' a generic function, nonetheless it can now >>> exponentiate _any_ scheme object that can be multiplied using `*'. >> >> To me thi

Re: Odd Behavior

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 19:44, Noah Lavine writes: > ;;; compiling test.scm > ;;; WARNING: compilation of test.scm failed: > ;;; key wrong-type-arg, throw_args (#f "Wrong type to apply: ~S" (#f) (#f)) > hello, world! Now it does: scheme@(guile-user)> (load "/tmp/test.scm") ;;; note: autocomp

Equality predicates, signed zeroes, R5RS and R6RS

2011-01-31 Thread Mark H Weaver
An issue has come to my attention that deserves wider discussion. Since at least Guile 1.8, (= 0.0 -0.0) has returned #t but (eqv? 0.0 -0.0) has returned #f, and this is still the case. PLT Scheme agrees with us that (eqv? 0.0 -0.0) is #f, but MIT/GNU Scheme, SCM, Chicken, and Gauche all return #

Re: [PATCH] Possible Documentation Fix

2011-01-31 Thread Noah Lavine
Hi, > It is correct, but I kinda liked the explicit mention of pattern > variable environments in the original.  In syntax expansion, there are > lexical variables, bound in lexical environments, and pattern variables, > bound in syntax-expansion environments.  The confusion addressed by that > pa

Re: Odd Behavior

2011-01-31 Thread Noah Lavine
Oh, sorry. I solved that problem (it needed an eval-when). That might also suggest some solutions to peg.scm oddness. I'd still be interested in any tips on debugging macros, though. Thanks, Noah On Mon, Jan 31, 2011 at 2:20 PM, Noah Lavine wrote: > Hello again, > > I tried finding the error by

Re: Odd Behavior

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 19:44, Noah Lavine writes: > (define (codegen) > #`(let ((message "hello, world!\n")) > (display message))) > > (define-syntax test > (lambda (x) > (syntax-case x () > (_ (codegen) > > (test) > > Guile tried to compile test.scm, failed, and then interpre

Re: Scheme Implementers

2011-01-31 Thread Noah Lavine
Hello, > What tends to happen is that people that want to do this consider > themselves Scheme programmers, first and foremost, and who do not > identify themselves with one Scheme system; so they release their code > on their own site, with info on using it with various systems, and send > mails

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 18:35, Mark H Weaver writes: > Andy Wingo writes: >>> The last patch might be slightly controversial. Although it does not >>> make `integer-expt' a generic function, nonetheless it can now >>> exponentiate _any_ scheme object that can be multiplied using `*'. >> >> To me thi

Re: Odd Behavior

2011-01-31 Thread Noah Lavine
Hello again, I tried finding the error by running compile-file, but I got the following Guile session: scheme@(guile-user)> (compile-file "test.scm") ice-9/boot-9.scm:119:21: Wrong type to apply: #f Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user)> ,bt

Odd Behavior

2011-01-31 Thread Noah Lavine
Hello all, I ran into an error message in Guile, and I'm not sure how to track down the cause of it. I used a file called test.scm with the following contents: #!guile !# (define (codegen) #`(let ((message "hello, world!\n")) (display message))) (define-syntax test (lambda (x) (sy

Re: Immediate pointers

2011-01-31 Thread Stefan Israelsson Tampe
Hi, I cannot say that I'm in the tag savy bin. But out of the box I remember that I kind of needed this in the guile-unify project. The solution I'm trying there is to look at address ranges when checking for the object type and use that to dispatch to a unify object or to work with a SCM poin

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Mark H Weaver
Andy Wingo writes: >> The last patch might be slightly controversial. Although it does not >> make `integer-expt' a generic function, nonetheless it can now >> exponentiate _any_ scheme object that can be multiplied using `*'. > > To me this is fine, in principle; but I wonder about causing `(exp

Re: [PATCH] Fast R6RS div/mod; improved extensibility of numerics

2011-01-31 Thread Mark H Weaver
Andy Wingo writes: > If you have time though, I wonder would scm_centered_divide be a better > name than scm_centered_quo_and_rem? "Divide" is the pronunciation of > the "/" procedure, I think. Agreed, here's a patch. Mark >From b5441b4fc27ee4c9686c69307369d24f7cacd660 Mon Sep 17 00:00:

Re: [PATCH] Rework the testing framework for number-theoretic division operators

2011-01-31 Thread Andy Wingo
On Mon 31 Jan 2011 07:19, Mark H Weaver writes: > l...@gnu.org (Ludovic Courtès) writes: >> There are related test failures on i686-linux-gnu: >> >> http://hydra.nixos.org/build/875025 > > I believe this patch should fix the test failures. Applied, thanks. Andy -- http://wingolog.org/