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.
Source code repository is moved to GitHub: https://github.com/shirok/Gauche. If you're following the development HEAD, please switch the origin.
(Release files and mailing lists will remain on SourceForge.net. Just the repo is moved.)
Gauche 0.9.3.3 - minor bug fixes
Several bug fixes since 0.9.3.2, plus a couple of improvements. I made a new package since one bug caused build problems in certain settings, and having a fixed tarball saved lots of troubles.
- Bug fixes:
- If DESTDIR was set and the platform didn't have previous Gauche installed, make install failed saying something like "libgauche-0.9.so.0.3: cannot open shared object file: No such file or directory". The order of installation was adjusted to avoid it.
- On FreeBSD, a bug in signal setup routine caused memory corruption.
- every with more than one argument list didn't return the last return value of the predicate when all the arguments satisfied it, as specified in srfi-1 (it returned #t instead). It was also the case in stream-every. Both are fixed.
- On MinGW, info command didn't work.
- On MinGW, when you used non-console version gosh-noconsole.exe and tried to spawn a child process to communicate via pipes, gosh-noconsole.exe just died.
- New procedure: string-scan-right
- GC is now 7.2b
- Bug fixes:
A documentation build problem was found when Gauche was configured to use native encoding other than utf-8. A follow-up release (0.9.3.2) is put on the server. If you want to use Gauche wiht non-default encoding, grab the new release. You don't need to update as far as compiling with utf-8.
On Windows/MinGW, 0.9.3 release version had a problem to compile git HEAD version of Gauche. A fixed version (0.9.3.1) is prepared. This problem won't affect other platforms.
- New Features
Lazy sequences: An efficient and seamless support of mixing lazy evaluation with ordinary list procedures. Forcing delayed evaluation is implicit, so you can pass lazy list to normal list procedures such as car or fold. See the manual entry for the details and examples.
- gauche.generator: A general utilities for
generators, a thunk that generates a value every time it is called. Lazy sequences are built on top of generators. See the manual entry for the details.
- Threads are now supported on Windows/MinGW build. It is directly based on Win32 thread API instead of pthreads; but Scheme-level semantics are almost the same. The cond-expand conditions are slightly modified to accomodate both thread models--- see Threads for the details.
- add-load-path macro now accepts an optional argument to make the given path relative to the currently loaded file. This is useful to distribute a script accompanied with library files; for example, specify (add-load-path "." :relative) in the script makes the library files searched from the same directory where the script exists. Then users can just copy the directory to anywhere and run the script.
- A chained-application macro $: Incorporated the feature which has been experimented as gauche.experimental.app. This macro allows (f a b (g c d (h i j))) to be written as ($ f a b $ g c d $ h i j). Although it is slighly longer, it is sometimes work better with indentation of deeply nested function calls. See the manual entry for the full explanation.
- A new gosh option -m module allows the main procedure to be searched in the specified module instead of the default user module. This allows a Scheme file to work both as a library module and an executable scripts (e.g. for running tests or demos); name the test program main but not export it, and it won't affect ordinary module users, but you can test the module by using -m option.
- Incompatibile Changes
- util.queue: Thread-safe queue can now be created with zero max-length, which is handy as a synchronization device. This is an incompatible change---previously, specyfing zero to :max-length means unlimited queue length. (Cf: Queue of zero length).
- Fixed a regexp bug in treatment of BOL/EOL assertions (^, $) within the assetion blocks such as (?=...). Regarding BOL/EOL assertions, these assertion blocks are treated as if they're stand-alone. The fixed behavior is now compatible with Perl and Oniguruma. The code that counted on the previous (buggy) behavior may break by this change.
- Removed gauche.auxsys module. This module contained several less-used system procedures; now they are in the core. The module was autoloaded, so not many code should be affected by this change. Only the code that explicitly refer to this module needs to be changed.
- Many frequently-used list procedures (all of util.list, and some of srfi-1) are now included in the core. The module util.list is no longer needed, although it is kept just for the backward compatibility. From srfi-1, the following procedures are now in the core: null-list?, cons*, last, member (extended one), take, drop, take-right, drop-right, take!, drop-right!, delete, delete!, delete-duplicates, delete-duplicates!, assoc (extended one), alist-copy, alist-delete, alist-delete!, any, every, filter, filter!, remove, remove!, filter-map, fold, fold-right, find, find-tail, split-at, split-at!, iota.
- New macros and procedures: values->list, fold-left, regexp-num-groups, regexp-named-groups.
- New procedure applicable? can be used to check object's applicability finer than procedure?. Related, a special class <bottom> is added, which behaves as a subtype of any classes.
- Build process is overhauled to allow out-of-source-tree build.
- Regular expression engine is slightly improved. For example, it now calculates the set of characters that can be a beginning of a part of regexp, and uses it to skip the input efficiently.
- thread-terminate! now attempts to terminate the target thread gracefully, and only tries the forceful means when the gracefull termination fails.
- open-input-file now accepts :encoding #t argument, which tells the procedure to use a coding-aware port. That is, it can recognize coding: ... specification in the beginning of the file. Useful to process source files.
- map is now restart-safe, that is, saving continuations in middle of mapping and restarting it doesn't affect previous results. This is required in R6RS.
- Various small improvements in the compiler and VM stack layout.
- gauche.test: test-module now checks the number of arguments given to the global procedures. This is useful to catch careless mistakes. In rare cases that you do intend to pass number of arguments incompatible to the normal usage of the procedures, list such procedures in :bypass-arity-check keyword argument (It is possible because of the dynamic nature of the language---methods of a different signature may be added later, for example).
- gauche.test: test-end has a keyword argument to exit with non-zero status if test failed. New function test-summary-check exits with non-zero status when the test record file indicates there have been failures. Both are useful to propagate test failure to upper levels such as continuous integration server.
- srfi-42: Support :generator qualifier to allow using generator procedures in a sense of gauche.generator.
- file.util: touch-file and touch-files takes various keyword arguments similar to touch(1) command.
- rfc.http: A new parameter http-proxy allows to set the default http proxy. The https connection now uses a library bundled to Gauche, no longer requires external stunnel command.
- GC is bumped to bdwgc 7.2-alpha6.
- Bux fixes
- Fixed an incorrect rounding bug when inexact numbers were given to div and mod.
- Fixed another division bug in /., when both dividend and divisor are too big to be represented by floating-point numbers.
- In quasiquote expander, unquote and unquote-splicing are recognized hygienically.
- force is now thread-safe.
- Fixed some MT-hazards in file loading/requiring. Thanks to Kirill Zorin for tracking those hard-to-find bugs.
- Fixed a bug that made (regexp-compile '(alt)) Bus Error.
- Fixed another regexp bug that didn't handle case-folding match beyond ASCII range. Patch from OOHASHI Daichi.
- gauche.parameter: Accessing parameters created in unrelated threads used to raise an error. It was annoying, since such situation could occur inadvertently when autoload is involved. Now the parameters work regardless of where they are created.
- rfc.json: Fixed a bug that produced incorrect JSON.
- rfc.http: Fixed the behavior of redirection for 3xx responses. You can also customize the behavior.
- gauche.threads: Fixed a bug in thread-sleep! when passed an exact rational number.
- util.stream: stream-count didn't work.
- New Features