Re: rest arguments in let-keywords

2005-05-18 Thread Clinton Ebadi
On Tue, 2005-05-17 at 21:07 -0500, Mario Storti wrote: > I want to use let-keywords, however it bothers to me the fact that the > rest arguments keeps the keyword arguments, so that I have to write > code to eliminate them. I read that this is for comptability with > Common Lisp. Is there an easy w

Re: namespace of goops module

2006-02-14 Thread Clinton Ebadi
On Wed, 2006-02-15 at 01:14 +0800, William Xu wrote: > Hi people there, > > I try to learn GOOP today. As i don't want to mess with name conficts, i > decided to add a prefix while using any modules. Thus to load GOOPS, > > guile> (use-modules ((oop goops) :renamer (symbol-prefix-proc 'oop/goop

Re: passing flags to a function

2006-05-02 Thread Clinton Ebadi
On Tue, 2006-05-02 at 08:25 -0400, Dan McMahill wrote: > Hello, > > I'm sure this is a very basic question about passing "or-able" flags to > a function. In C I might do something like: ...snip... You can make the flags available to scheme as numbers, and then the Scheme users can use Guile's b

Re: Enabling Debugging

2006-07-29 Thread Clinton Ebadi
Volkan YAZICI <[EMAIL PROTECTED]> writes: > Hi, > > I'm trying to enable debbuging - that's (debug-enable 'backtrace) in > Scheme - from a C program on-the-fly. Therefore, as far as I > understand from the quite poorly documented guile manual, I should > use scm_debug_options() for this purpose. B

GDS Release?

2007-02-14 Thread Clinton Ebadi
Are there any up to date releases of GDS available separated from Guile CVS HEAD? -- So play today Go make your hay beneath a warm sun shining But bear in mind one day you'll find the silver cloud's dark lining __

Re: rfc (define-module ... #:use-modules ...)

2007-10-04 Thread Clinton Ebadi
Thien-Thi Nguyen <[EMAIL PROTECTED]> writes: > currently: > (define-module (foo) > #:use-module (a b c) > #:use-module ((d e f) #:select (x y z)) > #:export (bar)) > > proposed: > (define-module (foo) > #:use-modules > (a b c) > ((d e f) #:select (x y z)) > #:export

Re: [patch] subordinate SMOBs with GOOPS superclasses

2007-12-13 Thread Clinton Ebadi
Klaus Schilling <[EMAIL PROTECTED]> writes: > From: Clinton Ebadi <[EMAIL PROTECTED]> > Subject: Re: [patch] subordinate SMOBs with GOOPS superclasses > Date: Wed, 12 Dec 2007 15:38:03 -0500 >> and not abort the entire system. At least in SBCL it takes a lot of >

Re: Long-lived Guile scripts in a mono-threaded game engine

2008-05-27 Thread Clinton Ebadi
Sylvain Beucler <[EMAIL PROTECTED]> writes: >> IOW, `say_stop' does a `(sleep 2)' (or `sleep (2)'), or waits for some >> UI event, is that right? > --- >> what is the nature of the pause? (I think that that might be important.) >> How do you interrupt the tight little say_stop sleep loop (if that'

Re: Long-lived Guile scripts in a mono-threaded game engine

2008-05-27 Thread Clinton Ebadi
Sylvain Beucler <[EMAIL PROTECTED]> writes: > Hi, > > Thanks for your answers Ludovic and Clinton. > > >> An alternative approach could use a thread per script. > > By the way, I have a question about threads: is there a way to kill a > running thread? For example when the current game screen chan

Re: Me no understand scoping

2008-07-29 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: > Hi, > consider the following code (simple iteration > construct invented mainly to cause naming > conflict, as the function 'times' is already > defined in guile) > > (define-macro (times n f) > `(let ((env (the-environment))) > (let loop ((i 0))

Re: Me no understand scoping

2008-07-30 Thread Clinton Ebadi
"Kjetil S. Matheussen" <[EMAIL PROTECTED]> writes: > Clinton Ebadi: >> >> As a matter of style, you probably want to avoid local-eval as it will >> have to be removed whenever Guile ends up with a faster compiler (one > > I've never heard this befo

Re: Me no understand scoping

2008-07-31 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: > Neil Jerram <[EMAIL PROTECTED]>: > >>> How to achieve this effect without using eval? >>> (I've tried (+ . l) but it didn't work out) >> >> (apply + l) > > Correct :) > Here comes another one: > Suppose I want to define a variable, but I don't know its

Re: References/locations

2008-08-15 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: > I've been thinking of implementing this "location" stuff > as a smob, but you've got the point that it is (probably) > impossible to implement the location system without > redefining set! and define. You may want to read a few documents on functional

Re: References/locations

2008-08-18 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: >> What is so wrong with forms like `(set! (vector-ref foo index) ...)'? > > In scheme the only problem is that they don't work, unless we > redefine vector-ref: > (define vector-get vector-ref) > (define vector-ref (make-procedure-with-setter vector-get v

Re: set-pair!

2008-08-20 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: > Hi, > I've been trying to write a function or macro that > would work like this: > > (let ((a 0)(b 0)) > (set-pair! '(a . b) '(1 . 2)) > (cons a b)) ; => (1 . 2) > > I eventually wrote: > > (define (set-pair! pair values) > (let ( (e (the-environm

Re: SOS: Simple Object System

2008-09-24 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: > The other is that in GOOPS a method is something > different than what is commonly known in OOP, because > a class doesn't know its methods (and furthermore, > methods can be created at any time of program execution, > not only during class definition).

Re: SOS: Simple Object System

2008-09-24 Thread Clinton Ebadi
"Maciek Godek" <[EMAIL PROTECTED]> writes: > 2008/9/24 Clinton Ebadi <[EMAIL PROTECTED]>: >> Interestingly enough, CLOS predates C++ and Java ;-) > > No wonder -- lambda calculus is a formal system to express concepts > and you can express practically a

Re: guile-db

2008-10-20 Thread Clinton Ebadi
Sebastian Tennant <[EMAIL PROTECTED]> writes: > Quoth Greg Troxel <[EMAIL PROTECTED]>: >> but... >> >> "To build Guile-PG you need to have installed both the PostgreSQL >>frontend library libpq, and a version of Guile that can load binary >>module (a b c) from file a/b/c.so or a/b/c/li

Re: guile history: your input needed!

2008-11-23 Thread Clinton Ebadi
"Linas Vepstas" <[EMAIL PROTECTED]> writes: > Hi, > > 2008/11/23 Neil Jerram <[EMAIL PROTECTED]>: >> If we had a clearer statement of >> the present, it would not matter so much how people describe the past. > > Is there a clear expression of a vision for the future? > What might one look forward

Re: Simplified slot access in goops

2008-12-02 Thread Clinton Ebadi
"Neil Jerram" <[EMAIL PROTECTED]> writes: > 2008/11/27 Maciek Godek <[EMAIL PROTECTED]>: > >> Perhaps the possible inconvenience is that all variable >> names that happen to be the slot names of a given class >> are shadowed. In the long run it may also cause significant >> performance problems (o

Re: Simplified slot access in goops

2008-12-02 Thread Clinton Ebadi
"Panicz Maciej Godek" <[EMAIL PROTECTED]> writes: >> with-slots uses symbol-macrolet[0] to bind each of the variable names to >> symbol macros within its body. I don't know of anything in Guile that is >> equivalent. > > R5RS pattern language allows to create syntactic aliases for practically > an

Re: 1+ is not R5RS

2008-12-18 Thread Clinton Ebadi
l...@gnu.org (Ludovic Courtès) writes: > "Bertalan Fodor (LilyPondTool)" writes: >> Could you provide me some background why 1+ exists, as it is the same >> as (+ 1, and why is it named like this? > > It'll be hard to get a definite answer: these procedures have "always" > been there, at least sin

Re: Killing off scm_init_guile for Guile 2.0 ?

2009-01-22 Thread Clinton Ebadi
Neil Jerram writes: >> The problem is, >> of course, that if you scm_init_guile in some .so, >> you will accidentally place the entire system into guile >> mode, and not just the .so, as intended. > > Or, to put that another way, the "guile mode"-ness persists on the > thread that called your lib

Re: scheme (format) question

2009-03-23 Thread Clinton Ebadi
Mark Polesky writes: >> (define (my-format bool string . list-of-nums) >> (apply format bool string (map set-precision list-of-nums))) >> >> (let ((a 2.0) >> (b 1/4) >> (c 1/3)) >> (my-format #t "~&~a ~a ~a" a b c)) > > > Kjetil, > > Awesome. Thanks. I knew there was something simp

Re: passing an alist to a procedure without making a copy?

2009-04-19 Thread Clinton Ebadi
Mark Polesky writes: > (define my-alist > '((a . 1) > )) > > (set! my-alist (acons 'b 2 my-alist)) > > my-alist ==> ((b . 2) (a . 1)) > > (define (alist-prepend alist key value) > (set! alist (acons key value alist))) > > (alist-prepend my-alist 'c 3) > > my-alist ==> ((b . 2) (a . 1

Re: GOOPS slot access with side-effect

2010-05-01 Thread Clinton Ebadi
Panicz Maciej Godek writes: > Welcome back :) > Long time no see > > I have a little question concerning GOOPS. > (I didn't find it anywhere in the manual) > > Is there any way to force a certain function > to be invoked during slot access? > > Say, I have a class definition: > (define-class ()