Hugs for MacOS X
Hans Aberg
haberg@matematik.su.se
Tue, 2 Jul 2002 14:06:35 +0200
[I think that the appropriate newsgroup is probably hugs-bugs@haskell.org,
so followups should probably only be set there.]
At 12:24 +0800 2002/07/02, Lyndon While wrote:
>We are considering applying to the Apple University Development Fund
>for support to build an integrated development environment for MacOS
>X based on the (already-ported) Hugs engine.
There was a thread in the Hugs-Bugs list "Graphics with XDarwin on Mac OS
X". Is this the "already ported" engine you are referring to (also see
below)?
>2. Is anyone working on this sort of environment already?
The version that Pablo Azero and I made for MacOS pre-X is down, and I do
not know anybody taking up a successor project for that platform. Johan
Nordlander made his own version for use on the Hugs-Bugs site, but that was
essentially starting from scratch version, ignoring the work that Pablo and
I had made over the years. Over the years, a few, but not many, fellows
expressed interest in working with the sources that Pablo Azero and I had
developed, but I did not hear anything about outputs resulting from that.
As for MacOS X, I have not heard of any such project.
> We're not thinking of a
>huge project: probably initially we will build something roughly like
>the MacGofer environment (those were the days!), with an integrated
>editor, command-line editing, colour-coded syntax a la the
>Haskell-mode in emacs, etc. With the size (and general naivety) of
>the class, the initial emphasis will be on reliability.
>
>My questions are:
>
>1. Would this be of interest to other groups who use Hugs on Macintoshes?
> (Statements of interest may increase our chances of success with AUDF.)
I think that there might be a general interest. My hope for the pre-X
version was that it might be developed so that many might do develop the
parts they were interest in, but in reality, only Pablo and I developed on
the MacOS version.
But perhaps this idea might be possible for MacOS X.
>3. Does anyone know any reason that this sort of endeavour might be
> harder than we expect?
MacOS pre-X programming was extremely time-consuming: Kevin Hammond, who
made the MacGofer, mentioned that he spent more time on the MacGofer MacOS
GUI than what had been at that time been spent totally on developing the
Hugs kernel itself.
Because of this, I think that one should avoid doing anything with MacOS
pre-X, when MacOS X now is widely available. The MacOS pre-X version that I
and Pablo made is essentially dead, except for those that only has MacOS
pre-X: Nearly all features were there in order to cover up for the fact
that MacOS pre-X was not even UNIX like. The only exception was the
experimental AppleEvent's feature; but I do not know how AppleEvent's work
under MacOS X, and making the feature non-experimental would require to
synch the Hugs kernel GC system with externally interrupting AppleEvent's
sent to the Hugs kernel (or even better, making the Hugs kernel
thread-proof).
As for developing for MacOS X, which I think is a Objective C threaded
version derived from the NeXT machine, those OO and threading features
might cut down on development time. But I still suspect that the best
strategy might be to do as little MacOS X GUI work as possible.
So I think that the first question that you should consider is whether the
program should be wholly independent of X-windows or not:
As mentioned above, it seems that one has been able to run the Hugs
X-Windows version on XDarwin. You might want to check if it is not best to
have all versions requiring XDarwin, and then merely do the MacOS X
additions that fall without that. This could be things like adding Haskell
control over AppleEvent's and multimedia features not available via
X-Windows.
But if requiring XDarwin is not feasible, then you might do a wholly new
MacOS X Darwin GUI.
Building a wholly new editor is probably going to be very time consuming:
In the MacOS pre-X version, we modified the wondows console that came with
the CcodeWarrior compiler. It is better to wrok with proper editor sources,
though. But unless you find some good source to start with, it may becoe
very time consuming, I suspect.
If you work with XDarwin, then perhaps XEmacs is available as well, and you
can work with that one, just building some extra Macish hooks. Richard
Stall said he want to enhance Emacs so that it has the capacity of IDE
(Integrated Development Environment) like CodeWarrior. Again, it is
important to cut development time.
If you want to make a wholly Macish version, then perhaps you can find a
suitable program to integrate your Hugs version with. For the MacOS pre-X,
I considered BBEdit and Alpha, but it turned out to be simpler to merely
modify and enhance the compiler console sources. -- But I would discourage
you to modify console sources, as they will outdate, and further may not be
efficiently written for modification. I just did that in order to quickly
get a working interface.
Perhaps you will decide to make both versions: But choosing development
strategy will depend a lot on how much programming time you have available.
Summing it up, I suspect that choosing development strategies will depend a
lot on how to cut development time, even though MacOS X programming in
itself should be interesting, in view that it is now one of the more
advanced OS's available.
Hans Aberg