Arc Forumnew | comments | leaders | submitlogin
1 point by shader 5418 days ago | link | parent

If you're interested, I wrote a new version of ppr that's currently available on anarki, that properly displays most functions, macros, if statements, and quasiquotes. The goal was to get it to look as much like the original source code as possible, to work with my src function. It also makes it easy to define an indentation function for a particular form, if you don't like the default indentation.


1 point by fallintothis 5418 days ago | link

Thanks, I did remember that. I suppose the outstanding bugs from http://arclanguage.org/item?id=9801 were fixed? e.g., My other post (http://arclanguage.org/item?id=11296) fixed the issue where long expressions (afn calls and such) would print on one line.

I'll still be combing over pg's pprint.arc, though. By keeping the changes small, modular, and as close to the original as possible, I figure that (a) there's a smaller chance of bugs, as each change is more understandable; (b) the code will be compatible with vanilla Arc; and thus (c) even if just a few fixes are cherry-picked, we might actually get a decent ppr in the next release. If nothing else, it's kind of fun. :)

-----

1 point by shader 5417 days ago | link

Indeed, that's the main reason I wrote my version of ppr ;) That's how I originally started my version - I was annoyed by the fact that pg's wouldn't properly print quasiquotes in my source code (and it's hard to debug macros that way) and just couldn't stop because it was so much fun.

And to be honest, I don't really know what the outstanding bugs are, or whether or not I ended up fixing them. It's been a while since I last looked at ppr.

-----

1 point by rntz 5415 days ago | link

All the bugs that I can recall finding are fixed.

-----