[Haskell-cafe] Detecting unused read handles? (was: File handles and pipes)

2008-10-19 Thread Stephen Hicks
On Sun, Oct 19, 2008 at 1:44 AM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Oct 19, at 1:37, Stephen Hicks wrote: I'm trying to understand how to get pipes working in Haskell, in particular with the revamped System.Process (though I've tried similar experiments with

Re: [Haskell-cafe] File handles and pipes

2008-10-19 Thread Donn Cave
Quoth Stephen Hicks [EMAIL PROTECTED]: In general, given a handful of system calls (and/or read/write handles), is there a way to combine them all together? Well, sure - if I understand what you mean. Not Handles, in the sense of a Haskell library construct, but UNIX pipes and processes

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Claus Reinke
I have a standard Data.Map.Map as the base structure for one of my macid data tables (jobs), but I noticed something that is probably causing problems for me. Even a simple 20 million record with int/int key values causes an out of memory error for me in ghci, Int keys, Int values eh? Does

Re[2]: [Haskell-cafe] is 256M RAM insufficient for a 20 million element Int/Int map?

2008-10-19 Thread Bulat Ziganshin
Hello Bertram, Sunday, October 19, 2008, 6:19:31 AM, you wrote: That's 5 words per elements ... that, like everything else, should be multiplied by 2-3 to account GC effect -- Best regards, Bulatmailto:[EMAIL PROTECTED]

[Haskell-cafe] Re: File handles and pipes

2008-10-19 Thread Matti Niemenmaa
Brandon S. Allbery KF8NH wrote: Pipes are perhaps a bit misnamed: if you want to combine the output of two pipes and funnel it into a third you can't simply plumb them together, you need to provide code which reads from the output pipes and writes into the input pipe. With the new

Re[2]: [Haskell-cafe] is 256M RAM insufficient for a 20 million element Int/Int map?

2008-10-19 Thread Philippa Cowderoy
On Sun, 19 Oct 2008, Bulat Ziganshin wrote: Hello Bertram, Sunday, October 19, 2008, 6:19:31 AM, you wrote: That's 5 words per elements ... that, like everything else, should be multiplied by 2-3 to account GC effect Unless I'm much mistaken, that isn't the case when you're looking

[Haskell-cafe] haskell facebook

2008-10-19 Thread Jason Dusek
Has anyone taken a stab at Haskell FaceBook bindings? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re[3]: [Haskell-cafe] is 256M RAM insufficient for a 20 million element Int/Int map?

2008-10-19 Thread Philippa Cowderoy
On Sun, 19 Oct 2008, Bulat Ziganshin wrote: Hello Philippa, Sunday, October 19, 2008, 3:25:26 PM, you wrote: ... that, like everything else, should be multiplied by 2-3 to account GC effect Unless I'm much mistaken, that isn't the case when you're looking at the minimum heap size

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Luke Palmer
On Sun, Oct 19, 2008 at 4:26 AM, Claus Reinke [EMAIL PROTECTED] wrote: (hint to ghc hackers: 'Data.Map.Map Int !Int' and '[!a]' would really be useful!-), I can't figure out what that means though. Strictness is not a property of types or of values, it is a property of functions. [!] is not

Re[3]: [Haskell-cafe] is 256M RAM insufficient for a 20 million element Int/Int map?

2008-10-19 Thread Bulat Ziganshin
Hello Philippa, Sunday, October 19, 2008, 3:25:26 PM, you wrote: ... that, like everything else, should be multiplied by 2-3 to account GC effect Unless I'm much mistaken, that isn't the case when you're looking at the minimum heap size because the GC'll run more frequently when you hit the

Re[4]: [Haskell-cafe] is 256M RAM insufficient for a 20 million element Int/Int map?

2008-10-19 Thread Bulat Ziganshin
Hello Philippa, Sunday, October 19, 2008, 3:58:35 PM, you wrote: what you mean? max heap size is 2gb probably. it may be configured on Ah, so you can't trust GHC to pick a max heap size within what the OS actually has available? hm, this includes virtual memory too. there are code snippets

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 million element Int/Int map?

