Re: Guile release planning

2008-11-12 Thread Ludovic Courtès
Hello! Andy Wingo <[EMAIL PROTECTED]> writes: > I think we went wrong in the 1.4->1.6 and 1.6->1.8 transitions, by > leaving /source files/ to bitrot. We should have provided > guile-1.6-compat.[ch] and guile-1.8-compat.[ch] files for users to > include in their source trees, wrapping e.g. the gh

Re: Another thread oddity/bug: scm_set_current_output_port

2008-11-12 Thread Ludovic Courtès
Hi, "Linas Vepstas" <[EMAIL PROTECTED]> writes: > It appears that the current port setting is lost, with each new > thread. So, for example, if I set the current output port in the > first 3 threads created, wait, and create a 4th thread, the > current output port is not set in the fourth thread

Re: bug: defining things in different threads

2008-11-12 Thread Linas Vepstas
2008/11/12 Ludovic Courtès <[EMAIL PROTECTED]>: > Hi Linas, > > "Linas Vepstas" <[EMAIL PROTECTED]> writes: > >> void * scm_one (void *p) >> { >> prtdbg("thread one"); >> scm_c_eval_string ("(define x \"asddf\")\n"); >> } >> >> void * scm_two (void *p) >> { >> prtdbg("thread two")

Re: Guile release planning

2008-11-12 Thread Andy Wingo
Hi Han-Wen, On Wed 12 Nov 2008 05:41, Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > One angle that we could take is time based release planning, like GNOME and > Fedora do: plan to do one or two releases per year on a rigid > schedule. With GNOME there is also a difference, as you know: they d

Re: Guile release planning

2008-11-12 Thread Andy Wingo
Greets, On Wed 12 Nov 2008 11:11, [EMAIL PROTECTED] (Ludovic Courtès) writes: > Andy Wingo <[EMAIL PROTECTED]> writes: > >> I think we went wrong in the 1.4->1.6 and 1.6->1.8 transitions, by >> leaving /source files/ to bitrot. We should have provided >> guile-1.6-compat.[ch] and guile-1.8-compat

Dynamic variable binding

2008-11-12 Thread Sebastian Tennant
Hi all, An elementary scheme problem from an elementary schemer... I need to create multiple variable bindings from a list of symbols. The value of the variables is unimportant. It's the 'names' of the variables that matter. In pseudo-scheme code: (map (lambda (v) (define (eval v) "foo") '(

Re: Dynamic variable binding

2008-11-12 Thread Ludovic Courtès
Hello! Sebastian Tennant <[EMAIL PROTECTED]> writes: > What exactly happens when you 'define' a symbol? In Guile (non-portable) terms, "(define foo 'bar)" is equivalent to: (module-define! (current-module) 'foo 'bar) or, at a lower-level: (module-add! (current-module) 'foo (make-variable

Re: bug: defining things in different threads

2008-11-12 Thread Ludovic Courtès
Hi Linas, "Linas Vepstas" <[EMAIL PROTECTED]> writes: > void * scm_one (void *p) > { > prtdbg("thread one"); > scm_c_eval_string ("(define x \"asddf\")\n"); > } > > void * scm_two (void *p) > { > prtdbg("thread two"); > scm_c_eval_string ("(display x)\n"); > } AFAICS, the

Re: Dynamic variable binding

2008-11-12 Thread dsmich
"Ludovic Courtès" <[EMAIL PROTECTED]> wrote: > Sebastian Tennant <[EMAIL PROTECTED]> writes: > > What exactly happens when you 'define' a symbol? > > But, just like "`eval' is evil", run-time symbol definition doesn't > sound right. Surely, there are other ways that you could use to solve >

Re: Dynamic variable binding

2008-11-12 Thread Keith Wright
> From: Sebastian Tennant <[EMAIL PROTECTED]> > > guile> (define-macro (definer var val) > `(define ,var ,val)) > guile> (definer 'foo "bar") > guile> foo > ERROR: Unbound variable: foo > ABORT: (unbound-variable) > > No doubt this fails for the same reason this does: > > guile> (

Does anyone actually use threads with guile?

2008-11-12 Thread Linas Vepstas
Does anyone actually use threads with guile? Or am I the first to do so? Today, I got a new crash. I have multiple threads, which are doing nothing but a bunch of define's, in parallel. (They're loading scheme code from various files). The stack trace is below. This is on guile-1.8.5 --linas th

Re: Does anyone actually use threads with guile?

2008-11-12 Thread Linas Vepstas
2008/11/12 Linas Vepstas <[EMAIL PROTECTED]>: > Today, I got a new crash. I have multiple threads, which > are doing nothing but a bunch of define's, in parallel. > (They're loading scheme code from various files). Studying the code just a little bit more, this looks like a dopey and pointless er

atexit in modules

2008-11-12 Thread Mike Gran
I have a C library that I wrapped as gsubrs that get put into a Guile module. The C library wants a library_init() function called when it is initialized and a library_end() function called when it taken down. (for the curious, it is specifically mysql_library_init() and mysql_library_end().)