Live data from Hacker News

Pretty Lisp

pretty-lisp.org

21–30 of 115 posts

Re: Pretty Lisp

#21
post #3

Earlier quoted context omitted.

Seconded. I made some designs for a graphical IDE like this years ago, but only on paper. I'm very happy to see someone else has done the hard work for me! I hope they'll support other languages too.

It's funny, more and more I'm moving my work to Mathematica because it works sort of like this already. That, and it's as far along the power curve from python/ruby as python/ruby is from C.

What kind of work do you do? Moving the work from what language? Do you not worry about having to pay huge licensing fees to run your code elsewhere?

Re: Pretty Lisp

#22
It is odd that in the third screenshot there is no visual differentiation between the true and false blocks of an if statement. That's one place where I still kind of regret the genericness of Lisp syntax.

Perhaps place a green outline around the true block, a red outline around the false block (if any), and indent them both slightly or otherwise connect them to the predicate block so that the connections are clear.

Of course one issue with treating constructs like if specially is that in Lisp you can create your own macros that act just like if but then don't get the special visual treatment.

Re: Pretty Lisp

#23
post #8

Something I'd be curious to hear from the pretty lisp designers: what advantages do you feel this offers over an Emacs which just highlights the symbol of interest or region between the matched parens for a particular code block? By way of context, I was a test subject for a perhaps related project called Code Bubbles http://www.andrewbragdon.com/codebubbles_site.asp a while ago. Since it was for Java, a language whi…

> what advantages do you feel this offers over an Emacs which just highlights the symbol of interest or region between the matched parens for a particular code block? This already exists: http://www.foldr.org/~michaelw/emacs/mwe-color-box.el (you can see a screenie in http://www.foldr.org/~michaelw/emacs/color-box.png )

I... love... this...

Seriously though, I wish that emacs put effort into a more modern rendering architecture. So that you could implement this sort of visualization in a more flexible way.

Re: Pretty Lisp

#24
post #22

It is odd that in the third screenshot there is no visual differentiation between the true and false blocks of an if statement. That's one place where I still kind of regret the genericness of Lisp syntax. Perhaps place a green outline around the true block, a red outline around the false block (if any), and indent them both slightly or otherwise connect them to the predicate block so that the connections are clear.…

(Following on from the last paragraph) I guess the thing to do is to have a little DSL declaring how to prettyize any sort of block (which I assume already exists for this project to work at all), and then allow the user to customize it to add his/her own.

Re: Pretty Lisp

#25
Interesting. I've often read discussions about how S-expressions could be made more readable. I never contribute much to such discussions because I've never had a problem with S-expressions. This is a neat idea though.

Re: Pretty Lisp

#26
Great idea.

I've thought of doing something similar for an HTML editor, because—like with Lisp—the nesting can become a nuisance.

Re: Pretty Lisp

#27
post #20

Earlier quoted context omitted.

> what advantages do you feel this offers over an Emacs which just highlights the symbol of interest or region between the matched parens for a particular code block? This already exists: http://www.foldr.org/~michaelw/emacs/mwe-color-box.el (you can see a screenie in http://www.foldr.org/~michaelw/emacs/color-box.png )

Thank you. I knew that it was an editor feature I'd seen before for lisp code, but didn't recall the name of any one in particular.

You're welcome! I don't know how useful it is in practice. I myself don't mind the parens as long as I can see them match.

Re: Pretty Lisp

#28
post #2

I've been wanting this sort of thing for ages. Considering how sophisticated we think we are, how the hell are we still using tools like emacs, or even VS on a daily basis? We should be indistinguishable from magic by now. This is a (small) step in the right direction. Can we please live in the future already?

I have written some amount of Lisp - at this point in the 5-10KLoC range, and I don't think this tool is a great editor.

However, it's one of the more useful code/program visualizations I've come across.

Re: Pretty Lisp

#29

Earlier quoted context omitted.

> what advantages do you feel this offers over an Emacs which just highlights the symbol of interest or region between the matched parens for a particular code block? This already exists: http://www.foldr.org/~michaelw/emacs/mwe-color-box.el (you can see a screenie in http://www.foldr.org/~michaelw/emacs/color-box.png )

That is extremely shiny. Can I get that in Vim?

Well, this is not quite the same, but you can get indent-level highlighting in vim via these sorts of plugins:

http://www.vim.org/scripts/script.php?script_id=3361

http://www.vim.org/scripts/script.php?script_id=1800

Some screenshots:

http://nathanaelkane.imgur.com/indent_guides

http://viming.blogspot.com/2007/02/indent-level-highlighting...

Of course, you can also get rainbow parenthesis in vim via:

  :let g:lisp_rainbow = 1
There should also be some way to get background highlights based on sexpr's instead of just indent level, but I haven't personally seen it.

Edit: actually, come to think of it, I seem to recall hearing that the slimv[1] plugin can do this. But I haven't really played with it myself.

[1] - http://www.vim.org/scripts/script.php?script_id=2531

Re: Pretty Lisp

#30
post #6

This is real neat, but expecting programmers to make such a large jump so quickly is a bit unrealistic. My best suggestion is to integrate this well with programers existing editors, open a socket from an Emacs instance and use this as visualization. You will get much better traction that way.

This is probably the most significant comment in the thread. Most people are pretty entrenched; they will be much more willing to try a new tool if it can fit it in with their existing workflow.

This applies to pretty much every problem out there, really.

Post reply on HN