Re: [Haskell-cafe] Cabal

2008-12-01 Thread Henning Thielemann
On Sun, 30 Nov 2008, Duncan Coutts wrote: On Sun, 2008-11-30 at 21:14 +0100, Henning Thielemann wrote: On Sun, 30 Nov 2008, Don Stewart wrote: lemming: Maybe you like to add a pointer in cabal-install.cabal/Homepage field to this page. Good idea. Duncan? After I finished that article,

Re: [Haskell-cafe] Combining licences

2008-12-01 Thread Henning Thielemann
On Mon, 1 Dec 2008, Emil Axelsson wrote: Or perhaps it's better to put the cell library in its own package? I'm a bit reluctant to do this, because it means that Wired will be essentially useless on its own. It's more the question, whether a Haskell wrapper to the cell library is useful on

Re: [Haskell-cafe] Combining licences

2008-12-01 Thread Emil Axelsson
Henning Thielemann skrev: On Mon, 1 Dec 2008, Emil Axelsson wrote: Or perhaps it's better to put the cell library in its own package? I'm a bit reluctant to do this, because it means that Wired will be essentially useless on its own. It's more the question, whether a Haskell wrapper to the

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-01 Thread Jules Bean
Andrew Coppin wrote: What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I

[Haskell-cafe] Re: Binary Trees missing on hackage

2008-12-01 Thread Andrew Wagner
The reasons I've always heard for this is that 1.) It's so easy to define a tree and 2.) There are tons of different variations of trees and what you can do with them. Not that I 100% agree, just what I've always heard. On Mon, Dec 1, 2008 at 6:09 AM, Christian Maeder [EMAIL PROTECTED]wrote:

Re: [Haskell-cafe] Haskell, successing crossplatform API standart

2008-12-01 Thread Bjorn Bringert
On Sun, Nov 30, 2008 at 17:51, Sterling Clover [EMAIL PROTECTED] wrote: Haxr provides a basic implementation of the XML-RPC protocol, and while it looks like it doesn' t build on 6.10 at the moment, getting it to build shouldn't be a problem, and although it doesn't appear to be under active

[Haskell-cafe] Re: catting to cat gets stuck at 135K

2008-12-01 Thread Simon Marlow
Donn Cave wrote: Quoth Duncan Coutts [EMAIL PROTECTED]: | On Thu, 2008-11-27 at 11:38 -0500, Brandon S. Allbery KF8NH wrote: | | The way this is usually handled in the non-threaded case is to either | use SIGCHLD or non-blocking waitpid() so that green threads can | continue running. I'm a

[Haskell-cafe] Re: Binary Trees missing on hackage

2008-12-01 Thread Andrew Wagner
Hm, I've been thinking about this this morning as I've gone about my commute. I could indeed imagine a class like the following that had multiple implementations like you're talking about: class Tree t where drawTree :: t String - String flatten :: t a - [a] etc. (see

[Haskell-cafe] Re: getLine and ^C on Windows

2008-12-01 Thread Simon Marlow
Mitchell, Neil wrote: Hi I have the same experience with Windows XP and getContents, so I think it's the entire IO layer on Windows, rather than just getLine on Vista. This is being tracked here http://hackage.haskell.org/trac/ghc/ticket/2758 Which is now fixed, FYI. 6.10.2 will have the

[Haskell-cafe] Re: Problem with directory-1.0.0.0

2008-12-01 Thread Simon Marlow
Bartosz Wójcik wrote: Hi Folks, I'm facing problem after I've reinstalled directory-1.0.0.0 (setup configure/build/install). Since then I cannot complie anything that needs this library. It fails with following messages: Preprocessing library haddock-2.4.0... Preprocessing executables for

[Haskell-cafe] Re: Binary Trees missing on hackage

2008-12-01 Thread Christian Maeder
I find classes for sequences, collections (edison) and graphs (fgl) and your proposed trees a bit awkward. I'ld like to see the actual data types first. Like for lists I can imagine a whole bunch of useful functions for BinTree (below) that are already implemented multiple times for user defined

Re: [Haskell-cafe] workarounds for Codec.Compression.Zlib errors in darcs

