From ctsharpe@earthlink.net Thu Nov 2 05:47:04 2000 Date: Thu, 02 Nov 2000 00:47:04 -0500 From: Christopher Sharpe ctsharpe@earthlink.net Subject: Using hugs
> I have just downloaded the hugs [...]
> The problem is that I don,t really how to make full use of the graphical
> capabilities. Would you please
> sent me some information concerning this matter.

At http://www.dcs.gla.ac.uk/~meurig/TclHaskell/

 you will find a link to TclHaskell, which has a GUI and is easy to use.

Here, for example, is a short program which opens up a window:

	let f = do {w <- window []} in start f

and here another, which stores the title for the window in a mutable
variable:

	let f = do {ref <- newState "how to use state";valueOfRef <- readState
ref;w <- window [];title w valueOfRef} in start f


I'd be interested in hearing from anyone who uses TclHaskell.


From soogin@hotmail.com Wed Nov 8 07:23:35 2000 Date: Wed, 08 Nov 2000 02:23:35 EST From: soo gin ong soogin@hotmail.com Subject: (no subject)
Dear Sir/Madam

Recently I've encountered that my Hugs98 which runs on windows 98 was fine 
until lately i got a message box when i start the program states "This 
application uses CTL3D32.DLL, which is not the correct version. This version 
of CTL3D32.DLL is designed only for Windows NT systems". Could you explain 
what happen ? Thank you

Soo Gin
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.



From mpj@cse.ogi.edu Tue Nov 7 17:50:55 2000 Date: Tue, 7 Nov 2000 09:50:55 -0800 From: Mark P Jones mpj@cse.ogi.edu Subject: (no subject)
| Recently I've encountered that my Hugs98 which runs on windows 98=20
| was fine until lately i got a message box when i start the program
| states "This application uses CTL3D32.DLL, which is not the correct
| version.  This version of CTL3D32.DLL is designed only for Windows NT
| systems". Could you explain what happen ?

You probably installed another piece of software that replaced the
original version of the CTL3D32.DLL on your machine with a version
intended only for Windows NT.  This seems to happen quite often (in
fact it's mentioned on the Hugs download page).  You can find more
background and help with fixes at:

   http://users.ticnet.com/chuckw/ctl3d.htm

All the best,
Mark



From ftaylor@cse.ogi.edu Sat Nov 11 23:28:00 2000 Date: Sat, 11 Nov 2000 15:28:00 -0800 From: Frank Seaton Taylor ftaylor@cse.ogi.edu Subject: Hugs and Mac and GUI
Howdy Folks.

I've been looking for a way to have Hugs on a Mac use a GUI toolkit like
Tcl/Tk. I prowled through the various GUI libraries listed under the
Libraries and Tools For Haskell page under haskell.org and found none
that supported Hugs on a Mac. Did I miss something or am I out of luck?

Thanks,
---Frank Seaton Taylor


From haberg@matematik.su.se Mon Nov 13 10:02:05 2000 Date: Mon, 13 Nov 2000 11:02:05 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 15.28 -0800 0-11-11, Frank Seaton Taylor wrote:
>I've been looking for a way to have Hugs on a Mac use a GUI toolkit like
>Tcl/Tk. I prowled through the various GUI libraries listed under the
>Libraries and Tools For Haskell page under haskell.org and found none
>that supported Hugs on a Mac. Did I miss something or am I out of luck?

The Hugs port that I and Pablo have done is from the point of view of GUI
very no-frills, and does not support any such things:

The problem is that such programming is very time-consuming, and we would
need somebody that has the time and interest specializing in such
programming. (I do not myself even know exactly what Tcl/Tk is, even though
I have seen the name showing up here and there in the posts.)

In addition, the new MacOS X is coming along, aleady existing in a beta
version with GCC available. There appears to be no point in doing any more
development for pre-MacOS X, and in addition, the development will probably
focus on Hugs STG/GHC.

If you want to experiment with GCC under MacOS X, here are some docs:
http://developer.apple.com/techpubs/macosx/DeveloperTools/Compiler/Compiler.pdf
http://developer.apple.com/techpubs/macosx/SystemOverview/SystemOverview.pdf

  Hans Aberg




From reid@cs.utah.edu Mon Nov 13 20:22:06 2000 Date: Mon, 13 Nov 2000 13:22:06 -0700 From: Alastair Reid reid@cs.utah.edu Subject: Hugs and Mac and GUI
Hans Aberg writes:
> In addition, the new MacOS X is coming along, aleady existing in a beta
> version with GCC available.

I doubt that would make much difference - the nice thing about Tcl/Tk is its
portability.  If someone were to spend the time making Tcl/Tk work with Hugs on
the Mac, I don't think they'd be wasting their time.

> in addition, the development will probably focus on Hugs STG/GHC.

STG-Hugs development has been abandoned - so work on Classic Hugs will not go
to waste.

--
Alastair Reid




From nordland@cse.ogi.edu Mon Nov 13 22:21:31 2000 Date: Mon, 13 Nov 2000 14:21:31 -0800 From: Johan Nordlander nordland@cse.ogi.edu Subject: Hugs and Mac and GUI
> 
> 
> Howdy Folks.
> 
> I've been looking for a way to have Hugs on a Mac use a GUI toolkit like
> Tcl/Tk. I prowled through the various GUI libraries listed under the
> Libraries and Tools For Haskell page under haskell.org and found none
> that supported Hugs on a Mac. Did I miss something or am I out of luck?
> 
> Thanks,
> ---Frank Seaton Taylor
> 
> 

The version of O'Hugs that was released September last year did actually contain
an attempt to make the Tk bindings work on a Mac.  The attempt was successful as
far as the actual Tk interface was concerned, but unsuccessful in the sense that
it wouldn't work side-by-side with the SIOUX text-based interface that O'Hugs
(and most Mac versions of Hugs) normally uses.

But this was Tk 8.1.  Newer versions might very well run on the Mac together
with SIOUX.  In fact, trying that out is on my todo list for the upcoming new
release of O'Hugs.  And if anyone is eager to find out even sooner, the
neccessary steps for porting any Tk variant of Hugs to the Mac should just be
installing Tk and setting up the correct paths for the linker.

Providing Tk actually is compatible with SIOUX, that is...

-- Johan


From haberg@matematik.su.se Tue Nov 14 09:21:25 2000 Date: Tue, 14 Nov 2000 10:21:25 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 13.22 -0700 0-11-13, Alastair Reid wrote:
>> In addition, the new MacOS X is coming along, aleady existing in a beta
>> version with GCC available.
>
>I doubt that would make much difference - the nice thing about Tcl/Tk is its
>portability.  If someone were to spend the time making Tcl/Tk work with
>Hugs on
>the Mac, I don't think they'd be wasting their time.

It is not the Tcl/Tk itself I am worrying about, but the graphics hooks to
the MacOS one must provide:

What is called "MacOS X" is actually five entirely different OS's running
side by side, all having in common that they are run by a Mach 3 kernel:
  Classic    MacOS pre-7
  Carbon     MacOS 8-9
  Cocoa      Actual MacOS X
  Java
  4.4BSD
Now, one wouldn't want to implement graphics hooks for the pre-MacOS X,
because that is too low level. It makes better sense doing it for Cocoa or
Java. One might do it for X-windows, too, because there are non-Apple
X-windows servers available for MacOS X.

>STG-Hugs development has been abandoned - so work on Classic Hugs will not go
>to waste.

Thank you for pointing this out. So what is the state of art of the Haskell
interpreters? Will there be a Haskell interpreter available in the future?
Will that be GHI (GHCi)?

  Hans Aberg
                  * Email: Hans Aberg <mailto:haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>




From haberg@matematik.su.se Tue Nov 14 09:23:56 2000 Date: Tue, 14 Nov 2000 10:23:56 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 14.21 -0800 0-11-13, Johan Nordlander wrote:
>The version of O'Hugs that was released September last year did actually
>contain
>an attempt to make the Tk bindings work on a Mac.

What is this O'Hugs you are speaking about?

-- The thing is that Hugs Mac port I and Pablo made consist of two parts,
one that I made and another that Pablo maintained which I think derives
from work you once made. We then combined that into one version.

Would it not be better to combine efforts into one single Mac version?

-- I have removed the DropUNIX package, and implemented AppleEvents on our
version (not yet released).

  Hans Aberg




From Malcolm.Wallace@cs.york.ac.uk Tue Nov 14 11:40:03 2000 Date: Tue, 14 Nov 2000 11:40:03 +0000 From: Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk Subject: Hugs and Mac and GUI
> So what is the state of art of the Haskell
> interpreters? Will there be a Haskell interpreter available in the future?
> Will that be GHI (GHCi)?

Classic Hugs98 will continue to live, and will remain pretty stable.
That is to say, it will incorporate bugfixes, but is unlikely to
incorporate further experimental extensions.  This is a good thing from
the point of view of users, providing a reliable base for learning,
teaching, and developing programs in a standardised language.

There are already other interpreters for Haskell.  `hbi' was the
first ever Haskell interpreter, and it is a very good system indeed.
`GHCi' will be a new interpreter, to be released sometime around the
New Year probably.  `hi' is a Hugs-like interactive interface to
Haskell compilers, looking very like an interpreter.

Regards,
    Malcolm


From haberg@matematik.su.se Tue Nov 14 15:28:58 2000 Date: Tue, 14 Nov 2000 16:28:58 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 11.40 +0000 0-11-14, Malcolm Wallace wrote:
>Classic Hugs98 will continue to live, and will remain pretty stable.
>That is to say, it will incorporate bugfixes, but is unlikely to
>incorporate further experimental extensions.  This is a good thing from
>the point of view of users, providing a reliable base for learning,
>teaching, and developing programs in a standardised language.
>
>There are already other interpreters for Haskell.  `hbi' was the
>first ever Haskell interpreter, and it is a very good system indeed.

I am curious about this "first ever" wording, because as I recall Hugs has
existed a very long time, originating from the Gofer.

>`GHCi' will be a new interpreter, to be released sometime around the
>New Year probably.

Do you know if this interpreter is thread-safe? -- This will be needed for
use with AppleEvent's under MacOS (binary data that programs can send to
each other).

  Hans Aberg




From Malcolm.Wallace@cs.york.ac.uk Tue Nov 14 15:59:28 2000 Date: Tue, 14 Nov 2000 15:59:28 +0000 From: Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk Subject: Hugs and Mac and GUI
| >There are already other interpreters for Haskell.  `hbi' was the
| >first ever Haskell interpreter, and it is a very good system indeed.
| 
| I am curious about this "first ever" wording, because as I recall Hugs has
| existed a very long time, originating from the Gofer.

I believe `hbi' has been available as long as the `hbc' compiler,
since about 1990.  Gofer was first written in about 1991, it became
widely available in about 1992, then Hugs was first released on 14
February 1995.  (Dates from memory + copyright notices.)

| >`GHCi' will be a new interpreter, to be released sometime around the
| >New Year probably.
| 
| Do you know if this interpreter is thread-safe? -- This will be needed for
| use with AppleEvent's under MacOS (binary data that programs can send to
| each other).

Since GHCi is very tightly bound to GHC, if the latter is thread-safe
(which I believe it is), then the former will be also.  For a more
definitive answer, you would need to ask the GHC team.

Regards,
    Malcolm


From nordland@cse.ogi.edu Tue Nov 14 17:17:55 2000 Date: Tue, 14 Nov 2000 09:17:55 -0800 From: Johan Nordlander nordland@cse.ogi.edu Subject: Hugs and Mac and GUI
Hans Aberg wrote:
> 
> At 14.21 -0800 0-11-13, Johan Nordlander wrote:
> >The version of O'Hugs that was released September last year did actually
> >contain
> >an attempt to make the Tk bindings work on a Mac.
> 
> What is this O'Hugs you are speaking about?

O'Hugs is an implementation of O'Haskell, which is an object-oriented extension
to Haskell developed at Chalmers.  Have a look at

   http://www.cs.chalmers.se/~nordland/ohaskell/

O'Hugs itself is a derivative of Hugs 1.3b, consisting of a replacement for the
IO monad, some syntactic enhancements, and a heavily modified type-checker.

> -- The thing is that Hugs Mac port I and Pablo made consist of two parts,
> one that I made and another that Pablo maintained which I think derives
> from work you once made. We then combined that into one version.
> 
> Would it not be better to combine efforts into one single Mac version?

Absolutely!  In fact this might be a good time to do that, since I'm in the
process of taking up the maintenance responsibilities for Classic Hugs.

> -- I have removed the DropUNIX package, and implemented AppleEvents on our
> version (not yet released).

This is good news, since I believe that makes the interpreter responsive to
AppleEvents whenever it attempts to read the command line (right?).  

So let's coordinate our activities.  Is there some place where I can get hold of
your latest sources?

-- Johan


From haberg@matematik.su.se Tue Nov 14 18:12:12 2000 Date: Tue, 14 Nov 2000 19:12:12 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 09.17 -0800 0-11-14, Johan Nordlander wrote:
>O'Hugs is an implementation of O'Haskell, which is an object-oriented
>extension
>to Haskell developed at Chalmers.  Have a look at
>
>   http://www.cs.chalmers.se/~nordland/ohaskell/
>
>O'Hugs itself is a derivative of Hugs 1.3b, consisting of a replacement
>for the
>IO monad, some syntactic enhancements, and a heavily modified type-checker.

OK. Thank you for the info.

>> -- I have removed the DropUNIX package, and implemented AppleEvents on our
>> version (not yet released).
>
>This is good news, since I believe that makes the interpreter responsive to
>AppleEvents whenever it attempts to read the command line (right?).

I tweaked the Hugs sources so that it is always responsive to AppleEvent's:
When an AppleEvent is receive a Hugs primitive is called, and one has
primitives to send AppleEvent's. The conversion goes over Hugs strings via
the AEGizmo's package, plus some extensions I wrote using Flex/Bison. (Some
AppleEvent's are hardwired and not sent to the Haskell interpreter, though.)

This is why I want a thread-safe Hugs version, because if Hugs is up and
running while receiving an event, it may break.

On the other hand, even though experimental, this variation is the
interesting one for everyone wanting to explore the limits of functional
programming and events. :-)

>So let's coordinate our activities.  Is there some place where I can get
>hold of your latest sources?

I will send you the stuff in the mail, if that is OK with you.

  Hans Aberg




From reid@cs.utah.edu Tue Nov 14 21:35:26 2000 Date: Tue, 14 Nov 2000 14:35:26 -0700 From: Alastair Reid reid@cs.utah.edu Subject: Hugs and Mac and GUI
Hans Aberg writes:
> I tweaked the Hugs sources so that it is always responsive to AppleEvent's:
> When an AppleEvent is receive a Hugs primitive is called, and one has
> primitives to send AppleEvent's. The conversion goes over Hugs strings via
> the AEGizmo's package, plus some extensions I wrote using Flex/Bison. (Some
> AppleEvent's are hardwired and not sent to the Haskell interpreter, though.)
>
> This is why I want a thread-safe Hugs version, because if Hugs is up and
> running while receiving an event, it may break.
>
> On the other hand, even though experimental, this variation is the
> interesting one for everyone wanting to explore the limits of functional
> programming and events. :-)

The way we've dealt with Windows and X11 events elsewhere is that events are
placed ina  queue which Haskell code can read out of.  For example, in my
graphics library, events like mouse movement and key strokes are put into a
channel (a threadsafe queue) for the window that receives the queue.  One tends
to run one thread per window whose job is to deal with incoming events -
possibly by forking off another thread to deal with the problem.

Of course, we're limited a bit by the fact that Hugs only has cooperative
multitasking but that works pretty well since most GUI's only deal with one
event at a time anyway - the multi-threading is just a programming convenience.
(Note that I'm not saying "all GUI's" - some would definitely benefit from
preemptive multitasking.)

--
Alastair Reid






From haberg@matematik.su.se Wed Nov 15 09:43:42 2000 Date: Wed, 15 Nov 2000 10:43:42 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 14.35 -0700 0-11-14, Alastair Reid wrote:
>> I tweaked the Hugs sources so that it is always responsive to AppleEvent's:
>> When an AppleEvent is receive a Hugs primitive is called, and one has
>> primitives to send AppleEvent's. The conversion goes over Hugs strings via
>> the AEGizmo's package, plus some extensions I wrote using Flex/Bison. (Some
>> AppleEvent's are hardwired and not sent to the Haskell interpreter, though.)
>>
>> This is why I want a thread-safe Hugs version, because if Hugs is up and
>> running while receiving an event, it may break.
>>
>> On the other hand, even though experimental, this variation is the
>> interesting one for everyone wanting to explore the limits of functional
>> programming and events. :-)
>
>The way we've dealt with Windows and X11 events elsewhere is that events are
>placed ina  queue which Haskell code can read out of.  For example, in my
>graphics library, events like mouse movement and key strokes are put into a
>channel (a threadsafe queue) for the window that receives the queue.  One
>tends
>to run one thread per window whose job is to deal with incoming events -
>possibly by forking off another thread to deal with the problem.

The MacOS uses different types of events, low-level events for mouse
clicks, GUI etc., and high-level events, called AppleEvent's, for
communication between programs.

The low-level events are put into a queue by the OS, but I have not made a
way for the Haskell code to read them. It might be a good idea though.

I figure you build your own queues will allow to store low-level events for
a longer period of time (like seconds). Right?

For the high-level events, the AppleEvent's, one really want the Haskell
code to have a look at them as soon as they arrive. For one thing, they
often expire fairly soon, making a later reply impossible.

>Of course, we're limited a bit by the fact that Hugs only has cooperative
>multitasking but that works pretty well since most GUI's only deal with one
>event at a time anyway - the multi-threading is just a programming
>convenience.
>(Note that I'm not saying "all GUI's" - some would definitely benefit from
>preemptive multitasking.)

If I should do any graphics programming, that should be multi-threaded,
under MacOS X, then. I have done some graphics programming under
cooperative multitasking, and I think it is too time-consuming, and does
not lead to the structures I am interested in.

So would still want to see a version of Hugs, or another interpreter which
is thread-safe at least in its simplest form, that one can interrupt the
current computations, set forth with some other for a while, and then
return to the original.

Note that this is not even full multi-tasking, because the interrupts are
here stacked: One returns to the old computations in the reverse order of
the interrupts. -- In true multi-tasking, one should be able to compute and
halt the different threads in any order.

  Hans Aberg
                  * Email: Hans Aberg <mailto:haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>




From haberg@matematik.su.se Fri Nov 17 10:10:42 2000 Date: Fri, 17 Nov 2000 11:10:42 +0100 From: Hans Aberg haberg@matematik.su.se Subject: Hugs and Mac and GUI
At 14.35 -0700 0-11-14, Alastair Reid wrote:
>The way we've dealt with Windows and X11 events elsewhere is that events are
>placed ina  queue which Haskell code can read out of.  For example, in my
>graphics library, events like mouse movement and key strokes are put into a
>channel (a threadsafe queue) for the window that receives the queue.  One
>tends
>to run one thread per window whose job is to deal with incoming events -
>possibly by forking off another thread to deal with the problem.

I looked a little bit on MacOS X, and it seems it has a mechanism doing
this stuff for you with respect to low-level events (the OS providing
queues for each window). In addition unhandled events can migrate up to the
object above it belongs to, eventually up to the program itself. There was
some changes made to the classical event handling mechanism (I do not
recall exactly what), so that windows can fade away instead of disappearing
abruptly when closed. I think it had to something do with the ownership of
events.

A Hugs port then would merely need to have a mechanism reading into those
queues. But I think a threaded version of Hugs would be better, so that one
could set interrupts for certain types of arriving events, and safely
execute some Haskell functions handling it, the way I unsafely made it for
high-level events.

So, again, it seems that one is better off porting to MacOS X, and not
earlier versions of the MacOS.

  Hans Aberg




From phoenix@esther.donga.ac.kr Sat Nov 25 12:02:16 2000 Date: Sat, 25 Nov 2000 21:02:16 +0900 From: Wooseok Yang phoenix@esther.donga.ac.kr Subject: unsubscribe hugs-users
dW5zdWJzY3JpYmUgaHVncy11c2Vycw0K