Re: [Haskell-cafe] Of phantom types and type extentions

2007-10-16 Thread Bertram Felgenhauer
Thomas M. DuBuisson wrote: The solution I would want looks like this: class NetworkAddress a where addressByteSize :: a - Int instance (NetworkAddress a) = Binary (AddressBlock a) where get = do lenH - get h- replicateM get

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread ChrisK
Simon Marlow wrote: Ultimately when things settle down it might make sense to do this kind of thing, but right now I think an easier approach is to just fix packages when dependencies change, and to identify sets of mutually-compatible packages (we've talked about doing this on Hackage

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread ChrisK
Don Stewart wrote: stefanor: On Mon, Oct 15, 2007 at 10:57:48PM +0100, Claus Reinke wrote: so i wonder why everyone else claims to be happy with the status quo? We aren't happy with the status quo. Rather, we know that no matter how much we do, the situation will never improve, so most of us

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Ketil Malde
Daniel McAllansmith [EMAIL PROTECTED] writes: I think what you're asking for is more than that: you want us to provide base-1.0, base-2.0 and base-3.0 at the same time, so that old packages continue to work without needing to be updated. Yes. That is possible, but much more work for the

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Udo Stenzel wrote: Simon Marlow wrote: So a package that depends on 'base' (with no upper version bound) *might* be broken in GHC 6.8.1, depending on which modules from base it actually uses. Let's look at the other options: - if we rename base, the package will *definitely* be broken

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Ketil Malde
Claus Reinke [EMAIL PROTECTED] writes: You need a way to specify foo 1.2 foo 2, which is a suggestion that was tossed around here recently. but what does such a version range say? that i haven't tested any versions outside the range (because they didn't exist when i wrote my package)?

Re: [Haskell-cafe] System.Posix

2007-10-16 Thread Bjorn Bringert
On Oct 16, 2007, at 3:25 , Galchin Vasili wrote: Hello, In a Hugs environment, I am able to import System.Directory but not to import System.Posix. Here is my environment ... .;{Hugs} \packages\*;C:\ftp\CatTheory\Haskell\SOE\graphics\lib\win32\*. I really want to use the Posix module.

RE: [Haskell-cafe] Performance problem with random numbers

2007-10-16 Thread Simon Peyton-Jones
We'd be delighted if someone offered a more performant library to put into future GHC releases. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Don | Stewart | Sent: 13 October 2007 22:38 | To: Isaac Dupree | Cc: haskell-cafe@haskell.org |

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
Be happy: we're about 15 years ahead of the lisp guys. 'cabal install xmonad' works, for example. - not on windows (and since it is popular, it will seduce more good haskellers not to bother with windows compatibility.. :-( - from xmonad.cabal (version 0.3, from hackage): build-depends:

[Haskell-cafe] Distributed haskell using Hadoop

2007-10-16 Thread Brad Clow
I was looking around for a haskell solution for distributing a computation across multiple machines and couldn't find anything that looked current and alive. I found out that the Hadoop project (java based) can interact with binary executables via stdin and stdout. So I have set up a Hadoop

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
- if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same compiled module in more than one package.

Re: [Haskell-cafe] ANNOUNCE: metaplug

2007-10-16 Thread Axel Mannhardt
Hello, There is one limitation to this, however. compileCall expects to compile a dynamic via GHC.dynCompileExpr; what this means is your resource must be monomorphic (for Typeable to work.) As of right now, the easiest way I can see to get around this is to simply define a datatype like

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. So rather than keep replying to individual points, I'd like to make some concrete proposals so we can make progress. 1.

[Haskell-cafe] RE: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Bayley, Alistair
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Marlow x changes == API changed x constant but y changes == API extended only x and y constant == API is identical Ordering on versions is lexicographic, given multiple versions that satisfy a dependency

Re: [Haskell-cafe] Haskell libraries for computer vision

