Scheme (29 Jul 2002)

Well, I did come up with a load of links over the weekend and wrote up an IV entry - then promptly forgot to upload it. Rats. That'll sit at home for another couple of weeks now

However, here are some that I dug out today:

You're going to have to Google for the rest of the links today

God it's hot. Not going to be sleeping well tonight

Been looking at Bigloo - a compiler for (mostly) R5RS Scheme which outputs C and Java bytecodes as its backends. One very nice feature is that it's designed to work with Java/C native code really well. However much we might wish it wasn't, the reality is that FFI interfaces in higher level languages (now there's a vague term (and a redundant acronym for that matter)) are really important.

It even manages to compile non-deterministic code using call/cc (see the snippet below, mostly from On Lisp)

In addition it has a nice (ILISP like) Emacs interface and what looks like a very nice native IDE, called BDK. I say looks like because I cannot get it to compile, but the screen shots are impressive

LtU has a link to conference notes about Bigloo's TK based GUI toolkit, called BigLook

(module nondet)

(define *paths* '())
(define failsym '@)

(define (choose choices)
  (if (null? choices)
     (lambda (cc)
	(set! *paths* (cons (lambda ()(cc (choose (cdr choices)))) *paths*))
(car choices)))))

(define fail 0)

 (lambda (cc)
   (set! fail (lambda ()
		 (if (null? *paths*)
		     (cc failsym)
		     (let ((p1 (car *paths*)))
			(set! *paths* (cdr *paths*))

(define small-ints '(1 2 3 4 5 6 7 8 9 10))

(define sum (lambda (x)
	       (let ((a (choose small-ints))
		     (b (choose small-ints)))
		  (if (= (+ a b) x) (cons a b) (fail)))))

(display (sum 19))(newline)