Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
egallesio committed Oct 10, 2024
2 parents 9cf95f0 + 8b73766 commit 57f9199
Show file tree
Hide file tree
Showing 23 changed files with 6,986 additions and 162 deletions.
6,834 changes: 6,744 additions & 90 deletions ChangeLog

Large diffs are not rendered by default.

103 changes: 92 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,86 @@
NEWS
====
## Version 2.10

This version of ***STklos*** mostly enhances the 2.00 version released a year ago. As usual, this version could not have be finalized without the help of Jeronimo Pellegrini ([@jpellegrini](https://github.com/jpellegrini)).

**Contributors for this version**:

- Akinori Hattori ([@hattya](https://github.com/hattya))
- Jeronimo Pellegrini ([@jpellegrini](https://github.com/jpellegrini))


**Enhancements:**

- Corrected the result of `stklos-config --compile`
- Added the second (optional) parameter to R7RS `load` (and `try-load`)
- Enhanced various things about ***STklos*** compilation/installation
- Added information in the summary of configuration script
- Builds are now reproducible
- FFI support can be completely disabled, if needed.
- Updated GTklos, the GTK+ extension
- Optimize `expt` primitive.
- Avoid unneeded boxing of numbers in the `+`, `-`, `*` and `/` operations
- Added `!` as a shell escape under the REPL
- Added statistics to the VM
- Permit to build ***STklos*** with the `tcc` C compiler.
- Added an simple hybrid (C and Scheme) module in the examples directory
- Correct/enhance implementation of numerical functions in some corner cases (in particular with NaNs and infinities).
- Added an API to add expressions rewriting rules before their compilation.
- Location given in error message is more precise
- Error messages don't loop anymore when displaying circular structures
- Added `list-set!` as the setter function of `list-ref`
- Added the number of allocations and collections to the output of the `time` form
- Added special instructions in the VM for `member`, `memq` and `memv`
- Added special instructions in the VM for `assoc`, `assq` and `assv`
- Do constant folding before in-lining usual functions
- Better UTF-8 support and updated Unicode tables to version 16.0.0
- Enhance the `apropos` primitive
- New REPL variables: `@*`, `@1`, `@2`, `@3`, `@4` and `@5`
- New REPL commands: `time`, `describe`, `expand`, `import`, `require-feature`,
`open`, `browse`, `manual`, `apropos`
- Documentation of a function can be accessed directly into the HTML Reeference Manual
- Length of symbols is no more limited.

**New primitives / parameters**:

- `read-ci`
- `eval-form-string-ci`
- `read-from-sring-ci`
- `compiler:source-rewrite`
- `compiler:peephole-optimizer`
- `1+` and `1-`
- `push!` and `pop`
- `inc!` and `dec!`
- `dolist`
- `apropos/alist`
- `apropos/pp`
- `default-browser`
- `open-in-browser`
- `manual`
- `install-path`
- `define-parameter`

**Updated embedded libraries**

- `libgc` updated to version 8.2.8
- `libffi` updated to version 3.4.6
- `libpcre2` updated to version 10.44

**New supported SRFI**

- SRFI-115: Scheme Regular Expressions
- SRFI-178: Bitvector library
- SRFI-232: Flexible curried procedures

**Misc:**

- Updated documentation
- Added tests
- Code cleaning an optimizations
- Bug fixes



Version 2.00
------------
Expand Down Expand Up @@ -42,24 +123,24 @@ The main changes in this version are:
- SRFI-19: Time Data Types and Procedures
- SRFI 43: Vector Library
- SRFI-95: Sorting and Merging
- SRFI 116: Immutable List Library
- SRFI 125: Intermediate hash tables
- SRFI-116: Immutable List Library
- SRFI-125: Intermediate hash tables
- SRFI-138: Compiling Scheme programs to executables
- SRFI 152: String Library (reduced)
- SRFI-152: String Library (reduced)
- SRFI-162: Comparators sublibrary
- SRFI 154: First-class dynamic extents
- SRFI-154: First-class dynamic extents
- SRFI-215: Central Log Exchange
- SRFI 217: Integer Sets
- SRFI 222: Compound objects
- SRFI 224: Integer Mappings
- SRFI-217: Integer Sets
- SRFI-222: Compound objects
- SRFI-224: Integer Mappings
- SRFI-227: Optional Arguments
- SRFI 228: Composing Comparators
- SRFI-228: Composing Comparators
- SRFI-229: Tagged Procedures
- SRFI-230: Atomic Operations
- SRFI 235: Combinators
- SRFI 236: Evaluating expressions in an unspecified order
- SRFI-235: Combinators
- SRFI-236: Evaluating expressions in an unspecified order
- SRFI-238: Codesets
- SRFI 244: Multiple-value Definitions
- SRFI-244: Multiple-value Definitions
- Added support for some R7RS-large libraries
- supported libraries of the *Red edition* are
- `(scheme bytevector)`
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ It adds support for 24 new [**SRFIs**](https://www.stklos.net/srfi.html) giving
support for 122 SRFIs. You can now use the [cURL](https://curl.se/libcurl/)
library thanks to the new **curl** extension.

**October 2024**
The 2.10 versions enhances the REPL, the documentation and numerical
functions. It adss support for 3 new [**SRFIs**](https://www.stklos.net/srfi.html) giving a complete
support for 125 SRFIs.


SRFI Support
------------

Expand Down
22 changes: 11 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for stklos 2.00.
# Generated by GNU Autoconf 2.72 for stklos 2.10.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
Expand Down Expand Up @@ -600,8 +600,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='stklos'
PACKAGE_TARNAME='stklos'
PACKAGE_VERSION='2.00'
PACKAGE_STRING='stklos 2.00'
PACKAGE_VERSION='2.10'
PACKAGE_STRING='stklos 2.10'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1378,7 +1378,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
'configure' configures stklos 2.00 to adapt to many kinds of systems.
'configure' configures stklos 2.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1449,7 +1449,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of stklos 2.00:";;
short | recursive ) echo "Configuration of stklos 2.10:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1555,7 +1555,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
stklos configure 2.00
stklos configure 2.10
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1921,7 +1921,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by stklos $as_me 2.00, which was
It was created by stklos $as_me 2.10, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -2699,7 +2699,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu

# Set also VERSION_STATUS to stable when changing version
VERSION_STATUS=unstable # and reset it to unstable after releasing
VERSION_STATUS=stable # and reset it to unstable after releasing

#
# Grab configure options before it is too late
Expand Down Expand Up @@ -3433,7 +3433,7 @@ fi

# Define the identity of the package.
PACKAGE='stklos'
VERSION='2.00'
VERSION='2.10'


printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Expand Down Expand Up @@ -8842,7 +8842,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by stklos $as_me 2.00, which was
This file was extended by stklos $as_me 2.10, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -8910,7 +8910,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
stklos config.status 2.00
stklos config.status 2.10
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
### Creation date: 28-Dec-1999 21:19 (eg)

AC_PREREQ([2.69])
AC_INIT([stklos],[2.00]) # Set also VERSION_STATUS to stable when changing version
VERSION_STATUS=unstable # and reset it to unstable after releasing
AC_INIT([stklos],[2.10]) # Set also VERSION_STATUS to stable when changing version
VERSION_STATUS=stable # and reset it to unstable after releasing

#
# Grab configure options before it is too late
Expand Down
87 changes: 87 additions & 0 deletions doc/HTML/hacking.html
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ <h1>Hacking STklos</h1>
</ul>
</li>
<li><a href="#_garbage_collection">10. Garbage collection</a></li>
<li><a href="#_c_variables_for_conditional_compilation">11. C variables for conditional compilation</a>
<ul class="sectlevel2">
<li><a href="#_detecting_libffi_libgmp_dynamic_loading">11.1. Detecting libffi, libgmp, dynamic loading</a></li>
<li><a href="#_statistics_gathering">11.2. Statistics gathering</a></li>
</ul>
</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -2336,6 +2342,87 @@ <h2 id="_garbage_collection">10. Garbage collection</h2>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_c_variables_for_conditional_compilation">11. C variables for conditional compilation</h2>
<div class="sectionbody">
<div class="paragraph">
<p>These are simple to understand, but we ist them here anyway.</p>
</div>
<div class="sect2">
<h3 id="_detecting_libffi_libgmp_dynamic_loading">11.1. Detecting libffi, libgmp, dynamic loading</h3>
<div class="ulist">
<ul>
<li>
<p><code>libffi</code>: the <code>configure</code> script will set the <code>HAS_FFI</code> variable when libffi is available. In
<code>ffi.c</code>, for example, the code that actually uses <code>libffi</code> is guarded by an <code>ifdef</code></p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="c"><span class="cp">#ifdef HAVE_FFI
</span> <span class="cm">/* use libffi here */</span>
<span class="cp">#else </span><span class="cm">/* HAVE_FFI */</span><span class="cp">
</span><span class="k">static</span> <span class="kt">void</span> <span class="nf">error_no_ffi</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">STk_error</span><span class="p">(</span><span class="s">"current system does not support FFI"</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">...</span>
<span class="n">DEFINE_PRIMITIVE</span><span class="p">(</span><span class="s">"make-callback"</span><span class="p">,</span> <span class="n">make_callback</span><span class="p">,</span> <span class="n">subr3</span><span class="p">,</span> <span class="p">(</span><span class="n">SCM</span> <span class="n">p1</span><span class="p">,</span> <span class="n">SCM</span> <span class="n">p2</span><span class="p">,</span> <span class="n">SCM</span> <span class="n">p3</span><span class="p">))</span>
<span class="p">{</span> <span class="n">error_no_ffi</span><span class="p">();</span> <span class="k">return</span> <span class="n">STk_void</span><span class="p">;}</span>
<span class="p">...</span>
<span class="cp">#endif</span></code></pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p><code>libgmp</code>: In <code>number.c</code>, STklos includes &#8220;gmp.h&#8221;. This header file
may be provided either by <code>mini-gmp</code> or by the full GMP. WHen the
<code>mini-gmp</code> is used, the variable <code><em>MINI_GMP_H</em></code> is defined, so
for example this is tone in <code>number.c</code>:</p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="c"><span class="cp">#ifdef __MINI_GMP_H__
</span> <span class="cm">/* BEGIN code for compiling WITH MINI GMP (*no* rationals!) */</span>
<span class="p">...</span>
<span class="cp">#else
</span> <span class="cm">/* BEGIN code for compiling WITH FULL GMP (*with* rationals!) */</span>
<span class="p">...</span>
<span class="cp">#endif </span><span class="cm">/* __MINI_GMP_H__ */</span><span class="cp">
</span></code></pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>In <code>dynload.c</code>, the variable <code>HAVE_DLOPEN</code> is used to guard the full contents of the file.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="_statistics_gathering">11.2. Statistics gathering</h3>
<div class="paragraph">
<p>In <code>vm.c</code>, code that does statistics gathering is guarded by <code>STAT_VM</code>. For example,</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="c"><span class="cp">#ifdef STAT_VM
</span><span class="k">static</span> <span class="kt">int</span> <span class="n">couple_instr</span><span class="p">[</span><span class="n">NB_VM_INSTR</span><span class="p">][</span><span class="n">NB_VM_INSTR</span><span class="p">];</span>
<span class="k">static</span> <span class="kt">int</span> <span class="n">cpt_inst</span><span class="p">[</span><span class="n">NB_VM_INSTR</span><span class="p">];</span>
<span class="k">static</span> <span class="kt">double</span> <span class="n">time_inst</span><span class="p">[</span><span class="n">NB_VM_INSTR</span><span class="p">];</span>
<span class="k">static</span> <span class="kt">int</span> <span class="n">collect_stats</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="k">static</span> <span class="kt">void</span> <span class="nf">tick</span><span class="p">(</span><span class="n">STk_instr</span> <span class="n">b</span><span class="p">,</span> <span class="n">STk_instr</span> <span class="o">*</span><span class="n">previous_op</span><span class="p">,</span> <span class="kt">clock_t</span> <span class="o">*</span><span class="n">previous_time</span><span class="p">);</span>
<span class="cp">#endif</span></code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
9 changes: 5 additions & 4 deletions doc/HTML/pp-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ <h3 id="a-subsection">A Subsection</h3>
Aenean in sem ac leo mollis blandit. Donec neque quam, dignissim in,
mollis nec, sagittis eu, wisi.</p>
<ul class="task-list">
<li><input type="checkbox" />Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus.</li>
<li><input type="checkbox" checked="" />Phasellus purus.</li>
<li><input type="checkbox" />Vivamus id enim.</li>
<li><label><input type="checkbox" />Cum sociis natoque penatibus et
magnis dis parturient montes, nascetur ridiculus mus.</label></li>
<li><label><input type="checkbox" checked="" />Phasellus
purus.</label></li>
<li><label><input type="checkbox" />Vivamus id enim.</label></li>
</ul>
<p>Praesent augue. Fusce commodo. Vestibulum convallis, lorem a tempus
semper, dui dui euismod elit, vitae placerat urna tortor vitae lacus.
Expand Down
11 changes: 3 additions & 8 deletions doc/HTML/pp.html
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,7 @@ <h2 id="_introduction">Introduction</h2>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="txt">Loaded '~/.config/stklos/stklosrc'


The first values of Fibonacci function:
<pre class="rouge highlight"><code data-lang="txt">The first values of Fibonacci function:
| 0 | 0 |
| 1 | 1 |
| 2 | 1 |
Expand Down Expand Up @@ -813,9 +810,7 @@ <h3 id="_variable_definition">Variable Definition</h3>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="txt">Loaded '~/.config/stklos/stklosrc'

Some information about this file:
<pre class="rouge highlight"><code data-lang="txt">Some information about this file:
- Title: I'm the title of the document
- Author: John Doe
- File Creation Date: Tue Jul 18 08:08:39 PM CEST 2023
Expand Down Expand Up @@ -858,7 +853,7 @@ <h3 id="_special_variables">Special Variables</h3>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight"><code data-lang="txt">STklos version: 2.00
<pre class="rouge highlight"><code data-lang="txt">STklos version: 2.10
stklos-pp version: 0.3</code></pre>
</div>
</div>
Expand Down
Loading

0 comments on commit 57f9199

Please sign in to comment.