From: Erann Gat
Subject: MCL on OS X newline hack
Date: 
Message-ID: <gNOSPAMat-88AC68.12183914052004@nntp1.jpl.nasa.gov>
If MCL's schizophrenia about newlines is giving you fits you might find 
the following hack to be salubrious:

  (defun lf2cr (w)
    (ccl::window-replace-all w (string #\linefeed) (string #\return)))

  (defmethod initialize-instance :after ((f fred-window) &rest initargs)
    (declare (ignore initargs))
    (let ( (b (fred-buffer f)) )
      (if (and (buffer-string-pos b (string #\linefeed))
               (not (buffer-string-pos b (string #\return))))
        (lf2cr f))))

E.

From: David Steuber
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <87hduicsl7.fsf@david-steuber.com>
Erann Gat <·········@flownet.com> writes:

> If MCL's schizophrenia about newlines is giving you fits you might find 
> the following hack to be salubrious:

Thank you.  I learned a new word today:

http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=salubrious&x=10&y=13

>   (defun lf2cr (w)
>     (ccl::window-replace-all w (string #\linefeed) (string #\return)))
> 
>   (defmethod initialize-instance :after ((f fred-window) &rest initargs)
>     (declare (ignore initargs))
>     (let ( (b (fred-buffer f)) )
>       (if (and (buffer-string-pos b (string #\linefeed))
>                (not (buffer-string-pos b (string #\return))))
>         (lf2cr f))))

So not only is Lisp the language where (if 0 'true 'false) => TRUE, it
encourages the use of baby names in symbols without being obfuscated.
So what about barney, wilma, and betty?

:-)

I'll have to remember this code in case I have problems with OpenMCL
or SBCL on my Mac.  Thanks for posting it.  Salubrity is a good thing.

Sobriety, however, sucks.

-- 
I wouldn't mind the rat race so much if it wasn't for all the damn cats.
From: mikel
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <ohgpc.48838$1r1.30446@newssvr29.news.prodigy.com>
David Steuber wrote:
> Erann Gat <·········@flownet.com> writes:
> 
> 
>>If MCL's schizophrenia about newlines is giving you fits you might find 
>>the following hack to be salubrious:
> 
> 
> Thank you.  I learned a new word today:
> 
> http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=salubrious&x=10&y=13
> 
> 
>>  (defun lf2cr (w)
>>    (ccl::window-replace-all w (string #\linefeed) (string #\return)))
>>
>>  (defmethod initialize-instance :after ((f fred-window) &rest initargs)
>>    (declare (ignore initargs))
>>    (let ( (b (fred-buffer f)) )
>>      (if (and (buffer-string-pos b (string #\linefeed))
>>               (not (buffer-string-pos b (string #\return))))
>>        (lf2cr f))))
> 
> 
> So not only is Lisp the language where (if 0 'true 'false) => TRUE, it
> encourages the use of baby names in symbols without being obfuscated.
> So what about barney, wilma, and betty?

I learned Common Lisp using Macintosh Common Lisp way back when it was 
Coral Common Lisp, and consequently have used those names for years for 
throwaway variables.

That said, just in case it isn't clear, fred is the emacs-like editor 
built into Macintosh Common Lisp.
From: David Steuber
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <874qqijgmh.fsf@david-steuber.com>
mikel <·····@evins.net> writes:

> David Steuber wrote:
> > Erann Gat <·········@flownet.com> writes:
> >
> >> If MCL's schizophrenia about newlines is giving you fits you might
> >> find the following hack to be salubrious:
> > Thank you.  I learned a new word today:
> > http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=salubrious&x=10&y=13
> >
> >>  (defun lf2cr (w)
> >>    (ccl::window-replace-all w (string #\linefeed) (string #\return)))
> >>
> >>  (defmethod initialize-instance :after ((f fred-window) &rest initargs)
> >>    (declare (ignore initargs))
> >>    (let ( (b (fred-buffer f)) )
> >>      (if (and (buffer-string-pos b (string #\linefeed))
> >>               (not (buffer-string-pos b (string #\return))))
> >>        (lf2cr f))))
> > So not only is Lisp the language where (if 0 'true 'false) => TRUE,
> > it
> > encourages the use of baby names in symbols without being obfuscated.
> > So what about barney, wilma, and betty?
> 
> I learned Common Lisp using Macintosh Common Lisp way back when it was
> Coral Common Lisp, and consequently have used those names for years
> for throwaway variables.
> 
> That said, just in case it isn't clear, fred is the emacs-like editor
> built into Macintosh Common Lisp.

I did not know that.  And here I was thinking that Erann was being
very clever with variable names.  I have been using Peanuts
characters.

So how much longer until OpenMCL gets bindings to run inside Xcode
with an Emacs like editor and total integration with that tool suite?
Wouldn't it be nice to use Interface Builder and all that jazz for CL
apps on OS X?

I am also wondering if Tiger will break stuff.

-- 
I wouldn't mind the rat race so much if it wasn't for all the damn cats.
From: mikel
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <_aqpc.67426$Nb5.42072@newssvr25.news.prodigy.com>
David Steuber wrote:

> mikel <·····@evins.net> writes:
> 
> 
>>David Steuber wrote:
>>
>>>Erann Gat <·········@flownet.com> writes:
>>>
>>>
>>>>If MCL's schizophrenia about newlines is giving you fits you might
>>>>find the following hack to be salubrious:
>>>
>>>Thank you.  I learned a new word today:
>>>http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=salubrious&x=10&y=13
>>>
>>>
>>>> (defun lf2cr (w)
>>>>   (ccl::window-replace-all w (string #\linefeed) (string #\return)))
>>>>
>>>> (defmethod initialize-instance :after ((f fred-window) &rest initargs)
>>>>   (declare (ignore initargs))
>>>>   (let ( (b (fred-buffer f)) )
>>>>     (if (and (buffer-string-pos b (string #\linefeed))
>>>>              (not (buffer-string-pos b (string #\return))))
>>>>       (lf2cr f))))
>>>
>>>So not only is Lisp the language where (if 0 'true 'false) => TRUE,
>>>it
>>>encourages the use of baby names in symbols without being obfuscated.
>>>So what about barney, wilma, and betty?
>>
>>I learned Common Lisp using Macintosh Common Lisp way back when it was
>>Coral Common Lisp, and consequently have used those names for years
>>for throwaway variables.
>>
>>That said, just in case it isn't clear, fred is the emacs-like editor
>>built into Macintosh Common Lisp.
> 
> 
> I did not know that.  And here I was thinking that Erann was being
> very clever with variable names.  I have been using Peanuts
> characters.

As Antonio Leitao said elsewhere, "Fred Resembles Emacs Deliberately". 
It's a pretty good implementation. Maybe a little more different from 
GNU Emacs than Xemacs is, but partly that's because it tried fairly 
successfully to be more Mac-like than those editors.

When Apple was working on the Apple Dylan development environment, the 
IDE used to build it was MCL, and fred was the editor. At the same time 
that was going on, I was working on a version of Newton OS that was 
built in Dylan. Dylan had a lisp-like syntax then, and the development 
environment for Newton, called Leibniz, was an extended version of MCL, 
with the fred editor and separate listeners for Common Lisp and 
(cross-compiled) Dylan.

> So how much longer until OpenMCL gets bindings to run inside Xcode
> with an Emacs like editor and total integration with that tool suite?
> Wouldn't it be nice to use Interface Builder and all that jazz for CL
> apps on OS X?

So hop over to common-lisp.net and join up on the Clotho mailing lists. 
Submit some code and I'll give you commit privileges.

Clotho is not intended to run inside XCode (lisp environments inside 
galactic federated IDEs does not seem to me like the Right Thing), but 
we do plan to make it read and write nibfiles and build app bundles and 
all of that.

> I am also wondering if Tiger will break stuff.

Undoubtedly.
From: David Steuber
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <878yfttgco.fsf@david-steuber.com>
mikel <·····@evins.net> writes:

> David Steuber wrote:
> 
> > So how much longer until OpenMCL gets bindings to run inside Xcode
> > with an Emacs like editor and total integration with that tool suite?
> > Wouldn't it be nice to use Interface Builder and all that jazz for CL
> > apps on OS X?
> 
> So hop over to common-lisp.net and join up on the Clotho mailing
> lists. Submit some code and I'll give you commit privileges.
> 
> Clotho is not intended to run inside XCode (lisp environments inside
> galactic federated IDEs does not seem to me like the Right Thing), but
> we do plan to make it read and write nibfiles and build app bundles
> and all of that.

I'll look into doing that.

I also think I would like to get OpenMCL from the source and have it
installed under ~/usr.  Darwin Ports has not upgraded since the last
time I looked.  Also, if I ever write an OS X app using OpenMCL, it
would be a lot easier for me to publish it in an app bundle if I knew
how it all went together.  Darwin Ports is almost a black box
install.  It is nice for dependencies.  I don't think OpenMCL had any
though.

> > I am also wondering if Tiger will break stuff.
> 
> Undoubtedly.

That is the suck.  I had problems going from Jaguar to Panther.  All
to do with Emacs braking which was fixed with a simple recompile.
SBCL was a harder break.  Brian Mastenbrook came up with a fix for
that.  The thing is, I only have one Mac and zero desire to run more
than one version of OS X.  It also took me about three or four weeks
to upgrade from Jaguar to Panther.  I do not know if I will be so
quick (or slow) when Tiger comes out.

When it comes to distributing an app file for OS X, one thing is
certain.  The end user should not care that it is written in Lisp,
Objective-C, or whatever.

-- 
I wouldn't mind the rat race so much if it wasn't for all the damn cats.
From: Antonio Menezes Leitao
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <pan.2004.05.15.06.46.39.886484@evaluator.pt>
On Sat, 15 May 2004 03:39:01 +0000, mikel wrote:

> David Steuber wrote:

> [...]
> That said, just in case it isn't clear, fred is the emacs-like editor 
> built into Macintosh Common Lisp.

IIRC, Fred Resembles Emacs Deliberately.

Antonio Leitao
From: Bruce Hoult
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <bruce-0C606C.20151615052004@copper.ipg.tsnz.net>
In article <······························@evaluator.pt>,
 Antonio Menezes Leitao <··············@evaluator.pt> wrote:

> > That said, just in case it isn't clear, fred is the emacs-like editor 
> > built into Macintosh Common Lisp.
> 
> IIRC, Fred Resembles Emacs Deliberately.

I never saw the point of doing that.

After years of working on Unix boxes where GNU emacs is the best editing 
choice available, my fingers "know" the emacs key bindings.  But they 
also "know" the CodeWarrior ones just as well, and the MSVS ones.  There 
is nothing magic, or super-efficient, about the emacs bindings that 
would make me want them in a different editor.

In fact it's worse than that.  If my fingers think they're in emacs then 
they're going to type things such as C-x d and expect to get a directory 
listing, or C-x v = to compare the file to what I checked out, or M-x 
shell to get a shell.  If I *don't* get those responses then I'm going 
to get rudely jolted out of my stream of thought, and no doubt scream 
and curse at the stoooopid editor.

Or am I deluded?

-- Bruce
From: Svein Ove Aas
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <_Ekpc.1610$RL3.35073@news2.e.nsc.no>
Bruce Hoult wrote:

> In article <······························@evaluator.pt>,
>  Antonio Menezes Leitao <··············@evaluator.pt> wrote:
> 
>> > That said, just in case it isn't clear, fred is the emacs-like editor
>> > built into Macintosh Common Lisp.
>> 
>> IIRC, Fred Resembles Emacs Deliberately.
> 
> I never saw the point of doing that.
> 
> After years of working on Unix boxes where GNU emacs is the best editing
> choice available, my fingers "know" the emacs key bindings.  But they
> also "know" the CodeWarrior ones just as well, and the MSVS ones.  There
> is nothing magic, or super-efficient, about the emacs bindings that
> would make me want them in a different editor.
> 
> In fact it's worse than that.  If my fingers think they're in emacs then
> they're going to type things such as C-x d and expect to get a directory
> listing, or C-x v = to compare the file to what I checked out, or M-x
> shell to get a shell.  If I *don't* get those responses then I'm going
> to get rudely jolted out of my stream of thought, and no doubt scream
> and curse at the stoooopid editor.

So use Emacs. No such problems. :P
 
> Or am I deluded?

Well, if you think you're in Emacs when, in fact, you aren't, then that
qualifies as delusion, yes.
From: mikel
Subject: Re: MCL on OS X newline hack
Date: 
Message-ID: <Mgqpc.67428$se5.13600@newssvr25.news.prodigy.com>
Bruce Hoult wrote:

> In article <······························@evaluator.pt>,
>  Antonio Menezes Leitao <··············@evaluator.pt> wrote:
> 
> 
>>>That said, just in case it isn't clear, fred is the emacs-like editor 
>>>built into Macintosh Common Lisp.
>>
>>IIRC, Fred Resembles Emacs Deliberately.
> 
> 
> I never saw the point of doing that.
> 
> After years of working on Unix boxes where GNU emacs is the best editing 
> choice available, my fingers "know" the emacs key bindings.  But they 
> also "know" the CodeWarrior ones just as well, and the MSVS ones.  There 
> is nothing magic, or super-efficient, about the emacs bindings that 
> would make me want them in a different editor.
> 
> In fact it's worse than that.  If my fingers think they're in emacs then 
> they're going to type things such as C-x d and expect to get a directory 
> listing, or C-x v = to compare the file to what I checked out, or M-x 
> shell to get a shell.  If I *don't* get those responses then I'm going 
> to get rudely jolted out of my stream of thought, and no doubt scream 
> and curse at the stoooopid editor.
> 
> Or am I deluded?

You could ask Gary Byers or Gail Zacharias, but I suspect it's a simple 
matter that Coral Common Lisp was written by people familiar with Emacs 
and Zmacs, who wanted a familiar editor in the Lisp they implemented for 
the Mac. Hemlock is one of those, too. There have been many Emacsen in 
the grand scheme of things, and if you use fred a lot, it becomes your 
native emacs. I know from personal experience that you can make the most 
irritating discrepancies from GNU Emacs go away with a little fred code, 
and fred is arguably nicer in many ways on MacOS 9 than GNU Emacs, at 
least if you're used to Mac appplications.

(Of course, point is moot for me nowadays, because I haven't touched OS 
9 in about 2 years now.)