Trouble joining with threads from C

2011-03-06 Thread Mark H Weaver
Apologies in advance if I'm making a mistake here, but can someone explain to me why the minimal attached example code fails to join with its trivial spawned thread? I might guess that it's because spawn_thread() in threads.c calls scm_i_pthread_detach. So does launch_thread(). Yet the documenta

Re: PEG Patches

2011-03-06 Thread Noah Lavine
Here's another patch, which in retrospect may be the most useful of the series. It adds a section called "PEG Internals" to the manual, and begins documenting how PEG actually works. This should make hacking PEG a lot easier. Noah On Sun, Mar 6, 2011 at 12:25 AM, Noah Lavine wrote: > Hello all,

Re: [PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-06 Thread Andreas Rottmann
l...@gnu.org (Ludovic Courtès) writes: > Hi Andreas, > > Andreas Rottmann writes: > >> The expansion of `define-inlinable' contained an expression, which made >> SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition >> used in expression context"). > > SRFI-9 says “Record-type

Re: [PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-06 Thread Ludovic Courtès
Hi Alex, Alex Shinn writes: > 2011/3/7 Ludovic Courtès : >> Hi Andreas, >> >> Andreas Rottmann writes: >> >>> The expansion of `define-inlinable' contained an expression, which made >>> SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition >>> used in expression context"). >>

Re: Cross-compiling Guile 2.0

2011-03-06 Thread Andy Wingo
Hi, On Sun 06 Mar 2011 12:03, Neil Jerram writes: > What architectural dependencies are there in the .go format? Only endianness and word size. Of course a macro could check something about the system at expansion-time, for example a value in a header; and there are things like the mapping of

Re: Cross-compiling Guile 2.0

2011-03-06 Thread Ludovic Courtès
Hi Neil, Neil Jerram writes: > In principle, how should Guile 2.0 be cross-compiled? I'm thinking > mostly of the part of the build that compiles all the installed modules. Guile 2.0 can only be cross-compiled when the endianness and word size of the host and target match (because the bytecode

Re: [PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-06 Thread Alex Shinn
2011/3/7 Ludovic Courtès : > Hi Andreas, > > Andreas Rottmann writes: > >> The expansion of `define-inlinable' contained an expression, which made >> SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition >> used in expression context"). > > SRFI-9 says “Record-type definitions m

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Andy Wingo
On Sun 06 Mar 2011 17:24, Mark H Weaver writes: > Andy Wingo writes: >> SCM scm_c_public_lookup (const char *module_name, const char *name); >> SCM scm_c_private_lookup (const char *module_name, const char *name); >> SCM scm_c_public_ref (const char *module_name, const char *name); >

`regexp-exec' and non-ascii strings

2011-03-06 Thread Clinton Ebadi
Greetings, While debugging[0] an issue with Bobot++ (poor sneek!) aborting after calling scm_regexp_exec on any utf-8 strings I eventually realized that... the string was actually single-byte encoded internally. After taking that down the wrong path I eventually tested `regexp-exec' with a *valid

Re: Not fixing ‘letrec*’

2011-03-06 Thread Ludovic Courtès
Hi, I’ve pushed a variant of this patch. Thanks, Ludo’.

Re: [PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-06 Thread Ludovic Courtès
Hi Andreas, Andreas Rottmann writes: > The expansion of `define-inlinable' contained an expression, which made > SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition > used in expression context"). SRFI-9 says “Record-type definitions may only occur at top-level”, and I’m in

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Ludovic Courtès
Hi! Andy Wingo writes: > SCM scm_public_lookup (SCM module_name, SCM sym); > SCM scm_private_lookup (SCM module_name, SCM sym); > > Look up a variable bound to SYM in the module named MODULE_NAME. If > the module does not exist or the symbol is unbound, signal an > error. T

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Andy Wingo
Hello, On Sun 06 Mar 2011 18:10, Thien-Thi Nguyen writes: > () Mark H Weaver > () Sun, 06 Mar 2011 11:24:33 -0500 > >Maybe utf8 is a better choice? > > A module name is a list of symbols, so why not use that from the beginning? The variants without _c_ did just that, so no problem there.

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Thien-Thi Nguyen
() Mark H Weaver () Sun, 06 Mar 2011 11:24:33 -0500 Maybe utf8 is a better choice? A module name is a list of symbols, so why not use that from the beginning? If the process of converting "ice-9 common-list" into (ice-9 common-list) must happen somewhere, it would be nice if it could happen e

[PATCH] Don't mix definitions and expressions in SRFI-9

2011-03-06 Thread Andreas Rottmann
As always, see the patch header for details. From: Andreas Rottmann Subject: Don't mix definitions and expressions in SRFI-9 The expansion of `define-inlinable' contained an expression, which made SRFI-9's `define-record-type' fail in non-toplevel contexts ("definition used in expression contex

[PATCH] Several tweaks for R6RS ports

2011-03-06 Thread Andreas Rottmann
Hi! Here's a few patches related to R6RS port support, in short: - Add missing `get-string-n!' and `get-string-n' - Fix a few missing exports - A bit of work on transcoder-related stuff See the patch headers for details. The patches are attached in the order they should be applied, although "

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Mark H Weaver
Andy Wingo writes: > SCM scm_c_public_lookup (const char *module_name, const char *name); > SCM scm_c_private_lookup (const char *module_name, const char *name); > SCM scm_c_public_ref (const char *module_name, const char *name); > SCM scm_c_private_ref (const char *module_name, co

proposal: scm_c_public_ref et al

2011-03-06 Thread Andy Wingo
Hey all, As we move more and more to writing code in Scheme and not in C, it becomes apparent that it is more cumbersome to reference Scheme values than it should be. I propose that we add helper C APIs like these: SCM scm_public_lookup (SCM module_name, SCM sym); SCM scm_private_lookup

Re: Cross-compiling Guile 2.0

2011-03-06 Thread Neil Jerram
Andy Wingo writes: > On Sat 05 Mar 2011 20:47, Neil Jerram writes: > >> In principle, how should Guile 2.0 be cross-compiled? I'm thinking >> mostly of the part of the build that compiles all the installed >> modules. > > I have never cross-compiled anything, so I really don't know. > > Ideally

Re: Error in make check building guile-lib for guile 2.0. trap-enable unbound

2011-03-06 Thread Neil Jerram
l...@gnu.org (Ludovic Courtès) writes: > Hi Neil, > > Neil Jerram writes: > >> I had a feeling that a lot (or even maybe all) of guile-lib got merged >> into the main Guile distribution. So are you sure you still need >> separate guile-lib at all? > > Only (sxml ...), (texinfo ...), and (statpro