2007-10-16 Thread Henning Thielemann
On Mon, 15 Oct 2007, Don Stewart wrote: http://alberrto.googlepages.com/easyvision An experimental Haskell system for fast prototyping of computer vision and image processing applications. Looks ridiculously cool. Image processing with Haskell - really interesting. I know of

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Claus Reinke wrote: - if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same compiled module in more

[Haskell-cafe] Proposal: register a package as providing several API versions

2007-10-16 Thread ChrisK
Simon Marlow wrote: Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. I have another concrete proposal to avoid things breaking so often. Let us steal from something that

Re: [Haskell-cafe] RE: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Stuart Cook
On 10/16/07, Bayley, Alistair [EMAIL PROTECTED] wrote: Just a minor point, but would mind explaining exactly what lexicographic ordering implies? It appears to me that e.g. version 9.3 of a package would be preferred over version 10.0. That strikes me as counter-intuitive. I believe the

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Lutz Donnerhacke
* Simon Marlow wrote: further sub-versions may be added after the x.y, their meaning is package-defined. Ordering on versions is lexicographic, given multiple versions that satisfy a dependency Cabal will pick the latest. x.y.z should be ordered numerically, if possible. As suggested by

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Simon Marlow wrote: Claus Reinke wrote: - if you provide a 'base' configuration that pulls in the stuff that used to be in base, the package will work I don't know of a way to do that. The name of the package is baked into the object files at compile time, so you can't use the same

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Bayley, Alistair wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Marlow x changes == API changed x constant but y changes == API extended only x and y constant == API is identical Ordering on versions is lexicographic, given multiple versions that satisfy

[Haskell-cafe] Re: Proposal: register a package as providing several API versions

2007-10-16 Thread Simon Marlow
ChrisK wrote: Simon Marlow wrote: Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. I have another concrete proposal to avoid things breaking so often. Let us steal from