2008-10-19 Thread Bertram Felgenhauer
Bulat Ziganshin wrote: Hello Bertram, Sunday, October 19, 2008, 6:19:31 AM, you wrote: That's 5 words per elements ... that, like everything else, should be multiplied by 2-3 to account GC effect True. You can control this factor though. Two RTS options help: -c (Enable compaction

Re: [Haskell-cafe] Re: HDBC or HSQL

2008-10-19 Thread Thomas Hartman
I am asking because I am trying to make HAppS a reasonable replacement for all contexts in which you would otherwise use an external relational database except those in which an external SQL database is a specific requirement. My experience with HAppS so far suggests that if

Re: [Haskell-cafe] Re: HDBC or HSQL

2008-10-19 Thread Thomas Hartman
For the reasons described in my previous message, I plan on looking into using takusen with HAppS. 2007/8/4 Alex Jacobson [EMAIL PROTECTED]: Have you looked at the HAppS.DBMS.IxSet? It gives you a type safe way to query indexed collections. -Alex- Isto Aho wrote: Hi, I'd like to store

Re: [Haskell-cafe] package question/problem

2008-10-19 Thread Henning Thielemann
On Sat, 18 Oct 2008, Duncan Coutts wrote: On Fri, 2008-10-17 at 18:23 -0500, Galchin, Vasili wrote: Hello, I am trying to cabal install HSQL. I am using ghc 6.8.2. The simple answer is that the package is unmaintained and has not been updated to work with ghc 6.8.x. As far as I know,

Re: [Haskell-cafe] haskell facebook

2008-10-19 Thread Robert Wills
I don't know much about this, but... http://hackage.haskell.org/packages/archive/HAppS-Server/0.9.2.1/doc/html/HAppS-Server-Facebook.html As I recall, Alex Jacobson's talk contained an example of building a facebook app.

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelementInt/Int map?

2008-10-19 Thread Claus Reinke
(hint to ghc hackers: 'Data.Map.Map Int !Int' and '[!a]' would really be useful!-), I can't figure out what that means though. Strictness is not a property of types or of values, it is a property of functions. [!] is not a subtype of [] ; IOW, there is no a such that [a] = [!Int] (where

Re: [Haskell-cafe] haskell facebook

2008-10-19 Thread Thomas Hartman
I think the facebook stuff is abandonware. 2008/10/19 Robert Wills [EMAIL PROTECTED]: I don't know much about this, but... http://hackage.haskell.org/packages/archive/HAppS-Server/0.9.2.1/doc/html/HAppS-Server-Facebook.html As I recall, Alex Jacobson's talk contained an example of building a

external sort on hackage Re: [Haskell-cafe] External Sort and unsafeInterleaveIO

2008-10-19 Thread Thomas Hartman
External sort is on hackage at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/external-sort Ben, I forgot to correct your name, but I will fix it soon. Thomas. 2008/10/11 Ben [EMAIL PROTECTED]: Fine with me, except my last name is Lee not Midfield. Thanks for doing this. Ben

Re: [Haskell-cafe] Detecting unused read handles? (was: File handles and pipes)

2008-10-19 Thread Brandon S. Allbery KF8NH
On 2008 Oct 19, at 2:39, Stephen Hicks wrote: I've got one more question now. Suppose I want to do the same thing on the other side, with two processes *receiving* the data. Is there a way to tell whether the first process wants input, and if not, wait for the second process to do anything?

Re: [Haskell-cafe] Error building GHC 6.8.3: version of ../../compiler/stage1/ghc-inplace could not be determined

2008-10-19 Thread Ian Lynagh
Hi Devin, On Sun, Oct 12, 2008 at 06:03:30PM -0700, Devin Mullins wrote: I'm trying to build 6.8.3 on Linux PowerPC, based on an old binary of 6.4 (latest build for this arch that I found). stage1 seems to have built, but from there, building libraries almost immediately fails: You could

Re: [Haskell-cafe] package question/problem

