Home | Features | Download | Extensions | Document | Development -> Japanese | -> Practical Scheme

Gauche is an R5RS Scheme implementation developed to be a handy script interpreter, which allows programmers and system administrators to write small to large scripts for their daily chores. Quick startup, built-in system interface, native multilingual support are some of my goals.

Gauche runs on several Unix-like platforms.

See Features for implemented features.

News

See ChangeLog for details. You can also check the most recent development status at Subversion repository.

2010/02/01

It is reported that a few Windows antivirus software heuristically flags Gauche 0.9 windows binary distribution as a dropper type virus. We believe this is a false positive; the current binary distribution on SourceForge.net is built on our developer's machine which is regularly scanned by antivirus software. Here's md5sum of the original packages:

5801c5a91a8e1c09e0a4b1ec30d37dee        Gauche-mingw-0.9.exe
0a1470b3a96e658c8e3c812aca880ffd        Gauchebox-0.9-box1.exe

2009/11/22

Gauche 0.9: Major Feature Enhancements

  • C API incompatible changes: Several incompatible C API changes are introduced, which may cause some extension to fail to compile. See API Changes in 0.9 for the details.
  • New features
    • New module: rfc.zlib: Zlib compression/decompression.
    • New module: rfc.sha: SHA2 support. rfc.sha1 is superseded by this module.
    • New module: util.sparse: Sparse vectors backed up by space-efficient trie, and hash-tables implemented on top of sparse vectors. They are memory efficient than the builtin hash tables when you want to keep tens of millions of entries.
    • Autoprovide: You no longer need 'provide' form for most of times. If (require "X") successfully loads X.scm and it doesn't have a provide form, the feature "X" is automatically provided. See the "Require and provide" section of the reference for more details.
    • Module gauche.test: Improved testing for exceptions. You can now test whether a specific type of condition is thrown by giving (test-error condition-type) as the expected result. See the manual entry for more details.
    • Module rfc.http: Now handles proxy by :proxy keyword argument. You can also easily compose application/x-www-form-urlencoded and multipart/form-data message to send form parameters. New procedures: http-put and http-delete.
    • Module rfc.mime: Added support of composing a MIME message.
    • Module gauche.threads: New procedures: thread-stop!, thread-cont!, thread-state.
    • Module gauche.termios: On Windows native support, this module provides Windows Console API instead of POSIX termios API, since emulationg POSIX termios on Windows is too much. A set of common high-level API that can be used on both POSIX and Windows are also added.
    • Module gauche.dictionary provides a bidirectional map, <bimap>.
    • run-process in module gauche.process, and builtin sys-exec and sys-fork-and-exec support :directory keyword argument to specify the working directory of the executed process.
    • Module file.util provides create-directory-tree and check-directory-tree.
    • Module gauche.net provides low-level socket operations: socket-sendmsg, socket-buildmsg, and socket-ioctl. Call-with-client-socket takes new keyword args to specify buffering mode for the socket.
    • Module www.cgi: cgi-main switches the buffering mode of stderr to line, so that the httpd log can record error messages line-by-line (much less clutter than before).
  • Major fixes and improvements
    • Fixed build problem on OSX 10.6 (Snow Leopard).
    • Performance is greatly improved on floating point number arithmetics, optional argument handling of builtin procedures, and case-lambda.
    • Now all whitespace characters defined in R6RS works as intertoken spaces in the source code.
    • A warning message is printed when a thread exits with an error and no other thread retrieve its status by thread-join! before the thread is GC-ed. This helps troubleshooting. Since thread-join! is the only way to know if the thread exitted by an error, you have either to call thread-join! to make sure to check the status, or to write the thread thunk to catch all errors and handle them properly.
    • Anonymous module name is #f now, instead of (somewhat arbitrarily chosen) |#|.
    • Some enhancements on symbols: 'uninterned' symbos are officially supported (symbols generated by gensym have been uninterned, but never been documented officially.) Uninterned symbols are written as #:symbol a la CommonLisp. Uninterned symbols are not registered to the internal symbol table, so there's no worry about name crash. The only way to refer to the same uninterned symbol from more than one place in the source code is to use srfi-38 notation (#n= and #n#). You can create uninterned symbol by string->uninterned-symbol and check whether a symbol is interned or not by symbol-intened?. There is also a new procedure, symbol-sans-prefix.
  • Windows support
    • Precompiled binary installer for Windows is now available. Get Gauche-mingw-0.9.exe. It is supported on Windows NT 3.5 and later (sorry, no support for Win9x.)
    • Precompiled binary does not include thread and gdbm support (yet). It is compiled to use utf-8 internal encoding.
    • Some Unix-specific system functions are not available, or have slightly different semantics because they are emulated via Windows API. If a function is not available on Windows, the reference manual says so. Windows version hasn't be used heavily, so expect bugs.
    • Large character set support on Windows Console is pretty limited. It is recommended to run gosh under Emacs for interactive use. See WindowsConsole for the details.

2008/10/6

Gauche 0.8.14: Maintenance release.

  • Bug fixes
    • In some cases, an argument list passed to apply wasn't copied.
    • On some platforms, signal mask of threads could be altered inadvertently by exception handling due to the different behavior of sigsetjmp.
    • format now raises an error if there's an incomplete tilde sequence in the given format string.
    • Internal parameter (gauche.parameter) code had a bug that allocates not enough storage.
    • There was a couple of bugs in dynamic-load that could cause dead lock or leaving internal state inconsistent.
    • Module rfc.http: The 'host' field became inconsistent when redirection happened.
  • R6RS-ish extensions
    • R6RS reader directive #!r6rs, #!fold-case and #!no-fold-case are recognized now. The latter two can be used to change case-folding mode of the reader in the middle of the source code. See the manual for the details.
    • New core procedures: finite?, infinite?, nan?, eof-object.
    • Two argument version of log: (log z b) is for base-b logarithm of z.
  • Extension-building improvements
    • gauche-config script provides --rpath-flag option to retrieve platform-specific rpath link option (e.g. "-Wl,--rpath -Wl,").
    • gauche-package script accepts --local option to the 'compile' and 'install' command to add local include paths and local library search paths conveniently. Basically, gauche-package compile --local=DIR package.tgz causes -IDIR/include and -LDIR/lib to be added to the actual compile and link command lines. To give more than one directory, say --local=DIR1:DIR2:....
    • A stub generator and ahead-of-time compiler (the facility to pre-compile Scheme code into VM instruction array as static C data) is integrated, allowing C and Scheme code to be mixed in the same source; this feature is not yet documented and the details are subject to change, but the curious mind can take a look at ext/dbm/*, which were much simpler than the previous version.
  • Additional improvements, new procedures & macros
    • GC is now Boehm GC 7.1.
    • Large part of VM code is rewritten for better performance and maintainability.
    • New procedure: hash-table-copy.
    • New convenience macros: rlet1 and if-let1.
    • You can now hook exit operation by the exit-handler parameter. See the "Program termination" section of the manual for the detailed description of this feature.
    • Made sys-lstat work like sys-stat on Windows platform; one less headache to write cross-platform code.
    • Module gauche.net: Constants SHUT_RD, SHUT_WR and SHUT_RDWR are defined to pass to socket-shutdown.
    • Module file.util: New convenience procedures: copy-directory*, touch-files, remove-files, delete-files.
    • Module dbm.*: Renamed dbm-rename to dbm-move for the consistency. (The old name is kept as alias for the backward compatibility). Added dbm-copy and dbm-move missing from dbm.fsdbm. Also properly detects variations of suffixes of ndbm-compatible database at configuration time.
    • Module www.cgi: :mode option is added to the MIME part handler passed to get-mime-parts to specify the permissions of the saved file.
    • Module rfc.ip: New procedure: ipv4-global-address?.

2008/2/13

Gauche 0.8.13: Lots of small improvements

  • Bug fixes
    • Module rfc.http: fixed a bug that didn't pass the port number in the host header field.
    • rxmatch-num-matches: returns 0 if #f is given, as described in the manual.
    • asin, asinh: fixed a problem of the code to avoid numerical instability.
    • Module slib: fixed to work with the newest slib release.
    • Module gauche.process: on-error-exit handler was errneously called even when the process' exit status was zero.
    • Module file.util: Fixed a bug in copy-file that didn't preserve the mode of the desination file in certain cases.
    • Module gauche.parseopt: Fixed a problem that regexp ran out of stack when very long option argument was given.
    • Fixed a problem of make uninstall that might remove libgc.a which wasn't installed by Gauche.
    • Module gauche.test: test-module have missed to check some of the internal definitions. Now it is fixed, and it may find references to undefined variables that haven't been spotted before.
    • Fixed an autoload bug which caused malfunction when mulitple threads tried to resolve the same autoload simultaneously.
  • Improvements in the core
    • Improved argument handling in apply: It used to push each arument in the argument list onto the VM stack, so when you applied long argument list that wouldn't fit the VM stack it failed. Now apply only expands the argument list as much as it needs. This eliminates the limitation of the length of argument list in almost all cases. For example, you can now do this:
        (apply list (iota 50000)) 
    • Better support of cross compilation (patch from YOKOTA Hiroshi).
    • New procedures: fixnum-width, greatest-fixnum, least-fixnum (as defined in R6RS).
    • String literals allow R6RS-style line breaking---a sequence of a backslash, zero or more whitespaces, newline, and zero or more whitespaces, are ignored in a string literal. You can write
       "Suppose this is very very long line." 
      as
       "Suppose this is very \ 
        very long line."
      for example.
  • Improvements in the system interface
    • Now Gauche uses 64bit file offsets, enabling to handle >2GB files. (On Linux, including <gauche.h> defines _FILE_OFFSET_BITS to 64. If you link libgauche with other libraries and passes around file offset value or struct stat, make sure the other libraries are also compiled with the same _FILE_OFFSET_BITS).
    • glob and glob-fold now supports '**' wildcard that matches multiple levels of directories.
    • New system functions: sys-getrlimit and sys-setrlimit.
    • <time> can now represent a time after the year 2038.
    • The default buffering mode of stdout is changed to full when it is not connected to the terminal (it remains line if it outputs to the terminal). This improves output performance quite a bit when you redirect the large output to a file or a pipe. Note: This may break programs that forgot to call (flush) when the output is piped.
  • Improvements in regexp
    • Regexp has now read/write invariance, except when it is created by string->regexp from a string with weird characters.
    • New procedure: rxmatch->string.
    • In regexp-replace family functions, you can now use names of named capturing groups to refer to the captured substring, as well as their indexes.
  • Improvements in other libraries
    • Module rfc.base64 and rfc.quoted-printable: The encoding routines now takes :line-width keyword arguments to insert line breaks in the output.
    • Module rfc.822: Added rfc822-write-headers, a generic message header generation routine. For the symmetry with it, rfc822-header->list is renamed to rfc822-read-headers. The old name is kept for the compatibility.
    • New tree-map search functions: tree-map-floor, tree-map-floor-key, tree-map-floor-value, tree-map-ceiling, tree-map-ceiling-key, tree-map-ceiling-value, tree-map-predecessor, tree-map-predecessor-key, tree-map-predecessor-value, tree-map-successor, tree-map-successor-key, tree-map-successor-value.
    • Module srfi-19: Julian day and modified julian day are now calculated by exact integers, avoiding rounding errors.
    • Module gauche.sequence: Officially supports methods to shuffle and permute the sequence content: permute, permute!, permute-to, shuffle, shuffle!, shuffle-to. These are already in since 0.8.12, but weren't documented.

Older news

Stay Informed

A mailing list for discussion and announcement of Gauche is now available, thanks for SourceForge. You can subscribe it from this page.