From: Edi Weitz
Subject: Announcement: CL-INTERPOL
Date: 
Message-ID: <87ismhfmr2.fsf@bird.agharta.de>
CL-INTERPOL is a library for Common Lisp which modifies the reader so
that you can have interpolation within strings similar to Perl or Unix
Shell scripts. It also provides various ways to insert arbitrary
characters into literal strings even if your editor/IDE doesn't
support them. Here's an example:

  * (let ((a 42))
      #?"foo: \xC4\N{U with diaeresis}\nbar: ${a}")
  "foo: ��
  bar: 42"

It can be found at <http://weitz.de/cl-interpol/>.

CL-INTERPOL was originally designed as an addendum to CL-PPCRE to
escape backslash hell - see <http://weitz.de/cl-ppcre/#backslash>. I
think it can stand on its own feet now. (Note that the version of
CL-PPCRE it should be fully compatible with, 0.7.0, has not been
released yet.)

Have fun,
Edi.

PS: Peter Seibel made me do it. Thanks.

From: Marc Battyani
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <bn6jnd$qcv@library1.airnews.net>
"Edi Weitz" <···@agharta.de> wrote
> CL-INTERPOL is a library for Common Lisp which modifies the reader so
> that you can have interpolation within strings similar to Perl or Unix
> Shell scripts. It also provides various ways to insert arbitrary
> characters into literal strings even if your editor/IDE doesn't
> support them. Here's an example:
>
>   * (let ((a 42))
>       #?"foo: \xC4\N{U with diaeresis}\nbar: ${a}")
>   "foo: ��
>   bar: 42"
>
> It can be found at <http://weitz.de/cl-interpol/>.
>
> CL-INTERPOL was originally designed as an addendum to CL-PPCRE to
> escape backslash hell - see <http://weitz.de/cl-ppcre/#backslash>. I
> think it can stand on its own feet now. (Note that the version of
> CL-PPCRE it should be fully compatible with, 0.7.0, has not been
> released yet.)

Great!

How about using CL-PPCRE and/or this to implement a simple (TeX like or
whatever) syntax for cl-typesetting ? ;-)

Marc

PS If only people could start to write more code like this to improve Common
Lisp instead of writing zillions of posts in endless Lisp vs (or Scheme
Python ARC Java ...) threads. :(
Just imagine how many libraries we would have if just a few % of the lines of
text written in these posts were converted to useful Lisp code...
From: Edi Weitz
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <87n0btcczv.fsf@bird.agharta.de>
On Wed, 22 Oct 2003 20:53:56 +0200, "Marc Battyani" <·············@fractalconcept.com> wrote:

> If only people could start to write more code like this to improve
> Common Lisp instead of writing zillions of posts in endless Lisp vs
> (or Scheme Python ARC Java ...) threads. :( Just imagine how many
> libraries we would have if just a few % of the lines of text written
> in these posts were converted to useful Lisp code...

Hmm, maybe we should start working on a converter to do that for us... :)

Edi.
From: ·············@comcast.net
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <3cdldlil.fsf@comcast.net>
"Marc Battyani" <·············@fractalconcept.com> writes:

> Just imagine how many libraries we would have if just a few % of the lines of
> text written in these posts were converted to useful Lisp code...

What makes you think the text in these posts are written manually?
From: Marco Antoniotti
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <7YRlb.59$KR3.16556@typhoon.nyu.edu>
Edi Weitz wrote:

> CL-INTERPOL is a library for Common Lisp which modifies the reader so
> that you can have interpolation within strings similar to Perl or Unix
> Shell scripts. It also provides various ways to insert arbitrary
> characters into literal strings even if your editor/IDE doesn't
> support them. Here's an example:
> 
>   * (let ((a 42))
>       #?"foo: \xC4\N{U with diaeresis}\nbar: ${a}")
>   "foo: ��
>   bar: 42"


Stupid question.  Would it be so hard to make it more FORMAT like?  I.e. 
use ~% for newline etc etc.

Cheers
--
Marco
From: Edi Weitz
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <87vfqfznwt.fsf@bird.agharta.de>
On Thu, 23 Oct 2003 10:53:55 -0400, Marco Antoniotti <·······@cs.nyu.edu> wrote:

> Stupid question.  Would it be so hard to make it more FORMAT like?
> I.e. use ~% for newline etc etc.

No, most likely not.[1] However, my main goal was to follow Perl's
crude syntax because a) it is intended as a supporting library for
CL-PPCRE and b) Perl's shell-like syntax will probably be more
appealing/familiar to "newbies." I have a hard time imagining Lisp
old-timers using my software.

Cheers,
Edi.

[1] Now that I think of it it is probably even easier to (partly)
    support FORMAT's syntax because you don't have that many
    exceptional cases (like Perl's strange scoping rules for \Q,
    etc.).
From: Nikodemus Siivola
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <bn8c7v$38846$2@midnight.cs.hut.fi>
Edi Weitz <···@agharta.de> wrote:

>       #?"foo: \xC4\N{U with diaeresis}\nbar: ${a}")

Very nice!

On a related topic, there's now a Cliki page for macro-characters of
used by various libraries at:

 http://www.cliki.net/Macro%20Characters

Similar in spirit to:

 http://www.cliki.net/Features

Cheers,

  -- Nikodemus
From: Edi Weitz
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <87oew88bas.fsf@bird.agharta.de>
On 23 Oct 2003 10:58:07 GMT, Nikodemus Siivola <········@kallio.cs.hut.fi> wrote:

> On a related topic, there's now a Cliki page for macro-characters of
> used by various libraries at:
> 
>  http://www.cliki.net/Macro%20Characters

Good idea. Perhaps you should link them to the corresponding
packages. Let me guess:

I   infix package from CMU AI repository
?   cl-interpol
`   Michael Parker's clawk
U   (Portable) AllegroServe (?)

Seems that everyone is using sub-characters of #\# because they are
afraid of using up the precious "full" macro characters that are
left... :)

Edi.
From: Nikodemus Siivola
Subject: Re: Announcement: CL-INTERPOL
Date: 
Message-ID: <bn8jd0$4v6$1@nyytiset.pp.htv.fi>
Edi Weitz <···@agharta.de> wrote:

>>  http://www.cliki.net/Macro%20Characters
> 
> Good idea. Perhaps you should link them to the corresponding
> packages. 

Very true. Though I was sort of thinking about the interface /
implementations issue, since I'm thinking of adopting #` for Osicat
for the same purpose it serves in clawk...

Hence there are now fields for both "meaning", and "used by".

> Seems that everyone is using sub-characters of #\# because they are
> afraid of using up the precious "full" macro characters that are
> left... :)

Heh. But maybe for no good reason really, since load binds *readtable*.

Cheers,

 -- Nikodemus