2008-10-19 Thread Mads Lindstrøm
Hi, Galchin, Vasili wrote: Hi Duncan, I was under the impression that HDBC doesn't support myqsl?? You can connect HDBC to MySQL using the HDBC-ODBC backend, see http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HDBC-odbc. Greetings, Mads Lindstrøm Regards, Vasili On

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelementInt/Int map?

2008-10-19 Thread Dan Doel
On Sunday 19 October 2008 10:32:08 am Claus Reinke wrote: (hint to ghc hackers: 'Data.Map.Map Int !Int' and '[!a]' would really be useful!-), I can't figure out what that means though. Strictness is not a property of types or of values, it is a property of functions. [!] is not a

[Haskell-cafe] Re: [Haskell] Probably a trivial thing for people knowing Haskell

2008-10-19 Thread Paul Johnson
Friedrich wrote: Paul Johnson [EMAIL PROTECTED] writes: [...] Because file reading is lazy, each line is only read when it is to be processed, and then gets reaped by the garbage collector. So it all runs in constant memory. Would you mind to elaborate a bit about it. What's so

[Haskell-cafe] A heretic question

2008-10-19 Thread Achim Schneider
What kind of things, barring coding on Haskell-less platforms and library interfaces would you choose to do in C++? I'm asking 'cos I'm learning C++ and can't get the proper motivation to do any program I can think of in it: If I need abstraction, I'm thinking Haskell or Scheme, and if I'm

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread John Van Enk
C++ is nicer to work with, when you have the option, on embedded microprocessors. Dealing with C all the time can be a little cumbersome. Actually, I've parroted this over and over, if I *could* use Haskell on an embedded micro, I would. There needs to be more work in that area. /jve On Sun,

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread Miguel Mitrofanov
On 20 Oct 2008, at 01:08, Achim Schneider wrote: I'm asking 'cos I'm learning C++ and can't get the proper motivation to do any program I can think of in it: If I need abstraction, I'm thinking Haskell or Scheme, and if I'm thinking performance, C itself more than suffices. Seems like

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread Derek Elkins
On Sun, 2008-10-19 at 23:08 +0200, Achim Schneider wrote: What kind of things, barring coding on Haskell-less platforms and library interfaces would you choose to do in C++? I'm asking 'cos I'm learning C++ and can't get the proper motivation to do any program I can think of in it: If I need

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread Erik de Castro Lopo
Achim Schneider wrote: What kind of things, barring coding on Haskell-less platforms and library interfaces would you choose to do in C++? I'm realatively new to Haskell but I've been coding pretty intensively in Ocaml for a number of years. For new code, there is stuff I would do in C over

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread Jason Dagit
On Sun, Oct 19, 2008 at 2:08 PM, Achim Schneider [EMAIL PROTECTED] wrote: What kind of things, barring coding on Haskell-less platforms and library interfaces would you choose to do in C++? You're asking a crowd that is heavily biased towards Haskell, what they would use C++ for? You should

Re: [Haskell-cafe] Glut using freeglut and non starndard header / lib location?

