Re: [Haskell] ANNOUNCE: jhc-0.8.1

2014-05-12 Thread Jens Petersen
Thank you for the new release. :)

On 13 May 2014 04:40, John Meacham  wrote:

> as for the packages i've been testing with
>
>
> fgl,regex-compat,bytestring,binary,mtl,containers,unix,utf8-string,zlib,HsSyck,filepath,process,syb,old-time,pretty.
>

and editline ?

For me it fails to build on Fedora 20 with the readline package but
completes with editline.

Krzysztof: maybe try removing or hiding the readline package or posting
your build error. :)

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: GHC version 7.6.3

2013-04-24 Thread Jens Petersen
> The GHC Team is pleased to announce a new patchlevel release of GHC, 7.6.3.

I made a test repo for Fedora 19 (in development) x86_64:

http://repos.fedorapeople.org/repos/petersen/ghc-7.6.3/

Once Haskell Platform for ghc-7.6 is available I will add that too.
ghc-7.6.3 should be in the future Fedora 20 release around the end of
this year...
Of course I wish it could be in the coming F19 release but unfortunately
the HP release is too late for that.

Jens

___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: GHC version 7.2.1

2011-08-11 Thread Jens Petersen
> The GHC Team is pleased to announce a new major release of GHC, 7.2.1.

Thank you!

I have done a test build of 7.2.1 for Fedora:

http://koji.fedoraproject.org/koji/taskinfo?taskID=3267317

You can download the binary packages for example like this for 2 weeks:
$ lftp http://kojipkgs.fedoraproject.org/scratch/petersen/task_3267317/
> mget *.[x86_64|i686].rpm
$ sudo rpm -Uvh ghc*-10.fc17.[x86_64|i686].rpm

The test results with system libffi are the same as I reported earlier
except for 1 unexpected failure on x86_64:

   ghci/should_run  3171 [bad stdout] (normal)


I expect Fedora will ship ghc-7.[24] in Fedora 17,
but we won't start work on that until F16 is near done
(F16 is due to ship at the beginning of Nov).
By that time hopefully progress will also have been
made on haskell-platform-2011.4.

Cheers, Jens

___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: GHC version 7.0.1

2010-12-06 Thread Jens Petersen
On 16 November 2010 10:09, Ian Lynagh  wrote:
>   =
>    The (Interactive) Glasgow Haskell Compiler -- version 7.0.1
>   =

Thanks for the release.

ghc-7.0.1 has been in Fedora's development tree now for over a week
and all libraries have been rebuilt and no problems noticed so far.
We expect to ship ghc-7 in Fedora 15 which is scheduled for release
in May 2011.

Thanks, Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] Re: ANNOUNCE: GHC version 6.12.2

2010-04-26 Thread Jens Petersen
On 22 April 2010 10:19, Ian Lynagh  wrote:
> Release notes are here:
>  http://haskell.org/ghc/docs/6.12.1/html/users_guide/release-6-12-2.html

No mention of it, but is utf8-string now only an internal library?

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: qtHaskell-1.1.3

2009-11-19 Thread Jens Petersen
Hi again David,

> Thank you - guess I was getting confused with
> the references to qmake: today ./build seems to
> work just fine for me on Fedore

A few more questions and thank you for qthaskell!! :-)

- any plans to cleanup the buildsystem?
  (requiring sudo to complete building is a bit of a no-no)

- Any idea how much ram is needed to build on Linux?
  I thought I built it once but the other night i left bin/hbuild
running over night and it was still swapping/running at

[399 of 640] Compiling Qtc.Gui.QListWidget ( Qtc/Gui/QListWidget.hs,
dist/build/Qtc/Gui/QListWidget.o )

the next morning - (this humble 32bit P4 only has 1.5GB of ram
- I'll try another bigger box later).

Thanks, Jens

ps I would to package it up for fedora. :)
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: qtHaskell-1.1.3

2009-11-08 Thread Jens Petersen
>> If I parsed right this is for qt3 - any plans for qt4? :-)
>
> actually the version number of qtHaskell has nothing to do with the version
> of Qt it works with. QtHaskell has always worked with Qt version 4 (and
> never with Qt version 3). See the UserGuide for details.
>
> With Best Wishes from
> David Harley

Thank you - guess I was getting confused with
the references to qmake: today ./build seems to
work just fine for me on Fedore 12-prerelease.
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: qtHaskell-1.1.3

2009-11-07 Thread Jens Petersen
2009/10/22 David Harley :
> A new release of qtHaskell (version 1.1.3) is available at
> http://qthaskell.berlios.de

Thank you

If I parsed right this is for qt3 - any plans for qt4? :-)

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: Happy version 1.16

2007-01-28 Thread Jens Petersen

Simon Marlow wrote:

ANNOUNCING Happy 1.16  - The LALR(1) Parser Generator for Haskell


Thanks for the release.

I just noticed that the tarball includes a InstallShield directory too.
Is that intentional?

I ask since I'm reviewing happy now for inclusion in Fedora Extras.

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] Re: ANNOUNCE: hmp3, an ncurses mp3 player

2005-12-01 Thread Jens Petersen
John Goerzen wrote:
> You may find my haskell-magic binding to libmagic useful.

"darcs get http://darcs.complete.org/magic-haskell"; seems to work.

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: hmp3, an ncurses mp3 player

2005-11-24 Thread Jens Petersen
Donald Bruce Stewart wrote:
> hmp3 is a lightweight ncurses-based mp3 player written in Haskell. It
> uses mpg321 or mpg123 as its decoding backend. It is designed to be
> simple, fast and robust.

Cool, thanks!  How about making it ignore non-mp3 files in directories?

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: Frag: a First Person Shooting game

2005-11-23 Thread Jens Petersen
Mun Hon Cheong wrote:
> Frag is a 3D First Person Shooting game.

Thanks for releasing this!

It built fine for me with ghc-6.4.1 on Fedora Core 4 x86_64,
but when I run it I get:

frag% ./a.out leveleg
:
:
"loaded textures/egyptians/sand_egy.tga"
"loaded textures/egyptians/leaf.tga"
"loaded textures/egyptians/gold_trim02.tga"
"missing texture: models/mapobjects/Skull/skull.tga"
"missing texture: textures/common/trigger.tga"
"loaded textures/egyptians/oldstone_ramses.tga"
"missing texture: textures/sfx/hellfog.tga"
*** glibc detected *** ./a.out: malloc(): memory corruption: 0x00807f90 
***
=== Backtrace: =
/lib64/libc.so.6[0x3d03d6b79e]
/lib64/libc.so.6(malloc+0x7b)[0x3d03d6cb3b]
./a.out[0x58aa95]
=== Memory map: 
:
:

Minimal gdb backtrace:

