From koen@cs.chalmers.se Fri Oct 13 16:51:24 2000 Date: Fri, 13 Oct 2000 17:51:24 +0200 (MET DST) From: Koen Claessen koen@cs.chalmers.se Subject: C-libraries and Control-C
Hi all,

I have linked a C-library to Hugs (I used H/Direct).

What I want is that some cleaning up of the C-libraries
state is done when the user presses control-C. Is there
any way to specify this without recompiling Hugs?

Thanks,
Koen.

--
Koen Claessen         http://www.cs.chalmers.se/~koen     
phone:+46-31-772 5424      mailto:koen@cs.chalmers.se
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden



From haberg@matematik.su.se Fri Oct 13 18:47:08 2000 Date: Fri, 13 Oct 2000 19:47:08 +0200 From: Hans Aberg haberg@matematik.su.se Subject: C-libraries and Control-C
At 17.51 +0200 0-10-13, Koen Claessen wrote:
>I have linked a C-library to Hugs (I used H/Direct).
>
>What I want is that some cleaning up of the C-libraries
>state is done when the user presses control-C. Is there
>any way to specify this without recompiling Hugs?

I do not know the answer of this question -- and you do not say which Hugs
you are using -- probably STG under UNIX.

If you want to tweak Hugs 98 though while awaiting the answer from the
experts, you could put in your private my_cleanup() either where ctrlbrk()
jumps on your platform if the cleanup should only take place when an
interrupt occurs, or at the beginning at interpreter() right after the
setjump, if you want the cleanup always take place when Hugs resets its
state.

  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 F.Nossin@student.tue.nl Wed Oct 25 11:02:39 2000 Date: Wed, 25 Oct 2000 12:02:39 +0200 From: Nossin, F. F.Nossin@student.tue.nl Subject: question about a sort algorithm
Is there a library available in Hugs with an implementation for
radix sort most significant???

thanking everybody in advance

Freek Nossin
student Computer Science at the TUE (Technical University of Eindhoven
(Holland))




From Tom.Pledger@peace.com Wed Oct 25 21:14:45 2000 Date: Thu, 26 Oct 2000 09:14:45 +1300 (NZDT) From: Tom Pledger Tom.Pledger@peace.com Subject: question about a sort algorithm
Nossin, F. writes:
 > Is there a library available in Hugs with an implementation for
 > radix sort most significant???

I don't see one there.

Bucket sort (the one with an array of booleans, indexed by the values
you're sorting) can be implemented in 2-3 lines, if that helps...
Hint: use accumArray.

Regards,
Tom


From 152837@swansea.ac.uk Fri Oct 27 09:54:54 2000 Date: Fri, 27 Oct 2000 09:54:54 +0100 From: QUARTEYSON E.B. (152837) 152837@swansea.ac.uk Subject: Using hugs
Hi,

I have just downloaded the hugs which I intend to use to write demo programs
for my my presentation.

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.

I will be grateful if you also any demo programs that you thing will help me
do a good presentation, I more
than happy to accept. Do you have any manual, Test cases etc.

Finally could you highlight any disadvantages of functional programming and
any suggestiong to rectify thses problems.

Thanks
Emmanuel Berend  Quarteyson


From reid@cs.utah.edu Fri Oct 27 19:45:35 2000 Date: Fri, 27 Oct 2000 12:45:35 -0600 From: Alastair Reid reid@cs.utah.edu 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.

You could try my graphics library (http://haskell.org/graphics) which is
used in Paul Hudak's textbook (http://haskell.org/soe).  Code from Paul
Hudak's book is included in the current distribution of the graphics library
(in the demo directory).

My library has fairly limited scope: it is mostly targeted at static
pictures with a little support for animations and interactive drawing
applications and absolutely no support for GUIs.  This restriction makes the
library simpler to understand - but may not be what you want.  (I'm trying
to improve support for animations, rubber-banding, etc. in response to a
recent query but GUI support isn't likely to appear anytime soon.)

Haskell.org (http://haskell.org/libraries/) lists some other libraries you
might use: several GUI libraries, a GIF library, OpenGL bindings, etc.

Hope this helps,

Alastair Reid



From Jeremy.Gibbons@comlab.ox.ac.uk Sat Oct 28 15:06:47 2000 Date: Sat, 28 Oct 2000 15:06:47 +0100 (BST) From: Jeremy Gibbons Jeremy.Gibbons@comlab.ox.ac.uk Subject: question about a sort algorithm
 > Is there a library available in Hugs with an implementation for
 > radix sort most significant???

A derivation of one is presented in my paper "A Pointless
Derivation of Radixsort", JFP 9(3) p339-346, 1999 (and
accessible from my homepage, URL below).

Jeremy

-- 
Jeremy.Gibbons@comlab.ox.ac.uk
  Oxford University Computing Laboratory,    TEL: +44 1865 283508
  Wolfson Building, Parks Road,              FAX: +44 1865 273839
  Oxford OX1 3QD, UK.  
  URL: http://www.comlab.ox.ac.uk/oucl/people/jeremy.gibbons.html