Writing libraries for C programs using Guile Scheme

2014-03-07 Thread Peter TB Brett
Hi all, Recently, there have been some really horrible programming errors found in widely-used and security-critical libraries (GnuTLS, for example). These libraries are usually written in C because C is a "lowest common denominator": if a library is written in C, almost every language will be ab

Re: Quietening Guile compilation output

2013-09-28 Thread Peter TB Brett
l...@gnu.org (Ludovic Courtès) writes: > I would recommend changing your package’s build system so that it > compiles and installs .go file. That way, users won’t see any such > messages. > > The only exception is commands with a #!../guile shebang. For those you > can really avoid auto-compilat

Re: Quietening Guile compilation output

2013-09-28 Thread Peter TB Brett
Thien-Thi Nguyen writes: > () Peter TB Brett > () Fri, 27 Sep 2013 21:56:39 +0100 > >As my Scheme codebase gets larger, when starting my application I get >screens full of debug spew about the Guile compilation process. How >can I silence the following message

Quietening Guile compilation output

2013-09-27 Thread Peter TB Brett
Hi folks, As my Scheme codebase gets larger, when starting my application I get screens full of debug spew about the Guile compilation process. How can I silence the following messages: ;;; note: source file /path/to/foo.scm ;;; newer than compiled /path/to/foo.scm.go ;;; compiling /path/t

Re: Getting Guile 2.0.x onto Fedora

2012-11-18 Thread Peter TB Brett
Mike Gran writes: > Hi- >   > With the Fedora 18 beta starting, I thought I'd check on the > state of Guile.  To date, Fedora hasn't moved past Guile 1.8.8. >   > The meta-bug tracking Guile 2.0.x integration is #678238 >   > https://bugzilla.redhat.com/show_bug.cgi?id=678238 >   > But, it is bei

