Re: [shift and reset, plus] while
On Wed 13 Apr 2011 19:31, Wolfgang J Moeller w...@heenes.com writes: Last resort: Once we do allow for argument(s) to (break), (while #t ... (break x) ... (break y) ...) If I understand you right, this is more like a coroutine, which could use an orthogonal form: (define-syntax with-yield (lambda (x) (syntax-case x () ((_ yield exp exp* ...) (identifier? #'yield) #'(let ((tag (make-prompt-tag))) (define (handler k . args) (define (resume . args) (call-with-prompt tag (lambda () (apply k args)) handler)) (apply values resume args)) (call-with-prompt tag (lambda () (let-syntax ((yield (syntax-rules () ((_ arg (... ...)) (abort-to-prompt tag arg (... ...)) exp exp* ...)) handler)) Then you can (with-yield yield (while #t ... (yield) ...)) Regards, Andy -- http://wingolog.org/
[patch] get 1.8.8 to build on Solaris 10u9
Hi, With the attached patch, I can build and run guile-1.8.8 on Solaris. It seems that the old logic that used USRSTACK no longer works, so I took it out. Tested on Solaris 10u9, on both SPARC64 and x86_64. - Andrew --- guile-1.8.8/libguile/gc_os_dep.c.orig Mon Dec 13 19:25:01 2010 +++ guile-1.8.8/libguile/gc_os_dep.c Fri Apr 15 14:03:13 2011 @@ -714,11 +714,8 @@ /* # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7, */ /* but reportedly breaks under 2.8. It appears that the stack */ /* base is a property of the executable, so this should not break */ /* old executables.*/ -/* HEURISTIC2 probably works, but this appears to be preferable. */ -# include sys/vm.h -# define STACKBOTTOM ((ptr_t) USRSTACK) # ifndef USE_MMAP # define USE_MMAP # endif # ifdef USE_MMAP
[patch] implement scm_init_guile for 1.8.8 on Solaris 10u9
Hi, The attached patch implements the scm_init_guile function on Solaris. The detection of the stack parameters is done via a new(ish) Solaris function, stack_getbounds() -- see http://download.oracle.com/docs/cd/E19253-01/816-5168/stack-getbounds-3c/index.html for details. Tested on Solaris 10u9, on both SPARC64 and x86_64. - Andrew PS: now, on to get 2.0.1 working... --- guile-1.8.8/libguile/threads.c.orig Mon Dec 13 19:24:40 2010 +++ guile-1.8.8/libguile/threads.c Wed Apr 27 20:07:34 2011 @@ -689,8 +689,25 @@ { return scm_get_stack_base (); } +#elif defined (sun) + +#define HAVE_GET_THREAD_STACK_BASE +#include ucontext.h +static SCM_STACKITEM * +get_thread_stack_base () +{ + stack_t stack; + stack_getbounds( stack ); + +#if SCM_STACK_GROWS_UP + return stack.ss_sp; +#else + return stack.ss_sp + stack.ss_size; +#endif +} + #endif /* pthread methods of get_thread_stack_base */ #else /* !SCM_USE_PTHREAD_THREADS */
Re: [patch] get 1.8.8 to build on Solaris 10u9
Hi Andrew, On Thu 28 Apr 2011 17:33, Andrew Gaylard a...@computer.org writes: With the attached patch, I can build and run guile-1.8.8 on Solaris. It seems that the old logic that used USRSTACK no longer works, so I took it out. Tested on Solaris 10u9, on both SPARC64 and x86_64. Thanks for the patch. Do you have access to other versions of Solaris? We would need to test this patch under them as well. Andy -- http://wingolog.org/
Re: [patch] implement scm_init_guile for 1.8.8 on Solaris 10u9
On Thu 28 Apr 2011 17:40, Andrew Gaylard a...@computer.org writes: The attached patch implements the scm_init_guile function on Solaris. The detection of the stack parameters is done via a new(ish) Solaris function, stack_getbounds() -- see http://download.oracle.com/docs/cd/E19253-01/816-5168/stack-getbounds-3c/index.html for details. Tested on Solaris 10u9, on both SPARC64 and x86_64. Thanks! Can you test also with older solaris? PS: now, on to get 2.0.1 working... Great :-) Andy -- http://wingolog.org/
Queries about while doc and (ice-9 command-line)
Hi there, I was looking today at some recent commits, and noticed a few queries... In http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0id=91956a94fe6363cf69d574b56397962ec6ef4468: +@example +(while #f (error not reached)) @result{} #f +(while #t (break)) @result{} #t +(while #f (break 1 2 3)) @result{} 1 2 3 +@end example I think the #f in the last while line should be #t. In http://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/command-line.scm?h=stable-2.0id=90779ad9a1d8b2533ad8495753677aebf5626571: (if (pair? do-script) (set-car! do-script arg)) (set! arg0 arg) (set! interactive? #f) (finish args (cons `(load ,arg) out))) Does this code mean that we load the script twice, in the -ds case? If that's right, I believe the -s block has the same issue. ((string=? arg -x) ; add to %load-extensions (if (null? args) (error missing argument to `-L' switch)) (set! user-extensions (cons (car args) user-extensions)) (parse (cdr args) out)) In the error message here, -L should be -x. ;; Handle the `-e' switch, if it was specified. ,@(if entry-point `((,entry-point (command-line))) '()) Do we go interactive after seeing a -e option? I don't see a setting of the interactive? variable that would prevent this? Regards, Neil
Re: [patch] get 1.8.8 to build on Solaris 10u9
Tested on Solaris 10u9, on both SPARC64 and x86_64. I've just successfully applied Andrew Gaylard's patch for guile-1.8.8 on Solaris SPARC, and got a successful build and installation. We have this version: % cat /etc/release Solaris 10 5/09 s10s_u7wos_08 SPARC ... I'd already installed the stock 1.8.8 release on three different Solaris 10 Intel boxes, and an OpenSolaris 11 Intel box. --- - Nelson H. F. BeebeTel: +1 801 581 5254 - - University of UtahFAX: +1 801 581 4148 - - Department of Mathematics, 110 LCBInternet e-mail: be...@math.utah.edu - - 155 S 1400 E RM 233 be...@acm.org be...@computer.org - - Salt Lake City, UT 84112-0090, USAURL: http://www.math.utah.edu/~beebe/ - ---
More on guile-1.8.8 on Solaris SPARC
I forgot to mention in my last post about the successful build of guile-1.8.8 on Solaris SPARC that there was one test failure, but it seemed minor: FAIL: time.test: strftime: C99 %z format: EST+5 Totals for this test run: passes: 11960 failures: 1 unexpected passes: 0 expected failures: 24 unresolved test cases: 16 untested test cases:0 unsupported test cases: 11 errors: 2 I did the build with PATH=/bin:/usr/sfw/bin:/usr/ccs/bin and LDFLAGS='-R/usr/lib -L/usr/lib -R/usr/local/lib -L/usr/local/lib'. The C compiler is gcc-3.4.3. --- - Nelson H. F. BeebeTel: +1 801 581 5254 - - University of UtahFAX: +1 801 581 4148 - - Department of Mathematics, 110 LCBInternet e-mail: be...@math.utah.edu - - 155 S 1400 E RM 233 be...@acm.org be...@computer.org - - Salt Lake City, UT 84112-0090, USAURL: http://www.math.utah.edu/~beebe/ - ---
Re: Queries about while doc and (ice-9 command-line)
Hi Neil, Thanks for the review! On Thu 28 Apr 2011 20:12, Neil Jerram n...@ossau.uklinux.net writes: +@example +(while #f (error not reached)) @result{} #f +(while #t (break)) @result{} #t +(while #f (break 1 2 3)) @result{} 1 2 3 +@end example I think the #f in the last while line should be #t. Indeed, fixed. (if (pair? do-script) (set-car! do-script arg)) (set! arg0 arg) (set! interactive? #f) (finish args (cons `(load ,arg) out))) Does this code mean that we load the script twice, in the -ds case? I think so, yes; unfortunately. Fixed. Would this merit a quick 2.0.2, you think? If that's right, I believe the -s block has the same issue. ((string=? arg -x) ; add to %load-extensions (if (null? args) (error missing argument to `-L' switch)) (set! user-extensions (cons (car args) user-extensions)) (parse (cdr args) out)) In the error message here, -L should be -x. Fixed also. Do we go interactive after seeing a -e option? I don't see a setting of the interactive? variable that would prevent this? This appears to be the old behavior. Am I mistaken? Thanks, Andy -- http://wingolog.org/
Re: Guile with win32 cross compiling
On Sun 24 Apr 2011 22:22, l...@gnu.org (Ludovic Courtès) writes: Looks good to me. Could you factor it into an M4 macro, use AC_CACHE_CHECK, and move that to acinclude.m4? I tried and failed, so I pushed it anyway. Would you like to do the refactoring as a separate commit? :-)) Sorry for being pathetic here but it is beyond my autofoo. Cheers, Andy -- http://wingolog.org/
Re: new hack declaration: guile-ming
I'm concentrating on a more convenient module for libming which is used to generate SWF files. Then we may write flash games with guile. Wow - I desperately want this for my chumby. Let me know if you want any help. yeah~:-) -- GNU Powered it GPL Protected it GOD Blessed it HFG - NalaGinrut --hacker key-- v4sw7CUSMhw6ln6pr8OSFck4ma9u8MLSOFw3WDXGm7g/l8Li6e7t4TNGSb8AGORTDLMen6g6RASZOGCHPa28s1MIr4p-x hackerkey.com ---end key---