unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* GNU Guile 1.9.2 problems with guile-lib
@ 2009-08-15 17:53 Barry Fishman
  2009-09-16 19:10 ` Andy Wingo
  0 siblings, 1 reply; 5+ messages in thread
From: Barry Fishman @ 2009-08-15 17:53 UTC (permalink / raw)
  To: guile-devel

Although guile-lib git master works with Guile 1.9.1, there seems to be
a problem with Guile 1.9.2.

Seen from: Ubuntu Jaunty x86_64

$ guile
Guile Scheme interpreter 0.5 on Guile 1.9.2
Copyright (C) 2001-2008 Free Software Foundation, Inc.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (htmlprag))
scheme@(guile-user)> (html->shtml "<hr noshade=1 />")

Backtrace:
In system/vm/vm.scm:
  41: 0* [vm-load #<vm 7fb9743acff0> #<objcode 7fb9721ab940>]
In unknown file:
   ?: 1* [#<vm 7fb9743acff0> #<program 7fb9721ab920 at <unknown port>:1:0 ()>]
In /home/util64/guile/share/guile/site/htmlprag.scm:
1224: 2* [htmlprag-internal:parse-html "<hr noshade=1 />" #f #t]
In /home/util64/guile/share/guile/site/htmlprag.scm:
1160: 3  [# # #f]
In /home/util64/guile/share/guile/site/htmlprag.scm:
 594: 4  [scan-tag #t]
In /home/util64/guile/share/guile/site/htmlprag.scm:
 603: 5  [scan-attr-list]
In /home/util64/guile/share/guile/site/htmlprag.scm:
 667: 6  [scan-attr]

ERROR: In procedure scan-attr:
ERROR: make-html-tokenizer - already unread #\>
scheme@(guile-user)> 

-- 
Barry Fishman





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Guile 1.9.2 problems with guile-lib
  2009-08-15 17:53 GNU Guile 1.9.2 problems with guile-lib Barry Fishman
@ 2009-09-16 19:10 ` Andy Wingo
  2009-09-16 20:03   ` Ludovic Courtès
  2009-09-16 20:30   ` Mike Gran
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Wingo @ 2009-09-16 19:10 UTC (permalink / raw)
  To: Barry Fishman; +Cc: guile-devel

On Sat 15 Aug 2009 19:53, Barry Fishman <barry_fishman@acm.org> writes:

> Although guile-lib git master works with Guile 1.9.1, there seems to be
> a problem with Guile 1.9.2.
>
> Seen from: Ubuntu Jaunty x86_64
>
> $ guile
> Guile Scheme interpreter 0.5 on Guile 1.9.2
> Copyright (C) 2001-2008 Free Software Foundation, Inc.
>
> Enter `,help' for help.
> scheme@(guile-user)> (use-modules (htmlprag))
> scheme@(guile-user)> (html->shtml "<hr noshade=1 />")

This works now. I suspect it was the
7f7b85cbf68a8b83e1ad7bc78379cf2764fc9a1b fix that did it. However we
have another problem:

scheme@(guile-user)> (define prime:sieve #y(0 0 1 1 0 1 0 1 0 0 0))
ERROR: In procedure make-generalized-vector:
ERROR: Wrong type argument in position 1 (expecting array type): y
ERROR: In procedure scm_read_expression:
ERROR: #<unknown port>:3:47: unexpected ")"

What is a #y vector? Does anyone know?

Andy
-- 
http://wingolog.org/




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Guile 1.9.2 problems with guile-lib
  2009-09-16 19:10 ` Andy Wingo
@ 2009-09-16 20:03   ` Ludovic Courtès
  2009-09-16 20:48     ` Barry Fishman
  2009-09-16 20:30   ` Mike Gran
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2009-09-16 20:03 UTC (permalink / raw)
  To: guile-devel

Hi,

Andy Wingo <wingo@pobox.com> writes:

> What is a #y vector? Does anyone know?

No idea.  Where does it come from?

Ludo’.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Guile 1.9.2 problems with guile-lib
  2009-09-16 19:10 ` Andy Wingo
  2009-09-16 20:03   ` Ludovic Courtès
@ 2009-09-16 20:30   ` Mike Gran
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Gran @ 2009-09-16 20:30 UTC (permalink / raw)
  To: Andy Wingo, Barry Fishman; +Cc: guile-devel

