;; Water garden ;; (lambda (uri) (for-each eval (with-input-from-file "garden.scm" read-list)) (let ((query (uri-query uri))) (if (null? query) (begin (print "=> register.scm Please register first.")) (let ((hash (symbol->string (caar query)))) (condition-case (let* ((g (with-input-from-file (make-pathname "accounts" hash) read))) (water-garden! g) (with-output-to-file (make-pathname "accounts" hash) (lambda () (write g))) (redirect-permanent (update-uri uri path: '(/ "microbotany" "view.scm") query: `((,hash . #t))))) (o (exn) (print "This garden no longer exists.\n\n" "=> register.scm Register to create another.")))))))