Welcome to the CHICKEN Scheme pasting service

This segfaults added by C-Keen on Tue Jan 24 12:22:10 2012

(use http-client progress-indicators)

(define (read/write length outport #!optional (bs (* 1024 2)))
  (let ((bar (make-progress-bar width: 40 max: length)))
    (let loop ((size length))
      (let* ((bytes (if (< bs size) bs size)))
        (if (zero? size) #t
            (let ((input (read-string bytes)))
              (if input
                  (write-string input bytes outport)
                  (when (> bytes 0)
                    (error "Missing ~a from input" bytes)))
              (advance-progress-bar! bar bytes)
              (loop (- size bytes))))))
    (finish-progress-bar! bar)))

(define out (open-output-file "/tmp/bla.m4a"))

(with-input-from-request
 "http://feedproxy.google.com/~r/logbuch-netzpolitik/~5/IBy73E35tME/lnp005-unter-42-minuten.m4a"
 #f
 (lambda () (read/write (* 20 1024 1024) out)))
(close-output-port out)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which R5RS procedure returns `'(2 3)' when given `'(1 2 3)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV