Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Pretty printing sexps
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Xah Lee  
View profile  
 More options Feb 9 2009, 2:59 am
Newsgroups: comp.lang.lisp, comp.lang.scheme, comp.emacs
From: Xah Lee <xah...@gmail.com>
Date: Sun, 8 Feb 2009 23:59:04 -0800 (PST)
Local: Mon, Feb 9 2009 2:59 am
Subject: Re: Pretty printing sexps
On Feb 8, 1:45 pm, Jason Nielsen <j...@math.carleton.ca> wrote:

> I have a program that is parsing input and emitting sexps (a subset of
> common lisp).  I can get this program to dump the output as one long
> string of sexps but that isn't a format that makes it easy to see any
> problems with my parser.  Is there an easy way to pretty print lisp code
> in this format (one big ass long string) into something readable?  I was
> thinking something along the lines of GNU indent for C.

> Thanks,
> Jason

• A Simple Lisp Code Formatter
  http://xahlee.org/emacs/lisp_formatter.html

just this month, i tried to “hire” Andy to do it. Here's the result:

 http://www.emacswiki.org/emacs/ElispFormat

the code is 1k lines but it's rather in beta stage, and it is tested
on elisp only. (current status is “abandoned”.)

I was offering a cheap “thank you” money of $15 (USD) for the work.
But due to the problem of small amount and international money
transfer, it's not paid. Was offering $50 for a somewhat more robust
result, but right now things just hang there. (he wouldn't take paypal
($20 to withdraw for him), no friend i can pay to in US, and he's got
more important thing to do this than this small compensation)

If you would write to him, possibly he might pick it up. And if you
offer some small amount, combined with mine, there'd be more
incentive. (i can pay you, then you add your amount and pay him, so to
avoid 3rd party sucking off transaction fee. (a bank wire is $20 a
pop)) I'm sure if few more people join in, we can make the code
industrial strength that works on any lisp code.

In my opinion, a mechanical lisp formatter is extremely important.
(see the section “Automatic, Uniform, Universal, Source Code Display”
at http://xahlee.org/UnixResource_dir/writ/lisp_problems.html )

Common Lisp, and perhaps Scheme lisp, has some facility to read lisp
code, but the problem is that the compiler throws away comment.
Basically unusable for this purpose unless somewhat extensively
modified.

If you search back, in 2008 or 2007 there are at least 2 biggist
thread on this... someone actually posted a similar request and
announcement, that he did a half-assed job of it. In one of the
thread, Rainer also gave a common lisp “solution” using its reader
(which ditches comments).

(spent 10 min to google group seach but failed. Apparently google
search does not exactly search all texts in the post... because i know
the exact phrases used the post, yet search results nothing. For those
want to find the thread here's tips: i posted to the thread (using
xahlee gmail.com or xah xahlee.org), so did Rainer. The date is
sometimes in 2008, possibly 2007.
This article:
• A Simple Lisp Code Formatter  http://xahlee.org/emacs/lisp_formatter.html
is a edited version from one of my post. Much texts there is verbatim.
A web search will probably return mirrored newsgroup sites of this
thread.
)

  Xah
http://xahlee.org/



 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.