12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- title: Wisp: Lisp, minus the parentheses
- date: 2015-09-23 17:05
- author: Christine Lemmer-Webber
- tags: wisp, scheme, lisp, hacking, foss
- slug: wisp-lisp-alternative
- ---
- <p>
- <a href="http://draketo.de/">Arne Babenhauserheide</a>
- has built a really cool syntax alternative for Scheme,
- <a href="http://draketo.de/english/wisp">Wisp</a>
- (not to be confused with a
- <a href="https://github.com/Gozala/wisp">different lisp-related-wisp</a>),
- or in standards version,
- <a href="http://srfi.schemers.org/srfi-119/srfi-119.html">SRFI 119</a>.
- It looks pretty nice:
- </p>
- <blockquote>
- <pre>
- ;; 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 "!")))
- </pre>
- </blockquote>
- <p>
- Actually, let's see that in emacs, just to be sure.
- </p>
- <p class="centered">
- <img src="/etc/images/blog/wisp_emacs_hello.png" alt="Wisp and hello world" />
- </p>
- <p>
- How about something slightly more substantial? How about a real life
- Guix package for GNU Grep:
- </p>
- <p class="centered">
- <img src="/etc/images/blog/wisp_emacs_guix_grep.png" alt="Wisp, Emacs, Guix and Grep" />
- </p>
- <p>Wow, not bad... not bad at all! I'd say that's quite readable!
- (Too bad the lines don't line up exactly in that screenshot; that's
- not the code but rather my emacs theme bolding the wisp code.)</p>
- <p>
- 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.
- </p>
- <p>
- 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.
- </p>
- <p>
- Now what would <em>really</em> be hylarious would be to port this to
- <a href="http://hylang.org/">Hy</a>...
- </p>
|