2008-10-19 Thread Henk-Jan van Tuyl
On Sat, 18 Oct 2008 01:19:42 +0200, Marc Weber [EMAIL PROTECTED] wrote: Which is the way to install the glut library with non standard header / lib location? I've tried setting CFLAGS before running ./configure ./setup configure and adding the include directory this way include-dirs:

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Don Stewart
claus.reinke: I have a standard Data.Map.Map as the base structure for one of my macid data tables (jobs), but I noticed something that is probably causing problems for me. Even a simple 20 million record with int/int key values causes an out of memory error for me in ghci, Int keys,

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread Luke Palmer
On Sun, Oct 19, 2008 at 3:08 PM, Achim Schneider [EMAIL PROTECTED] wrote: What kind of things, barring coding on Haskell-less platforms and library interfaces would you choose to do in C++? I would recommend programming a simple game using SDL. That is currently not that much easier in Haskell

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Luke Palmer
On Sun, Oct 19, 2008 at 5:05 PM, Don Stewart [EMAIL PROTECTED] wrote: In general, being able to specialise polymorphic structures so they look like unpacked monomorphic ones would be awesome. (!Int, !Bool) - (,) {-# UNPACK #-}!Int {-# UNPACK #-}!Bool I repeat my concern about this

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread Bulat Ziganshin
Hello Achim, Monday, October 20, 2008, 1:08:06 AM, you wrote: thinking Haskell or Scheme, and if I'm thinking performance, C itself more than suffices. ... and machine code too :D C++ is the highest level language that provide asm-like speed, so it's hard to find reasons to use C instead.

Re: [Haskell-cafe] Error building GHC 6.8.3: version of ../../compiler/stage1/ghc-inplace could not be determined

2008-10-19 Thread Devin Mullins
On Sun, Oct 19, 2008 at 05:13:55PM +0100, Ian Lynagh wrote: You could unpack the Debian package of 6.8.2: http://packages.debian.org/lenny/powerpc/ghc6/download Thanks! Indeed, I was able to use this to build 6.8.3. Also, when building yourself, an unregisterised build is more likely to work

[Haskell-cafe] Questions for Free!

2008-10-19 Thread Creighton Hogg
Hello Haskellers, So I have a bit of a follow up question after reading Theorems For Free! this weekend. There's a throw away comment near the beginning about how you can recast the results into category theoretic form, but using lax natural transformations. Now I'm assuming this means a natural

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Max Bolingbroke
2008/10/20 Don Stewart [EMAIL PROTECTED]: claus.reinke: Ideally, I'd just like to indicate the strictness in the types (hint to ghc hackers: 'Data.Map.Map Int !Int' and '[!a]' would really be useful!-), In general, being able to specialise polymorphic structures so they look like unpacked

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Max Bolingbroke
2008/10/20 Luke Palmer [EMAIL PROTECTED]: On Sun, Oct 19, 2008 at 5:05 PM, Don Stewart [EMAIL PROTECTED] wrote: In general, being able to specialise polymorphic structures so they look like unpacked monomorphic ones would be awesome. (!Int, !Bool) - (,) {-# UNPACK #-}!Int {-#

Re: [Haskell-cafe] A heretic question

2008-10-19 Thread ajb
G'day all. On Sun, 2008-10-19 at 23:08 +0200, Achim Schneider wrote: I'm asking 'cos I'm learning C++ and can't get the proper motivation to do any program I can think of in it: If I need abstraction, I'm thinking Haskell or Scheme, and if I'm thinking performance, C itself more than suffices.

Re[2]: [Haskell-cafe] A heretic question

2008-10-19 Thread Bulat Ziganshin
Hello ajb, Monday, October 20, 2008, 4:50:45 AM, you wrote: The trouble is that C++ is a tool that's hard to use well. But that's why they pay us the big bucks, right? i think that one day we will hear that ML was too easy language and they invented Haskell in order to keep future salaries

Re: Re[2]: [Haskell-cafe] A heretic question

2008-10-19 Thread Brandon S. Allbery KF8NH
On 2008 Oct 19, at 21:07, Bulat Ziganshin wrote: Monday, October 20, 2008, 4:50:45 AM, you wrote: The trouble is that C++ is a tool that's hard to use well. But that's why they pay us the big bucks, right? i think that one day we will hear that ML was too easy language and they invented

Re: [Haskell-cafe] package question/problem

2008-10-19 Thread Duncan Coutts
On Sat, 2008-10-18 at 23:38 -0500, Galchin, Vasili wrote: Hi Duncan, I was under the impression that HDBC doesn't support myqsl?? I believe it works via ODBC. But perhaps you can persuade Frederik Eaton to make new working releases of HSQL. Duncan

Re: [Haskell-cafe] is 256M RAM insufficient for a 20 millionelement Int/Int map?

2008-10-19 Thread Duncan Coutts
On Sun, 2008-10-19 at 16:05 -0700, Don Stewart wrote: I'd like them strict and specialised, So that: data IntMap a = Nil | Tip {-# UNPACK #-} !Key a | Bin {-# UNPACK #-} !Prefix {-# UNPACK #-} !Mask !(IntMap a) !(IntMap a) applied as so,