From: Kenneth Tilton
Subject: MCL 5 vs Unix files
Date: 
Message-ID: <ktilton-F0DA73.16012004112004@nyctyp02-ge0.rdc-nyc.rr.com>
I'll be heading over to the MCL mailing list with this shortly, but I 
thought I would check in here since youse guys are so quick to respond.

I have the MCL 5 demo. I have asdf.lisp. Recently pulled down using 
ViewCVS or whatever that web thingy is, direct to Mac OS X. (This 
problem also applies to UFFI and my own source, but I am using ASDF as 
my example. Note also that I have no problem with the same source under 
Lispworks Trial for mac.)

I have to use the MCL5 File>Open Unix... menu item or mcl thinks it is 
one line long. Fine, I use "Open Unix...".

But i do not really want to open it. I want to load it. Unfortunately, 
there is no load-unix function. Loading it yields no definitions, i am 
guessing because the reader also sees one long line, a comment.

So I open-unix it, select all and evaluate and asdf gets built. But now 
ASDF cannot find anything inside uffi.asd, i guess because it thinks it 
is all one comment line.

Am I missing something insanely simple? Or do I have to write a little 
code to convert Lisp source to something MCL can eat? Other?

kenny

From: Kenneth Tilton
Subject: Re: MCL 5 vs Unix files
Date: 
Message-ID: <ktilton-8AA376.16212204112004@nyctyp02-ge0.rdc-nyc.rr.com>
In article <·····························@nyctyp02-ge0.rdc-nyc.rr.com>,
 Kenneth Tilton <·······@nyc.rr.com> wrote:

> I'll be heading over to the MCL mailing list with this shortly, but I 
> thought I would check in here since youse guys are so quick to respond.
> 
> I have the MCL 5 demo. I have asdf.lisp. Recently pulled down using 
> ViewCVS or whatever that web thingy is, direct to Mac OS X. (This 
> problem also applies to UFFI and my own source, but I am using ASDF as 
> my example. Note also that I have no problem with the same source under 
> Lispworks Trial for mac.)
> 
> I have to use the MCL5 File>Open Unix... menu item or mcl thinks it is 
> one line long. Fine, I use "Open Unix...".
> 
> But i do not really want to open it. I want to load it. Unfortunately, 
> there is no load-unix function. 

OK, I just noticed the File menu items to load or compile unix files, 
but that does not help ASDF with its batch processing of the unix files. 

I guess I better just write a conversion utility.

kt
From: Dave Seaman
Subject: Re: MCL 5 vs Unix files
Date: 
Message-ID: <cme7ed$ckg$1@mozo.cc.purdue.edu>
On Thu, 04 Nov 2004 21:12:29 GMT, Kenneth Tilton wrote:
> In article <·····························@nyctyp02-ge0.rdc-nyc.rr.com>,
>  Kenneth Tilton <·······@nyc.rr.com> wrote:

>> I'll be heading over to the MCL mailing list with this shortly, but I 
>> thought I would check in here since youse guys are so quick to respond.
>> 
>> I have the MCL 5 demo. I have asdf.lisp. Recently pulled down using 
>> ViewCVS or whatever that web thingy is, direct to Mac OS X. (This 
>> problem also applies to UFFI and my own source, but I am using ASDF as 
>> my example. Note also that I have no problem with the same source under 
>> Lispworks Trial for mac.)
>> 
>> I have to use the MCL5 File>Open Unix... menu item or mcl thinks it is 
>> one line long. Fine, I use "Open Unix...".
>> 
>> But i do not really want to open it. I want to load it. Unfortunately, 
>> there is no load-unix function. 

> OK, I just noticed the File menu items to load or compile unix files, 
> but that does not help ASDF with its batch processing of the unix files. 

> I guess I better just write a conversion utility.

There is a conversion utility built in to MCL, though not particularly
well documented.

If you open a file in Fred and it looks like a single line, type <ctrl-x>
<ctrl-f> to convert the linefeeds to carriage returns, thus making it
readable to MCL.

And if you have trouble remembering this, as I do, then select Tools ->
Fred Commands, and start typing "linefeed" in the "Contains:" box.  By
the time you get to the "f" there will be only one match, a function
called (ED-XFORM-LINEFEEDS), whose keyboard shortcut is listed as c-x
c-f.


-- 
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
From: Ron Garret
Subject: Re: MCL 5 vs Unix files
Date: 
Message-ID: <rNOSPAMon-3C2BD9.13460304112004@nntp1.jpl.nasa.gov>
In article <············@mozo.cc.purdue.edu>,
 Dave Seaman <·······@no.such.host> wrote:

