Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Scheme is undefined shit

Name: Anonymous 2016-05-02 19:38

The behavior of syntax-rules -- in particular, the renaming of identifiers that will appear at the top level -- is not completely specified in R5RS. Different implementations of macro-expanders vary widely in this respect.

The following is an illustrative test. It is a syntax-rule for letrec (taken verbatim from Section 7.3 of R5RS) with only one change: the fragment

(let ((var1 <undefined>) ...)
(let ((temp1 init1) ...)
(set! var1 temp1)
...
body ...)


is replaced by the "equivalent" code:

(begin
(define var1 #f) ...
(define temp1 init1) ...
(set! var1 temp1) ...
body ...))


We also changed the name to letrec1 to avoid confusion with the standard letrec. If we use letrec1 at the top level and overlook the pollution of the global namespace, we may expect that letrec1 is semantically equivalent to letrec.

Is it? To test this claim, we evaluate the following expression:

(letrec1 ((x 1) (y 2)) (display (+ x y)) (newline))

It turns out, this expression may print 3, print 4, or raise an unbound variable error. You might wish to load the file referenced below into your Scheme system. The existing Scheme systems almost evenly fall into three categories regarding this test.

Result 3 is printed by:
Scheme48, Chez Scheme, MIT Scheme 7.7.1, Chicken

Result 4 is printed by:
PLT Scheme 202, SCM (native macro-expander), Gauche Scheme, Gambit (with Hieb and Dybvig implementation of syntax-rules/syntax-case), Al Petrofsky's portable macro-expander

Unbound variable error is raised by:
SCM with Will Clinger's expander (aka Macros that work), Petite Chez Scheme 6.0a, Bigloo 2.4b

http://okmij.org/ftp/Scheme/macros.html#Macro-CPS-programming

Name: Anonymous 2016-05-02 23:18

Why does everybody hate Guile? It stopped being slow as balls since the version 2.

Name: Anonymous 2016-05-03 10:28

>>2
Because speed often has no bearing on whether or not a language is shit? It's like Cudder complaining about bloat.

Name: Anonymous 2016-05-03 13:41

>>3
It's an implementation of Scheme, not its own language.

Name: Anonymous 2016-05-03 15:12

>>4
Speed often has no bearing on whether or not an implementation is shit. Especially given such a limited language like Scheme, where everything useful is implementation extensions.

Name: Anonymous 2016-05-03 18:30

>>5
It's not that the implementations are shit (which most of them are), it's that Scheme itself is shit.

Name: Anonymous 2016-05-03 18:54

Being GNU is reason enough not to use Guile.

Name: Anonymous 2016-05-03 19:05

Being Scheme is reason enough not to use Guile.

Name: Anonymous 2016-05-03 19:12

>>5
Except that everyone I know kept calling Guile as shit because back in the 1.x days it was slow.

Don't change these.
Name: Email:
Entire Thread Thread List