> What is a #y vector? Does anyone know?

From the 1.3.2 changelog

1998-10-18  Mikael Djurfeldt  <mdj@barbara.nada.kth.se>

* unif.c (scm_raprin1): Changed print syntax for byte vectors from
        #bytes(...) to #y(...), and syntax for short vectors from
        #short(...) to #h(...).  This may seem nutty, but, like the other
        uniform vectors, byte vectors and short vectors want to have the
        same print and read syntax (and, more basic, want to have read
        syntax!).  Changing the read syntax to use multiple characters
        after the hash sign breaks with the conventions used in R5RS and
        the conventions used for the other uniform vectors.  It also
        introduces complexity in the current reader, both on the C and
        Scheme levels.  (The Right solution is probably to change the
        syntax and prototypes for uniform vectors entirely.)


- Mike




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Guile 1.9.2 problems with guile-lib
  2009-09-16 20:03   ` Ludovic Courtès
@ 2009-09-16 20:48     ` Barry Fishman
  0 siblings, 0 replies; 5+ messages in thread
From: Barry Fishman @ 2009-09-16 20:48 UTC (permalink / raw)
  To: guile-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Hi,
>
> Andy Wingo <wingo@pobox.com> writes:
>
>> What is a #y vector? Does anyone know?
>
> No idea.  Where does it come from?
>
> Ludo’.

From the error message it is a generalized vector, which no longer
exists.  What seems to be wanted is a bitvector.  There does not
seem to be a literal for a bitvector although its printed like:
#*00110101000

Maybe something like:

diff --git a/src/math/primes.scm b/src/math/primes.scm
index 9873ae4..43745e9 100644
--- a/src/math/primes.scm
+++ b/src/math/primes.scm
@@ -103,7 +103,7 @@ being labelled prime) is @code{(expt 2 (- prime:trials))}."
 	 (or (null? lst) (and (= 1 (gcd n (car lst))) (mapf (cdr lst)))))))
 (define prime:prime-sqr 121)
 (define prime:products '(105))
-(define prime:sieve #y(0 0 1 1 0 1 0 1 0 0 0))
+(define prime:sieve (bitvector #f #f #t #t #f #t #f #t #f #f #f))
 (letrec ((lp (lambda (comp comps primes nexp)
 	       (cond ((< comp (quotient most-positive-fixnum nexp))
 		      (let ((ncomp (* nexp comp)))
@@ -112,9 +112,9 @@ being labelled prime) is @code{(expt 2 (- prime:trials))}."
 			    (next-prime nexp (cons ncomp comps)))))
 		     ((< (quotient comp nexp) (* nexp nexp))
 		      (set! prime:prime-sqr (* nexp nexp))
-		      (set! prime:sieve (make-uniform-vector nexp #\nul 0))
+		      (set! prime:sieve (make-bitvector nexp #f))
 		      (for-each (lambda (prime)
-				  (uniform-vector-set! prime:sieve prime 1))
+				  (bitvector-set! prime:sieve prime #t))
 				primes)
 		      (set! prime:products (reverse (cons comp comps))))
 		     (else
@@ -132,7 +132,7 @@ being labelled prime) is @code{(expt 2 (- prime:trials))}."
 There is a slight chance, @code{(expt 2 (- prime:trials))}, that a 
 composite will return @code{#t}."
   (set! n (abs n))
-  (cond ((< n (uniform-vector-length prime:sieve)) (positive? (uniform-vector-ref prime:sieve n)))
+  (cond ((< n (bitvector-length prime:sieve)) (bitvector-ref prime:sieve n))
 	((even? n) #f)
 	((primes-gcd? n prime:products) #f)
 	((< n prime:prime-sqr) #t)


There are still other issues with guile-lib with 4 of 25 tests failing.
I have been looking at them as a background task.
-- 
Barry Fishman





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-16 20:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-15 17:53 GNU Guile 1.9.2 problems with guile-lib Barry Fishman
2009-09-16 19:10 ` Andy Wingo
2009-09-16 20:03   ` Ludovic Courtès
2009-09-16 20:48     ` Barry Fishman
2009-09-16 20:30   ` Mike Gran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).