[Haskell-cafe] RE: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Bayley, Alistair
From: Simon Marlow [mailto:[EMAIL PROTECTED] The lexicographical ordering would make 10.0 9.3. In general, A.B C.D iff A C or A == C B D. When we say the latest version we mean greatest, implying that version numbers increase with time. Does that help? Sort of. It's what

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Simon Marlow
Bayley, Alistair wrote: From: Simon Marlow [mailto:[EMAIL PROTECTED] The lexicographical ordering would make 10.0 9.3. In general, A.B C.D iff A C or A == C B D. When we say the latest version we mean greatest, implying that version numbers increase with time. Does that help?

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Thomas Hartman
dons's blog entry on parsing dates might point somewhere useful http://cgi.cse.unsw.edu.au/~dons/blog/2006/11/12#rpn-reloaded t. Don Stewart [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/15/2007 08:25 PM To Justin Bailey [EMAIL PROTECTED] cc Haskell-Cafe haskell-cafe@haskell.org Subject

Re: [Haskell-cafe] Equality Question

2007-10-16 Thread Thomas Hartman
not quite the same issue, but you might be interested by http://people.cs.uu.nl/stefan/blog/00012.html which notes: Prelude let apply = \f x - f x Prelude let apply' = \f - f Prelude apply undefined `seq` () () Prelude apply' undefined `seq` () *** Exception: Prelude.undefined mulling

Re: [Haskell-cafe] Equality Question

2007-10-16 Thread Thomas Hartman
a good sanity check for saneness of two fxs is to quickcheck them, as I believe I provided an example to for a previous question of yours. Though I think in this case that's impossible because, as someone else pointed out, not even the function tyes agree. t. PR Stanley [EMAIL PROTECTED]

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Brandon S. Allbery KF8NH
On Oct 16, 2007, at 4:21 , Ketil Malde wrote: The major/minor scheme has worked nicely for .so for ages. i'm not so sure about that. it may be better than alternatives, but [..] Also, it sees a lot of testing, at least in current Linux distributions. The point is that the end-user

Re: [Haskell-cafe] RE: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Brandon S. Allbery KF8NH
On Oct 16, 2007, at 9:01 , Bayley, Alistair wrote: From: Simon Marlow [mailto:[EMAIL PROTECTED] The lexicographical ordering would make 10.0 9.3. In general, A.B C.D iff A C or A == C B D. When we say the latest version we mean greatest, implying that version numbers increase with

RE: [Haskell-cafe] How to thoroughly clean up Haskell stuff on linux

2007-10-16 Thread Thomas Hartman
Indeed, I don't want to waste time but have no choice (rpm needs root), not sure if this'll help (never tried it myself) but this claims there's a non-root way to use rpm http://www.techonthenet.com/linux/build_rpm.php cheers, t. --- This e-mail may contain confidential and/or privileged

Re: [Haskell-cafe] Re: Proposal: register a package as providing several API versions

2007-10-16 Thread Stefan O'Rear
On Tue, Oct 16, 2007 at 01:57:01PM +0100, Simon Marlow wrote: Certainly, this is something we want to support. However, there's an important difference between shared-library linking and Haskell: in Haskell, a superset of an API is not backwards-compatible, because it has the potential to

Re: [Haskell-cafe] Haskell libraries for computer vision

2007-10-16 Thread Paul Hudak
Henning Thielemann wrote: On Mon, 15 Oct 2007, Don Stewart wrote: http://alberrto.googlepages.com/easyvision An experimental Haskell system for fast prototyping of computer vision and image processing applications. Looks ridiculously cool. Image processing with Haskell -

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Bjorn Bringert
On Oct 16, 2007, at 2:25 , Don Stewart wrote: jgbailey: I am trying to parse various date and time formats using the parseTime function found in (GHC 6.6.1) Data.Time.Format. The one that is giving me trouble looks like this: 2008-06-26T11:00:00.000-07:00 Specifically,

[Haskell-cafe] Re: Proposal: register a package as providing several API versions

2007-10-16 Thread Ketil Malde
ChrisK [EMAIL PROTECTED] writes: Once it is possible to have cabal register the hsFoo-3.0.0 also as hsFoo-2 it will be easy to upgrade to hsFoo. No old programs will fail to compile. Who here knows enough about the ghc-pkg database to say how easy or hard this would be? Ignoring disk

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
1. Document the version numbering policy. agreed. just making everybody's interpretation explicit has already exposed subtle differences, so documenting common ground will help. We should have done this earlier, but we didn't. The proposed policy, for the sake of completeness is: x.y where:

Re: [Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Claus Reinke
If the convention for modifying package versions of form x.y.z is: - increment z for bugfixes/changes that don't alter the interface - increment y for changes that consist solely of additions to the interface, parts of the interface may be marked as deprecated - increment x for changes that

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-16 Thread Claus Reinke
I have another concrete proposal to avoid things breaking so often. Let us steal from something that works: shared library versioning on unixy systems. indeed!-) there are established workarounds that are needed to make that system work as it does, so it is a good idea to check whether cabal

Re: [Haskell-cafe] Re: Proposal: register a package as providingseveral API versions

2007-10-16 Thread Simon Marlow
Claus Reinke wrote: It could be done using the tricks that Claus just posted and I followed up on. You'd need a separate package for hsFoo-2 that specifies exactly which bits of hsFoo-3 are re-exported. Given some Cabal support and a little extension in GHC, this could be made relatively

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Justin Bailey
On 10/16/07, Bjorn Bringert [EMAIL PROTECTED] wrote: Hmm, perhaps I should clarify this: parsedate and time-1.1.1 (which comes with GHC 6.6.1) have different APIs. parsedate produces CalendarTimes, and the code in time-1.1.1 produces the new time and date data types. So I guess parsedate

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Neil Mitchell
Hi (/ 10) means the function that divides its argument by 10 (- 10) however is just the number -10, even if I put a space between the - and 10. How can I create a function that subtracts 10 from its argument in a clean way then? subtract is the way to go. (`subtract` 10) I think you

Re: [Haskell-cafe] Performance problem with random numbers

2007-10-16 Thread Peter Verswyvelen
Does the GHC code generator makes use of SIMD instructions? Maybe via the C compiler? Cheers, Peter Simon Peyton-Jones wrote: We'd be delighted if someone offered a more performant library to put into future GHC releases. | I've seen similar results switching to the SIMD mersenne twister C

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Bjorn Bringert
On Oct 16, 2007, at 17:54 , Justin Bailey wrote: On 10/16/07, Bjorn Bringert [EMAIL PROTECTED] wrote: Hmm, perhaps I should clarify this: parsedate and time-1.1.1 (which comes with GHC 6.6.1) have different APIs. parsedate produces CalendarTimes, and the code in time-1.1.1 produces the new

Re: [Haskell-cafe] Distributed haskell using Hadoop

2007-10-16 Thread Murray Gross
At Brooklyn College we have been running distributed Haskell (release 5, though) under Linux/Mosic for several years. There are some problems, but we think they are well under control. Murray Gross Brooklyn College, City University of New York On Tue, 16 Oct 2007, Brad Clow wrote: I

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Justin Bailey
On 10/16/07, Bjorn Bringert [EMAIL PROTECTED] wrote: Should we just add XX:XX as an alternative time zone offset format accepted by %z and %Z? Is this a standard format? I'm not sure, but I am getting this date from Google in their XML feeds representing calendar data. The specific element

Re: [Haskell-cafe] Re: Proposal: register a package asprovidingseveral API versions

2007-10-16 Thread Claus Reinke
are those tricks necessary in this specific case? couldn't we have a list/range of versions in the version: field, and let cabal handle the details? I don't understand what you're proposing here. Surely just writing version: 1.0, 2.0 isn't enough - you need to say what the 1.0 and 2.0 APIs

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Derek Elkins
On Tue, 2007-10-16 at 17:02 +0100, Neil Mitchell wrote: Hi (/ 10) means the function that divides its argument by 10 (- 10) however is just the number -10, even if I put a space between the - and 10. How can I create a function that subtracts 10 from its argument in a clean way

Re: [Haskell-cafe] Distributed haskell using Hadoop

2007-10-16 Thread Adam Langley
On 10/16/07, Brad Clow [EMAIL PROTECTED] wrote: I would prefer a more Haskell orientated solution and welcome any suggestions. If not maybe this will be of use to others. Well, Hadoop is aiming towards a Google style of cluster processing and the path towards that is pretty clear: 1) An XDR

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Neil Mitchell
Hi I think you should have to write negative numbers using the syntax 0-10, since currently having one single unary operator is ugly. I think writing 0-10 is ugly. Ugly - yes. But very clear as to its meaning. How often do people actually write negative numeric literals? My guess is that

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Michael Campbell
On 10/16/07, Neil Mitchell [EMAIL PROTECTED] wrote: Ugly - yes. But very clear as to its meaning. How often do people actually write negative numeric literals? Any time I need one. And I can guarantee I don't make the compiler perform an arithmetic computation to get one, either. -- Wise

Re: [Haskell-cafe] System.Posix

2007-10-16 Thread Galchin Vasili
Hi Bjorn (and everybody), What would it entail to get System.Posix working on Windows? Would a mininum requirement e.g. be teh installation of http://www.cygwin.com? Or write a POSIX API to Win32 API binding? If I understand the problem, I wouldn't mind giving a run at it! Regards, Bill On

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread David Christensen
I think you should have to write negative numbers using the syntax 0-10, since currently having one single unary operator is ugly. I think writing 0-10 is ugly. Ugly - yes. But very clear as to its meaning. How often do people actually write negative numeric literals? My guess is that -1 is

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Ross Paterson
On Tue, Oct 16, 2007 at 01:08:49PM +0100, Simon Marlow wrote: So rather than keep replying to individual points, I'd like to make some concrete proposals so we can make progress. 1. Document the version numbering policy. We should have done this earlier, but we didn't. The proposed policy,

Re: [Haskell-cafe] System.Posix

2007-10-16 Thread Bjorn Bringert
If you want to try and implement some of the System.Posix API using the win32 API, a good place to put that would be in the unix-compat package. Darcs repo: http://www.cs.chalmers.se/~bringert/darcs/unix-compat/ Hackage page: http://hackage.haskell.org/cgi-bin/hackage-scripts/

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Isaac Dupree
Ross Paterson wrote: I would make API extended only a bit more precise: any module that uses explicit import lists will not be affected by the changes. So one can add classes, types and functions, but not instances (except where either the class or the type is new). okay You probably can't

Re: [Haskell-cafe] Equality Question

2007-10-16 Thread Dan Weston
Your intuition that id is related to const is a good one, since id can be defined in terms of const. Here is one of many: id' = flip const const [This is also called a CKK combinator. See http://en.wikipedia.org/wiki/S_combinator#Combinatory_calculi for more examples, such as SKK, SKS, and

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Carl Witty
On Tue, 2007-10-16 at 09:25 -0700, Justin Bailey wrote: On 10/16/07, Bjorn Bringert [EMAIL PROTECTED] wrote: Should we just add XX:XX as an alternative time zone offset format accepted by %z and %Z? Is this a standard format? Yes, this is standard; see below.

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Don Stewart
simonmarhaskell: Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. So rather than keep replying to individual points, I'd like to make some concrete proposals so we can

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Neil Mitchell
Hi I agree. = 1.0 isn't viable in the long term. Rather, a specific list, or bounded range of tested versions seems likely to be more robust. In general, if it compiles and type checks, it will work. It is rare that an interface stays sufficiently similar that the thing compiles, but then

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Isaac Dupree
Neil Mitchell wrote: Hi I agree. = 1.0 isn't viable in the long term. Rather, a specific list, or bounded range of tested versions seems likely to be more robust. In general, if it compiles and type checks, it will work. It is rare that an interface stays sufficiently similar that the thing

Re: [Haskell-cafe] Performance problem with random numbers

2007-10-16 Thread Stefan O'Rear
On Tue, Oct 16, 2007 at 06:07:39PM +0200, Peter Verswyvelen wrote: Does the GHC code generator makes use of SIMD instructions? Maybe via the C compiler? No. GHC uses GCC extensions, and GCC doesn't support automatic SIMD use. (You could use -unreg and an advanced compiler. Good luck finding

Re: [Haskell-cafe] Help parsing dates and times

2007-10-16 Thread Bjorn Bringert
On Oct 16, 2007, at 21:39 , Carl Witty wrote: On Tue, 2007-10-16 at 09:25 -0700, Justin Bailey wrote: On 10/16/07, Bjorn Bringert [EMAIL PROTECTED] wrote: Should we just add XX:XX as an alternative time zone offset format accepted by %z and %Z? Is this a standard

[Haskell-cafe] Bug in runInteractiveProcess?

2007-10-16 Thread John Goerzen
Hi everyone, I have been trying to implement a Haskell-like version of shell pipelines using runInteractiveProcess. I am essentially using hGetContents to grab the output from one command, and passing that to (forkIO $ hPutStr) to write to the next. Slow, but this is just an experiment. This

[Haskell-cafe] Functional Programming Books

2007-10-16 Thread Dan Piponi
I was just putting together my Amazon wish list and was wondering if there are any great books on Haskell and/or functional programming that people think are must-reads. Okasaki's Purely Functional Programming, Pierce's Types and Programming Languages are frequent recommendations. Smullyan's To

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Peter Verswyvelen
Concurrent Clean uses the ~ symbol for unary negation. That's also a way of fixing it. Personally I could also live with allowing no space between the minus sign and the number... If you leave a space, - becomes the subtract operator. Coming from C++ I always make the mistake to forget

Re: [Haskell-cafe] Functional Programming Books

2007-10-16 Thread Don Stewart
dpiponi: I was just putting together my Amazon wish list and was wondering if there are any great books on Haskell and/or functional programming that people think are must-reads. Okasaki's Purely Functional Programming, Pierce's Types and Programming Languages are frequent recommendations.

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Isaac Dupree
Peter Verswyvelen wrote: Personally I could also live with allowing no space between the minus sign and the number... If you leave a space, - becomes the subtract operator. I once thought that... there was the opposition that (x-1) subtraction of a constant appears too often. And I found

Re: [Haskell-cafe] Bug in runInteractiveProcess?

2007-10-16 Thread Jules Bean
John Goerzen wrote: Many systems will just try to close *all* FDs except the ones they need after a fork(). Another approach would be to maintain a global list of FDs that the Haskell thread is using, and close all of them except the pipe ends in the child. Does this make sense to everyone?

[Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread John Goerzen
On 2007-10-16, Jules Bean [EMAIL PROTECTED] wrote: John Goerzen wrote: Many systems will just try to close *all* FDs except the ones they need after a fork(). Another approach would be to maintain a global list of FDs that the Haskell thread is using, and close all of them except the pipe

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Daniel McAllansmith
Following is a summary of my thoughts on the matter, in large part so I can figure out what I'm thinking... apologies if it's a bit of a ramble. All comments welcome. Basically - version numbering which differs from Simon's proposal - precise dependencies, I think the same as Simon is

[Haskell-cafe] Re: Proposal: register a package as providing several API versions

2007-10-16 Thread Daniel McAllansmith
On Wednesday 17 October 2007 01:32, ChrisK wrote: Simon Marlow wrote: Several good points have been raised in this thread, and while I might not agree with everything, I think we can all agree on the goal: things shouldn't break so often. I have another concrete proposal to avoid things

[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

2007-10-16 Thread Ian Lynagh
[would it be possible to pick a single list to discuss this on please, so there is no danger of some people missing some subthreads if they aren't on all the lists, or getting messages 3 times if they are?] On Tue, Oct 16, 2007 at 01:08:49PM +0100, Simon Marlow wrote: 2. Precise dependencies.

[Haskell-cafe] using quickcheck to generate test (table) data

2007-10-16 Thread Thomas Hartman
I wanted to generate some random table data, and decided to use quickcheck to do this. I didn't want to be checking properties, I actually wanted to output the examples that quickcheck came up with using arbitrary. In this case, I wanted to generate lists of lists of strings. In case this is

[Haskell-cafe] Re: [Haskell] IN Doubt...

2007-10-16 Thread ajb
[Moved to haskell-cafe] G'day all. Quoting Don Stewart [EMAIL PROTECTED]: You can't pattern match 'a' and 'a' like that -- there's no implicit unification. Since we're being nostalgic in other threads, this is #1 on my list of things I miss from Miranda. It's also high on my things that

Re: [Haskell-cafe] OzHaskell?!?

2007-10-16 Thread Manuel M T Chakravarty
I wrote a while ago, There is AngloHaskell and now AmeroHaskell. Doesn't that call for OzHaskell? http://haskell.org/haskellwiki/OzHaskell In the meantime a number of interested people put their name down on the wiki page. So, let's talk more concretely about a first meeting. I have

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread John Meacham
On Tue, Oct 16, 2007 at 06:27:19PM -0300, Isaac Dupree wrote: Peter Verswyvelen wrote: Personally I could also live with allowing no space between the minus sign and the number... If you leave a space, - becomes the subtract operator. I once thought that... there was the opposition that

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Richard A. O'Keefe
On 17 Oct 2007, at 10:58 am, John Goerzen wrote: Do you mean FD_CLOEXEC, which can be set with fcntl()? If so, it's not defined in POSIX according to the Linux manpage. I couldn't find CLOSE_ON_EXEC in either open(2) or fcntl(2). F_GETFD and F_SETFD are the things to look for; FD_CLOEXEC

Re: [Haskell-cafe] Strange subtract operator behavior

2007-10-16 Thread Lennart Augustsson
If naturals have a perfectly reasonable subtraction then they also have a perfectly reasonable negate; the default is 0-x. (Oh, subtraction wasn't THAT reasonable, you say. :) ) -- Lennart On 10/17/07, John Meacham [EMAIL PROTECTED] wrote: On Tue, Oct 16, 2007 at 06:27:19PM -0300, Isaac

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Brandon S. Allbery KF8NH
On Oct 16, 2007, at 21:40 , Richard A. O'Keefe wrote: F_GETFD and F_SETFD are the things to look for; FD_CLOEXEC is a fancy way of saying 1 in historic UNIXes. The OSF/1 /usr/include/sys/ fcntl.h says that FD_CLOEXEC is POSIX REQUIRED. This facility is most certainly part of the Single Unix

Re: [Haskell-cafe] Strange subtract operator behavior - and lazy naturals

2007-10-16 Thread John Meacham
On Wed, Oct 17, 2007 at 03:13:23AM +0100, Lennart Augustsson wrote: If naturals have a perfectly reasonable subtraction then they also have a perfectly reasonable negate; the default is 0-x. (Oh, subtraction wasn't THAT reasonable, you say. :) ) I suppose I was overextending the use of

[Haskell-cafe] job opportunity

2007-10-16 Thread jeff p
Hello, Here are the essential details... Location: NYC Industry: finance Salary: enough to live comfortably in Manhattan Hard Requirements: Must be able to work in the USA (we can't get you a worker's visa). Must be an expert level Haskell user; must be comfortable with monads,

Re: [Haskell-cafe] OzHaskell?!?

2007-10-16 Thread Don Stewart
chak: I wrote a while ago, There is AngloHaskell and now AmeroHaskell. Doesn't that call for OzHaskell? http://haskell.org/haskellwiki/OzHaskell In the meantime a number of interested people put their name down on the wiki page. So, let's talk more concretely about a first

Re: [Haskell-cafe] Functional Programming Books

2007-10-16 Thread Albert Y. C. Lai
Richard Bird's Introduction to Functional Programming using Haskell, second edition exceeds other introductory books by introducing laws (e.g., fold laws, fusion laws), efficiency issues (including the stack overflow question, deforestation), and monad transformers. IMO these are

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Donn Cave
On Oct 16, 2007, at 7:31 PM, Brandon S. Allbery KF8NH wrote: I could dig for official confirmation, but this is my understanding of both POSIX and SUS, and portable C programs generally #define FD_CLOEXEC to 1 if it doesn't already exist, since the value *is* standard even though the name

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Brandon S. Allbery KF8NH
On Oct 17, 2007, at 0:39 , Donn Cave wrote: On Oct 16, 2007, at 7:31 PM, Brandon S. Allbery KF8NH wrote: I could dig for official confirmation, but this is my understanding of both POSIX and SUS, and portable C programs generally #define FD_CLOEXEC to 1 if it doesn't already exist,

Re: [Haskell-cafe] Bug in runInteractiveProcess?

2007-10-16 Thread Donn Cave
On Oct 16, 2007, at 1:48 PM, John Goerzen wrote: I have been trying to implement a Haskell-like version of shell pipelines using runInteractiveProcess. I am essentially using hGetContents to grab the output from one command, and passing that to (forkIO $ hPutStr) to write to the next. Slow,

Re: [Haskell-cafe] Functional Programming Books

2007-10-16 Thread Justin Bailey
On 10/16/07, Dan Piponi [EMAIL PROTECTED] wrote: I was just putting together my Amazon wish list and was wondering if there are any great books on Haskell and/or functional programming that people think are must-reads. Okasaki's Purely Functional Hudak's The Haskell School of Expression is

Re: [Haskell-cafe] Re: Bug in runInteractiveProcess?

2007-10-16 Thread Donn Cave
On Oct 16, 2007, at 9:52 PM, Brandon S. Allbery KF8NH wrote: On Oct 17, 2007, at 0:39 , Donn Cave wrote: ... As for closing file descriptors explicitly - if I remember right what I've seen in the NetBSD source, the UNIX popen() implementation may years ago have closed all file descriptors,