2008-12-01 Thread Neil Mitchell
While that's true, Haskell also makes it easy to make the same sort of error with IO (or any other Monad) values, whether created with the FFI or not. If you say f = do x y z and y has type IO CInt then you won't get an error (and I don't think you can even ask for

[Haskell-cafe] Re: howto tuple fold to do n-ary cross product?

2008-12-01 Thread Larry Evans
On 11/30/08 12:49, Larry Evans wrote: [snip] You'll see Domains can be an mpl::vector of any length. The cross_nproduct_view_test.cpp tests with a 3 element Domains: typedef mpl::vector mpl::range_cint,0,4 , mpl::range_cint,100,103 , mpl::range_cint,2000,2002

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-01 Thread John Goerzen
Don Stewart wrote: Very curious. Did you file a bug report with the maintainers of the 30+ database packages on hackage? Or did you not have the underlying database drivers installed? Did you make any attempt to contact the authors to determine the cause of your problem? Incidentally,

[Haskell-cafe] Parallel alpha-beta search

2008-12-01 Thread Colin Paul Adams
Has anyone ever attempted this in Haskell? If so, what sort of speed-up have you had (with which algorithm)? -- Colin Adams Preston Lancashire ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] The Knight's Tour: solutions please

2008-12-01 Thread Bertram Felgenhauer
Don Stewart wrote: Lee Pike forwarded the following: Solving the Knight's Tour Puzzle In 60 Lines of Python http://developers.slashdot.org/article.pl?sid=08/11/30/1722203 Seems that perhaps (someone expert in) Haskell could do even better? Maybe even parallelize the

[Haskell-cafe] Scala job in Boston writing quantitative finance software

