Re: File traversal on FAT32 or NTFS

2018-06-08 Thread Richard Shann
On Thu, 2018-06-07 at 18:45 +0300, Eli Zaretskii wrote: > > From: Richard Shann > > Date: Thu, 07 Jun 2018 14:22:12 +0100 > > > > Should I expect the procedure ftw to work on Microsoft file > > systems? > > A call that works on Unix seems to hang on M/S >

File traversal on FAT32 or NTFS

2018-06-07 Thread Richard Shann
Should I expect the procedure ftw to work on Microsoft file systems? A call that works on Unix seems to hang on M/S And, for good measure, what is the "command processor" that will be invoked by the system and system* procedures? Richard Shann

Re: UTF8 string storage and retrieval in XML

2016-02-01 Thread Richard Shann
On Mon, 2016-02-01 at 13:16 -0500, Mark H Weaver wrote: > Richard Shann writes: > > > Can anyone explain what is going on when you try to store strings with > > non-ASCII characters? Here is an example: > > > > guile> (define another-data "Čć")

Re: UTF8 string storage and retrieval in XML

2016-02-01 Thread Richard Shann
On Mon, 2016-02-01 at 10:43 -0500, Thompson, David wrote: > On Mon, Feb 1, 2016 at 10:36 AM, Richard Shann > wrote: > > I should have said: > > guile --version > > Guile 1.8.8 > > I don't think that you will find much help for this version of Guile > here

Re: UTF8 string storage and retrieval in XML

2016-02-01 Thread Richard Shann
I should have said: guile --version Guile 1.8.8 Richard On Mon, 2016-02-01 at 15:05 +, Richard Shann wrote: > Can anyone explain what is going on when you try to store strings with > non-ASCII characters? Here is an example: > > guile> (define another-data "Čć")

UTF8 string storage and retrieval in XML

2016-02-01 Thread Richard Shann
er-data to give "Čć" not "�\x8c�\x87" (what is that?)... My problem comes with storing an association list with the second element a string with a non-ASCII character in it. I'm storing the alist as a string with (format #f "'~s" myalist) but when I try to store this string on disk using XML it barfs on reloading. Richard Shann

Re: Syntactic significance of dot

2014-09-23 Thread Richard Shann
On Tue, 2014-09-23 at 00:01 +0300, Marko Rauhamaa wrote: > Richard Shann : > > > I've come across some (working) scheme code whose meaning I can't > > unravel. The problem is there is a "." character whose significance > > eludes me. The guile refer

Syntactic significance of dot

