Re: Adding to the end of the load path

2012-11-16 Thread Noah Lavine
And replying to myself, I remembered something else that had been in the back of my mind: a while ago on this list, there was discussion of bundling some modules with libguile, perhaps as static C arrays. This could make it easier to embed Guile, as a program could embed all the modules it needs an

Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Bruce Korb
This is a clumsy way of saying you don't like the '©' character in strings. I truly do dislike the fact that that you changed the behavior of strings. Yes, I know I can figure out how to change my code to use byte arrays somehow or another, but it is a lot of work. More than just "sed 's/string/b

Re: Adding to the end of the load path

2012-11-16 Thread Bruce Korb
On 11/15/12 16:10, Noah Lavine wrote: > Given that the module-lookup system is fundamentally complicated, I'm going to > suggest that we *don't* try to make it all configurable by environment > variables. > If people want full control of lookups, they can write a site-wide Guile init > file or a p

Re: Adding to the end of the load path

2012-11-16 Thread Mark H Weaver
Hi Noah, Noah Lavine writes: > Given that the module-lookup system is fundamentally complicated, I'm > going to suggest that we *don't* try to make it all configurable by > environment variables. If people want full control of lookups, they > can write a site-wide Guile init file or a personal ~/

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Mark H Weaver
Hi Bruce, Bruce Korb writes: > This is a clumsy way of saying you don't like the '©' character in > strings. I'm sorry, but you haven't provided nearly enough information for me to figure out what caused the SIGSEGV. I don't even know what function you called, or what arguments you passed to it

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Bruce Korb
On 11/16/12 11:19, Mark H Weaver wrote: > Hi Bruce, > > Bruce Korb writes: >> This is a clumsy way of saying you don't like the '©' character in >> strings. > > I'm sorry, but you haven't provided nearly enough information for me to I'm sorry, I did leave off the backtrace. Here's another GDB

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Bruce Korb
> "AG_SCM_STR02SCM()" is a Guile-version dependent macro: > > $ fgrep GUILE_VERSION ../config.h > #define GUILE_VERSION 25 > > an edited extract from my version dependent wrapper header: > > #elif GUILE_VERSION < 20 > # define AG_SCM_STR02SCM(_s) scm_from_locale_string(_s) >

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Mark H Weaver
Bruce Korb writes: >>> figure out what caused the SIGSEGV. I don't even know what function you >> >> scm_from_locale_string(). I had a stack trace that disappeared >> from the email. (Typo of some sort. Sorry.) > > Actually, it was scm_from_utf8_string, since GUILE_VERSION was 25 Okay, t

Re: Adding to the end of the load path

2012-11-16 Thread Noah Lavine
On Fri, Nov 16, 2012 at 1:52 PM, Mark H Weaver wrote: > Hi Noah, > Hello, > In general, I think the idea of requiring people to write scheme code to > manipulate %load-path (and other settings) is a fine approach. Maybe > you're right that this is better than adding a bunch of new environment

Re: [PATCH] Futures: Avoid creating the worker pool more than once

2012-11-16 Thread Ludovic Courtès
Hi Mark, Mark H Weaver skribis: > From b0d936a348b916e73e9071abeb7baae3d7c126d3 Mon Sep 17 00:00:00 2001 > From: Mark H Weaver > Date: Wed, 7 Nov 2012 08:39:42 -0500 > Subject: [PATCH] Futures: Avoid creating the worker pool more than once. > > * module/ice-9/futures.scm (%create-workers!): Use

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Bruce Korb
On 11/16/12 13:23, Mark H Weaver wrote: >> Actually, it was scm_from_utf8_string, since GUILE_VERSION was 25 > > Okay, that's the problem. You told Guile that the C string was encoded > in UTF-8, but actually it was encoded in Latin-1: OK, so I tried latin1, too. (replacing scm_from_utf3_st

Delimited continuations to the rescue of futures

2012-11-16 Thread Ludovic Courtès
Hello! As was reported recently by Mark and others, ‘par-map’ would only use ncores - 1, because the main thread was stuck in a ‘wait-condition-variable’ while touching one of the futures. The obvious fix is to write ‘par-map’ like this (as can be seen from Chapter 2 of Marc Feeley’s PhD thesis):

scm_from_zbyte_string

2012-11-16 Thread Bruce Korb
This is insufficient. There are the "to" functions and the string extraction thingys that must be done. But I really don't like that "scm_i_make_string()" call. SCM scm_from_zbyte_string (const char *str) { return scm_from_zbyte_stringn (str, -1); } SCM scm_from_zbyte_stringn (const char *str

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Noah Lavine
Hello, On Fri, Nov 16, 2012 at 6:32 PM, Bruce Korb wrote: > On 11/16/12 13:23, Mark H Weaver wrote: > >> Actually, it was scm_from_utf8_string, since GUILE_VERSION was 25 > > > > Okay, that's the problem. You told Guile that the C string was encoded > > in UTF-8, but actually it was encoded

Re: Program received signal SIGSEGV, Segmentation fault.

2012-11-16 Thread Mark H Weaver
Bruce Korb writes: > On 11/16/12 13:23, Mark H Weaver wrote: >>> Actually, it was scm_from_utf8_string, since GUILE_VERSION was 25 >> >> Okay, that's the problem. You told Guile that the C string was encoded >> in UTF-8, but actually it was encoded in Latin-1: > > OK, so I tried latin1, too.

Re: scm_from_zbyte_string

2012-11-16 Thread Mark H Weaver
Bruce Korb writes: > This is insufficient. There are the "to" functions > and the string extraction thingys that must be done. > But I really don't like that "scm_i_make_string()" call. Use 'scm_from_latin1_string' and 'scm_to_latin1_string', in combination with setting all the port encodings to

Re: Delimited continuations to the rescue of futures

2012-11-16 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > As was reported recently by Mark and others, ‘par-map’ would only use > ncores - 1, because the main thread was stuck in a > ‘wait-condition-variable’ while touching one of the futures. > > The obvious fix is to write ‘par-map’ like this (as can be seen fro