[Chicken-users] utf8/url interaction: SEGV

2009-04-21 Thread Peter Danenberg
The following is sufficient to segfault my local chicken (3.4.0):

  (require-extension utf8 url)
  (url http://localhost;)

Loading url without utf8 works fine; anyone know what sort of
interaction might cause that?


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Lisp puzzles

2009-04-21 Thread John Cowan
These are some very old Lisp puzzles I dug up and translated to Scheme.
The idea is to figure out what they do, ideally without testing them,
but if you *want* to test them, nobody can stop you.


;; What do these functions do?

(define (greussay l r)
  (cond
((atom? l) #f)
((memq l r) #t)
((greussay (car l) (cons l r)) #t)
(else (greussay (cdr l) (cons l r)

(define (allen l)
  (cond
((null? l) '())
((null? (cdr l)) l)
(else (cons (car (allen (cdr l)))
(allen (cdr (allen (cdr l

(define (samet x y)
  (if ( x 2)
  (+ y 1)
  (samet (- x 1) (samet (- x 2) y

(define (goossens-moby l)
  (if (null? (cdr l))
  (car l)
  (goossens-moby (cddr (append l (car l))

(define (hofstadter-g n)
  (if (= 0 n)
  0
  (- n (hofstadter-g (hofstadter-g (- n 1))

(define (hofstadter-q n)
  (cond
((= n 1) 1)
((= n 2) 1)
(else (+ (hofstadter-q (- n (hofstadter-q (- n 1
 (hofstadter-q (- n (hofstadter-q (- n 2

(define (goossens l x)
  (if (null? l)
  x
  (goossens (reverse (cdr l)) (car l

;; Utility function

#;(define (atom? x) (not (pair? x)))

-- 
Henry S. Thompson said, / Syntactic, structural,   John Cowan
Value constraints we / Express on the fly. co...@ccil.org
Simon St. Laurent: Your / Incomprehensible http://www.ccil.org/~cowan
Abracadabralike / schemas must die!


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users