2014-09-22 Thread Richard Shann
oot?) ,exception-markup . ,(if (ly:pitch? bass-pitch) (list (ly:context-property context 'slashChordSeparator) (name-note bass-pitch #f)) '() Richard Shann

Re: Geting the value of a top level scheme value from C

2014-01-24 Thread Richard Shann
Thanks for all the replies - sorry I didn't spot that section of the manual (perhaps because it came under "Using modules" and I haven't dipped my toes in that stuff). I have it working now. Richard On Fri, 2014-01-24 at 12:34 -0500, Mark H Weaver wrote: > Richard Shann w

Geting the value of a top level scheme value from C

2014-01-24 Thread Richard Shann
ot;, scm_to_locale_string (bar)); etc... Richard Shann

Re: negating a number

2014-01-15 Thread Richard Shann
Hmm, yes of course, I looked up minus and negate and so on in the index, forgetting that non-words are also indexed... thank you! Richard On Wed, 2014-01-15 at 13:30 -0500, Mark H Weaver wrote: > Richard Shann writes: > > > Is there something neater than > > > > (- 0 amo

negating a number

2014-01-15 Thread Richard Shann
Is there something neater than (- 0 amount) to negate a number? Can't spot anything in the manual ... Richard Shann

Re: Problem with wide characters on upgrading to guile 2.x

2013-09-11 Thread Richard Shann
On Sat, 2013-09-07 at 11:07 +0200, Andy Wingo wrote: > On Mon 02 Sep 2013 10:48, Richard Shann writes: > > > On Thu, 2013-08-22 at 12:14 -0700, Mike Gran wrote: > >> >> 2. In the inner_main of your scm_with_guile call, > >> > >> >> tr

Re: [Denemo-devel] Problem with wide characters on upgrading to guile 2.x

2013-09-04 Thread Richard Shann
On Wed, 2013-09-04 at 12:17 -0400, Mark H Weaver wrote: > Richard Shann writes: > > > On Tue, 2013-09-03 at 19:53 +0200, Thien-Thi Nguyen wrote: > > [...] > >>pt_BR.utf8 is not a supported locale on your system. > > > > yes, that is why I chose it, so

Re: [Denemo-devel] Problem with wide characters on upgrading to guile 2.x

2013-09-04 Thread Richard Shann
o that when I understand it better. Thank you for the response, Richard Shann

Re: Problem with wide characters on upgrading to guile 2.x

2013-09-02 Thread Richard Shann
On Thu, 2013-08-22 at 12:14 -0700, Mike Gran wrote: > >> 2. In the inner_main of your scm_with_guile call, > > >> try calling scm_setlocale. Maybe something like this? > >> (This shouldn't make a difference, I think. > >> But, if it does, it says something interesting.) > >> > >> scm_setl

Re: Problem with wide characters on upgrading to guile 2.x

2013-08-22 Thread Richard Shann
On Thu, 2013-08-22 at 11:45 -0700, Mike Gran wrote: > Hi Richard- > > > > scheme@(guile-user)> (string-append " " "hello") > > > $1 = " \ue176hello" > > scheme@(guile-user)> (display " ") > > scheme@(guile-user)> (display (string-append " " > > "hello")) > > helloscheme@(guile-us

Re: Problem with wide characters on upgrading to guile 2.x

2013-08-22 Thread Richard Shann
side Denemo scm_c_eval_string() is being used to evaluate a string that includes this wide character and that is throwing the exception. Richard On Thu, 2013-08-22 at 14:50 +0200, Panicz Maciej Godek wrote: > 2013/8/22 Richard Shann > GNU/Denemo has a number of guile scripts in whi

Re: Problem with wide characters on upgrading to guile 2.x

2013-08-22 Thread Richard Shann
tting setlocale (LC_ALL, "C.UTF-8") in the above initialization sequence does not affect the behavior. Richard On Thu, 2013-08-22 at 14:50 +0200, Panicz Maciej Godek wrote: > 2013/8/22 Richard Shann > GNU/Denemo has a number of guile scripts in which wide > charact

Problem with wide characters on upgrading to guile 2.x

2013-08-22 Thread Richard Shann
t "~%=> ~A~%"" ") ; the throw arguments are (scm_to_stringn cannot convert wide string to output locale 84 #f #f) what is "locale 84" and how can I return to the desired behavior? Richard Shann

Re: Creating a top level definition if none so far exists, on the fly.

2013-08-15 Thread Richard Shann
On Thu, 15 Aug 2013 05:17:49 -0700 (PDT) Mike Gran wrote: > > > > From: Richard Shann > >> > From: Richard Shann > >> > > >> > I have just started using GNU/Denemo under the guile 2.x and the > >> > following c

Re: Creating a top level definition if none so far exists, on the fly.

2013-08-15 Thread Richard Shann
On Thu, 15 Aug 2013 04:18:52 -0700 (PDT) Mike Gran wrote: > > From: Richard Shann > > > > I have just started using GNU/Denemo under the guile 2.x and the > > following construct no longer works: > > > > (if (not (defined? 'ToggleFiguredBassMode::Activ

Creating a top level definition if none so far exists, on the fly.

2013-08-15 Thread Richard Shann
I have just started using GNU/Denemo under the guile 2.x and the following construct no longer works: (if (not (defined? 'ToggleFiguredBassMode::Active)) (define ToggleFiguredBassMode::Active #f)) The intention is to have a variable defined at the top level which starts out being #f. The nee

Re: More Guile 1.8 code failing in 2.x

2013-02-27 Thread Richard Shann
On Wed, 2013-02-27 at 16:13 +0100, Andy Wingo wrote: > On Wed 27 Feb 2013 16:08, Andy Wingo writes: > > > Here is a Guile 2-compatible version: > > > > (cond-expand > >(guile-2) ; nothing > >(else ; guile < 2.0 > > (define-macro (define-once sym exp) > > `(define ,sym (if (mod

Re: More Guile 1.8 code failing in 2.x

2013-02-27 Thread Richard Shann
On Wed, 2013-02-27 at 06:48 -0800, Mike Gran wrote: > > From: Richard Shann > > > > Thanks for this - it seems define-once is not defined in guile 1.8 > > however, so while some systems only have guile 2.0 (Fedora) and others > > only have guile 1.8 (Debian stabl

Re: More Guile 1.8 code failing in 2.x

2013-02-27 Thread Richard Shann
On Wed, 2013-02-27 at 08:19 -0500, m...@markwitmer.com wrote: > Richard Shann writes: > > > We have one more construct being refused as we upgrade to guile 2.0 in > > GNU/Denemo > > > > (if (not (defined? 'ToggleTripleting::InsideTriplet)) > > (

More Guile 1.8 code failing in 2.x

2013-02-27 Thread Richard Shann
ny mechanism to get initialized, other than this construct. Richard Shann

Re: Guile 1.8 code failing in 2.x

2013-02-25 Thread Richard Shann
) > > in stead! > > /Stefan > > > On Mon, Feb 25, 2013 at 8:18 PM, Richard Shann > wrote: > > In GNU/Denemo we have some scheme which has been working in guile 1.8 > > but which fails (if I have tested correctly) in guile 2.0 > > Apparently the code originated

Guile 1.8 code failing in 2.x

2013-02-25 Thread Richard Shann
fail? (I am running Debian stable myself so don't have direct access to guile 2.x so my testing is limited). - Richard Shann (define-macro defstruct (lambda (s . ff) (let ((s-s (symbol->string s)) (n (length ff))) (let* ((n+1 (+ n 1)) (vv (make-vector n+1))) (

Re: statically linking in srfi modules

2013-02-12 Thread Richard Shann
On Mon, 2013-02-11 at 12:03 -0500, Mark H Weaver wrote: > Richard Shann writes: > > configure:31783: checking for main in -lregex > > configure:31812: i686-pc-mingw32-gcc -o conftest.exe > > -Wno-unused-but-set-variable > > -I/home/rshann/mxe/usr/i686-pc-mingw32/

Re: statically linking in srfi modules

2013-02-11 Thread Richard Shann
On Mon, 2013-02-11 at 10:05 +, Richard Shann wrote: > I noticed that the invocation of the guile build was accepting the > default for regex, so I tried setting it explicitly > with --enable-regex=yes in the configure. With this I see in > config.log > > configure:31783: ch

Re: statically linking in srfi modules

2013-02-11 Thread Richard Shann
On Sun, 2013-02-10 at 21:02 -0500, Mark H Weaver wrote: > Richard Shann writes: > > On Sun, 2013-02-10 at 10:35 -0500, Mark H Weaver wrote: > >> This is an unrelated problem, namely that './configure' is apparently > >> unable to find a suitable POSIX

Re: statically linking in srfi modules

2013-02-10 Thread Richard Shann
On Sun, 2013-02-10 at 10:35 -0500, Mark H Weaver wrote: > Richard Shann writes: > > With this Denemo starts up looking very good - no error messages from > > any of the scheme executed on startup. > > Good. I think the SRFI problem is finally solved. > > > How

Re: statically linking in srfi modules

2013-02-10 Thread Richard Shann
On Sat, 2013-02-09 at 21:00 -0500, Mark H Weaver wrote: > Hi Richard, > > Don't worry, we'll get it working. Here's another attempt. > Replace the calls to 'scm_c_register_extension' with the following: > > scm_c_call_with_current_module (scm_c_resolve_module ("guile"), >

Re: statically linking in srfi modules

2013-02-09 Thread Richard Shann
More on that call to scm_c_call_with_current_module (scm_c_resolve_module ("srfi srfi-1"), init_srfi_1, NULL); I have had a look using gdb and it is exiting during the call to scm_c_resolve_module() HTH Richard

Re: statically linking in srfi modules

2013-02-09 Thread Richard Shann
On Sat, 2013-02-09 at 10:32 -0500, Mark H Weaver wrote: > Richard Shann writes: > > Well it seems I may have been premature in saying that srfi-1 was > > successfully loaded. Although the error message is gone, there is no > > symbol 'map which srfi-1 should have re

Re: statically linking in srfi modules

2013-02-09 Thread Richard Shann
I can feed it any scheme expression and have it evaluated to debug the problem... Richard On Fri, 2013-02-08 at 17:11 -0500, Mark H Weaver wrote: > I wrote: > > > Richard Shann writes: > > > >> > > > > The problem is the call to 'load-extension

Re: statically linking in srfi modules

2013-02-08 Thread Richard Shann
r the rapid response. Richard On Fri, 2013-02-08 at 17:11 -0500, Mark H Weaver wrote: > I wrote: > > > Richard Shann writes: > > > >> > > > > The problem is the call to 'load-extension' near the top of > > 'srfi-1.scm', which again

Re: statically linking in srfi modules

2013-02-08 Thread Richard Shann
e me tracking through the libguile-srfi-srfi-1-v-3.a code? Richard On Fri, 2013-02-08 at 12:27 +0100, Andy Wingo wrote: > On Fri 08 Feb 2013 10:25, Richard Shann > writes: > > > On Fri, 2013-02-08 at 09:24 +, Richard Shann wrote: > >> Is it possible to statical

Re: statically linking in srfi modules

2013-02-08 Thread Richard Shann
On Fri, 2013-02-08 at 13:02 +, Richard Shann wrote: > Hmm, I can't find scm_c_register_extension in the guile reference index, > and though including libguile.h finds the function I get the error > message scm_init_srfi_1 undeclared... > Hunting around for this symbol I see

Re: statically linking in srfi modules

2013-02-08 Thread Richard Shann
h" gives a heap of errors... It looks like this module is the only one doing the dynamic loading thing, judging by grepping for extension in the files, but is there a way of knowing? Thanks in advance, Richard On Fri, 2013-02-08 at 12:27 +0100, Andy Wingo wrote: > On Fri 08 Feb 2013 10

Re: statically linking in srfi modules

2013-02-08 Thread Richard Shann
Oh - sorry, I should have mentioned, we are still on guile 1.8 (perhaps for no good reason?), if that affects the answer. Richard On Fri, 2013-02-08 at 09:24 +, Richard Shann wrote: > Is it possible to statically link in the srfi modules? For GNU/Denemo we > are currently tryin

statically linking in srfi modules

2013-02-08 Thread Richard Shann
eady built in mxe as static libraries; is there a way to build guile with the srfi stuff ready linked in? Richard Shann

Re: Trouble with returning parameters passed in to C primitives.

2012-12-07 Thread Richard Shann
Thank you! I am much clearer on the meaning of quote now. Richard Shann > On Dec 7, 2012 5:51 AM, "Richard Shann" wrote: > > If I pass 'a in as a parameter I get something back which prints on > the > > console as (quote a) but which is not eq? to 'a >

Trouble with returning parameters passed in to C primitives.

2012-12-06 Thread Richard Shann
on the menu, do-offset is returned but I get the error message (#f Wrong type to apply: ~S (do-offset) #f) (BTW I can't find a blow by blow explanation of this error message anywhere, I see some discussion of earlier versions of it on the net...) Anyone able to help? Richard Shann

Re: scm_defined_p(sym, env)

2011-08-24 Thread Richard Shann
Thanks for this, I see there is also scm_is_true to take care of the possibility that SCM_BOOL_T might not be a scalar type, we should be using that too. Richard On Wed, 2011-08-24 at 12:01 -0400, guile-user-requ...@gnu.org wrote: > > Richard Shann writes: > > > I didn't

Re: scm_defined_p(sym, env)

2011-08-23 Thread Richard Shann
00, r...@tuxteam.de wrote: > On Tue, Aug 23, 2011 at 12:36:44PM +0100, Richard Shann wrote: > > I have defined a function with one needed and one optional arg, using > > > > scm_c_define_gsubr (name, 2, 0, 0, callback); > > > > in my function I need to test if the second ar

scm_defined_p(sym, env)

2011-08-23 Thread Richard Shann
environment? Richard Shann

What does #-3# mean?

2010-08-23 Thread Richard Shann
manual (again?) Richard Shann

Re: A variable that holds a string which may be the name of a variable.

2009-12-03 Thread Richard Shann
On Thu, 2009-12-03 at 18:56 +, Neil Jerram wrote: > Linas Vepstas writes: > > > 2009/12/2 Neil Jerram : > > Neil, > > > > For my own edification -- is tehre any difference between > > > >> (let ((sym (with-input-from-string mything read))) > > > > and > > > > (let ((sym (string->symbol mythi

Re: A variable that holds a string which may be the name of a variable.

2009-12-03 Thread Richard Shann
Thanks to all guileans who have responded. I seem to have a workable solution based on Neil's code. The thing I hadn't grokked was the existence of the with-input-from-string procedure. I had been messing with defined? and symbol? but got nowhere. FWIW the core bit of code I ended up with takes th

A variable that holds a string which may be the name of a variable.

2009-12-02 Thread Richard Shann
d to hold. Any help much appreciated! Richard Shann

Re: Creating a list of procedures in a file.

2009-11-20 Thread Richard Shann
Works like a dream - thank you! Richard On Thu, 2009-11-19 at 22:41 +, Neil Jerram wrote: > Richard Shann writes: > > > Thanks for this: the only problem might be that it is the top-level > > definitions in Denemo's initialization script that I want to list. I >

Re: Creating a list of procedures in a file.

2009-11-19 Thread Richard Shann
D: <87ws1nfk3u@gnu.org> > Content-Type: text/plain; charset=utf-8 > > Hi, > > Richard Shann writes: > > > I wonder if anyone knows of a method to extract a list of top-level > > procedure definitions from a string? > > You can use module-for-eac

Creating a list of procedures in a file.

2009-11-18 Thread Richard Shann
. Richard Shann

Re: calling scheme procedures by name from C

2009-08-02 Thread Richard Shann
On Sun, 2009-08-02 at 14:00 +0100, Paul Emsley wrote: > Richard Shann wrote: > > > > SCM proc = gh_str2scm("d-UploadRoutine", strlen("d-UploadRoutine")); > > // proc = scm_string_to_symbol("d-UploadRoutine"); > > // proc = scm_string

Re: calling scheme procedures by name from C

2009-08-02 Thread Richard Shann
On Sun, 2009-08-02 at 06:17 -0500, Linas Vepstas wrote: > 2009/8/2 Richard Shann : > > Hi, > > I want to call a scheme procedure with four arguments from C. > > (The example scheme procedure here is just displaying its arguments.) > > > > (define (d-Uploa

calling scheme procedures by name from C

2009-08-02 Thread Richard Shann
argument in position 1 (expecting string): 33820865 ERROR: In procedure apply: ERROR: Wrong type argument in position 1: d-UploadRoutine It seems to me the docs are rather deficient here! They don't give the types of the arguments, and the header only tells you they are SCM... Help much appreciated, Richard Shann

Re: Getting the (text) selection from the clipboard

2009-06-18 Thread Richard Shann
Thanks for the info: as we have gtk in Denemo I've used that - just didn't want to be doing something stupid! Richard > > Does anyone know if there is a guile procedure to get the (text) > > selection? (That is from doing Copy in another application) > > Richard > > I assume you mean in the X sen

Getting the (text) selection from the clipboard

2009-06-17 Thread Richard Shann
Does anyone know if there is a guile procedure to get the (text) selection? (That is from doing Copy in another application) Richard

Re: make-regexp on mingw

2009-05-06 Thread Richard Shann
On Wed, 2009-05-06 at 12:01 -0400, guile-user-requ...@gnu.org wrote: > Ludovic Courts wrote: > > Richard Shann writes: > > > >> conftest.c:94:19: regex.h: No such file or directory > > > > That means that either is simply not available in MinGW,

Re: make-regexp on mingw

2009-05-04 Thread Richard Shann
Thanks very much for the help, I'll have to look further at mingw. Richard > > > conftest.c:94:19: regex.h: No such file or directory > > That means that either is simply not available in MinGW, or > it's optional, I don't know. > > Thanks, > Ludo'. >

Re: make-regexp on mingw

2009-05-03 Thread Richard Shann
> It should be available as long as Guile is configured with > `--enable-regex' (which is the default) and regcomp(3) is provided by > the C library, which I'd expect to be the case here. > > Can you show the result of "grep regcomp config.log" when configured > on > MinGW? This gives nothing bu

make-regexp on mingw

2009-05-02 Thread Richard Shann
In porting GNU Denemo to windows I noticed that make-regexp is not present. I found an obscure comment in one file that indicates this is a known limitation. Can anyone confirm this? Are there some release notes that I should have seen? Is it a problem that is likely to be fixed? Richard Shann