Re: Shell commands with output to string

2022-02-22 Thread Neil Jerram
On Tue, 22 Feb 2022 at 10:23, Alex Sassmannshausen wrote: > > Hi Zelphir, > > I think you want to be using the popen / pipe procedures for this. See > https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Pipes.html > for the chapter in the manual. Another example, for reading transactions o

Re: Proposal: Deep Dive into the Guile Docs & Makeover Proposal

2022-02-19 Thread Neil Jerram
On Thu, 17 Feb 2022 at 16:59, Blake Shaw wrote: > > https://tube.nocturlab.fr/videos/watch/2b55ca09-f0fd-4899-9cb0-9632cd90b3d1 Wow, what a great reminder of things past! I mean "past" in the sense that I used to be very strongly focused on this, but have not been for some years. The material i

Re: Proposal: Deep Dive into the Guile Docs & Makeover Proposal

2022-02-08 Thread Neil Jerram
Hi Blake, On Tue, 8 Feb 2022 at 08:55, Blake Shaw wrote: > [...] > > Serving at once as a referrence manual & API specification, the large size > may in part be attributed to what simultaneously makes Guile an appealing > project to contribute to, while also rendering the documentation process

Re: Question about data structures

2020-11-23 Thread Neil Jerram
On Sun, 22 Nov 2020 at 18:49, Zelphir Kaltstahl wrote: > Hello Guile Users! > > I have a question about data structures. > > Recently I read a file and the lines in the file would become a list in > my Guile program. The file was not super big or anything. However, I > usually try to avoid having