> On Thu, 04 Nov 2004 21:12:29 GMT, Kenneth Tilton wrote:
> > In article <·····························@nyctyp02-ge0.rdc-nyc.rr.com>,
> >  Kenneth Tilton <·······@nyc.rr.com> wrote:
> 
> >> I'll be heading over to the MCL mailing list with this shortly, but I 
> >> thought I would check in here since youse guys are so quick to respond.
> >> 
> >> I have the MCL 5 demo. I have asdf.lisp. Recently pulled down using 
> >> ViewCVS or whatever that web thingy is, direct to Mac OS X. (This 
> >> problem also applies to UFFI and my own source, but I am using ASDF as 
> >> my example. Note also that I have no problem with the same source under 
> >> Lispworks Trial for mac.)
> >> 
> >> I have to use the MCL5 File>Open Unix... menu item or mcl thinks it is 
> >> one line long. Fine, I use "Open Unix...".
> >> 
> >> But i do not really want to open it. I want to load it. Unfortunately, 
> >> there is no load-unix function. 
> 
> > OK, I just noticed the File menu items to load or compile unix files, 
> > but that does not help ASDF with its batch processing of the unix files. 
> 
> > I guess I better just write a conversion utility.
> 
> There is a conversion utility built in to MCL, though not particularly
> well documented.
> 
> If you open a file in Fred and it looks like a single line, type <ctrl-x>
> <ctrl-f> to convert the linefeeds to carriage returns, thus making it
> readable to MCL.
> 
> And if you have trouble remembering this, as I do, then select Tools ->
> Fred Commands, and start typing "linefeed" in the "Contains:" box.  By
> the time you get to the "f" there will be only one match, a function
> called (ED-XFORM-LINEFEEDS), whose keyboard shortcut is listed as c-x
> c-f.

You can also set CCL::*DO-UNIX-HACK* to T and MCL will do this 
conversion automatically when you open a file.  (You can also meta-. on 
this variable to get the source code that does this work, at which point 
you can customize the behavior to your heart's content.)

rg
From: Kenneth Tilton
Subject: Re: MCL 5 vs Unix files
Date: 
Message-ID: <ktilton-7C3043.19325304112004@nyctyp02-ge0.rdc-nyc.rr.com>
In article <·······························@nntp1.jpl.nasa.gov>,
 Ron Garret <·········@flownet.com> wrote:

> In article <············@mozo.cc.purdue.edu>,
>  Dave Seaman <·······@no.such.host> wrote:
> 
> > On Thu, 04 Nov 2004 21:12:29 GMT, Kenneth Tilton wrote:
> > > In article <·····························@nyctyp02-ge0.rdc-nyc.rr.com>,
> > >  Kenneth Tilton <·······@nyc.rr.com> wrote:
> > 
> > >> I'll be heading over to the MCL mailing list with this shortly, but I 
> > >> thought I would check in here since youse guys are so quick to respond.
> > >> 
> > >> I have the MCL 5 demo. I have asdf.lisp. Recently pulled down using 
> > >> ViewCVS or whatever that web thingy is, direct to Mac OS X. (This 
> > >> problem also applies to UFFI and my own source, but I am using ASDF as 
> > >> my example. Note also that I have no problem with the same source under 
> > >> Lispworks Trial for mac.)
> > >> 
> > >> I have to use the MCL5 File>Open Unix... menu item or mcl thinks it is 
> > >> one line long. Fine, I use "Open Unix...".
> > >> 
> > >> But i do not really want to open it. I want to load it. Unfortunately, 
> > >> there is no load-unix function. 
> > 
> > > OK, I just noticed the File menu items to load or compile unix files, 
> > > but that does not help ASDF with its batch processing of the unix files. 
> > 
> > > I guess I better just write a conversion utility.
> > 
> > There is a conversion utility built in to MCL, though not particularly
> > well documented.
> > 
> > If you open a file in Fred and it looks like a single line, type <ctrl-x>
> > <ctrl-f> to convert the linefeeds to carriage returns, thus making it
> > readable to MCL.
> > 
> > And if you have trouble remembering this, as I do, then select Tools ->
> > Fred Commands, and start typing "linefeed" in the "Contains:" box.  By
> > the time you get to the "f" there will be only one match, a function
> > called (ED-XFORM-LINEFEEDS), whose keyboard shortcut is listed as c-x
> > c-f.
> 
> You can also set CCL::*DO-UNIX-HACK* to T and MCL will do this 
> conversion automatically when you open a file.  (You can also meta-. on 
> this variable to get the source code that does this work, at which point 
> you can customize the behavior to your heart's content.)
> 
> rg

Thx, Ron. Note to Lisp newbies: I actually found this on my own by using 
apropos on "unix", assuming that the three unix file menu items were 
achieved via (let ((<some-unix-special> t)) <usual-load-logic>).

Unfortunately, wrapping the asdf build of uffi in such a dynamic binding 
did not work. :( hey, maybe I mistyped it, I'll try again. when it did 
not work I just figured I had guessed wrong.

Thx to everyone for the pointers.

kenny
From: Edi Weitz
Subject: Re: MCL 5 vs Unix files
Date: 
Message-ID: <u4qk5i9zb.fsf@agharta.de>
On Thu, 04 Nov 2004 21:12:29 GMT, Kenneth Tilton <·······@nyc.rr.com> wrote:

> I guess I better just write a conversion utility.

You should be able to use recode:

  <http://www.gnu.org/software/recode/recode.html>

Probably something like 

  recode mac..latin1 *.lisp

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Thomas A. Russ
Subject: Re: MCL 5 vs Unix files
Date: 
Message-ID: <ymi1xf48bz0.fsf@sevak.isi.edu>
Kenneth Tilton <·······@nyc.rr.com> writes:

> Am I missing something insanely simple? Or do I have to write a little 
> code to convert Lisp source to something MCL can eat? Other?

I found that the simplest solution was to add this to my init.lisp file
for MCL.  Put init.lisp in the same folder as the demo:

  (setq ccl::*linefeed-equals-newline* t)

Then MCL can read both Mac-style and Unix-style files.

-- 
Thomas A. Russ,  USC/Information Sciences Institute