Re: Compatibility V1.8 and 2.0 - deprecated (debug-enable 'debug)

2011-08-09 Thread Peter TB Brett
Ian Hulin writes: > In the Lilypond code we use (debug-enable 'debug) to give full error > information when we have Scheme lines embedded in a LilyPond source file. > > This option has been deprecated in V2.0 but there's no indication in > NEWS of how to supply equivalent functionality. I believ

A question about SCM_DEFINE & guile-snarf

2011-06-15 Thread Peter TB Brett
The Guile manual says: > For historical reasons, the `SCM_DEFINE' macro also defines a static > array of characters named `s_clear_image', initialized to the string > "clear-image". You shouldn't use this array, but you might need to be > aware that it exists. Why is using this discouraged? li

Re: A question about scm_{to,from}_locale_string()

2011-06-12 Thread Peter TB Brett
Thien-Thi Nguyen writes: > Probably sooner or later it behooves us (clients of libguile) > to hold a libguile "portability summit", where common bits of > autoconfigury, shimming, etc can be actively pooled, refactored > and (hopefully) incorporated into a time-saving tarball. > > In this way, st

Re: A question about scm_{to,from}_locale_string()

2011-06-12 Thread Peter TB Brett
l...@gnu.org (Ludovic Courtès) writes: > Hello, > > Peter TB Brett skribis: > >> All of our strings are encoded as UTF-8, but we can't use >> scm_to_utf8_stringn() and scm_from_utf8_string() because they don't >> exist in Guile 1.8.8 (which we're goi

A question about scm_{to,from}_locale_string()

2011-06-11 Thread Peter TB Brett
Hi folks, gEDA currently uses scm_to_locale_string() and scm_from_locale_string() to convert C char* strings to and from SCM strings. All of our strings are encoded as UTF-8, but we can't use scm_to_utf8_stringn() and scm_from_utf8_string() because they don't exist in Guile 1.8.8 (which we're goi

gEDA now supports Guile 2.0! (And an issue).

2011-06-03 Thread Peter TB Brett
Hi folks, I just finished porting gEDA (http://www.gpleda.org/) to Guile 2.0! I encountered one problem, though. In Guile 1.8.x, scm_display_error() takes a stack as the first argument. In Guile 2.0.x, scm_display_error() takes a frame as the first argument. Can anyone suggest a sensible way t

Re: Trouble building Guile 1.9.13

2010-12-05 Thread Peter TB Brett
Neil Jerram writes: > Peter TB Brett writes: > >> ERROR: In procedure skip_block_comment: >> ERROR: /home/peter/src/guile/guile-tools:1:2: unterminated `#! ... !#' >> comment >> guile: uncaught throw to wrong-type-arg: (#f Wrong type (expecting ~A): ~S >

Trouble building Guile 1.9.13

2010-12-05 Thread Peter TB Brett
Hi folks, I'm attempting and failing to compile Guile 1.9.13 from git. I checked out the `release_1-9-13', ran `./autogen.sh' and `./configure', but `make' fails with: GENguile-procedures.texi Backtrace: In unknown file: ?: 12 [boot-closure #t # ...] ?: 11 [catch-closure] ?: 10 [

Re: Help needed debugging segfault with Guile 1.8.7

2010-12-02 Thread Peter TB Brett
l...@gnu.org (Ludovic Courtès) writes: > Peter TB Brett writes: > >> Thanks for the info. Judging by previous experience, gEDA will need to >> support Guile 1.8.x for at least two years after Guile 2.x arrives. >> It's probably going to be painful. :-/ > > Out

Re: Help needed debugging segfault with Guile 1.8.7

2010-12-01 Thread Peter TB Brett
Neil Jerram writes: > [snip] > > I think your design is similar to what is outlined in the `Extending > Dia' node of the Guile manual. Were you aware of that doc before > working out your design? If not, I guess we need to make it more > prominent. If yes, I'd appreciate any suggestions you ha

Re: Help needed debugging segfault with Guile 1.8.7

2010-12-01 Thread Peter TB Brett
Linas Vepstas writes: > Basically, if you are going to let users enter arbitrary scheme into > your app, they *will* enter malformed, broken expressions, and you > have to deal with these. Among other things, you have to give them > a clue as to what the error was -- some sort of trace, error re

Re: Help needed debugging segfault with Guile 1.8.7

2010-11-10 Thread Peter TB Brett
Peter TB Brett writes: > I've added a testsuite for the libgeda Scheme API. In one commit [2], > the testsuite succeeds. In the following commit [3], a test which does > not touch any of the changed code starts causing a segfault in the Guile > interpreter. > > [snip]

Help needed debugging segfault with Guile 1.8.7

2010-11-10 Thread Peter TB Brett
Hi folks, I've recently been working on greatly expanding the Guile Scheme API to libgeda, the shared library in the gEDA suite [1]. Unfortunately, I need your help. I've added a testsuite for the libgeda Scheme API. In one commit [2], the testsuite succeeds. In the following commit [3], a tes

Re: Checking for guile from configure -- forward compat.

2009-08-08 Thread Peter TB Brett
Linas Vepstas gmail.com> writes: > 2009/8/8 Peter TB Brett peter-b.co.uk>: > > Hi everyone, > > > > Currently, there appear to be two ways to check for the presence of > > Guile: > > > >  PKG_CHECK_MODULES(GUILE, [guile-1.8]) > > I believe tha

Checking for guile from configure -- forward compat.

2009-08-07 Thread Peter TB Brett
Hi everyone, Currently, there appear to be two ways to check for the presence of Guile: PKG_CHECK_MODULES(GUILE, [guile-1.8]) Or: GUILE_FLAGS Unfortunately, the first of these *only* works for Guile 1.8 -- so if some has, at some point in the future, Guile 2.x, we'll have to add some m4 ma

Re: calling scheme procedures by name from C

2009-08-02 Thread Peter TB Brett
On Sun, 02 Aug 2009 14:00:48 +0100, Paul Emsley wrote: > and p.s. use the new style interface not the gh_* one. e.g. SCM arg1 = > scm_makfrom0str("hello"); I believe scm_makfrom0str is deprecated, and that new code should use scm_from_locale_string. Regards, Pe