2008-12-01 Thread Paul Chiusano
Hi folks, The company I work for, ClariFI (http://clarifi.com/), is looking to hire developers with a strong background in functional programming to do a mixture of Scala and Java programming. It's fine if you don't happen to know Scala but are strong in Haskell - we are looking for people who

[Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-01 Thread Diego Echeverri
I've created a wiki page, http://haskell.org/haskellwiki/The_Knights_Tour I note the LogicT version is the shortest so far. -- Don Probably noob question. I was looking into the first solution in the page and tried to replace sortOn f = map snd . sortBy (comparing fst) . map (f id) for sortOn'

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-01 Thread Andrew Coppin
John Goerzen wrote: Don Stewart wrote: Very curious. Did you file a bug report with the maintainers of the 30+ database packages on hackage? Or did you not have the underlying database drivers installed? Did you make any attempt to contact the authors to determine the cause of your

Re: [Haskell-cafe] Re: The Knight's Tour: solutions please

2008-12-01 Thread Duncan Coutts
On Mon, 2008-12-01 at 22:48 +0100, Diego Echeverri wrote: I've created a wiki page, http://haskell.org/haskellwiki/The_Knights_Tour I note the LogicT version is the shortest so far. -- Don Probably noob question. I was looking into the first solution in the page and tried to replace

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-01 Thread Ganesh Sittampalam
On Sun, 30 Nov 2008, Neil Mitchell wrote: http://www.cs.york.ac.uk/fp/darcs/proposition/ Unreleased, but might be of interest. It simplifies propositional formulae, and can do so using algebraic laws, custom simplifications or BDDs. I don't really use this library, so if it is of interest to

[Haskell-cafe] Re: '#' in literate haskell

2008-12-01 Thread John MacFarlane
+++ Bertram Felgenhauer [Nov 30 08 09:57 ]: John MacFarlane wrote: Can anyone explain why ghc does not treat the following as a valid literate haskell program? - test.lhs # This is a test foo = reverse . words I believe this is an

Re: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-01 Thread John Goerzen
On Mon, Dec 01, 2008 at 09:59:24PM +, Andrew Coppin wrote: I don't think this state of affairs is unique in the Haskell world. Some people use Linux, Mac, or Windows as their main development box, but pretty much everybody tries to support all platforms. Incidentally, Andrew Coppin (CCd

Re: [Haskell-cafe] The Knight's Tour: solutions please

2008-12-01 Thread Dan Doel
On Monday 01 December 2008 1:39:13 pm Bertram Felgenhauer wrote: As one of the posters there points out, for n=100 the program doesn't actually backtrack if the 'loneliest neighbour' heuristic is used. Do any of our programs finish quickly for n=99? The Python one doesn't. Nothing I tried

[Haskell-cafe] Can anybody give me some advice on this?

2008-12-01 Thread Georgel Calin
Hello everybody, I have a piece of code that gives me headaches for some time now. Simply put, I would like to know which is the best way to overpass a Couldn't match expected type * against inferred type *-error and an Occurs check: cannot construct the infinite type:-error in the following

[Haskell-cafe] global variables for foreign C functions

2008-12-01 Thread Andrea Rossato
Hello, I'm writing the bindings to a C library which uses, in some functions, global variables. To make it clearer, those functions need a global variable to be defined. A C program using my_function, one of the library functions, would look like: char progname[] = a_program_name; int main(

Re: [Haskell-cafe] global variables for foreign C functions

2008-12-01 Thread Evan Laforge
On Mon, Dec 1, 2008 at 4:39 PM, Andrea Rossato [EMAIL PROTECTED] wrote: Hello, I'm writing the bindings to a C library which uses, in some functions, global variables. To make it clearer, those functions need a global variable to be defined. A C program using my_function, one of the library

Re: [Haskell-cafe] global variables for foreign C functions

2008-12-01 Thread Judah Jacobson
On Mon, Dec 1, 2008 at 4:55 PM, Evan Laforge [EMAIL PROTECTED] wrote: On Mon, Dec 1, 2008 at 4:39 PM, Andrea Rossato [EMAIL PROTECTED] wrote: Hello, I'm writing the bindings to a C library which uses, in some functions, global variables. To make it clearer, those functions need a global

Re: [Haskell-cafe] global variables for foreign C functions

2008-12-01 Thread John Meacham
On Mon, Dec 01, 2008 at 04:55:14PM -0800, Evan Laforge wrote: On Mon, Dec 1, 2008 at 4:39 PM, Andrea Rossato [EMAIL PROTECTED] wrote: Hello, I'm writing the bindings to a C library which uses, in some functions, global variables. To make it clearer, those functions need a global

Re: [Haskell-cafe] Can anybody give me some advice on this?

2008-12-01 Thread Ryan Ingram
The problem is this: what is the type of embeddedParser? Unless you can answer that question, you're not going to be able to write it. In particular, its *type* depends on the *value* of its argument; the type of embeddedParser [1,2] is different from the type of embeddedParser [1,1,2]. This

Re: [Haskell-cafe] Can anybody give me some advice on this?

2008-12-01 Thread Ryan Ingram
Also, if you can give up on the dependent types issue, and you just want the equivalent of embeddedParser [1,2], you have a problem that the type you are specifying is infinite; this is the cause of the occurs checks errors you are getting. Lets specify the type you are parsing directly, then

Re: [Haskell-cafe] global variables for foreign C functions

2008-12-01 Thread John Van Enk
I would find a ForeignData extension incredibly helpful. This will be crucial if Haskell ever wants to target out of the ordinary systems. /jve On Mon, Dec 1, 2008 at 8:38 PM, John Meacham [EMAIL PROTECTED] wrote: On Mon, Dec 01, 2008 at 04:55:14PM -0800, Evan Laforge wrote: On Mon, Dec 1,

Re: [Haskell-cafe] Re: Binary Trees missing on hackage

2008-12-01 Thread Brandon S. Allbery KF8NH
On 2008 Dec 1, at 8:28, Andrew Wagner wrote: Hm, I've been thinking about this this morning as I've gone about my commute. I could indeed imagine a class like the following that had multiple implementations like you're talking about: One can indeed --- but it turns out to be even more

[Haskell-cafe] bug in time libs?

2008-12-01 Thread Jason Dusek
I'm on 6.10.1, using the libs provided with the binary of GHC for Mac OS X. I was fooling around with the time package in GHCi and something seems to be off. I have included a transcript. If I take a time diff, then the seconds are positive when the picos are negative and vice versa.

Re: [Haskell-cafe] bug in time libs?

2008-12-01 Thread sam lee
I can't find document for System.Time . But I can import System.Time . It's weird... I can't find document for TimeDiff and related functions. I guess this is all deprecated. A related bug report: http://hackage.haskell.org/trac/ghc/ticket/2519 I would use Data.Time.Clock Prelude :m +

[Haskell-cafe] Re: Cabal

2008-12-01 Thread mail
Don Stewart [EMAIL PROTECTED] writes: I'm a fan of gitit, and its 46 dependencies, that install via cabal-install. Pretty awesome. gitit's 46 dependencies convinced me to install cabal-install, and now I couldn't be happier! ___ Haskell-Cafe

Re: [Haskell-cafe] The Knight's Tour: solutions please

2008-12-01 Thread wren ng thornton
Dan Doel wrote: On Monday 01 December 2008 1:39:13 pm Bertram Felgenhauer wrote: As one of the posters there points out, for n=100 the program doesn't actually backtrack if the 'loneliest neighbour' heuristic is used. Do any of our programs finish quickly for n=99? The Python one doesn't.

[Haskell-cafe] System.IO.UTF8 Problem

2008-12-01 Thread Ben George
Hi, so I've been working with System.IO.UTF8 trying to get it to render Japanese characters correctly. Using just IO I've gotten it to output the correct unicode values, however, replacing the IO.putStrLn commands with System.IO.UTF8 yielded some strange errors. I went through the program and

Re: [Haskell-cafe] System.IO.UTF8 Problem

2008-12-01 Thread Brandon S. Allbery KF8NH
On 2008 Dec 2, at 0:38, Ben George wrote: $ghc file.hs compilation IS NOT required byteindex.o: In function `sKE_info': (.text+0x8bf): undefined reference to `__stginit_utf8zmstringzm0zi3zi3_SystemziIOziUTF8_' collect2: ld returned 1 exit status Use ghc --make so it looks up the dependencies

[Haskell-cafe] serious defect in system-uuid

2008-12-01 Thread Jason Dusek
I discovered that my UUID type causes a loop when tested for equality. Anyone who is using `system-uuid`, please upgrade to version 1.0.2. -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Compatible problem with GHC 6.10.1

2008-12-01 Thread Andy Stewart
Hi all, I use Debian and GHC 6.8.2-7 Have install cabal, xmonad, gtk2hs with GHC 6.8.2-7 But when upgrade to GHC 6.10.1, i failed to install XMonad 0.8 and gtk2hs 0.9.13 I heard someone install success with develop version. So anyone success install XMonad and gtk2hs with GHC 6.10.1? BTW, i

Re: [Haskell-cafe] Compatible problem with GHC 6.10.1

2008-12-01 Thread Brandon S. Allbery KF8NH
On 2008 Dec 2, at 1:50, Andy Stewart wrote: BTW, i want to know the details compatible problem between 6.8 with 6.10? Is most libraries have compatible with GHC 6.10.1? The compatibility issue is mainly that GHC 6.10 ships with base-4.0, which as with past major revisions is not

Re: [Haskell-cafe] Compatible problem with GHC 6.10.1

2008-12-01 Thread Colin Paul Adams
Andy == Andy Stewart [EMAIL PROTECTED] writes: Andy But when upgrade to GHC 6.10.1, i failed to install XMonad Andy 0.8 and gtk2hs 0.9.13 I heard someone install success with Andy develop version. So anyone success install XMonad and Andy gtk2hs with GHC 6.10.1? I am using the

[Haskell-cafe] Re: Compatible problem with GHC 6.10.1

2008-12-01 Thread Andy Stewart
Thank you very much. So anyone install XMonad with GHC 6.10.1 success? -- Andy Colin Paul Adams [EMAIL PROTECTED] writes: Andy == Andy Stewart [EMAIL PROTECTED] writes: Andy But when upgrade to GHC 6.10.1, i failed to install XMonad Andy 0.8 and gtk2hs 0.9.13 I heard someone

[Haskell-cafe] Re: Compatible problem with GHC 6.10.1

2008-12-01 Thread Andy Stewart
Hi Colin, Colin Paul Adams [EMAIL PROTECTED] writes: Andy == Andy Stewart [EMAIL PROTECTED] writes: Andy But when upgrade to GHC 6.10.1, i failed to install XMonad Andy 0.8 and gtk2hs 0.9.13 I heard someone install success with Andy develop version. So anyone success install

[Haskell-cafe] What causes loop?

2008-12-01 Thread Martin Hofmann
I am picking up a discussion with the same topic from haskell-users on 8th November. Thunks with reference on themselves was mentioned as main reason for loop. A safe recursive definition would be let x = Foo (x+1) However, if you leave out the constructor, let x = x + 1 you get a loop