Re: Questions about (open-input-output-pipe

2020-11-10 Thread Neil Jerram
I guess it's because "wg pubkey" has not yet seen EOF on its input, i.e. it doesn't know that the input is complete. If that's right, I'm afraid I don't know how to fix it. Presumably you need a call that closes half of the port, but still allows reading the "wg pubkey" output from it. Alternati

Re: Need help starting a project in Guile - distributed DE / GUI toolkit using Wayland

2020-03-23 Thread Neil Jerram
On Mon, 23 Mar 2020 at 01:36, Jan wrote: > Hello, > > I would like to make my project in Guile, but I'm not really an > advanced programmer yet - I made some hello worlds in C++, simple 2D > and 3D games in JS using WebGL and I've read basics of Guile from the > manual and Scheme generally from S

Re: Stepping back up as a co-maintainer

2019-10-17 Thread Neil Jerram
I'm afraid arguing by analogy or proverb rarely helps, because the analogy is usually inaccurate in some way. Also, what about Horchata? :-) On Thu, 17 Oct 2019 at 11:53, zx spectrumgomas wrote: > Let's hope so. But in Spain we have a proverb: "Blanco y en botella, > leche". "White and bottle -

Re: Weird Guile Scheme Behaviour

2019-09-13 Thread Neil Jerram
Correct usage of append! usually requires (set! x (append! x )), despite what you might think from the !. I haven't read the rest of your email carefully, but I wonder if that will make a difference? Best wishes, Neil On Fri, 13 Sep 2019 at 13:39, Philip K. wrote: > > Hi, > > I was re

Re: shell script to start guile w/ repl

2019-03-06 Thread Neil Jerram
On Wed, 6 Mar 2019 at 01:22, Matt Wette wrote: > > Hi All, > > I'm trying to generate a shell script that sets up environment for guile and > then executes a guile repl. I can do that. It is here: > >#!/bin/sh > >LD_LIBRARY_PATH=/path/to/my/lib >export LD_LIBRARY_PATH > >exec gui

Re: [ANN] Guile Hall Release (v0.2)

2019-02-16 Thread Neil Jerram
On Fri, 15 Feb 2019 at 16:33, Alex Sassmannshausen wrote: > [...] > Otherwise you can get the code from > https://gitlab.com/a-sassmannshausen/guile-hall/, and build (hopefully) Hi Alex, It's a bit of a side point, but I noticed that your org-mode README is not properly formatted on the Gitlab s

Re: how to use gsl with the guile ffi

2018-12-28 Thread Neil Jerram
tantalum writes: > so far i couldnt find the cause with strace. Well I think I'm just stating the obvious here, but clearly libgslcblas.so is OK - > openat(AT_FDCWD, "/usr/lib/libgslcblas.so", O_RDONLY|O_CLOEXEC) > = 7 - and also libgsl.so - > openat(AT_FDCWD, "/usr/lib/libg

Re: how to use gsl with the guile ffi

2018-12-28 Thread Neil Jerram
tantalum writes: > im getting the error "In procedure dynamic-link: file: "libgsl", > message: "file not found"" with the following code: > > (import (system foreign)) > (define gsl (dynamic-link "libgsl")) > > * gsl (optionally?) depends on libgslcblas, which itself links without > e

Re: Guile equivalent to JS promises?

2018-12-10 Thread Neil Jerram
swedebu...@riseup.net writes: > Hi > > I'm trying to understand JS promises. > > Are promises relevant in Guile? > > According to https://www.promisejs.org/ they seem to be a tool to > read/write JSON in a nonblocking way. > > Is this related to threading where the JS dev want multiple threads to

Re: Beginner questions

2018-11-28 Thread Neil Jerram
Catonano writes: > Neil, > > Il giorno lun 19 nov 2018 alle ore 10:02 Neil Jerram < > n...@ossau.homelinux.net> ha scritto: > >> >> >> On 18 November 2018 19:33:31 GMT, Catonano wrote: >> >Il giorno lun 29 ott 2018 alle ore 22:58 swedebugia >&g

Re: Beginner questions

2018-11-19 Thread Neil Jerram
On 18 November 2018 19:33:31 GMT, Catonano wrote: >Il giorno lun 29 ott 2018 alle ore 22:58 swedebugia > >ha scritto: > >> Hi >> >> I would like to learn more scheme and I would like to make a small >CLI >> program that runs in the terminal and prompts the user for input and >> evaluates it. >>

Re: How to pass the address of an pointer object to c?

2018-04-01 Thread Neil Jerram
Fis Trivial writes: > Hi, all. > I'am trying a wrap a math library written in c with guile scheme. Here > is an example declaration of c type and function in that math library: > > typedef void* array; > typedef int err; > > err randu(array* result, int ndims, long long *dims, dtype type); > > >

Re: Signals / Messages / Events / ...?

2018-01-03 Thread Neil Jerram
On 03/01/18 15:11, Christopher Howard wrote: On Wed, 2018-01-03 at 11:53 +, Neil Jerram wrote: Well, one Lispy mechanism in that area is hooks.  For example, from some of my old code: ;; Changes to modem registration state are indicated by calling this ;; hook with args STATE and

Re: Signals / Messages / Events / ...?

2018-01-03 Thread Neil Jerram
On 03/01/18 05:09, Christopher Howard wrote: Hi list, forgive me if this is a somewhat vague question... but is there some kind of framework/system/approach for Guile where you could have different parts of your code register callback functions to react to a certain signal or message raised by an

Re: Mes 0.8 released

2017-06-26 Thread Neil Jerram
Best wishes - Neil    Original Message   From: Jan Nieuwenhuizen Sent: Monday, 26 June 2017 11:22 To: Neil Jerram Cc: guile-user@gnu.org; guix-de...@gnu.org; epsilon-de...@gnu.org Subject: Re: Mes 0.8 released Neil Jerram writes: Hi Neil! > In your bootstrap path, what is the step after Mes?‎

Re: Mes 0.8 released

2017-06-26 Thread Neil Jerram
Hi Jan, In your bootstrap path, what is the step after Mes?‎ I guess it would be using mescc to compile some C program - but if that is right, which program?  Regards - Neil    Original Message   From: Jan Nieuwenhuizen Sent: Sunday, 25 June 2017 17:40 To: guile-user@gnu.org Cc: guix-de...@gnu

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Neil Jerram
On 12/06/17 09:55, Neil Jerram wrote: On 12/06/17 09:19, Chris Marusich wrote: I think I'm missing something here. In (list (f)), the call to f certainly looks like it's happening at a position that one might intuitively call a "tail" position. So, in this case, what disqu

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Neil Jerram
On 12/06/17 09:19, Chris Marusich wrote: I think I'm missing something here. In (list (f)), the call to f certainly looks like it's happening at a position that one might intuitively call a "tail" position. So, in this case, what disqualifies f from being in tail position? Can you give me an ex

Re: Two variables that are linked together by an heuristic (constraint programming?)

2017-04-26 Thread Neil Jerram
Perhaps by making 'cursor' relative to 'view'? Then you could always declare / assert that  (>= cursor-x 0) (< cursor-x (screen-width)) ; and similarly for cursor-y ‎    Neil    Original Message   From: Amirouche Boubekki Sent: Tuesday, 25 April 2017 10:40 To: Guile User Subject: Two variables

Re: ?-suffix for booleans... good-idea? or bad-idea?

2017-04-25 Thread Neil Jerram
I'm also not sure. In the past I've written code with an 'xxx?' variable, and then added a procedure to set it, giving 'set-xxx?!' - which is not exactly elegant. Also I'm not sure it's best practice to have many variables/attributes/parameters with boolean values, as this can lead to code t

Re: Getting started with tekuti

2017-04-06 Thread Neil Jerram
The attached seems to help. With that, the stdout no longer shows errors, and I see a sensible-looking web UI at http://localhost:8080 and http://localhost:8080/admin. On 06/04/17 22:52, Neil Jerram wrote: Hey Andy, I'm just trying to get started with tekuti, but am hitting problems

Getting started with tekuti

2017-04-06 Thread Neil Jerram
Hey Andy, I'm just trying to get started with tekuti, but am hitting problems which look like they're associated with having no content yet. I've appended a transcript below - can you see what's wrong? Thanks - Neil neil@neil-laptop:~/SW/tekuti$ ./env src/tekuti ;;; note: source file /home

Re: [ANN] guile-sdl2 0.2.0 released

2017-01-21 Thread Neil Jerram
> Home page: https://dthompson.us/pages/software/guile-sdl2.html I get 404 for that URL, and also if I add 'www.'.

Re: Missing (ice-9 debugging) files in guile 2.1.4?

2016-10-11 Thread Neil Jerram
On 11/10/16 17:41, Cecil McGregor wrote: I am running guile 2.1.4 and have noticed the missing ice-9/debugging dirs. I will copy the files from 1.8 and hope they work well enough. Is this intentional, or just delayed? Hi Cecil, It's intentional; in the transition from 1.8 to 2.x, the innards

Re: Presentation of traversi framework via graph recommendations

2016-09-09 Thread Neil Jerram
I got lost at the point of looking up the genres for Toy Story; why does that involve graph traversal?  Probably it would help to add a bit into the blog to explain how the movie information is mapped into a graph.    Original Message   From: Amirouche Boubekki Sent: Friday, 9 September 2016 0

Re: Presentation of traversi framework via graph recommendations

2016-09-09 Thread Neil Jerram
Your blog includes: ‎Mind the fact that -ref procedures have no ! at the end which means they return a new record. I think that should be -set instead of -ref    Neil    Original Message   From: Amirouche Boubekki Sent: Friday, 9 September 2016 07:32 To: Guile User Subject: Presentation of tr

Re: Using . in module names

2016-06-03 Thread Neil Jerram
On 03/06/16 08:57, Christopher Baines wrote: From reading the documentation, I would expect this to work, as . is valid in symbols? But from trying this out, it does not seem to (the module cannot be loaded). Does anyone have information about this? I think you should provide the complete ex

Re: gpsd lib

2016-06-02 Thread Neil Jerram
Hi Mike,  In short, no. For some possibly interesting colour... I've passed many minutes, in recent years, playing with GPS on my Openmoko and GTA04 phones, including trying to get them to export a GPS data stream over Bluetooth; and as I'm also interested in using Guile on those phones, I mig

Re: Using libnotify from Guile

2016-01-05 Thread Neil Jerram
On 05/01/16 09:40, Ludovic Courtès wrote: Neil Jerram skribis: I noticed you asked about libnotify on IRC Also note that glibc built for the Linux kernel provides wrappers for a bunch of inotify syscalls in : --8<---cut here---start->8--- $ objd

Using libnotify from Guile

2016-01-04 Thread Neil Jerram
Hi Luis, I noticed you asked about libnotify on IRC; unfortunately I wasn't quick enough before you left the channel, but I had a quick play and found that it was quite easy to generate a notification using the FFI: (use-modules (system foreign)) (define libnotify (dynamic-link "libnotify")) (d

Re: FOSDEM call for Guile related talks

2015-11-23 Thread Neil Jerram
Hi Ludo, On 19/11/15 14:25, Ludovic Courtès wrote: "Neil Jerram" skribis: Pjotr, I've made my submission now - please could you check if it looks correctly done? (I've never done a FOSDEM submission before...) I can confirm it’s in penta.fosdem.org, but I think you

