Re: Adding Identities to Peval

2012-02-17 Thread Andy Wingo
Hi Noah, On Fri 17 Feb 2012 03:22, Noah Lavine writes: >>> (let* ((x (random)) >>>        (y (list x)) >>>        (z (car y)) >>>   (eq? x z)) >> > To make sure I understand, in the x-y-z example, psyntax would produce > different gensyms for x and z, but peval could merge them later on, > right

Re: allocation within critical sections

2012-02-17 Thread Andy Wingo
On Fri 17 Feb 2012 03:46, Mike Gran writes: >> From: Andy Wingo > >>> Can you explain what happens here?  Is it a deadlock?  What’s at >>> ports.c:575? >> >> It was a deadlock, but I fixed it.  It was something that locked all >> weak sets, but while doing so allocated memory.  Allocating mem

Re: allocation within critical sections

2012-02-17 Thread Mike Gran
> From: Andy Wingo  >> As an aside, I can get a similar sort of deadlock during garbage >> collection of SMOBs if my smob_free function calls a scheme function. >> But the manual does note that you should not call any functions in >> SMOB GC finalizers, so that wouldn't happen if I actually f

build-lexical-var vs. -Wunused-variable

2012-02-17 Thread Ludovic Courtès
Hello, Commit f9685f437312ea790981373ddc375b2a26ba9c4f changes ‘build-lexical-var’ like this: (define-syntax-rule (build-lexical-var src id) - (gensym (string-append (symbol->string id) " "))) + (gensym (string-append (symbol->string id) "-"))) This breaks a heuristic used in the

Re: allocation within critical sections

2012-02-17 Thread Andy Wingo
On Fri 17 Feb 2012 11:32, Mike Gran writes: > - Since memory is low, it calls GC_invoke_finalizers This doesn't necessarily occur when memory is low -- it occurs when allocating new objects, and previously the collector decided that some objects were finalizable. It doesn't indicate hard times

Re: Trouble using (current-filename)

2012-02-17 Thread Ludovic Courtès
Hi, Andy Wingo skribis: > On Thu 16 Feb 2012 22:34, l...@gnu.org (Ludovic Courtès) writes: > >> Andy Wingo skribis: >> >>> (define-syntax current-filename >>> (lambda (x) >>> "A macro that expands to the current filename: the filename that >>> the (current-filename) form appears i

Re: allocation within critical sections

2012-02-17 Thread Ludovic Courtès
Hi, Andy Wingo skribis: > Ooooh, good one. A bug in Guile, this one, and tricky to get around. > Of course, running finalizers in a separate thread will solve it. It’s about differing user-provided finalizer execution, no? What about using asyncs for that? For instance, scm_i_finalize_smob m