Custom Query (1631 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 1631)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#1143 fixed byte-string-* procedures not exported from utf8 egg Alex Shinn Caolan McMahon
Description

The wiki page for the utf8 egg describes the byte-string-length and byte-string-set! procedures, but they don't seem to be exported from the module. I get "reference to possibly unbound identifier `byte-string-length'" after importing utf8 as described in the wiki.

Editing the module myself and exporting them appears to fix the issue.

#1152 wontfix Reserved pattern symbols break when a binding of the same name exists Alex Shinn Moritz Heidkamp
Description

When reserved pattern symbols like ? or _ are bound in the lexical environment of a match expression, they don't work anymore:

(import matchable)

(let ((? 1))
  (match '(x y)
    ((? odd?) (print ?))))

(match '(x y)
  ((_ _) (print 'ok)))

(let ((_ 1))
  (match '(x y)
    ((_ _) (print 'ok))))

Output:

$ csc matchbug.scm && ./matchbug
x
ok

Error: (match) no matching pattern

	Call history:

	matchbug.scm:5: print	  
	matchbug.scm:8: print	  
	matchbug.scm:10: failure391	  
	matchbug.scm:10: error	  	<--
#1157 fixed test egg 'approx-equal?' bug? Alex Shinn John Foerch
Description

There may be a bug in 'approx-equal?' in the test egg.

I was puzzled as to why testing against an expected value of 0.0 always seems to fail, even with a large epsilon (1.0).

(use test) (test 0.0 1e-18) => [FAIL]

Here is the source code of 'approx-equal?' for reference:

(define (approx-equal? a b epsilon)

(cond

((> (abs a) (abs b))

(approx-equal? b a epsilon))

((zero? b)

(< (abs a) epsilon))

(else

(< (abs (/ (- a b) b)) epsilon))))

I note that the conditional branch (zero? b), which is apparently a special case for testing against 0, will never be reached unless both a and b are 0, because if b is 0 the absolute value of any other number is greater, so the previous condition will catch it and flip a and b.

Should that middle condition instead be the following?

((zero? a)

(< (abs b) epsilon))

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.