2021-12-23 Shiro Kawai * Release 0.9.11 2021-12-16 Shiro Kawai * src/libsys.scm (sys-mmap, ): Improve mmap API. size argument needs to be mandatory (there's no reasonable default). Expose fields of for introspection. 2021-12-14 Shiro Kawai * ext/tls/tls-mbed.c: Support MbedTLS 3.0. This is a partial support: we need tls-bind to allow TLS-enabled server. But at least this one works as a client. 2021-12-03 Shiro Kawai * src/libio.scm (%write-walk-rec): Handle circular reference through boxes. https://github.com/shirok/Gauche/issues/787 2021-12-01 Shiro Kawai * check-build-version, configure.ac, Makefile.in: Before generating files by BUILD_GOSH, check if it is the latest release. With this, the user who accidentally try to compile from the repo using older Gauche will be told so upfront, instead of getting an misterious error in the middle of building. The required BUILD_GOSH version is kept in configure.ac, right below the AC_INIT line. Don't forget to update when you make a new release. 2021-11-23 Shiro Kawai * lib/gauche/cgen/precomp.scm (handle-define-inline): Fix that define-inline'ed procedures weren't expanded within the same compilation unit. We need to let the compiling enviornment know about the inlined procedures. 2021-11-22 Shiro Kawai * src/libmacro.scm (cond-expand): EXPERIMENTALLY add 'package' clause to test package existence and its version. A special package name 'gauche' can be used to check running Gauche version. Let's see how it goes. 2021-11-15 Shiro Kawai * src/gauche.h (ScmProcedure), src/proc.c (Scm__CopyProcedure): Use the reserved slot of ScmProcedure as tags-alist. We can keep srfi-229 procedure tag there, and more in future. INCOMPATIBLE CHANGE: We make Scm_CopyProcedure private, moved to priv/procP.h and renamed to Scm__CopyProcedure. Use code shouldn't need to use it, for procedures are immutable entity and copying shouldn't make difference. It is only used internally to do certain bookkeeping. * lib/srfi-229.scm: Added. 2021-11-11 Shiro Kawai * lib/gauche/cgen/stub.scm (make-array-getter-setter): Support treating u8int_t array in cstruct as . Eventually we'll extend it to other uniform vectors, and this is the first step. (define-cproc): Allow '_ in the arguments to indicate unused args. * lib/gauche/cgen/cise.scm: (define-cenum): Added. This has been in Gauche-gl for a while. 2021-11-10 Shiro Kawai * lib/gauche/cgen/cise.scm: Allow '_' as an unused argument in define-cfn, so that we don't need a dummy cast expression to suppress 'unused argument' warnings. We also need the similar stuff for define-cproc and define-cmethod, but the handling of arguments differ a lot. So, maybe later. 2021-11-07 Shiro Kawai * lib/gauche/cgen/stub.scm: Rename define-type to declare-stub-type. Make it clear that it is merely a hint to the stub generator, only effective during a single stub file processing. (define-cclass): Let it handle declare-stub-type, even if it needs custom c-predicate name or unboxer name. (define-cstruct): Incorporated define-cstruct, an easier stub interface for C struct. 2021-11-05 Shiro Kawai * src/libtype.scm (ScmNativeType): Let it keep C type name as well. The long-term plan is to integrate stub types to the built-in type system, though we'll still keep some info outside of the built-in types (e.g. C notation of boxer/unboxer won't be used except stub generators, so no need to carry it around in the ). * lib/gauche/cgen/type.scm: Keep reference to the actual Scheme type in the stub type. Changed API of make-cgen-type. 2021-10-27 Shiro Kawai * lib/rfc/http.scm: Use new tls-connect interface that lets TLS module opens the socket. This allows proper use of mbedTLS. * ext/*/Makefile.in: Adjust GENERATED and CONFIG_GENERATED macros to the src/*. The 'distcclean' target removes CONFIG_GENERATED (e.g. Makefile), and 'maintainer-clean' removes GENERATED as well. Before this change, a build after distclean caused an error while building ext/gauche, for unicode-attr.scm is removed by distclean but not regenerated since src/char_attr.c exists. Also, renamed GENERATED -> PREGENERATED to avoid confusion. * lib/rfc/http (start-connection): When no TLS module is available, raise an error saying so, rather than letting rfc.tls module throw an obscure error. Cf. https://github.com/shirok/Gauche/issues/784 NB: rfc.tls is loaded by cond-expand gauche.net.tls, so we don't bother to make it autoload. 2021-10-24 Shiro Kawai * ext/digest/sha2.c (SHA1_End): Fix strict aliasing violation. The original code yields incorrect binary with gcc 11.2 when compiled with -O2. 2021-10-03 Shiro Kawai * src/gauche/priv/bignumP.h: Make bignum.h private. It was never intended for public use. Technically this is compatiblity-breaking, but if the user code directly uses bignum API, there's something wrong. 2021-09-28 Shiro Kawai * lib/data/random.scm (random-data-random-source): A parameter to keep the current random source. Previous random-state thingy was awkward and not compatible to srfi-194. * ext/mt-random: Add mt-random-get-seed 2021-09-07 Shiro Kawai * src/gauche/vm/debugger.scm, src/read.c: Experimentally implemented per-thread debug logging. #?@=expr records evaluation of expr like #?=, but the output goes to per-thread file, with timestamp. This prevents logs to be mixed up. * ext/threads/threads.scm (latch-clear!): Added. 2021-09-03 Shiro Kawai * lib/gauche/interactive.scm (describe): Add (describe ). * src/libnum.scm (ratnum?): Added. 2021-09-01 Shiro Kawai * ext/threads/threads.scm (thread-try-start!): Added. A thread can be terminated before it is started. thread-start! raises an error when it is applied on such a thread. However, we may want to just ignore such case. 2021-08-29 Shiro Kawai * lib/gauche/interactive.scm (describe): Add (describe ) to describe flonum. * ext/threads/threads.c (Scm_TerminateThread): Add flags argument, and allow to choose forcible/non-forcible termination. * ext/threads/threads.scm (thread-terminate!): Make non-forcible termination default. Forcible termination has no guarantee the process state is sane afterwards, so it should be reserved for absolutely desperate situation. We expect non-forcible termination shows little difference from forcible termination, for the program will go on anyways---the only difference should be the hanged thread remains in the process. 2021-08-28 Shiro Kawai * src/gauche-cesconv.in: Add --in-place option. 2021-08-24 Shiro Kawai * src/boolean.c (Scm_EqvP): Let (eqv? -0.0 0.0) #f. The spec of eqv? has been changed since R5RS; in R7RS, it must return #f if two objects are numbers and it yields different results with Scheme's standard arithmetic operations. Subsequently, (equal? -0.0 0.0) also returns #f. * src/numebr.c: Make sure integer divisions and roundings never return -0.0. It complicates things when the result is compared to 0.0 with equal?. 2021-08-22 Shiro Kawai * src/number.c (scm_abs): Fix: (abs -0.0) returned -0.0. Oops. * ext/srfi/srfi-19.scm: Define object-equal? on . 2021-08-15 Shiro Kawai * lib/srfi-69.scm (hash-table-hash-function): The returned procedure's second argument is now optional, for the compatibility with srfi-128. https://github.com/shirok/Gauche/issues/777 2021-08-11 Shiro Kawai * lib/srfi-197.scm: Added (reference implementation) 2021-08-06 Shiro Kawai * lib/gauche/test/diff.scm (test*/diff): Renamed from test*-diff. Use unified diff instead of context diff. Handle the case when the result isn't a string. 2021-08-05 Shiro Kawai * lib/util/lcs.scm (lcs-edit-list/unified), lib/text/diff.scm (diff-report/unified): Also added unified diff. 2021-08-03 Shiro Kawai * lib/gauche/cgen/stub.scm (cgen-genstub): Add output-directory keyword argument. 2021-08-02 Shiro Kawai * lib/gauche/test.scm: Save failure report procedure in *discrepancy-list* as well, so that we can report in the same format in the test summary. test-fail++ is enhanced to take the optioanl report procedure; it's optional to keep the backward compatibility. Note the report procedure output is slightly changed. The prefix "ERROR: GOT " and the last newline is printed by the test framework now, so the report procedure only need to display the content. (prim-test): Change the optional argument order. 'hook' argument will be rarely used (it's to adapt other test frameworks to Gauche), so it will make more sense to have it last. 2021-08-01 Shiro Kawai * lib/text/diff.scm (diff-report/context): Added. * lib/util/lcs.scm (lcs-edit-list/context): Add 'context diff' functonality. 2021-07-29 Shiro Kawai * lib/gauche/test/diff.scm (test*-diff): Add a utility that reports diff of expected and actual results. It's a lot easier to spot what went wrong than the default output. 2021-07-28 Shiro Kawai * lib/gauche/test.scm (test-report): Add an optional 'report' arg to prim-test, test and test*, to customize failure reporting. 2021-07-27 Shiro Kawai * lib/gauche/test.scm (test-remove-files, test-with-temporary-directory): Added. test-remove-files is effectively the same as remove-files in file.util, and only for the tests that can't rely on file.util. test-with-temporary-directory is generally useful. 2021-07-24 Shiro Kawai * src/gauche/priv/nativeP.h (SCM_ALIGNOF): Added. 2021-07-23 Shiro Kawai * src/libtype.scm: Change -> . It'll be the basis of FFI type system. 2021-07-22 Shiro Kawai * ext/srfi/srfi-19.scm (describe): Let (describe