[ prog / sol / mona ]

prog


What is the most underrated Scheme implementation?

13 2020-06-02 16:34

>>3,9

In my opinion, the most underrated Scheme implementation would be Sagittarius
they all seem very good: Sagittarius

I've been playing around with Sagittarius because it does seem very nice. The interactive environment unfortunately leaves much to be desired. I think the attached output stands on its own as an explanation of the problems, but I'll add some description anyway. In reverse the order of the code block presented below, the output of a process is often extremely cryptic due to references being explicitly printed. There are no macros analogous to Chez Scheme's ‘define-trace’, ‘let-trace’, etc. the tracer does not print the arguments of the expression being traced, but only the output, which remains in the cryptic fashion mentioned earlier. (not that it's a big deal to copy Chez's macros) Lastly, exceptions are presented in a manner that is not easily interpreted, followed by the full stack trace, I could see other liking this but don't enjoy it. Perhaps I'll download Larceny to see if the interactive environment is more enjoyable there.

(define (subset s)
  (if (null? s)
      (list '())
      (let ((rest (subset (cdr s))))
        (append rest (map (lambda (r) (cons (car r) (car s))) rest)))))

(subset '(1 2 3))
Unhandled exception
  Condition components:
  1. &assertion
  2. &who car
  3. &message "pair" required, but got ()
  4. &irritants ()
  5. &stack-trace

stack trace: ...

(define (subset s)
  (if (null? s)
      (list '())
      (let ((rest #?=(subset (cdr s))))
        (append rest
          (map (lambda (r) (list (car s) r)) rest)))))

(subset '(1 2 3))

#?=(subset (cdr s))
#?=(subset (cdr s))
#?=(subset (cdr s))
#?-    (())
#?-    (() (3 ()))
#?-    (() #0=(3 ()) (2 ()) (2 #0#))

(() #0=(3 ()) #1=(2 ()) #2=(2 #0#) (1 ()) (1 #0#) (1 #1#) (1 #2#))
51


VIP:

do not edit these