Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MCL 5 vs Unix files

0 views
Skip to first unread message

Kenneth Tilton

unread,
Nov 4, 2004, 3:52:28 PM11/4/04
to
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

Kenneth Tilton

unread,
Nov 4, 2004, 4:12:29 PM11/4/04
to
In article <ktilton-F0DA73...@nyctyp02-ge0.rdc-nyc.rr.com>,
Kenneth Tilton <kti...@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

Edi Weitz

unread,
Nov 4, 2004, 4:24:08 PM11/4/04
to
On Thu, 04 Nov 2004 21:12:29 GMT, Kenneth Tilton <kti...@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 "spam...@agharta.de" 5) "edi")

Dave Seaman

unread,
Nov 4, 2004, 4:37:17 PM11/4/04
to

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>

Ron Garret

unread,
Nov 4, 2004, 4:46:03 PM11/4/04
to
In article <cme7ed$ckg$1...@mozo.cc.purdue.edu>,
Dave Seaman <dse...@no.such.host> wrote:

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

Kenneth Tilton

unread,
Nov 4, 2004, 7:24:00 PM11/4/04
to
In article <rNOSPAMon-3C2BD...@nntp1.jpl.nasa.gov>,
Ron Garret <rNOS...@flownet.com> wrote:

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

Thomas A. Russ

unread,
Nov 8, 2004, 12:52:35 PM11/8/04
to
Kenneth Tilton <kti...@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

0 new messages