[PATCH] Prevent 'error' from being tail-called, for better diagnostics

2012-01-29 Thread Mark H Weaver
Hello all, Paul Smith got a rather unhelpful error message from Guile when he called 'error' in tail position from one of his procedures, and asked for input on how to improve error reporting, so I've been looking into it. In this case, the error came from a procedure like this: (define (to-st

[PATCH] Implement scm_call_varargs and scm_call_{7,8,9}

2012-01-29 Thread Mark H Weaver
Andy suggested that we should add these, so here's a patch to do so. Okay to push? Mark >From 08376ad8f67f8c268d78d4f25bd59ca8affe5585 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 29 Jan 2012 20:00:21 -0500 Subject: [PATCH] Implement scm_call_varargs and scm_call_{7,8,9} * libgu

[PATCH] Fix primitive-eval to return # for definitions

2012-01-29 Thread Mark H Weaver
I wrote: > Hello all, > > I think the following behavior is inconsistent and undesirable: > > scheme@(guile-user)> (list (compile '(define foo 3))) > $1 = (#) > scheme@(guile-user)> (list (primitive-eval '(define foo 3))) > $2 = (#) > > It doesn't really make sense for 'define' to return a

Inconsistent 'return value' for definitions

2012-01-29 Thread Mark H Weaver
Hello all, I think the following behavior is inconsistent and undesirable: scheme@(guile-user)> (list (compile '(define foo 3))) $1 = (#) scheme@(guile-user)> (list (primitive-eval '(define foo 3))) $2 = (#) It doesn't really make sense for 'define' to return a value, because it cannot b

Re: unknown location: definition in expression context in subform optname-from of "_^"

2012-01-29 Thread Mark H Weaver
Andy Wingo writes: > Keyword arguments suit this task much better. Okay, I have a fresh idea for your consideration. Let's provide a more general facility to make keyword arguments more convenient to use from C, while avoiding repeatedly interning them. I propose a new macro SCM_KEYWORD, which

Re: Should we compile Guile with -fno-strict-aliasing?

2012-01-29 Thread Ludovic Courtès
Hi! l...@gnu.org (Ludovic Courtès) skribis: [...] > I’ve just tried on this platform and it seems to fix the threading > issues we were observing (though I won’t claim victory until Hydra > reproduces the success several times in a row ;-)). Well no, this one had nothing to do (see

Re: unknown location: definition in expression context in subform optname-from of "_^"

2012-01-29 Thread Bruce Korb
Hi Andy, On Sun, Jan 29, 2012 at 12:28 PM, Andy Wingo wrote: >  * Bruce's original problem statement says nothing about columns. That's because I, personally, in my application, didn't put forth the effort originally (~15 years ago) and it's "too hard" to retrofit. >  * The eval-string introduc

Re: Should we compile Guile with -fno-strict-aliasing?

2012-01-29 Thread Ludovic Courtès
Hi! Andy Wingo skribis: > On Fri 27 Jan 2012 20:02, Mark H Weaver writes: > >> For many years, Linux (the kernel) has used the -fno-strict-aliasing >> compiler option to disable certain tricky optimizations that depend upon >> a very strict reading of the aliasing rules of modern C standards.

Re: Should we compile Guile with -fno-strict-aliasing?

2012-01-29 Thread Andy Wingo
Hi! On Fri 27 Jan 2012 20:02, Mark H Weaver writes: > For many years, Linux (the kernel) has used the -fno-strict-aliasing > compiler option to disable certain tricky optimizations that depend upon > a very strict reading of the aliasing rules of modern C standards. It > turns out that it's qui

Re: unknown location: definition in expression context in subform optname-from of "_^"

2012-01-29 Thread Andy Wingo
Greets, On Sun 29 Jan 2012 05:12, Mark H Weaver writes: > Andy Wingo writes: >> On Sat 28 Jan 2012 20:47, Mark H Weaver writes: >>> Andy Wingo writes: Didn't we settle on eval-string, with the #:file and #:line kwargs? See eval-string in the manual. >>> >>> I guess the code to use

Re: Build Error in master

2012-01-29 Thread Catonano
Il giorno 26 gennaio 2012 23:06, Andy Wingo ha scritto: > On Thu 26 Jan 2012 15:26, Noah Lavine writes: > > > I just checked out the latest master. I attempted to build it, but got > > stuck at this point: > > Is it http://lists.gnu.org/archive/html/bug-guile/2011-12/msg00058.html > ? > yyes, i

Re: unknown location: definition in expression context in subform optname-from of "_^"

2012-01-29 Thread Mike Gran
> From: Bruce Korb > On Sat, Jan 28, 2012 at 8:12 PM, Mark H Weaver wrote: >> In short, this single function allows code to do the ideal thing >> relatively painlessly.  Typical usage might be something like this: >> >>  SCM >>  my_eval (const char *string, const char *file_name, >>      

Re: unknown location: definition in expression context in subform optname-from of "_^"

2012-01-29 Thread Bruce Korb
Hi Mark, On Sat, Jan 28, 2012 at 8:12 PM, Mark H Weaver wrote: > In short, this single function allows code to do the ideal thing > relatively painlessly.  Typical usage might be something like this: > >  SCM >  my_eval (const char *string, const char *file_name, >          long line, long column