Wisp (no, not that one) is the best Lisp sexp alternative I've seen

Christopher Allan Webber at 2015-09-23T21:12:07Z

Updated, with screenshots, on my blog!

@Arne Babenhauserheide has built a really cool syntax alternative for Scheme, Wisp, or in standards version, SRFI 119.

;; hello world example
display                             ;    (display
  string-append "Hello " "World!"   ;      (string-append "Hello " "World!"))
display "Hello Again!"              ;    (display "Hello Again!")

;; hello world function
define : hello who                  ;    (define (hello who)
  display                           ;      (display 
    string-append "Hello " who "!"  ;        (string-append "Hello " who "!")))

What's nice is that unlike most s-expression alternatives, it doesn't lack any of the power of Lisp; it's "just lisp" with the parentheses hidden by vaguely pythonesque indentation, which means even macros work.

Now me personally? I've learned to love the parens, and there's nothing that beats an editor that knows how to do cool structural s-expression editing and navigation. But I admit that learning to read through all the parentheses was a tough thing for me initally, and certainly for many others. Maybe this can help boil the lisp frog for some.

Now what would really be hylarious would be to port this to Hy...

Claes Wallin (韋嘉誠), Arne Babenhauserheide, David Thompson, lnxwalt@microca.st and 3 others likes this.

Claes Wallin (韋嘉誠), Claes Wallin (韋嘉誠), Arne Babenhauserheide shared this.

Show all 5 replies
Of course there's already an emacs mode. Looks really neat!

Claes Wallin (韋嘉誠) at 2015-09-24T08:09:09Z

Arne Babenhauserheide, Christopher Allan Webber likes this.

after looking at the blog post I had to run guix package -s grep to see if the "numbrs" typo was there or not.

Efraim Flashner at 2015-09-24T10:47:42Z

Arne Babenhauserheide, Christopher Allan Webber likes this.

Heh, must have accidentally hit backspace or delete when converting to wisp and then doing the test conversion back (those sexp's in the guix one are the real output from the wisp->sexp conversion tool!)

Christopher Allan Webber at 2015-09-24T12:44:38Z

Arne Babenhauserheide likes this.