Program received signal SIGABRT, Aborted.
[Switching to Thread 46912496296672 (LWP 20343)]
0x003d03d2f280 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x003d03d2f280 in raise () from /lib64/libc.so.6
#1  0x003d03d30750 in abort () from /lib64/libc.so.6
#2  0x003d03d64a7f in __libc_message () from /lib64/libc.so.6
#3  0x003d03d6b79e in _int_malloc () from /lib64/libc.so.6
#4  0x003d03d6cb3b in malloc () from /lib64/libc.so.6
#5  0x0058aa95 in ForeignziMarshalziAlloc_zdwccall2_info ()
#6  0x0028 in ?? ()
#7  0x in ?? ()

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] Haddock now in Fedora Extras

2005-10-02 Thread Jens Petersen
I'm pleased to announce that Haddock has now been included in
Fedora Extras for a few days. :)

(Since Fedora Core 4, yum is configured for Fedora Extras by default,
so users just need to run "yum install haddock" as root to install.)

Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] Annouce: ghc-6.4.1 now in Fedora Extras

2005-09-22 Thread Jens Petersen
I am very happy to announce that ghc-6.4.1 packages have been released already
in Fedora Extras[1].  (There are builds for FC4 ppc/i386/x86_64 and for FC3
i386/x86_64 as usual.)

6.4.1 feels like quite a milestone specially for us Linux amd64/x86-64 users.
:-)  Thank you for the release!

Jens


[1] http://fedoraproject.org/wiki/Extras/UsingExtras
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] [announce] Fedora Haskell mailing list

2005-02-21 Thread Jens Petersen
The Fedora Haskell project now has a mailing list
which is kindly hosted on haskell.org. :)
If you wish to subscribe for announcements and discussion
of packaging Haskell projects for Fedora, please go to
.
More information about the project is available on

Cheers, Jens
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: HsUnix 1.0.1 - Haskell for Unix Shell Scripting

2004-02-08 Thread Jens Petersen
> "VW" == Volker Wysk <[EMAIL PROTECTED]> writes:

VW> I'm pleased to announce the first release of the
VW> HsUnix library. It enables you to do things easily
VW> in Haskell which are typically done by the
VW> shell. Thus Haskell can be used to write shell
VW> scripts.

Thanks, sounds great. :)  Though the tarball I just
downloaded only seems to contain HsUnixArgs.hs.  Perhaps
something went wrong with it?

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Hugs98 November 2003 RPM package

2003-11-25 Thread Jens Petersen
> "RP" == Ross Paterson <[EMAIL PROTECTED]> writes:

RP> We are pleased to announce a new release of Hugs98,
RP> an interpreter and programming environment for
RP> developing Haskell programs.  Sources and binaries
RP> are freely available on the World-Wide Web.
RP> (Contributions of binary packages for other
RP> platforms would be welcome.)

I just uploaded an i386 rpm package to:

http://haskell.org/~petersen/rpms/hugs98/

Cheers, Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: [Gtk2hs-users] Announce: Gtk2hs version 0.9.4

2003-11-19 Thread Jens Petersen
> "AS" == Axel Simon <[EMAIL PROTECTED]> writes:

AS> https://sourceforge.net/projects/gtk2hs/

A Linux ix86 rpm package built with ghc-6.0.1 and gtk2-2.2
is available too now.

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


[rpms] updated greencard rpm package for ghc-6.0.1 available

2003-11-14 Thread Jens Petersen
FYI a new greencard rpm package built with ghc-6.0.1 is
now available from :

http://haskell.org/~petersen/rpms/greencard/?C=M&O=D

Cheers, Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


darcs 0.9.13 rpms available

2003-11-05 Thread Jens Petersen
I rpm-packaged darcs[1] 0.9.13 for Linux/ix86.  You can get
the srpm and binary rpms from:

http://haskell.org/~petersen/rpms/darcs/

Enjoy, -Jens

Footnotes: 
[1]  http://abridgegame.org/darcs/

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: hws-wp and ghc-6.0.1

2003-11-04 Thread Jens Petersen
> "TLB" == Thomas L Bevan <[EMAIL PROTECTED]> writes:

TLB> If anyone ports this to work with GHC6.0 please let
TLB> us know.  Tom

The patch below allows me to build hws with ghc-6.0.1 and
run it without plugins.  However when trying to run it with
loading modules I see:

