1. 27
  1. 5

    I thought this was talking about the R7RS revision of the Scheme spec, but it’s actually talking about an implementation of Scheme.

    Although it is a descendant of tinyScheme, s7 is closest as a Scheme dialect to Guile 1.8. I believe it is compatible with r5rs and r7rs

    1. 5

      That’s what I was thinking too. Here is the S7 page for the curious.

      1. 1

        s7 looks great - there is a max/msp and pd api project for it but it lack syntax-rules and the scheme numeric tower.

      2. 5

        I came across this in the Janet chatroom. Janet has the applicative syntax described here. It has caused hard-to-find bugs for me, when a function is accidentally swapped for an array (out-of-bounds error or garbage from the array) or table (usually just returns nil, even worse). So I’m on the fence about it, and tend to just use get in my Janet code (doesn’t make the code that much easier to read anyway, just a small bit easier to write, imo).

        The first-class environments look nice. Janet also has this, grep for env in the docs - there’s make-env, curenv, root-env etc. As with s7, it’s a table of symbols to a table containing their value (Janet also has their docstring and source position). It’s pretty convenient for getting info about the standard library ((length root-env) is 554).

        This makes me want to take a look at s7, it looks like a nice Scheme!

        1. 5

          This is when I truly realized how crazily dynamic s7 is. Other interpreted languages can manipulate their environments, but I’ve never seen anything like this […]

          Lua and Fennel have this. I remember being flabbergasted when I first saw it in Lua; it was so useful I couldn’t believe other languages hadn’t implemented it. Guess I hadn’t read up enough on s7. Is it part of the standard?

          1. 4

            Is it part of the standard

            No, though a number of other schemes have it; and there is also a common lisp in-development that supports it. (The common lisp implementation is sicl, and afaik it only supports first-class global environments; that is not quite the same, but still allows you to do interesting things.)

            1. 4

              Neat! It seems like a very dynamic alternative to higher order functions. Section from the Lua book for the curious.

              1. 2

                Io has, if I remember correctly, the ability to change the evaluation context of a message (function call) arguments. Essentially like taking the AST and deciding at runtime where it should be evaluated.

              2. 1

                The reactive features are nice: symbol-access has since been replaces by reactive-set!. Example:

                Start s7:

                docker run -it schemer/s7 (:head doesn’t work!)

                (load "reactive.scm")
                (define a 3) 
                (define b 2) 
                (define x 0) 
                (reactive-set! x (+ a b)) 


                (set! b 7)


                (set! a 104)


                (define mx (lambda (z) (* x z)))
                (mx 15)


                (set! a 20)
                (mx 15)



                Though I could not figure how to create the exact example from the article; in the code there is an example that looks like it would do, but it doesn’t work (must be outdated as well). Any ideas?