wisp
 
(Arne Babenhauserheide)
2014-08-07: merge default for release: simpler unicode handling and honor stable v0.6.1

merge default for release: simpler unicode handling and honor --quiet for bootstrapping.

diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,10 @@ wisp = wisp.scm language/wisp/spec.scm
 wisp_SOURCES = wisp-guile.w wisp-reader.w
 EXTRA_DIST = $(wisp_SOURCES) $(wisp_DATA) bootstrap.sh wisp.py examples tests runtests.sh wisp-repl-guile.sh
 CLEANFILES = ${wisp} ChangeLog
-DISTCLEANFILES = ${CLEANFILES} @abs_top_builddir@/1 @abs_top_builddir@/2 @abs_top_builddir@/test.sh
+DISTCLEANFILES = ${CLEANFILES} @abs_top_builddir@/1 @abs_top_builddir@/2 @abs_top_builddir@/syntaxtests.sh
+# don't spout out lots of stuff at each distcheck. Disable for debugging.
+AM_DISTCHECK_CONFIGURE_FLAGS="--quiet"
+
 
 all : ${wisp}
 
@@ -14,12 +17,12 @@ ChangeLog :
 
 .INTERMEDIATE: input.in.intermediate
 input.in.intermediate: ${wisp_SOURCES}
-	@abs_top_srcdir@/bootstrap.sh @abs_top_srcdir@ @guile@ @python3@
+	@abs_top_srcdir@/bootstrap.sh @abs_top_srcdir@ @guile@ @python3@ 2>&1 | sed "s/^;;;.*//" 2>&1 | grep . 1>&2 ; test ! $$? -eq 0 # grep did not find anything
 
-.PHONY: test.sh
-test.sh : wisp.scm runtests.sh
-	echo '#!/bin/bash' > @abs_top_builddir@/test.sh
-	echo @abs_top_srcdir@/runtests.sh @abs_top_srcdir@ @abs_top_builddir@ >> @abs_top_builddir@/test.sh
-	chmod +x @abs_top_builddir@/test.sh
+.PHONY: syntaxtests.sh
+syntaxtests.sh : wisp.scm runtests.sh
+	echo '#!/bin/bash' > @abs_top_builddir@/syntaxtests.sh
+	echo @abs_top_srcdir@/runtests.sh @abs_top_srcdir@ @abs_top_builddir@ >> @abs_top_builddir@/syntaxtests.sh
+	chmod +x @abs_top_builddir@/syntaxtests.sh
 
-TESTS=test.sh
+TESTS=syntaxtests.sh
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+wisp 0.6.1 (2014-08-05):
+- simpler unicode handling
+- honor --quiet in bootstrapping
+
 wisp 0.6.0 (2014-07-14): 
 - Better performance
 - Support for SRFI-105
diff --git a/bootstrap.sh b/bootstrap.sh
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -26,12 +26,13 @@ if [[ ! x"${diff}" == x"success" ]]; the
     echo "failed to bootstrap wisp.scm. diff: " ${diff}
     exit 1
 fi
-echo "successfully bootstrapped wisp.scm"
-echo preparing the reader: wisp at the REPL
-echo parsing the spec file...
+# put all output into stderr via 1>&2 and prefix it with ;;; to make it possible to kill it alongside the auto-compile output from guile with one sed.
+echo ";;;" "successfully bootstrapped wisp.scm" 1>&2
+echo ";;;" preparing the reader: wisp at the REPL 1>&2
+echo ";;;"  parsing the spec file... 1>&2
 mkdir -p language/wisp
 ${guile} wisp.scm ${srcdir}/wisp-reader.w 2>/dev/null > language/wisp/spec.scm \
-    && echo ...precompiling the spec file... \
+    && echo ";;;" ...precompiling the spec file... 1>&2 \
     && ${guile} -L . -s language/wisp/spec.scm \