hws-wp% sudo ./src/hws -d .
/home/petersen/haskell/haskell-libs/hws-wp/hws-wp/plugins/DirPlugin.o: unknown symbol 
`SystemziPosixziFiles_isDirectory_closure'
 
Fail: user error
Reason: resolveFunctions failed?False

and similarly for the other modules.  Perhaps the linking
isn't quite, right?

Jens


Index: hws-wp/src/AccessLogger.hs
===
RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/AccessLogger.hs,v
retrieving revision 1.1
diff -u -r1.1 AccessLogger.hs
--- hws-wp/src/AccessLogger.hs  16 Feb 2003 14:55:28 -  1.1
+++ hws-wp/src/AccessLogger.hs  5 Nov 2003 04:09:34 -
@@ -45,7 +45,7 @@
 import IO
 import Char (toLower)
 import IOExts hiding (trace)
-import Time
+import System.Time
 import Network.BSD
 import Network.Socket
 import Exception
Index: hws-wp/src/Core.hs
===
RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Core.hs,v
retrieving revision 1.1
diff -u -r1.1 Core.hs
--- hws-wp/src/Core.hs  16 Feb 2003 14:55:28 -  1.1
+++ hws-wp/src/Core.hs  5 Nov 2003 04:09:34 -
@@ -15,6 +15,7 @@
   fileAccess)
 import Exception (tryJust, ioErrors)
 import System.IO
+import Control.Exception (bracket)
 import Control.Monad
 import Control.Monad.Trans
 
Index: hws-wp/src/Main.hs
===
RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Main.hs,v
retrieving revision 1.1
diff -u -r1.1 Main.hs
--- hws-wp/src/Main.hs  16 Feb 2003 14:55:28 -  1.1
+++ hws-wp/src/Main.hs  5 Nov 2003 04:09:34 -
@@ -51,7 +51,7 @@
 import Posix
 import Network.BSD
 import IO hiding (bracket)
-import Exception
+import Control.Exception
 import Monad
 import IOExts  hiding (trace)
 import Control.Concurrent
@@ -212,7 +212,7 @@
 -- server.  If we receive a restart signal (from a SIGHUP), then we
 -- re-read the configuration file.
 topServer conf ps = do
-catchError
+Control.Exception.catch
(do unBlockSignals sigsToBlock
   unblock $ do
   server conf ps)
@@ -233,7 +233,7 @@
 -- open the server socket and start accepting connections
 server conf ps = do
   proto <- getProtocolNumber "tcp"
-  Exception.bracket
+  bracket
  (socket AF_INET Stream proto)
  (\sock -> sClose sock)
  (\sock -> do
@@ -247,7 +247,7 @@
 acceptConnections conf ps sock = do
   (h, SockAddrInet port haddr) <- accept sock
   forkIO ( (talk conf ps h haddr  `finally`  (hClose h))
-`Exception.catch` 
+`Control.Exception.catch` 
   (\e -> trace ("servlet died: "  ++ show e) (return  ()))
)
   acceptConnections conf ps sock
@@ -277,11 +277,7 @@
else return ())
  return Nothing)
   )
-#if __GLASGOW_HASKELL__ < 409
   ([EMAIL PROTECTED] -> 
-#else
-  (\e@(IOException io) -> 
-#endif
if isEOFError e
 then trace "EOF from client" $ return Nothing
 else do logError ("request: " ++ showIOError io) 
Index: hws-wp/src/Makefile
===
RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile16 Feb 2003 14:55:28 -  1.1
+++ Makefile5 Nov 2003 06:14:47 -
@@ -14,13 +14,13 @@
 
 # Change this to wherever yours are, I don't know what the variable
 # is called in the fptools mk stuff
-GHCDIR = /usr/lib/ghc-5.04.2
+GHCDIR = /usr/lib/ghc-6.0.1
 
 LD_OPTS += -optl-export-dynamic -L$(RTLDIR) 
 HS_OBJS += -ldl -lHSrts -lHSlang -lHSposix -lHSnetwork
 # Link in the objects. Yes it takes ages to compile, but that's better
 # than it taking ages to start the program!
 HS_OBJS += $(GHCDIR)/HSbase.o $(GHCDIR)/HSlang.o $(GHCDIR)/HSposix.o 
$(GHCDIR)/HSnetwork.o
-HS_OBJS += $(RTLDIR)/libRuntimeLoader.a
-
+#HS_OBJS += $(RTLDIR)/libRuntimeLoader.a
+HS_OBJS += $(RTLDIR)/*.o
 
Index: hws-wp/src/Util.hs
===
RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Util.hs,v
retrieving revision 1.1
diff -u -r1.1 Util.hs
--- hws-wp/src/Util.hs  16 Feb 2003 14:55:28 -  1.1
+++ hws-wp/src/Util.hs  5 Nov 2003 04:09:34 -
@@ -38,7 +38,7 @@
 import Network.Socket   hiding (accept)
 import qualified Network.Socket
 
-import Time
+import System.Time
 import Locale
 import Char
 import IO
@@ -51,6 +51,7 @@
 #else
 import GHC.Base
 import GHC.Conc
+import GHC.Exception
 import GHC.IOBase
 #endif
 
@@ -148,12 +149,12 @@
 killThread timeout

Re: implement hash table

2003-10-08 Thread Jens Petersen
> "DBS" == Donald Bruce Stewart <[EMAIL PROTECTED]> writes:

DBS> There is already one implemented in the GHC
DBS> libraries.  If you are using GHC 6, you can import
DBS> Data.HashTable.

There is also the older (less efficient?)  Data.FiniteMap
with very similar functionality.

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: HaRe, the Haskell Refactorer, version 0.1

2003-10-05 Thread Jens Petersen
> "CR" == Claus Reinke <[EMAIL PROTECTED]> writes:

>> Any chance of XEmacs support too? :-)

CR> 1. what little I know about Emacs scripting I
CR>learned during this
CR>  project, so I wouldn't even know what is
CR>  different in XEmacs or why XEmacs doesn't work
CR>  with the Emacs version of the interface. Help
CR>  from X/Emacs hackers is welcome.

Well the little time I have for hacking I prefer to give to
Haskell, but perhaps after playing with HaRe under Emacs I
can try to make it work with XEmacs if I find some time. :-)

CR> 2. we don't want to get bogged down in supporting
CR>various
CR> frontends, but we do want to enable others to
CR> contribute interface versions for their
CR> favourite editor/IDE.

So I understand patches are accepted. :-)

Cheers, Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Announce: hircules IRC client 0.3 released

2003-10-05 Thread Jens Petersen
It's a pleasure to announce the release of Hircules 0.3.

Hircules is an IRC client written in Haskell, using gtk2hs
for its gui.  Since the last release about 3 months ago,
various bugs have been fixed and a good number of new
features added, including better charset support and tab
highlighting.  A summary of the main changes is appended
below.

See the Hircules webpage  for
more details.  A source tarball and an i386 rpm built for Linux
with glibc-2.3 and gtk2-2.2 are available for download from
the project site page .

Enjoy,

Jens

Version 0.3 (2003-10-05):
* New features
- input area is now at the bottom of the channel buffer, not a Entry box
- UTF-8 support
- highlighting of tabs for channel activity
- multiline input is support now (from text pasted into input area)
- exceptions from lambdabot modules are now caught
- absolute paths are no longer mistaken for irc commands
- leading '/' is optional now in virtual channels
- topic changes appear in Alert channel now
- autodecoding of ISO-2022
- tabs menu setup now
- virtual channels now have '%' in front of them and can be "joined"
- irc log is now date-stamped as well
- the charset encoding for writing to a channel can now be set and shown
  with the new "/coding" command
- improved lambdabot configure support
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: HaRe, the Haskell Refactorer, version 0.1

2003-10-04 Thread Jens Petersen
On Thu, Oct 02, 2003 at 11:19:47AM +0100, C.Reinke wrote:

> we are pleased to announce the availability of HaRe 0.1 (also 
> known as HaRe 01/10/2003 ;-), a snapshot of our Haskell Refactorer
> prototype.

Thank you - looks pretty nice!
Any chance of XEmacs support too? :-)

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: [GUI] Announce: wxHaskell 0.2

2003-09-19 Thread Jens Petersen
On Tue, Sep 16, 2003 at 03:24:50PM +0200, Daan Leijen wrote:
> Announcement: wxHaskell version 0.2 

Thanks for the release.  0.2 seems to build much better on Linux. :)
I built an rpm package with ghc-6.0.1 for wxGTK2 and put it at

http://juhp.dyndns.org/jens/haskell/

for now.  They should be available from later

http://haskell.org/~petersen/rpms/wxhaskell/

(current public_html seems to be disabled on haskell.org).

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: GHC version 6.0.1

2003-07-30 Thread Jens Petersen
On Wed, Jul 30, 2003 at 01:06:02PM +0100, Simon Marlow wrote:

> We are pleased to announce a new patchlevel release of the Glasgow
> Haskell Compiler (GHC), version 6.0.1.

Thanks :)

I just uploaded a ghc-6.0.1-1 rpm package for Linux/i386 to

http://haskell.org/~petersen/rpms/ghc/

built with ghc-6.0 and linked against glibc 2.3.

Please let me know if you have any problems with this package.

Cheers, Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Announce: hircules 0.2 released

2003-07-03 Thread Jens Petersen
I am happy to annouce the release of Hircules 0.2.

Hircules is an IRC client written in Haskell, using gtk2hs
for its user interface.  Since the last release about 2 months
ago, many bugs have been fixed and some new features added.
A brief list of the main changes is appended below.

See the Hircules webpage  for
more details.  A source tarball and an i386 rpm built for Linux
with glibc-2.3 and gtk2-2.2 are available for download from
the project site page .

Going forward I want to make an effort to keep the cvs repository
more up-to-date with more regular commits.  The TODO list contains
the list of features I would like to implement in coming versions.

Enjoy, and as usual please send your feedback and comments,

Jens


* Summary of changes in Hircules 0.2
- Whitespace in messages received, sent and displayed is now preserved.
- Hircules can now be run from a non-tty.
- The "/me" command has been added for writing ctcp actions.
- CTCP actions are now displayed properly.
- When users join a channel their "[EMAIL PROTECTED]" info is also displayed
now.
- MODE changes should now be displayed properly.
- All channels are now logged to a log file in ".hircules/log/".
- Channel tabs are now numbered.
- Channel members are now tracked per channel.
  Quit and nick-change messages only appear now in the relevant channel.
- Private messages and public messages addressed to one (with "nick:
...") cause an audible beep.
- Public messages addressed to one appear also in a new virtual Alert
channel.
- /join can now also be used to display a hidden channel or start a
private conversation.


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ghc6.0 and ghc5.04.3 i386 rpms available

2003-06-13 Thread Jens Petersen
2003年06月13日(金)の17時53分に Jens Petersen 曰く:
> The latest package is named
> ghc6.0-6.0-1 and there is also a ghc5.04.3-5.04.3-2 package[...] The
> ghc5.04.3 and ghc6.0 can be installed in parallel without conflicts,

Thinking about it more, I realised that of course what is really being
numbered here is the interface version number of the hi files (the "ABI"
version if you like), so perhaps it would be better to name the packages
ghc6000 and ghc5043?  These names also seems a little more seemly...

Opinions?

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


ghc6.0 and ghc5.04.3 i386 rpms available

2003-06-13 Thread Jens Petersen
Hello,

Recently I have made some further small packaging improvements to the
ghc-6.0 rpms announced earlier.  The latest package is named
ghc6.0-6.0-1 and there is also a ghc5.04.3-5.04.3-2 package (using the
same patch as the ghc-5.04.3-1 package for RHL9 made by Andy Moran). The
ghc5.04.3 and ghc6.0 can be installed in parallel without conflicts,
since I separated out the utils programs into -utils subpackages.  They
are all available from

  http://haskell.org/~petersen/rpms/ghc/

I have tested them both on Red Hat Linux 8.0 and 9.  (The new packages
names are a little long, but this means that when say ghc-6.1 comes out
there won't been a need to generate a ghc6.0 then, but just a ghc6.1
package...)

Please try them and let me know what you think or if you have any
problems.  There is also ChangeLog file in the above directory too, so
that one can easily see what changes have been made between the
different package releases.

Cheers, Jens


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: HSHGL 3.00

2003-06-09 Thread Jens Petersen
2003年06月06日(金)の23時40分に Alastair Reid 曰く:
> In preparation for a major release of HSHGL, we are making an alpha
> release for folk to play with.  This release only works with X11 and
> GHC (it almost certainly still runs on Hugs too but we haven't tested
> recently).

Thank you for the release!

An rpm package for ghc-6.0 is available from:

  http://haskell.org/~petersen/rpms/HSHGL/

Enjoy, Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: HSX11 1.00

2003-06-08 Thread Jens Petersen
2003年06月06日(金)の23時06分に Alastair Reid 曰く:
> In preparation for a major release of HSX11, we are making an alpha
> release for folk to play with.  We welcome bug reports, comments on
> how the system is packaged, the web page, examples, comments from
> those who build binary and source packages, etc. and especially
> welcome comments accompanied by patches or cvs commit messages.

Thanks for the release.

I made an rpm package built with ghc-6.0 and put it in:

  http://haskell.org/~petersen/rpms/HSX11/

Cheers, Jens


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: GreenCard 3.01

2003-06-08 Thread Jens Petersen
2003年06月06日(金)の22時53分に Alastair Reid 曰く:
> In preparation for a major release of Green Card, we are making an
> alpha release for folk to play with.

An rpm package is available from:

  http://haskell.org/~petersen/rpms/greencard/

I added a ChangeLog to the above directory to make it easier for people
to track packaging changes. (The above page is also linked from the
greencard homepage.)

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: HSHGL 3.00

2003-06-06 Thread Jens Petersen
2003年06月06日(金)の23時40分に Alastair Reid 曰く:
>HSHGL 3.00
> A Portable Graphics Library

Thanks for releasing this too. :-)

> The library can be downloaded from: http://www.haskell.org/graphics/.

The link to the source on http://haskell.org/graphics/downloading.html
should be http://haskell.org/graphics/downloads/HSHGL-3.00.tar.gz
I guess.

Cheers, Jens


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: HSX11 1.00

2003-06-06 Thread Jens Petersen
2003年06月06日(金)の23時06分に Alastair Reid 曰く:
>  HSX11 1.00
>   A Haskell binding for X11
> 
> In preparation for a major release of HSX11, we are making an alpha
> release for folk to play with.  We welcome bug reports, comments on
> how the system is packaged, the web page, examples, comments from
> those who build binary and source packages, etc. and especially
> welcome comments accompanied by patches or cvs commit messages.

Thanks for the release. :-)

When I run "make all" I get:

 % cd libraries/X11/
 % make all
 rm -f Graphics/X11/Types.o; if [ ! -d Graphics/X11/Types_split ]; then mkdir 
Graphics/X11/Types_split; else /usr/bin/find Graphics/X11/Types_split -name '*.o' 
-print | xargs rm -f __rm_food; fi;   
 /usr/bin/ghc -H16m -O -cpp -fglasgow-exts -fffi -Iinclude -package-name X11 -O 
-Rghc-timing  -package HSgreencard  -package haskell98 -split-objs-c 
Graphics/X11/Types.hs -o Graphics/X11/Types.o  -ohi Graphics/X11/Types.hi
 ghc-6.0: unknown package name: Main
 <>
 make: *** [Graphics/X11/Types.o] Error 1

Anyone else see this?  I wonder what is going on?

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


update of ghc-6.0 rpms for Red Hat Linux 9

2003-06-05 Thread Jens Petersen
2003年06月02日(月)の11時45分に Jens Petersen 曰く:
> I have built rpms of ghc-6.0 on Red Hat Linux 9.
> I didn't build the libraries with profiling this time,
> however the package includes the docs, the xlib binding from
> hslibs and hence green-card from cvs too (a number of patches/hacks
> were needed for this and they can be found in the nosrc rpm).
:
> (Note the nosrc rpm doesn't include the ghc-6.0 tarball, you'll
> have to download that separately if you wish to rebuild the package.)

I updated the packages to just a conventional build of ghc-6.0 (the xlib
and green-card packaging in the first version had problems anyway).
There shouldn't be any changes in the ghc-6.0 packaging itself, so
unless you wish to get rid of the broken green-card and xlib in the
first version there is no necessity to upgrade.

You can download ghc-6.0-2.rhl9 from:

  http://haskell.org/~petersen/rpms/ghc/

Cheers, Jens

ps If you wish to have the prof libs too next time I build, please let
me know.  I use them so rarely myself that I didn't bother to build
them, but I don't mind doing so if there is demand.

pps There is a rpm package of the alpha greencard-3.00 release in
<http://haskell.org/~petersen/greencard> too.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: GHC version 6.0

2003-06-02 Thread Jens Petersen
2003年05月30日(金)の00時06分に Simon Marlow 曰く:
> We are pleased to announce a new major release of the Glasgow Haskell
> Compiler (GHC), version 6.0.

Thanks for the release! :-)

I have built rpms of ghc-6.0 on Red Hat Linux 9.
I didn't build the libraries with profiling this time,
however the package includes the docs, the xlib binding from
hslibs and hence green-card from cvs too (a number of patches/hacks
were needed for this and they can be found in the nosrc rpm).

The packages are currently lying at

http://haskell.cs.yale.edu/~petersen/rpms/i386/ghc-6.0-1_rhl9.i386.rpm
http://haskell.cs.yale.edu/~petersen/rpms/i386/ghc-doc-6.0-1.i386.rpm
http://haskell.cs.yale.edu/~petersen/rpms/srpms/ghc-6.0-1.nosrc.rpm

(Note the nosrc rpm doesn't include the ghc-6.0 tarball, you'll
have to download that separately if you wish to rebuild the package.)

Enjoy and let me know if you have any problems,

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: HTTP protocol libraries

2003-03-06 Thread Jens Petersen
Johannes Waldmann <[EMAIL PROTECTED]> writes:

> Dear all, I am looking for a Haskell library for the HTTP/1.1 protocol,
> i. e. data types for Requests and Responses,
> and functions to read chunked bodies etc. Is there such a thing?

Warrick Gray wrote a small HTTP library.  You can find it at:

http://homepages.paradise.net.nz/warrickg/haskell/http/

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: ANNOUNCE: hat-2.00

2002-06-20 Thread Jens Petersen

Jens Petersen <[EMAIL PROTECTED]> writes:

> Malcolm Wallace <[EMAIL PROTECTED]> writes:
> 
> > We are pleased to announce a new release of Hat, the Haskell tracing
> > (an debugging) system for Haskell'98.

> http://haskell.org/~petersen/rpms/i386/hat-2.00-1.i386.rpm

> http://haskell.org/~petersen/rpms/i386/hat-doc-2.00-1.i386.rpm

> http://haskell.org/~petersen/srpms/hat-2.00-1.src.rpm

Oh, FYI below is the patch I applied in order to be able to
package hat correctly.

I just added DESTDIR to onedir and stopped the ghc-pkg during
build time, since that needs to be done at package install
time (see hat.spec in the srpm).  Trivial stuff, but thought
you might like to know.

You're welcome to include hat.spec file in the distribution
if you wish (and the hmake one too in hmake).

Cheers, Jens


diff -u hat-2.00/script/confhat~ hat-2.00/script/confhat
--- hat-2.00/script/confhat~Sun Jun 16 16:07:35 2002
+++ hat-2.00/script/confhat Sun Jun 16 16:07:35 2002
@@ -18,7 +18,7 @@
 if [ -d lib/$MACHINE/hatlib/ghc ]
 then
   # discover ghc location
-  onedir=`grep ghc $HMAKERC | grep import | head -1 | cut -d'"' -f2`
+  onedir=$DESTDIR`grep ghc $HMAKERC | grep import | head -1 | cut -d'"' -f2`
   GHCINCDIR=`dirname $onedir`
   GHCLIBDIR=`dirname $GHCINCDIR`
   echo >&2 "Installing hat package for ghc under $GHCLIBDIR"
@@ -28,14 +28,14 @@
   if [ -d $GHCINCDIR/hat ]
   then
 cp -p lib/$MACHINE/hatlib/ghc/libHShat.a $GHCLIBDIR  && \
-cp -p lib/$MACHINE/hatlib/ghc/*.hi $GHCINCDIR/hat  && \
-{ ghc-pkg --remove-package=hat || $TRUE; } && \
-ghc-pkg --add-package http://www.haskell.org/mailman/listinfo/haskell



Re: ANNOUNCE: hat-2.00

2002-06-20 Thread Jens Petersen

Malcolm Wallace <[EMAIL PROTECTED]> writes:

> We are pleased to announce a new release of Hat, the Haskell tracing
> (an debugging) system for Haskell'98.

> For information on hat:   http://www.cs.york.ac.uk/fp/hat/
> For hat downloads:ftp://ftp.cs.york.ac.uk/pub/haskell/hat/
> (Please note that a prior installation of hmake-3.05 is required.)

Thanks.

I made a rpm package with ghc-5.02.3 built on a Red Hat 7.3-ish environment
and put it at

http://haskell.org/~petersen/rpms/i386/hat-2.00-1.i386.rpm

Since the docs are rather large, I put them in a separate
subpackage gzipping the ps and pdf files

http://haskell.org/~petersen/rpms/i386/hat-doc-2.00-1.i386.rpm

and the source rpm file is:

http://haskell.org/~petersen/srpms/hat-2.00-1.src.rpm

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: ANNOUNCE: nhc98-1.14, hmake-3.05

2002-06-20 Thread Jens Petersen

Malcolm Wallace <[EMAIL PROTECTED]> writes:

> We are pleased to announce new releases of nhc98 and hmake.  These are
> essentially bug-fix and performance-improvement releases.

> for information on hmake: http://www.cs.york.ac.uk/fp/hmake/

I put an rpm package built with ghc-5.02.3 on a Red Hat Linux 7.3-ish box
at

http://haskell.org/~petersen/rpms/i386/hmake-3.05-1.i386.rpm

and the source rpm file is:

http://haskell.org/~petersen/srpms/hmake-3.05-1.src.rpm

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



popen lazy args and input pipe

2002-03-21 Thread Jens Petersen

Volker Wysk <[EMAIL PROTECTED]> writes:

> On 21 Mar 2002, Jens Petersen wrote:
> > Volker Wysk <[EMAIL PROTECTED]> writes:
> > > POpen-1.0.0 contains the same bug which I made. It doesn't ensure that
> > > the values which are needed after the call of forkProcess, before that
> > > of executeFile, are fully evaluated. So, if they are read lazily from a
> > > stream, the newly spawned child process reads data from a stream which
> > > it shares with its parent, making it disappear from the parent's input.
> > > In this situation, this sure isn't intended.

Ok, I agree this is a potential if unlikely problem.  I
can't really think of any useful examples though.

I guess using "$!"s in the call to popen would solve this
part.

> > Perhaps you could give an explicit example?
> 
> I haven't tried it, but it's exactly the same thing.

Well, an explicit example using your "pipeto" or popen would
be helpful.

> > > Inserting the following lines just before the line "pid <- forkProcess",
> > > in POpen.hs, would force the corresponding values to be evaluated, so no
> > > data will be lost.
> > >
> > > seq (length path) $ seq (sum (map length args)) $ return ()
> > > when (isJust env) $ seq (sum (map (\(a,b) -> length a + length b)
> > >   (fromJust env))) $ return ()
> > > when (isJust dir) $ seq (length (fromJust dir)) $ return ()

I would prefer not to add strict evaluation to POpen unless
it's absolutely necessary.  I guess I really need a testcase
for this problem.  If you have one please send it to me.  I
should really add some unit tests to popenhs.

> > Hmmm, I don't really see why this is necessary.  Don't the
> > lazy values of "path", "env" and "dir" just get evaluated
> > when they're needed here as normal?  (If what you say is
> > true though it would be simpler just to use "$!" or "!"s for
> > strict evaluation I guess.)
> 
> Yes, and that's *after* forkProcess. So when they are computed from
> the lazily read contents of a stream, the newly spawned child will read
> data from a stream which it shares with its parent.

Btw I guess one can say that popen inherits this problem
from "Posix.runProcess".

But usually "path", "env" and "dir" are not streams, just
strings, right?  Even for args I feel pushed to think of a
real example where it could be a problem.  Something like
"xargs" taking a long stream of arguments from stdin, but
arguments instead??  (Most shells have restrictions on the
size of argv I think though.)

Are you're referring to these comments from Posix.lhs, or
you've rediscovered them?

-- ***NOTE***: make sure you completely force the evaluation of the path
-- and arguments to the child before calling runProcess. If you don't do
-- this *and* the arguments from runProcess are read in from a file lazily,
-- be prepared for some rather weird parent-child file I/O behaviour.
--
-- [If you don't force the args, consider the case where the
--  arguments emanate from a file that is read lazily, using
--  hGetContents or some such. Since a child of a fork()
--  inherits the opened files of the parent, the child can
--  force the evaluation of the arguments and read them off the
--  file without any problems.  The problem is that while the
--  child share a file table with the parent, it has separate
--  buffers, so a child may fill up its (copy of) the buffer,
--  but only read it partially. When the *parent* tries to read
--  from the shared file again, the (shared) file offset will
--  have been stepped on by whatever number of chars that was
--  copied into the file buffer of the child. i.e., the unused
--  parts of the buffer will *not* be seen, resulting in
--  random/unpredicatable results.
--
--  Based on a true (, debugged :-) story.
-- ]

Reading this again I start to understand the problem you're
describing a little better.  Perhaps something does need to
be done about it, as you say. ;-)

> But hPutStr, followed by hClose, won't complete until all
> the input string has been written, while no process is
> listening.

Oops, you're right!  Indeed popen hangs on input greater
than 4kB on my system.  Thank you very much for reporting
this.

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Bug in IO libraries when sending data through a pipe?

2002-03-21 Thread Jens Petersen

Hi Volker,

Volker Wysk <[EMAIL PROTECTED]> writes:

> On Mit, 2002-03-20 at 07:00, Jens Petersen wrote:
> > Jens Petersen <[EMAIL PROTECTED]> writes:
> > 
> > > > The problem is that the child process doesn't
> > > > receive all the data which the parent sends. It's as
> > > > if "hPutStr vonh txt" sends the data lazily somehow,
> > > > and "hClose vonh" closes the pipe prematurely.
> > > > 
> > > > It varies from run to run exactly which data gets
> > > > through. If I cause the child process to read all
> > > > its input immediately, the problem doesn't seem to
> > > > occur. Normally, it does so gradually, which takes a
> > > > few seconds.
> > > > 
> > > > I'm using GHC 5.02.2
> > > 
> > > Quite possibly could be a bug.  Lazy IO is rather subtle I
> > > think, specially when done across pipes.  I faced some
> > > similar problem with in POpen recently.  You can see how I
> > > solved it (worked round it?) by comparing the latest release
> > > 1.00 with the previous one 0.00.1:
> > > 
> > > http://www.01.246.ne.jp/~juhp/haskell/popenhs/
> 
> POpen-1.0.0 contains the same bug which I made. It doesn't ensure that
> the values which are needed after the call of forkProcess, before that
> of executeFile, are fully evaluated. So, if they are read lazily from a
> stream, the newly spawned child process reads data from a stream which
> it shares with its parent, making it disappear from the parent's input.
> In this situation, this sure isn't intended.

Perhaps you could give an explicit example?

> Inserting the following lines just before the line "pid <- forkProcess",
> in POpen.hs, would force the corresponding values to be evaluated, so no
> data will be lost.
> 
> seq (length path) $ seq (sum (map length args)) $ return ()
> when (isJust env) $ seq (sum (map (\(a,b) -> length a + length b) 
>   (fromJust env))) $ return ()
> when (isJust dir) $ seq (length (fromJust dir)) $ return ()

Hmmm, I don't really see why this is necessary.  Don't the
lazy values of "path", "env" and "dir" just get evaluated
when they're needed here as normal?  (If what you say is
true though it would be simpler just to use "$!" or "!"s for
strict evaluation I guess.)

I would be more worried about the input stream string not
being complete when the input handle is closed.

> I'm also not sure what this part is supposed to do:
> 
> inr <- if (isJust inpt) then
>do
>(inr', inw) <- createPipe
>hin <- fdToHandle inw
>hPutStr hin $ fromJust inpt
>hClose hin
>return $ Just inr'
>   else
>   return Nothing

It returns the output end of a pipe containing the input
string if one is given.

> Doesn't it write the input data to a pipe which no process reads
> from..??

Nope, "doTheBusiness" dup2's it to the stdin of the subprocess:

  (outr, outw) <- createPipe
  (errr, errw) <- createPipe
  pid <- forkProcess
  case pid of
Nothing -> doTheBusiness inr outw errw   -- ***
Just p -> 
  do
  -- close other end of pipes in here
  when (isJust inr) $
   fdClose $ fromJust inr
  fdClose outw
  fdClose errw
  hout <- fdToHandle outr
  outstrm <- hGetContents hout
  herr <- fdToHandle errr
  errstrm <- hGetContents herr
  return (outstrm, errstrm , p)
where
doTheBusiness :: 
Maybe Fd-- stdin
-> Fd   -- stdout
-> Fd   -- stderr
-> IO (String, String, ProcessID)-- (stdout, stderr)
doTheBusiness inr outw errw = 
do
maybeChangeWorkingDirectory dir
when (isJust inr) $
 dupTo (fromJust inr) stdInput   -- ***
dupTo outw stdOutput
dupTo errw stdError
executeFile path True args env
-- for typing, should never actually run
error "executeFile failed!"

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Bug in IO libraries when sending data through a pipe?

2002-03-19 Thread Jens Petersen

Jens Petersen <[EMAIL PROTECTED]> writes:

> > The problem is that the child process doesn't receive all the data which
> > the parent sends. It's as if "hPutStr vonh txt" sends the data lazily
> > somehow, and "hClose vonh" closes the pipe prematurely.
> > 
> > It varies from run to run exactly which data gets through. If I cause the
> > child process to read all its input immediately, the problem doesn't
> > seem to occur. Normally, it does so gradually, which takes a few seconds.
> > 
> > I'm using GHC 5.02.2
> 
> Quite possibly could be a bug.  Lazy IO is rather subtle I
> think, specially when done across pipes.  I faced some
> similar problem with in POpen recently.  You can see how I
> solved it (worked round it?) by comparing the latest release
> 1.00 with the previous one 0.00.1:
> 
> http://www.01.246.ne.jp/~juhp/haskell/popenhs/
> 
> In comparison Posix.runProcess allows attaching file handles
> to the in, out and error pipes, which can be written to and
> read from eagerly I suppose.

Also I just rediscovered Manuel Chakravarty's HPL (Haskell
Ports Library), which provides a rather elegant,
sophisticated approach.

http://www.cse.unsw.edu.au/~chak/haskell/ports/

It compiles fine under ghc-5.02.2, and using the BufferMode
patch included at the end output seems to be ok, but input
of more than 2048 bytes doesn't seem to be being handled
reliably.

Eg with the test program below:

% test-processes ping localhost

works (with the aforementioned patch below to Processes.hs), but


% cat 4096 | test-processes cat

[4096 is a file of 4096 chars]
mostly gives no output, but occasionally I see

Warning: Ports.listenToPort: Attempted to listen to a closed port!

Needs some debugging I guess. :)

Jens


-- ghc -o test-processes `ports-config --cflags --libs` test-processes.hs
module Main
where
import Processes
import Ports
import IO (openFile, hGetContents, IOMode(..), hSetBuffering, BufferMode(..))
import Monad (unless)

main:: IO()
main = do
 inpt <- getContents
 withPorts [] $ \ (cmd:args) ->
   do
   outpt <- newPort ' '
   errpt <- newPort ' '
   let p = proc cmd args
   p inpt outpt errpt
   putStrLn "output:"
   out <- listenToPort outpt
   mapM_ putStrLn $ lines out
   putStrLn "error:"
   errclosed <- isClosedPort errpt
   unless errclosed $
 do
 err <- listenToPort errpt
 putStr err
   putStrLn "test finished"


Index: Processes.hs
===
RCS file: /home/chakcvs/cvs/ports/lib/Processes.hs,v
retrieving revision 1.7
diff -u -r1.7 Processes.hs
--- Processes.hs2001/07/04 16:15:52 1.7
+++ Processes.hs2002/03/20 05:28:33
@@ -145,6 +145,8 @@
   stdoutWriteHandle <- fdToHandle stdoutWriteFD
   stderrReadHandle  <- fdToHandle stderrReadFD
   stderrWriteHandle <- fdToHandle stderrWriteFD
+  hSetBuffering stdoutReadHandle  LineBuffering
+  hSetBuffering stderrReadHandle  LineBuffering
   --
   -- the child must close the pipe ends that it doesn't use (especially, the
   -- write end)
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Bug in IO libraries when sending data through a pipe?

2002-03-10 Thread Jens Petersen

Volker Wysk <[EMAIL PROTECTED]> writes:

> (zu, von) <- createPipe
> vonh <- fdToHandle von
> hSetBuffering vonh NoBuffering
> mpid <- forkProcess
> case mpid of
>Nothing -> do   -- child
>   -- connect pipe's read end to stdin
>   -- and close its write end
>   dupTo zu (intToFd 0)
>   fdClose zu
>   hClose vonh
>   executeFile prog True par Nothing
>   ... -- (print error message)
>Just pid -> do   -- parent
>   fdClose zu  -- close pipe's read end
>   -- ** here **
>   hPutStr vonh txt-- write text to forked process
>   hClose vonh -- close pipe's write end
>   -- wait for child process to finish
>   (Just ps) <- getProcessStatus True True pid
>   if ps == Exited ExitSuccess
>   then return ()
>   else ...) -- (error message)
> 
> The problem is that the child process doesn't receive all the data which
> the parent sends. It's as if "hPutStr vonh txt" sends the data lazily
> somehow, and "hClose vonh" closes the pipe prematurely.
> 
> It varies from run to run exactly which data gets through. If I cause the
> child process to read all its input immediately, the problem doesn't
> seem to occur. Normally, it does so gradually, which takes a few seconds.
> 
> I'm using GHC 5.02.2

Quite possibly could be a bug.  Lazy IO is rather subtle I
think, specially when done across pipes.  I faced some
similar problem with in POpen recently.  You can see how I
solved it (worked round it?) by comparing the latest release
1.00 with the previous one 0.00.1:

http://www.01.246.ne.jp/~juhp/haskell/popenhs/

In comparison Posix.runProcess allows attaching file handles
to the in, out and error pipes, which can be written to and
read from eagerly I suppose.

Jens
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Simple sockets sample?

2002-01-28 Thread Jens Petersen

Jens Petersen <[EMAIL PROTECTED]> writes:

> "Dominic Cooney" <[EMAIL PROTECTED]> writes:
> 
> > >   sendTo host port "GET / HTTP/1.0\r\n\r\n";
> 
> Hmmm, I was trying something more like (under Linux):
> 
> do
> h <- connectTo host port
> hPutStrLn h "GET / HTTP/1.0\n"
> response <- hGetContents h
> putStr response
> 
> Unfortunately this hangs waiting for the response.
> Don't know why yet...

As Ketil Malde pointed out to me, Dominic's crlfcrlf
sequence is indeed necessary.  Ie after replacing the above
hPutStrLn line with

hPutStr h "GET / HTTP/1.0\r\n\r\n"

my program finally works.  As Simon comments in his
webserver, some kinding of transfer coding would be nice to
avoid this kind of hassle.



Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Simple sockets sample?

2002-01-27 Thread Jens Petersen

"Dominic Cooney" <[EMAIL PROTECTED]> writes:

> Does anybody know of a simple GHC Socket sample? I want to retrieve an
> HTTP URL, but I keep getting errors like this:

Funny I was trying to do the same this morning on the way to
work.

> A minimal program that exhibits the problem is below. I am using GHC
> 5.02 on Win XP Pro. When I enter the request via telnet, I do get a
> response.
> 
> I assume I am making some terrible newbie mistake, so if anyone could
> point it out it would be appreciated.

> > main = withSocketsDo $ do {
> > connectTo host port;
> > sendTo host port "GET / HTTP/1.0\r\n\r\n";
> > response <- recvFrom host port;
> > putStrLn response

Hmmm, I was trying something more like (under Linux):

do
h <- connectTo host port
hPutStrLn h "GET / HTTP/1.0\n"
response <- hGetContents h
putStr response

Unfortunately this hangs waiting for the response.
Don't know why yet...

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



ANNOUNCE: popenhs-1.00.0 released

2002-01-25 Thread Jens Petersen

Version 1.00.0 of popenhs is out.  You can get it from:

http://www.01.246.ne.jp/~juhp/haskell/popenhs/

popenhs is a small library providing lazy string output from
and input to a subprocess.  The interface provided by
"popen" now differs from the "popen3" offered in 0.00 by
taking an input string argument instead of returning an
input handle.

Thanks to Uwe Schmidt for reporting the problem in the
previous release of popen3 hanging on a closed input pipe,
that led to this new implmentation, which I believe fixes
the problem.

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



[qforeign] examples/Glob.hsc patch for segv on nomatch

2002-01-09 Thread Jens Petersen

This patch fixes a problem with the glob binding example in
qforeign, where it would segfault when no files were found
for the glob exp.

Btw, Qrczak, have you considered adding the glibc glob flag
extensions to Glob (eg GLOB_BRACE, GLOB_TILDE, etc)?  They
would be nice to have too, but I guess there is the issue of
portability?  In that case perhaps they should then going
into a separate submodule?

Jens

ps There is also still the issue with attr_set in the
Curses.hsc binding, which I haven't managed to resolve yet
(except by working "around" it by using attrset instead).


2002-01-09  Jens Petersen  <[EMAIL PROTECTED]>

* examples/Glob.hsc (glob): Test pathc before trying
to read pathv to avoid segfault on nomatch.

Index: examples/Glob.hsc
===
RCS file: /cvsroot/qforeign/qforeign/examples/Glob.hsc,v
retrieving revision 1.4
diff -u -r1.4 Glob.hsc
--- examples/Glob.hsc   2001/03/18 19:40:00 1.4
+++ examples/Glob.hsc   2002/01/09 14:18:14
@@ -81,8 +81,12 @@
 (#const GLOB_NOMATCH) -> GlobNoMatch
 (#const GLOB_NOSPACE) -> GlobNoSpace
 _ -> GlobOther
-pathv <- (#peek glob_t, gl_pathv) ptr
-paths <- peekArray0 nullPtr pathv >>= mapM peekCString
+pathc <- (#peek glob_t, gl_pathc) ptr :: IO CUInt
+paths <- if pathc > 0 then
+  do
+  pathv <- (#peek glob_t, gl_pathv) ptr
+  peekArray0 nullPtr pathv >>= mapM peekCString
+ else return []
 globfree ptr
 return (res, paths)
 

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: haxml

2001-12-11 Thread Jens Petersen

David Smallwood <[EMAIL PROTECTED]> writes:

> Does anyone know of a mirror site where I can download the latest
> version of HaXml.  (Connection to York is - and has been for a
> while - apparently down:  
>ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/HaXml-1.02.tar.gz, that is)

The above url seemed to work for me just now.

Jens

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Unicode support

2001-09-30 Thread Jens Petersen

Colin Paul Adams <[EMAIL PROTECTED]> writes:

> >>>>> "Jens" == Jens Petersen <[EMAIL PROTECTED]> writes:
> 
> Jens> 16 bits is enough to describe the Basic Multilingual Plane
> Jens> and I think 24 bits all the currently defined extended
> Jens> planes.  So I guess the report just refers to the BMP.
> 
> I guess it does, and I think back in 1998 that may still have been
> identical to Unicode. 
> But the revision of the report that SPJ is preparing is unchanged in
> this respect, and so is factually inaccurate.
> I think it should either be amended to mention the BMP subset of
> Unicode, or, better, change the reference from 16-bit to 24-bit.

Actually ISO 10646 defines formally a 31-bit character set. [1]

Is it still possible to update the latest revision of the
Haskell 98 report to this effect?  (There was some unicode
discussion earlier, about upper and lower case if I remember
correctly, but I am surprised noone has raised this point
again.)

Jens

ps We need better unicode support in the implementations too.
At least ghc-5 has 31 bit Char's now!  Hurrah!

Footnotes: 
[1]  http://www.cl.cam.ac.uk/~mgk25/unicode.html

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Unicode support

2001-09-30 Thread Jens Petersen

Hamilton Richards <[EMAIL PROTECTED]> writes:

> At 12:20 PM -0500 9/29/01, Colin Paul Adams wrote:
> >I have just been reading through the Haskell report to refresh my
> >memory of the language. I was surprised to see this:
> >
> >The character type Char is an enumeration and consists of 16 bit values,
> >conforming to
> >the Unicode standard [10].
> >
> >Unicode uses 24-bit values to identify characters.
> 
> According to the official Unicode web site [0],
> 
>   The Unicode Standard defines three encoding forms
>   that allow the same data to be transmitted in a byte,
>   word or double word oriented format (i.e. in 8, 16 or
>   32-bits per code unit).
> 
> [0] http://www.unicode.org/unicode/standard/principles.html

You have to distinguish between encodings (you refer to
utf-8, utf-16 and utf-32) and the unicode (iso-10646) tables
of codepoints themselves.

16 bits is enough to describe the Basic Multilingual Plane
and I think 24 bits all the currently defined extended
planes.  So I guess the report just refers to the BMP.

Jens



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: [Gtkhs] ANN: Gtk+HS 0.11.5

2001-09-10 Thread Jens Petersen

"Manuel M. T. Chakravarty" <[EMAIL PROTECTED]> writes:

> I am pleased to announce version 0.11.5 of Gtk+HS, the
> Haskell binding for the GUI toolkit GTK+.

Thanks for 0.11.5, Manuel.

I am having trouble building it though.  Below's what I am
getting.  I get the same error c2hs-0.9.8 and chs-0.9.9,
with both cvs and the tarball.  This is with ghc-5.00.2-1.

Jens


/usr/bin/ghc -c -O -package lang -fglasgow-exts -recomp -I/usr/include/gtk-1.2 
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include 
-i/usr/local/lib/c2hs-0.9.9/ghc5/import -fglasgow-exts -package lang  
'-#include' '-#include"gMarsh.h"' -i../glib -I../glib  Gdk.hs

Gdk.hs:103:
Couldn't match `Ptr CString' against `CChar'
Expected type: Ptr CInt -> Ptr (Ptr CString) -> IO a
Inferred type: Ptr CInt -> Ptr CChar -> IO ()
In the first argument of `initAux', namely `(gdk_init)'
in a `do' expression pattern binding:
(prog, args', _) <- initAux (gdk_init) args

Gdk.hs:111:
Couldn't match `Ptr CString' against `CChar'
Expected type: Ptr CInt -> Ptr (Ptr CString) -> IO a
Inferred type: Ptr CInt -> Ptr CChar -> IO CInt
In the first argument of `initAux', namely `(gdk_init_check)'
in a `do' expression pattern binding:
(prog, args', succ) <- initAux (gdk_init_check) args
make[1]: *** [Gdk.o] Error 1
make[1]: Leaving directory `/home/petersen/haskell/gtk+hs/gdk'
make: *** [all] Error 2

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell