other-lisps

EmmanuelOga 2020-04-30T06:37:11.000900Z

sup. Any scheme ppl around?

EmmanuelOga 2020-04-30T06:37:19.001200Z

Reading https://scheme.com/tspl4/further.html#./further:h0

EmmanuelOga 2020-04-30T06:37:28.001500Z

(define-syntax let
  (syntax-rules ()
    [(_ ((x e) ...) b1 b2 ...)
     ((lambda (x ...) b1 b2 ...) e ...)]))

EmmanuelOga 2020-04-30T06:38:01.002Z

Not sure why scheme requires the three-dot syntax when mapping the pattern to the expression

EmmanuelOga 2020-04-30T06:39:03.003Z

for example, here: ((x e) ...) is the pattern and I imagine it just "destructuring" the list that defines the let-bindings

EmmanuelOga 2020-04-30T06:39:49.003900Z

but it is a bit weird that I cannot just write ((lambda (x) b1 b2 ...) e), both x and e require the three dots (or else it is a syntax error)

EmmanuelOga 2020-04-30T06:41:12.004300Z

The book explanation: > the three pattern variables x, e, and b2 that appear in ellipsis prototypes in the pattern also appear in ellipsis prototypes in the template. This is not a coincidence; it is a requirement. In general, if a pattern variable appears within an ellipsis prototype in the pattern, it cannot appear outside an ellipsis prototype in the template.

EmmanuelOga 2020-04-30T06:41:26.004700Z

I just don't find the explanation to satisfying, still wonder "why"

EmmanuelOga 2020-04-30T06:41:50.005100Z

Also, not sure how to macro-expand in scheme 😬

EmmanuelOga 2020-04-30T06:41:58.005300Z

(chez)

EmmanuelOga 2020-04-30T06:42:08.005600Z

chez manuals can be quite unfriendly

EmmanuelOga 2020-04-30T07:26:50.006300Z

can't believe emacs and scheme feels so unpolished even in 2020

EmmanuelOga 2020-04-30T07:27:14.006800Z

can't find a version of scheme that runs smoothly on emacs+geiser on windows

EmmanuelOga 2020-04-30T07:27:37.007300Z

and DrRacket is so clunky even for learning sigh

EmmanuelOga 2020-04-30T09:13:54.007500Z

oh, this looks super cool: https://code.cs61a.org/