-    && echo ...succeeded \
-    && echo to use wisp at the REPL, run '`'${guile} -L . --language=wisp'`'
+    && echo ";;;" ...succeeded 1>&2 \
+    && echo ";;;" to use wisp at the REPL, run '`'${guile} -L . --language=wisp'`' 1>&2
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1,14 +1,14 @@
 dnl run `autoreconf -i` to generate a configure script. 
 dnl Then run ./configure to generate a Makefile.
 dnl Finally run make to generate the project.
-AC_INIT([wisp], [0.6.0],
+AC_INIT([wisp], [0.6.1],
         [arne_bab@web.de])
 # Check for programs I need for my build
 AC_CANONICAL_TARGET
-AC_ARG_VAR([guile], [How to call GNU Guile.])
-AC_CHECK_TARGET_TOOL([guile], [guile], [no])
+AC_ARG_VAR([guile], [How to call GNU Guile 2.0.x.])
+AC_CHECK_TARGET_TOOL([guile], [guile-2.0], [no])
 AS_IF([test "x$guile" = "xno"],
-      [AC_MSG_ERROR([cannot find GNU Guile.])])
+      [AC_MSG_ERROR([cannot find GNU Guile 2.0 or later.])])
 AC_ARG_VAR([python3], [How to call Python 3.])
 AC_CHECK_TARGET_TOOL([python3], [python3], [no])
 AS_IF([test "x$python3" = "xno"],
diff --git a/docs/srfi.org b/docs/srfi.org
--- a/docs/srfi.org
+++ b/docs/srfi.org
@@ -80,7 +80,8 @@ Remember, even if a proposal becomes an 
 
 ** Acknowledgments
 
-Thanks for lots of constructive discussions goes to Alan Manuel K. Gloria and David A. Wheeler.
+- Thanks for lots of constructive discussions goes to Alan Manuel K. Gloria and David A. Wheeler.
+- Also thanks to Mark Weaver for his help with the wisp parser and the guile integration - including a 20x speedup.
 
 * Related SRFIs
 
@@ -429,7 +430,7 @@ if
 
 ** _ (the underscore)
 
-In Python the whitespace hostile html already presents problems with sharing code - for example in email list archives and forums. But in Python the indentation can mostly be inferred by looking at the previous line: If that ends with a colon, the next line must be more indented (there is nothing to clearly mark reduced indentation, though). In wisp we do not have that help, so we need a way to survive in that hostile environment.
+In Python the whitespace hostile html already presents problems with sharing code - for example in email list archives and forums. But in Python the indentation can mostly be inferred by looking at the previous line: If that ends with a colon, the next line must be more indented (there is nothing to clearly mark reduced indentation, though). In wisp we do not have this help, so we need a way to survive in that hostile environment.
 
 The underscore is commonly used to denote a space in URLs, where spaces are inconvenient, but it is rarely used in lisp (where the dash ("-") is mostly used instead), so it seems like a a natural choice.
 
diff --git a/wisp-reader.w b/wisp-reader.w
--- a/wisp-reader.w
+++ b/wisp-reader.w
@@ -15,6 +15,9 @@ define-module : language wisp spec
   . #:use-module : system base language
   . #:export : wisp
 
+; Set locale to something which supports unicode. Required to avoid using fluids.
+setlocale LC_ALL ""
+
 ;;;
 ;;; Language definition
 ;;;
@@ -32,21 +35,10 @@ define : read-one-wisp-sexp port env
   define : read-wisp-chunk
     if : eof-object? : peek-char port
       read-char port ; return eof: we’re done
-      let
-         : dpe : fluid-ref %default-port-encoding
-           set-pending-port!
-             lambda ()
-                 let
-                   : s : wisp2lisp : wisp-chunkreader port
-                   set! : wisp-pending-port port
-                      open-input-string s
-         if dpe ; default port encoding is set
-           set-pending-port!
-           ; else: we need to redefine %default-port-encoding to
-           ; UTF-8. Use with-fluids to avoid affecting other code.
-           with-fluids : : %default-port-encoding "UTF-8"
-             set-pending-port!
-         try-pending
+      let : : s : wisp2lisp : wisp-chunkreader port
+        set! : wisp-pending-port port
+               open-input-string s
+        try-pending
   define : try-pending
     let : : pending-port : wisp-pending-port port
       if pending-port