Discussion:
[Scheme-reports] Gauche joins the ranks of the R7RS implementations
John Cowan
2014-08-27 01:41:40 UTC
Permalink
Gauche <http://practical-scheme.net/gauche> has released its R7RS-small
implementation. This adds it to Chibi, Chicken (not yet complete),
Foment, and Sagittarius.

On the bad news front, the implementation of R7RS for Gambit has been
abandoned, at least for now. (More accurately, the implementer of the
R7RS package has abandoned Gambit.)

If anyone else has a working R7RS, let me know.
--
John Cowan http://www.ccil.org/~cowan ***@ccil.org
"Make a case, man; you're full of naked assertions, just like Nietzsche."
"Oh, i suffer from that, too. But you know, naked assertions or GTFO."
--heard on #scheme, sorta
Taylan Ulrich Bayirli/Kammer
2014-08-27 08:12:44 UTC
Permalink
Post by John Cowan
Gauche <http://practical-scheme.net/gauche> has released its R7RS-small
implementation. This adds it to Chibi, Chicken (not yet complete),
Foment, and Sagittarius.
[...]
If anyone else has a working R7RS, let me know.
Guile has an r7rs branch that's pretty far but incomplete.
Post by John Cowan
On the bad news front, the implementation of R7RS for Gambit has been
abandoned, at least for now. (More accurately, the implementer of the
R7RS package has abandoned Gambit.)
That's bad news for me, because I was hoping to test my bytestructures
library on Gambit-C, hoping it can optimize usages of immutable records.

If anyone knows an R7RS implementation that optimizes the access of
statically apparent immutable records, please let me know.

Example: module A exports an immutable record my-foo that has its field
foo-x containing the value x, and module B imports it and the foo-x
accessor, and has the expression (foo-x my-foo) somewhere (where the
'foo-x' and 'my-foo' bindings aren't shadowed), then that expression
should be optimized to the constant value x during static analysis.
(This is possible with R6RS-like module systems where exported bindings
are immutable as well as imported ones; or otherwise when the module
exporting 'my-foo' has been analyzed prior to determine that it does not
in fact mutate the 'my-foo' binding.)

I'm a little disappointed that near to no Scheme compilers do such an
optimization. It's crucial to the efficiency of my bytestructures
proposal, which is procedural and highly dynamic in nature.

Taylan
Shiro Kawai
2014-08-29 06:21:36 UTC
Permalink
On Tue, Aug 26, 2014 at 10:12 PM, Taylan Ulrich Bayirli/Kammer <
Post by Taylan Ulrich Bayirli/Kammer
If anyone knows an R7RS implementation that optimizes the access of
statically apparent immutable records, please let me know.
It's on my agenda, but still several steps away; currently I'm working on
inlining record accessors.
Theoretically, once I've done it, and combined with constant propagation,
reference to a slot
of constant immutable record should be calculated at compile time.
Taylan Ulrich Bayirli/Kammer
2014-08-29 11:11:30 UTC
Permalink
Post by Shiro Kawai
It's on my agenda, but still several steps away; currently I'm working
on inlining record accessors.
Theoretically, once I've done it, and combined with constant
propagation, reference to a slot
of constant immutable record should be calculated at compile time.
Looking forward to this! :)

Are imported bindings (truly) immutable in Gauche? That is, the binding
is also immutable for the exporting module (a la R6RS), and the
exporting module cannot be reloaded at runtime without also recompiling
and reloading the module that imports bindings from it? (Sort of
"static linking" of modules.) Because otherwise the compiler cannot
know for sure what record object will be accessed at run-time by the
importing module, and cannot do the optimization after all. (Or if it
does anyway, then reloading the exporting module has no effect because
the module that imported it was compiled against and still uses the old
version's exported object...)

Am I being clear?

I mean to write an article some time on the different "linking"
strategies for modules especially with regard to Scheme. Or maybe there
is such a thing out there already?

Taylan
Justin Ethier
2014-08-27 16:27:29 UTC
Permalink
Post by John Cowan
Gauche <http://practical-scheme.net/gauche> has released its R7RS-small
implementation. This adds it to Chibi, Chicken (not yet complete),
Foment, and Sagittarius.
[...]
If anyone else has a working R7RS, let me know.
Husk <http://justinethier.github.io/husk-scheme/> supports (most of)
R7RS-small as well. There is a detailed feature list over here <
https://github.com/justinethier/husk-scheme/issues/24>.

Thanks,

Justin
OKUMURA Yuki
2014-08-29 12:52:06 UTC
Permalink
mosh supports some of R7RS. Most R7RS vocabulary available as R6RS
library (scheme base) etc.

nmosh(alternative frontend for mosh) on my branch (
https://github.com/okuoku/mosh/tree/master ) now supports R7RS library
syntax.
It still lacks include-ci or (library ...) cond-expand operator but I
will implement them soon.
Next nmosh release(0.2.8) is now planned around next December so I'd
love to line nmosh as one of R7RS implementation once I'd managed to
release it..
(I have no plan to implement R7RS on the original mosh which have
psyntax based expander though.)

Current nmosh can import (chibi regexp) as-is and it can be used from
R6RS scripts :)


Unfortunately, current nmosh intentionally omits several R7RS
constructs due to backward compatibility concerns.

- |long symbol syntax| of R7RS

nmosh reads single '|' character as a symbol; it is indeed
incompatible with R7RS syntax.
I will try to add a R7RS reader mode to support them inside
(define-library ...).

- Integer as library name component

One of my application requires every library name components are valid
syntactic identifier to track syntactic location(line numbers) of each
library definitions.
This limitation is just plain wrong thing but I have no time to fix my
application...
Exception: SRFI library names e.g. (srfi 1) are automagically
translated as SRFI-97/R6RS name such as (srfi :1).
Post by John Cowan
Gauche <http://practical-scheme.net/gauche> has released its R7RS-small
implementation. This adds it to Chibi, Chicken (not yet complete),
Foment, and Sagittarius.
On the bad news front, the implementation of R7RS for Gambit has been
abandoned, at least for now. (More accurately, the implementer of the
R7RS package has abandoned Gambit.)
If anyone else has a working R7RS, let me know.
--
"Make a case, man; you're full of naked assertions, just like Nietzsche."
"Oh, i suffer from that, too. But you know, naked assertions or GTFO."
--heard on #scheme, sorta
_______________________________________________
Scheme-reports mailing list
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
Loading...