[ANN] Some R7RS libraries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Some R7RS libraries

Peter Lane
Hi list,

Recently I have been writing and repackaging a variety of Scheme
libraries to work on R7RS implementations.  The collection is a work in
progress, but is currently tested on Chibi, Kawa and
Larceny: with some exceptions, the included examples and tests work on
all three implementations.

For details, installation, licensing etc, see:

* https://github.com/petercrlane/r7rs-libs

(There is a script provided for kawa to compile the collection into
class files and bundle into a single jar file.  This can be added to
your classpath or placed in kawa/lib for ease of use: see INSTALL for
details.)

Documentation:

* in pdf   http://peterlane.info/downloads/r7rs.pdf
* or html  http://peterlane.info/r7rs/html/index.html

Currently, there are 7 sub-collections, with 165 libraries between them,
and over 1700 exported functions/variables.

| Name      | Libraries | Exports
| autodiff  | 17        | 146
| nltk      | 6         | 76
| pfds      | 16        | 183
| rebottled | 9         | 305
| robin     | 9         | 113
| slib      | 91        | 713
| weinholt  | 17        | 190
| Total     | 165       | 1726

Robin is written by me and includes a statistics library, a text library
with a stemmer, similarity measures and formatting functions, and, from
Ruby, abbrev and logger libraries.

The remaining collections are repackaged from R6RS or earlier Scheme
versions to work with R7RS and are from various sources and by various
authors.

The main repackaged collection is SLIB, which includes a variety of data
structures, functions to manipulate strings and arrays, a version of
lisp's format command, various mathematical functions, an xml-parser, a
database system, and a 3D modelling language, amongst many others.

The remaining collections include text processing (nltk), functional
data structures (pfds), cryptographic functions (weinholt), pdf output
and regular expressions (rebottled), and automatic differentiation
(autodiff).

Health warning: As not all parts of the different collections came with
test suites, and even those which have test suites are not necessarily
rigorously tested, I may well have broken things in conversion.  All
known problems are listed in the README.

Let me know of any problems via Github issues, here or email (see url
below).

--
Peter Lane
http://peterlane.info

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Some R7RS libraries

Per Bothner
On 04/10/2017 07:07 AM, Peter Lane wrote:
> Recently I have been writing and repackaging a variety of Scheme libraries to work on R7RS implementations.  The collection is a work in progress, but is currently tested on Chibi, Kawa and
> Larceny: with some exceptions, the included examples and tests work on all three implementations.

Cool.  Thanks!

Perhaps it would make sense to add SRFI-27 to Kawa itself.

You write: "Kawa uses the colon in symbol names specially to refer to Java method calls."
That's not quite right.  See https://www.gnu.org/software/kawa/Colon-notation.html

Kawa does have a "recovery" hack for identifiers with colons:

#|kawa:1|# (define foo:bar 12)
#|kawa:2|# foo:bar
12
#|kawa:3|# (define (foo:baz x) (list x foo:bar))
#|kawa:4|# (foo:baz 3)
(3 12)

To make this more robust, you can define foo as a namespace:
(define-namespace foo "foo-namespace")

Have you tested your library with the 'invoke' git branch?
That would be valuable, as the invoke branch will become Kawa 3.x
this year (the plan is to do so before JDK 9 is released).
There are a number of incompatible changes, most notably that by
default Kawa will follow SRFI-140, so most string procedures
will return immutable strings.
--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Some R7RS libraries

Peter Lane

On 10/04/17 18:21, Per Bothner wrote:
> Perhaps it would make sense to add SRFI-27 to Kawa itself.
I will take another look at it first but yes, it would be convenient to
add in to Kawa itself.
> Have you tested your library with the 'invoke' git branch?
> That would be valuable, as the invoke branch will become Kawa 3.x
> this year (the plan is to do so before JDK 9 is released).
I shall give that a try and let you know what happens.
> There are a number of incompatible changes, most notably that by
> default Kawa will follow SRFI-140, so most string procedures
> will return immutable strings.
That may need another cond-expand option in places.  I have a few such
for strings already, as chibi does not support srfi 13.

--
Peter Lane
http://peterlane.info/scheme.html

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Some R7RS libraries

Per Bothner
On 04/10/2017 11:45 AM, Peter Lane wrote:
>> There are a number of incompatible changes, most notably that by
>> default Kawa will follow SRFI-140, so most string procedures
>> will return immutable strings.
> That may need another cond-expand option in places.  I have a few such for strings already, as chibi does not support srfi 13.

I expect you will need very few changes.  Kawa will still have string-set!,
and both make-string and string-copy will return mutable strings.
--
        --Per Bothner
[hidden email]   http://per.bothner.com/