Live data from Hacker News

Lisp without parentheses: Lisp INdented

genyris.com

11–20 of 45 posts

Re: Lisp without parentheses: Lisp INdented

#12

Set the highlight color of your () to white. Solved.

Why are people up-voting this? This is a recipe for bugs.

Light gray, then ;-P

Srsly, looking past the brackets is the least problem in reading lisp. The harder part is dealing with the lack of syntax, so you have to remember place structures instead of picking up hints from the punctuation. And in that regard, Pythonic indenting makes it harder.

Re: Lisp without parentheses: Lisp INdented

#14
post #2

Hm, this feels like comitting hara-kiri, but I actually found the eight queens sample: http://www.genyris.com/wiki?page=default/eightqueenssource A lot more readable than the 'regular' lisp version: http://obereed.net/queens/algorithm.html By automating the process of converting between 'indented' lisp and 'regular' lisp those that want it can have it and those that do not can simply ignore it.

True, having a round trip to Lisp's standardized format might make this usable. I have to wonder how much of Ruby's success is owed to being unable to trivially share Python code with strangers without most of our tools shredding the whitespace.

Re: Lisp without parentheses: Lisp INdented

#16
post #2

Hm, this feels like comitting hara-kiri, but I actually found the eight queens sample: http://www.genyris.com/wiki?page=default/eightqueenssource A lot more readable than the 'regular' lisp version: http://obereed.net/queens/algorithm.html By automating the process of converting between 'indented' lisp and 'regular' lisp those that want it can have it and those that do not can simply ignore it.

True, having a round trip to Lisp's standardized format might make this usable. I have to wonder how much of Ruby's success is owed to being unable to trivially share Python code with strangers without most of our tools shredding the whitespace.

That's one of my pet peeves with python. Even sites like the django documentation suffer from this, cut&paste simply does not work in the python world and it is much poorer because of that.

It also can make debugging such a problem hell because you have to completely grok the code in order to spot the fact that the last line of a code block has somehow mysteriously jumped left 4 spaces.

And it makes refactoring code a major pain.

Braces rule compared to spaces.

Re: Lisp without parentheses: Lisp INdented

#19

Set the highlight color of your () to white. Solved.

is there a way to interchange ( to [ ? I have RSI. P.S. Not keyboard mapping please.

DrScheme (PLT scheme's IDE) automatically translates [ and ] to ( and ) where appropriate. It's very handy.

Re: Lisp without parentheses: Lisp INdented

#20

Set the highlight color of your () to white. Solved.

is there a way to interchange ( to [ ? I have RSI. P.S. Not keyboard mapping please.

    (defun square-bracket-reader (stream char)
      (declare (ignore char))
      (read-delimited-list #\] stream t))
    (defun use-square-bracket-readtable ()
      (set-macro-character #\[ #'square-bracket-reader)
      (set-macro-character #\] (get-macro-character #\) nil)))
Post reply on HN