Re: syntax-case guards

2013-02-03 Thread Stephen Compall
ing ellipsis in form (syntax k) The error is correct; k lives in single-ellipsis world. What should k mean to syntax->datum? The first k? The last k? Try changing #'k to #'(k ...), and adjusting the guard to deal with list of k, such as you will get, instead of just k. -- Stephen Com

Re: About the primitive macros `and' and `or'

2009-12-24 Thread Stephen Compall
On Fri, 2009-12-25 at 13:18 +0800, Yi DAI wrote: > If anyone can give a reasonable explanation, I may buy it. Otherwise, > I will go with my version in the future. And I suggest Guile or the > standard committee fix this annoying `bug' of Scheme. I, for one, cannot find fault with your suggestion

Re: Interesting Behavior of 'append!' In Local Context

2009-10-17 Thread Stephen Compall
On Sat, 2009-10-17 at 20:36 -0400, Eric McDonald wrote: > Thanks, Stephen. I never really looked at quote as declaring a literal. > I primarily saw its use for suppressing evaluation inside the quoted > entity, and as a convenient shorthand for making lists. I guess it's a > convenient shorthand fo

Re: Interesting Behavior of 'append!' In Local Context

2009-10-17 Thread Stephen Compall
On Oct 17, 2009, at 5:28 PM, Eric McDonald wrote: Notice that 'v1' does not seem to be re-initialized in the second invocation of 'foo'. Interestingly, if I run 'bar' with the same data, the problem does not manifest itself: Literals are literally literal. That is to say: (define (itsalitera

Re: References/locations

2008-08-20 Thread Stephen Compall
"Maciek Godek" <[EMAIL PROTECTED]> writes: > By the way, the let-alias syntax you > gave me in your former letter doesn't work with guile either. I am curious about this; was this with use-syntax on syncase, or use-modules/#:use-module? Or maybe it has just been a while. :) -- I write stuff at

Re: References/locations

2008-08-10 Thread Stephen Compall
"Maciek Godek" <[EMAIL PROTECTED]> writes: > I've tried to do it using a "procedure with > setter", but the problem is that set! doesn't > evaluate its first argument (as long as it's a > symbol), so I'd have to wrap everything > up in macros to obtain: > (set! (vector-location v 1) 10) Actually,

Re: UTF-8 and new ports

2008-02-14 Thread Stephen Compall
Mike Gran <[EMAIL PROTECTED]> writes: > It seems that port types are inherently 8-bit, right? > So to make this work, the ports will have to store and > transmit characters as UTF-8 encoded data. The > 'fill_input' function will have to convert UTF-32 to > UTF-8 and then cache them, passing them

Re: the future of Guile

2007-12-04 Thread Stephen Compall
On Tue, 2007-12-04 at 07:50 +0100, Marco Maggi wrote: > 3. For Guile 2.0 backwards compatibility at the C level can >be broken. Freely. No shame. No blame. This message references another message that I can't find: http://lists.gnu.org/archive/html/guile-devel/2003-04/msg00076.html > 4. If

Re: why args are invalid syntaxes in syntax-rules

2007-10-14 Thread Stephen Compall
On Sat, 2007-10-13 at 08:37 +0200, Marco Maggi wrote: > (body ?args ?body) First, invoke that instead of this. Second, does the above pattern match the below syntax? > (body () > (display 'ciao) > (newline)) -- ;;; Stephen Compall ** http://scompall.n

Re: read-string!/partial on non-file ports

2007-09-10 Thread Stephen Compall
sentation of OBJ to PORT or to the current output port if not given. The output is designed for human readability, it differs from `write' in that strings are printed without doublequotes and escapes, and characters are printed as per `write-char', not in `#\&#x

Re: vector-fill! seems giving out the wrong result

2007-09-04 Thread Stephen Compall
want *the same object* in each position. Try it out with pairs: (let ((v (make-vector 2 (list 1 (write v) (newline) (set-car! (vector-ref v 0) 42) (write v) (newline)) -- ;;; Stephen Compall ** http://scompall.nocandysw.com/blog ** But you know how reluctant paranormal phenomena are

Re: load in environment

2007-07-05 Thread Stephen Compall
onment it captured when it was created. The closure isn't "inside" any module; you merely gave it a binding in your temporary module. temp-module m has # has # which is eq? to item captured the environment containing my-table so can refer to my-table when cal

Re: load in environment

2007-07-05 Thread Stephen Compall
-module! old-cm) What other Guile state might you want to modify in the dynamic context of a load, though? -- ;;; Stephen Compall ** http://scompall.nocandysw.com/blog ** But you know how reluctant paranormal phenomena are to reveal themselves when skeptics are present. --Robert Sheaffer, SkI

Re: hash-get-handle and hash-ref redundant

2007-06-29 Thread Stephen Compall
item (cdr assoc) (define (hash-list-ref ht key) (hash-ref ht key '())) ;; I recently wrote a script that would have seriously benefited ;; in clarity from such a structure. -- ;;; Stephen Compall ** http://scompall.nocandysw.com/blog ** "Peta" is Greek for fifth; a p

Re: guile.m4

2006-06-14 Thread Stephen Compall
alloc; therefore, the way to go is to directly try to compile a call to said function. -- Stephen Compall http://scompall.nocandysw.com/blog ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

Re: stack overflow problem

2006-02-04 Thread Stephen Compall
cons. See Section 33.3.7.1 (Stack overflow, http://www.gnu.org/software/guile/docs/guile-ref/Debugger-options.html) in the Guile Reference for details. -- Stephen Compall http://scompall.nocandysw.com/blog signature.asc Description: This is a digitally signed message part __

Re: Smobs & garbage collecting

2006-01-01 Thread Stephen Compall
oc and malloc, you could wash over either with a utility function, or even use the WHAT argument to add more details to your memory statistics [in debug mode only, of course!] or just in-source documentation of your mallocations. -- Stephen Compall http://scompall.nocandysw.com/blog signature.

Re: Why won't this extension load?

2005-12-13 Thread Stephen Compall
n with no return value and no arguments]. Regardless, the name has been mangled by the C++ compiler, which is why you pass the -C option to `nm', which demangles names. The solution is to say: extern "C" void scm_init_test -- Stephen Com