RE: FOSDEM call for Guile related talks

2015-11-12 Thread Neil Jerram
Thanks, Alex and Ludo! Pjotr, I've made my submission now - please could you check if it looks correctly done? (I've never done a FOSDEM submission before...) Thanks, Neil -Original Message- From: guile-user-bounces+neil=ossau.homelinux@gnu.org [mailto:guile-user-bounces+

Re: How to create hygienic environments?

2015-06-20 Thread Neil Jerram
Michael Tiedtke writes: > Just to quote myself: > >> The (null-environment 5) gives me an empty environment but how > should I insert the editor commands? > > Just think of these editor commands as regular Scheme definitions. I think you're looking for 'module-define!': scheme@(guile-user)> (

Re: Imagemagick and Guile

2015-01-11 Thread Neil Jerram
On 2015-01-11 09:09, A0 wrote: I need to generate an image from raw byte data in my code and ImageMagick seems like an obvious choice to do this. But, looking at http://www.imagemagick.org/script/api.php , I see no Guile API listed. Before I get my hands dirty, I'd like to check if someone alre

Re: guile-2.0.11 installation on system with 2.0.5

2014-09-15 Thread Neil Jerram
On 2014-09-15 02:16, m...@netris.org wrote: Federico Beffa writes: Neil Jerram writes: This is just a guess, but what happens if you do this: $ LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/guile Regards, Neil With this it works! I notice that there is an /etc/ld.so.cache file

Re: guile-2.0.11 installation on system with 2.0.5

2014-09-14 Thread Neil Jerram
Federico Beffa writes: > Hi, > > I'm on Debian 7.6 with guile-2.0.5 installed. I would like to install > a newer version of guile. Therefore I downloaded 2.0.11 and installed > in /usr/local with > > ./configure > make > sudo make install > > Everything appeared to be fine. However, with my surpr

Re: A couple of questions about goops method parameters

2014-09-07 Thread Neil Jerram
Taylan Ulrich Bayirli/Kammer writes: > Panicz Maciej Godek writes: > >> [...] it's hard for me to see the advantage of FRP over OOP in >> practical systems (e.g. windowed applications with buttons and so >> on). [...] > > An off-topic remark: > > I don't know about *functional* reactive programm

Re: cannot compile: srfi-10 define-reader-ctor 'hash '#,(

2014-08-14 Thread Neil Jerram
On 2014-08-14 11:27, Taylan Ulrich Bayirli/Kammer wrote: Neil Jerram writes: I wonder about possibly having some magic that would automatically match certain top-level forms and evaluate them at compile time. The case for this for 'define-reader-ctor' feels quite strong. For the

Re: cannot compile: srfi-10 define-reader-ctor 'hash '#,(

2014-07-31 Thread Neil Jerram
On 2014-07-30 23:27, Jan Nieuwenhuizen wrote: Ludovic Courtès writes: Hi, In this example, you want the reader extension to be available at compile time, and not necessarily at run time. However, by writing the code as is, the reader extension is available only at run time, hence the error.

Re: ossaulib dbus error

2014-07-29 Thread Neil Jerram
On 2014-07-24 15:33, Max wrote: When I set GUILE_WARN_DEPRECATED to "detailed" I got warning that "Eval closures are deprecated". Is this related to eval-when workaround? If so - what would be relevant solution? No, I don't think this is related to eval-when. I believe an eval closure is what

Re: ossaulib dbus error

2014-07-23 Thread Neil Jerram
On 2014-07-22 19:46, Max wrote: 22.07.2014 19:05, Neil Jerram пишет: On 2014-07-22 17:39, Max wrote: OK, sorry to take your time on that attempt. What if you do "guile --debug test.scm" where test.scm has just the load-path appending and (use-modules (glib dbus)) ? If that sti

Re: ossaulib dbus error

2014-07-22 Thread Neil Jerram
On 2014-07-22 17:39, Max wrote: I've copied glib/ to neil/, replaced all the instances of glib with neil (except for libglib of course :) and tried to use (neil dbus) but the result is exactly the same - ERROR: no code for module (neil dbus) OK, sorry to take your time on that attempt. What if

Re: ossaulib dbus error

2014-07-22 Thread Neil Jerram
On 2014-07-22 17:00, Max wrote: Hi. I'm trying to use dbus from ossaulib (as far as I recall it's the only dbus library for guile which is still alive) but got errors from the very beginning: _ (set! %load-path (append %load-path '("/home/lol/source/ossaulib/"))) (use-modules (oop goops) (g

Re: Learning Guile web. Stuck on returning an image.

2014-05-26 Thread Neil Jerram
Martyn Smith writes: > Getting to the point of the email -- I am a bit confused how I would return a > jpg image. For example: - > > > The "1234" tells me which file to load and return. > > Being primarily a .NET developer, I am struggling to understand how to achieve > such goal in guile. I hav

Re: dbus introspection

2014-04-28 Thread Neil Jerram
On 2014-04-28 13:49, Max wrote: 27.04.2014 15:33, Neil Jerram пишет: I have some FFI-based client-side bindings in my library at http://git.savannah.gnu.org/cgit/ossaulib.git/. The (glib dbus) module exports procedures for - making a synchronous or asynchronous dbus call - registering a

Re: dbus introspection

2014-04-27 Thread Neil Jerram
Max writes: > Hi all. > > Are there some dbus bindings available for guile? I have some FFI-based client-side bindings in my library at http://git.savannah.gnu.org/cgit/ossaulib.git/. The (glib dbus) module exports procedures for - making a synchronous or asynchronous dbus call - registering

Re: #:getter procedure returns unexpected value in GOOPS

2014-04-26 Thread Neil Jerram
"Diogo F. S. Ramos" writes: > When using GOOPS, if a class has a second slot, the #:getter procedure > of the first slot returns the value of the second slot when applied to > an instance of a subclass. > > (use-modules (oop goops)) > > (define-class () > (a #:init-form 'foo #:getter foo-a) >

Re: WebSockets

2014-04-02 Thread Neil Jerram
[Now guile-user only, since that seems appropriate] On 2014-04-02 11:08, Nala Ginrut wrote: On Wed, 2014-04-02 at 10:29 +0100, Neil Jerram wrote: Hi there, I'm interested in adding support for WebSockets (http://tools.ietf.org/html/rfc6455) to Guile's web modules. Is anyone else

WebSockets

2014-04-02 Thread Neil Jerram
Hi there, I'm interested in adding support for WebSockets (http://tools.ietf.org/html/rfc6455) to Guile's web modules. Is anyone else interested in - or possibly already working on - that? Thanks, Neil

'or' and multiple values

2014-03-25 Thread Neil Jerram
Hi there! In the following, is the last result a bug? GNU Guile 2.0.9-deb+1-1 Copyright (C) 1995-2013 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain

Re: ‘with-exception-handler’ rationale

2014-03-07 Thread Neil Jerram
On 2014-03-07 13:34, Nikita Karetnikov wrote: I’ve expected ‘with-exception-handler’ to behave like ‘catch’, but it doesn’t. scheme@(guile-user)> ,use (srfi srfi-34) scheme@(guile-user)> (with-exception-handler (const "got it") (lambda () (raise "boom!"))) ice-9/boot-9.scm:106:20: In procedure #

Re: Article about GNU Guile and GOOPS

2014-03-04 Thread Neil Jerram
On 2014-03-04 12:57, Jan Wedekind wrote: Hi, I have written a small blog post about object-oriented programming with GNU Guile and GOOPS [1]. Having used the Ruby programming language for some time, I am quite spoiled when it comes to objects ;) It took me a while to figure out defining const

Re: FFI bindings for FFTW

2014-02-25 Thread Neil Jerram
On 2014-02-25 14:28, Daniel Llorens wrote: Hello, I've written a minimal wrapper for FFTW (http://www.fftw.org/fftw3_doc/Guru-Interface.html#Guru-Interface). https://gitorious.org/guile-ffi-fftw It provides two functions, (fftw-dft! rank sign in out) and (fftw-dft rank sign in). It's

Re: Guile, Emacs, and smartphones

2011-06-22 Thread Neil Jerram
Mike Gran writes: > Hi- > > So, it is time for me to buy a new phone. >   > Has anyone run Emacs or Guile on their phone? I've run Emacs and Guile 1.8 on my Freerunner. No success with Guile 2.0 yet. (Although I've hardly devoted much time yet to that; I hope to do so soonish.) > (Somehow I d

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

2011-06-04 Thread Neil Jerram
Peter TB Brett writes: > Can anyone suggest a sensible way to support both? I haven't been able > to figure out a good feature test... at the moment I've had to resort to > passing #f. :-( How about executing a fragment of Guile code that calls display-error, and seeing if it throws an exception

Re: Is there any approach to define "private" vars in GOOPS?

2011-04-01 Thread Neil Jerram
nalaginrut writes: > Sorry I think the "update score" is a fake problem. It can be solved by > #:allocation #:virtual. > But I still want to talk this topic: "How to hide the critical > property?" With apologies for the late reply... I guess something like this (untested): (define valid-score

Re: Serving files with guile web server

2011-03-19 Thread Neil Jerram
ro...@lavabit.com writes: > So far I have been able to serve text files and images, it should work > with any mime-type now, but I have not test it yet. > > Here is the piece of code that handles files for the curious: > > (let ((file-path (public-file-path path))) > (if (file-exists

Re: Serving files with guile web server

2011-03-18 Thread Neil Jerram
ro...@lavabit.com writes: > I gave a second read to the manual and found: > > "The handler should return two values: the response, as a > record from (web response), and the response body as a string, bytevector, > or #f if not present." > > If this is correct then I guess I should check the file

Re: regex-split for Guile

2011-03-11 Thread Neil Jerram
William James writes: > (define (regex-split regexp str . options) Thanks for posting that! For fun/interest, here's an alternative implementation that occurred to me. Neil (use-modules (ice-9 regex) (ice-9 string-fun)) (define (regex-split regex str . opts) (let* ((un

Re: Problems to install Guile 2.0.0

2011-03-09 Thread Neil Jerram
Germán Arias writes: > Output for gcc --version: > > german@german-desktop:~$ gcc --version > gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3) > Copyright (C) 2007 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is > NO > warranty; not even for MERCHAN

Re: Is there any approach to define "private" vars in GOOPS?

2011-03-09 Thread Neil Jerram
nalaginrut writes: > hi all! > I got a question. Is there any approach to define a "private" > vars/methods in the GOOPS? Or it's impossible? I didn't find any > "private" info in the GOOPS manual. Hi there! In Guile, the visibility of identifiers - including any functions you've defined to get

Re: GNU Guile 1.9.15 released — last call before 2.0!

2011-02-02 Thread Neil Jerram
l...@gnu.org (Ludovic Courtès) writes: > We are pleased to announce GNU Guile release 1.9.15. This is the last > pre-release before the 2.0 release, due on Feb. 16th! Wow, excellent job, and exciting times. Well done to everyone involved! Neil

Re: Modules

2011-02-01 Thread Neil Jerram
Andy Wingo writes: > I would also mention the approach from the skeleton package, which you > can fetch from http://wingolog.org/git/skeleton.git. `autoreconf -vif', > `./configure', and `make'. It has a toplevel `env' script, similar to > other environment scripts needed for other languages th

Re: Modules

2011-01-29 Thread Neil Jerram
Andy Wingo writes: > Hi Marek, > > On Sat 29 Jan 2011 13:13, Marek Kubica writes: > >> What about "the same directory that the file is in"? The point is, when >> writing scripts that become larger than one file, splitting them into >> modules becomes immensely painful because the modules cannot

Re: Modules

2011-01-29 Thread Neil Jerram
Neil Jerram writes: > Marek Kubica writes: > >> What about "the same directory that the file is in"? The point is, when >> writing scripts that become larger than one file, splitting them into >> modules becomes immensely painful because the modules cannot fi

Re: Modules

2011-01-29 Thread Neil Jerram
Marek Kubica writes: > What about "the same directory that the file is in"? The point is, when > writing scripts that become larger than one file, splitting them into > modules becomes immensely painful because the modules cannot find each > other. I agree that this is a bit awkward. My current

Re: inconsistency between let and lambda

2011-01-15 Thread Neil Jerram
Joo ChurlSoo writes: > The following behavior of `let' seems to be wrong. > > guile> (version) > "1.8.8" > guile> > (let ((go #f) > (alist '())) > (let ((a 1) (b (call-with-current-continuation (lambda (x) (set! go x) 2 > (set! alist (cons (cons a b) alist)) > (set! a 100) >

Re: Macro expansion

2011-01-15 Thread Neil Jerram
Hans Aberg writes: > In the code below the 'loop' and 'begin' examples will execute the > while' loop, but if put into the body of a function, 'while' will not > run. So why, and how to fix it? > > Just copy and paste the examples below into guile. For the two first, > I get > 0123456789 > 01

Re: How to change prompt and value-history in guile 1.9.14 init file ~/.guile

2010-12-23 Thread Neil Jerram
Fu gangqiang writes: > Hi, all > guile 1.9.14 default prompt is 'scheme @(guile-user)>' and value-history is > #t, > I can change them using commands ' ,o prompt "guile>"' and ',o value-history > #f' > but how to change them in ~/.guile file According to the `Value History' section in the man

Re: FW: ERROR: file: "libguilereadline-v-17", message: "The specified module could not be found"

2010-12-21 Thread Neil Jerram
"Whitlock, Bradley D" writes: > I built readline-6.1 and gmp-4.3.2 under MinGW on XP and I have guile up and > running but I cannot get readline module to load: > ERROR: In procedure dynamic-link: > > ERROR: file: "libguilereadline-v-17", message: "The specified module could not > be found." >

Re: Backquote simplification

2010-12-11 Thread Neil Jerram
Hi Hans, To reply quickly to one point in your email... (I'll ponder the rest later.) Hans Aberg writes: > On 11 Dec 2010, at 01:25, Neil Jerram wrote: > >> In the hope that these questions might be useful to at least one of >> us... > > I do not know what that me

Re: Backquote simplification

2010-12-10 Thread Neil Jerram
Hans Aberg writes: > The reply I got was helpful, but I decided to settle for a macro > implementation: > > (use-syntax (ice-9 syncase)) > > (define-syntax tuple > (syntax-rules () > ((tuple xs ...) > `(tuple ,xs ...)) > ((tuple x1 x2 . y) > (append `(tuple ,x1 ,x2) y)) >

Re: Backquote simplification

2010-12-10 Thread Neil Jerram
Hans Aberg writes: > [Your reply does not seem to be on the list, so I cc it.] > > Thanks. I might try an iterated cons, that is a function f such such > that > (f x1 ... xk y) --> (cons x1 ... (cons xk y) ...)) Isn't that just `list'? More generally: I've been reading your emails, but I'm af

Re: new sqlite binding

2010-12-07 Thread Neil Jerram
On 7 December 2010 04:46, Linas Vepstas wrote: > Would g-wrap work? I remember g-wrap was written about 10 years ago, > back when swig didn't work so well, and certainly didn't work well with > guile. But I had the impression that g-wrap went defunct. Not sure. > > (what do I know? for all I kn

Re: Trouble building Guile 1.9.13

2010-12-05 Thread Neil Jerram
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 > (exact integer (#t # # > #)) ((#t # # a8f51f0> #))) > make[3]: *** [gu

Re: A few patches for guile-www

2010-12-03 Thread Neil Jerram
Thien-Thi Nguyen writes: > Thanks; i appreciate the feedback. I have the impression after a > quick skim that all the changes are bugfixes (not merely enhancements). > Is that correct? Yes, I would say so. > In any case, i will gladly apply them once i figure out > their nature and suitable Ch

Re: new sqlite binding

2010-12-03 Thread Neil Jerram
Andy Wingo writes: > But I would like to mention the downside of the dynamic FFI > approach: with the static FFI you get typechecking by the C > compiler, but with the dynamic FFI you're on your own. Interesting point, thanks. > I suppose you could also use the C compiler to at least check that

Re: GOOPS:Can I just overload "slot-set!" under #:virtual and let alone "slot-ref" ?

2010-12-03 Thread Neil Jerram
Nala Ginrut writes: > yeah~you hit it precisely! > But I'm not sure if I modified the slot-seting call I'm not clear what you mean by that. > ,the result is all > slot-set! procedure would be effected? No, that's not the case for either of my suggestions. If you invented something like `#:all

Re: GOOPS:Can I just overload "slot-set!" under #:virtual and let alone "slot-ref" ?

2010-12-02 Thread Neil Jerram
On 3 December 2010 00:52, Nala Ginrut wrote: > thanks, but my question is something like this: > ... > (cache ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; ERROR > ... > (sunday ... #:slot-ref (lambda (o) (slot-ref o 'cache)) ...) ;; That's OK > > I could call "(slot-ref o 'cache)" in o

Re: GOOPS:Can I just overload "slot-set!" under #:virtual and let alone "slot-ref" ?

2010-12-02 Thread Neil Jerram
On 2 December 2010 07:06, Nala Ginrut wrote: > Hi, everybody! > I got a question while I'm trying GOOPS, here is some example code pieces: > ;;guile code > (define-class () > (cache #:init-form 0) > (tt #:init-form 1 > #:allocation #:virtual > #:slot-set! (lambda (o v) >

Re: Generating compiled scm (.go) files as part of LilyPond build

2010-11-28 Thread Neil Jerram
Ian Hulin writes: > OK, here's the question: if we decide not to rely on AUTOCOMPILE, and > we are able generate our own .go files in, say, /out/scm, > how do we get guile to use the compiled version > /out/scm/.go in preference to a possibly > non-existent .scm.go file in the cache? There are

Re: new sqlite binding

2010-11-28 Thread Neil Jerram
Linas Vepstas writes: > Hi, > > On 25 November 2010 08:12, Andy Wingo wrote: >> >> I just hacked up a new binding to sqlite. It works with sqlite3 and >> Guile 1.9/2.0. Check it out at: >> >>  http://gitorious.org/guile-sqlite3 > > I'd like to horn in on Andy's glory by advertising guile-dbi > >

Re: libexif binding

2010-11-28 Thread Neil Jerram
Andy Wingo writes: > Hey all, > > I wrote a quick binding to libexif, and threw it up on the tubes. It's > here: > > http://gitorious.org/guile-exif > > I'm rewriting my web photo gallery from being in python to guile, hence > the sqlite and exif hacking. Really cool to see these quick new b

Re: Help needed debugging segfault with Guile 1.8.7

2010-11-28 Thread Neil Jerram
Hi Peter, Thanks for providing such a clear explanation of the problem. Here are a few comments. Peter Brett writes: > Sure. libgeda uses direct management of memory, and the structures used > in its document object model need to be explicitly deleted when finished > with. I decided to use a

A few patches for guile-www

2010-11-25 Thread Neil Jerram
679ca96c6104a Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Thu, 25 Nov 2010 20:11:29 + Subject: [PATCH 1/4] Allow big-dishing-loop to set modlisp-ish reply style --- source/server-utils/big-dishing-loop.scm |5 +++-- source/server-utils/modlisp.scm |9 + 2 fil

Re: ERROR: Bad define placement

2010-11-22 Thread Neil Jerram
barry stevensson writes: > Can anyone  help me please ...  i need your help badly. It's always a good idea to CC the list, so that more people can potentially help you. I've added guile-user on CC here. > Or at least guide where > should i have a look to figure out the mistake... I've attache

Re: ERROR: Bad define placement

2010-11-17 Thread Neil Jerram
barry stevensson writes: > ERROR: In procedure memoization: > ERROR: Bad define placement (define (kxmax zvalue2) (- 1 zvalue2)). Just move the `(define (kxmax zvalue2) (- 1 zvalue2))' line so that it comes directly after `(define (kyluw xx zz) (- 1.5 (+ xx zz)))'. Scheme doesn't allow that def

Re: Help needed debugging segfault with Guile 1.8.7

2010-11-11 Thread Neil Jerram
Peter TB Brett writes: > I'd really appreciate any suggestions that anyone might be able to give > me on figuring out how I've managed to break things. At the moment, I'm > at a complete loss. I'm afraid I only have two general ideas. 1. You can use gdb_print and gdb_output to see the Scheme v

Re: pipe buffering

2010-09-24 Thread Neil Jerram
Aidan Gauland writes: > Maybe it would be better to post my original program that would just > hang. I was only using expect to print debugging messages; my > original program used expect-strings. > > --Aidan > > #! /usr/bin/guile -s > !# > > (use-modules (ice-9 expect)) > (use-modules (ice-9 po

Re: pipe buffering

2010-09-22 Thread Neil Jerram
Aidan Gauland writes: > Then I have a sexp for debugging, which shows that `expect' is getting > one character at a time from the telnet subprocess, since it only > prints out "Tmatch", instead of "Trying [IP address]..." Well, as the manual says: -- Macro: expect clause ... [...] The p

Re: Plotting in Guile

2010-07-29 Thread Neil Jerram
Joel James Adamson writes: > So would I write a C program to handle the IPC between guile and > GNUPLOT, and then control it with Scheme? There's no need to use C here. You can generate the data, and pass it to Gnuplot, all in Scheme. For example, see: http://ossau.homelinux.net:8000/~neil/gr

Re: Thread and guile environment

2010-07-09 Thread Neil Jerram
Andy Wingo writes: > On Mon 05 Jul 2010 09:23, ri...@happyleptic.org writes: > >> Suppose I have a multithreaded C program. Isn't the guile environment >> supposed >> to be shared amongst all threads ? That's what I understood from reading the >> docs anyway. >> >> Yet this simple exemple shows

Re: mod_lisp support for guile-www

2010-07-06 Thread Neil Jerram
Thien-Thi Nguyen writes: > () Neil Jerram > () Sun, 07 Mar 2010 23:00:13 + > >I'm working on a project that needs a web data server, and I'd like to >use Apache + mod_lisp + Guile for that. > >[extending Guile-WWW: background, rationale, etc] >

Re: Best way to call a user defined hook (written in guile) from C when the hook need plenty parameters

2010-07-05 Thread Neil Jerram
ri...@happyleptic.org writes: > (define (hook-helper %s) (lambda () #\t)) > > where %s is the long list of parameters (foo bar baz...) that's inserted by > the C program. > And : > > (define (hook . args) (local-eval (cons print-user-fields user-fields) > (procedure-environment (apply hook-helpe

Re: Thread and guile environment

2010-07-05 Thread Neil Jerram
ri...@happyleptic.org writes: > Suppose I have a multithreaded C program. Isn't the guile environment supposed > to be shared amongst all threads ? That's what I understood from reading the > docs anyway. > > Yet this simple exemple shows the opposite (see the 3 attached files). > So am I supposed

Re: Jumping back to REPL prompt on ^C

2010-07-04 Thread Neil Jerram
Taylor Venable writes: > Hi there, I'm writing a piece of code with a web server component, and > part of that being that I want to jump back to the REPL when one hits > ^C. So it would go something like this: > > scheme@(guile-user)> (start-server) > ;;; handling requests > ^C > scheme@(guile-u

  1   2   3   4   5   6   >