Re: string parsing/preparation for latex

2005-11-15 Thread Stephen Compall
in the definition of with-collect, in terms of clarity. Also, while you could implement flat-cond as a function, that would ultimately get in your way. -- Stephen Compall http://scompall.nocandysoftware.com/blog signature.asc Description: This is a digitally signed message part _

Re: string parsing/preparation for latex

2005-11-13 Thread Stephen Compall
y drawbacks of its own. Better to just handle it in functions, which, for example, wouldn't have the spurious parenthesis problem of the multiple + argument syntax, and so on. Not to mention the added benefit of scheme->LaTeXing forms unknown at load-time without using eval

Re: string parsing/preparation for latex

2005-11-08 Thread Stephen Compall
t; (texu/prep-str-for-tex (read-line)) ;; % \ { } ~ $ & # ^ _ => ";; \\% \\{ \\} \\~ \\$ \\& \\# \\^ \\_" guile> (begin (display (texu/prep-str-for-tex (read-line))) (newline)) ;; % \ { } ~ $ & # ^ _ -| ;; \% \\ \{ \} \~ \$ \& \# \^ \_ Where guile> is a prompt, => means a return value, -| means printed line, all e

Re: Getting scheme error informations when running scheme code from C

2005-09-11 Thread Stephen Compall
you do manually. -- Stephen Compall http://scompall.nocandysoftware.com/blog signature.asc Description: This is a digitally signed message part ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

libreadline not found on your system (was Re: Guile)

2005-09-07 Thread Stephen Compall
//cnswww.cns.cwru.edu/php/chet/readline/rltop.html -- Stephen Compall http://scompall.nocandysoftware.com/blog ___ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user

Re: Guile starting state.

2005-08-12 Thread Stephen Compall
, at /usr/share/guile/1.6/ice-9/boot-9.scm:3022: (if (provided? 'regex) (module-use! guile-user-module (resolve-interface '(ice-9 regex This function is set up for a call in script.c if a -c or -s option is not used. top-repl makes this and other modifications to th

Re: Using a macro with FOLD alters FOLD procedure!

2005-04-15 Thread Stephen Compall
"it is an error" to pass a macro to fold. Seems like a serious error, of course, that leaves the system in an undefined state unlike errors that don't modify the implementation :); I am no authority on whether this should be fixed (which is