Re: [Haskell-cafe] Re: Problems with Haskell Platform

2010-06-02 Thread Ivan Miljenovic
On 31 May 2010 20:14, Pete Chown 1...@234.cx wrote: I was just thinking, interactions between Cabal and the distribution package manager could get worse, as shared Haskell libraries become more common.  Suppose a distribution ships a package 'foo', but not a package 'bar' which depends on it.  

Re: [Haskell-cafe] Difference between div and /

2010-06-02 Thread Richard O'Keefe
On Jun 2, 2010, at 9:18 AM, Maciej Piechotka wrote: Hmm. C, Java co.[1] seems to not have this problem. Languages that do recognise a difference between integer quotient-and-remainder and multiplicative inverse: - MATHEMATICS - Algol 60, Algol W, Algol 68 - BCPL (/ is integer division, #/

Re: [Haskell-cafe] Language Shootout reverse-complement benchmark

2010-06-02 Thread Louis Wasserman
On a similar note, there was no parallelized implementation for spectral-norm, even though Haskell had been doing rather well on the single-core benchmark. Heh. Louis Wasserman wasserman.lo...@gmail.com http://profiles.google.com/wasserman.louis On Tue, Jun 1, 2010 at 10:38 AM, Gwern Branwen

Re: [Haskell-cafe] Parselib sample

2010-06-02 Thread Richard O'Keefe
On Jun 2, 2010, at 6:45 AM, Stephen Tetley wrote: There's a C parser for Happy (LR) - I long while ago I converted this to Frown (also LR) - both Happy and Frown are parser generators that take a grammar description and generate a Haskell module that implements the Parser. Personally I prefer

Re: [Haskell-cafe] How to build an Indicator Type for a type class?

2010-06-02 Thread Brent Yorgey
Perhaps something here may be of use? http://okmij.org/ftp/Haskell/types.html#class-based-overloading http://okmij.org/ftp/Haskell/types.html#class-based-dispatch -Brent On Mon, May 31, 2010 at 01:32:18PM +0200, Steffen Schuldenzucker wrote: Dear Cafe, let: data True data False

RE: [Haskell-cafe] Dependency issues with GHC 6.12.2 installing parsec and others

2010-06-02 Thread Ralph Hodgson
I decided to remove everything and start again with the Haskell Platform. I am back up and running enough to make progress. -Original Message- From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Ralph Hodgson Sent: Tuesday, June 01, 2010 4:34 PM

RE: [Haskell-cafe] Installing Curl on Windows 7 - permissions problem

2010-06-02 Thread Ralph Hodgson
Thanks - Yes that is what I did. I have curl working fine on the MAC - I will have to devote more time to Windows 7. The MAC work has revealed a strange problem in download-curl. I'll have more to say about that later. -Original Message- From: Stephen Tetley

RE: [Haskell-cafe] Installing Curl on Windows 7 - permissions problem

2010-06-02 Thread Ralph Hodgson
Yes - I understand more now - thanks. -Original Message- From: daniel.is.fisc...@web.de [mailto:daniel.is.fisc...@web.de] Sent: Tuesday, June 01, 2010 10:49 AM To: haskell-cafe@haskell.org; rhodg...@topquadrant.com Cc: 'Don Stewart'; 'Henning Thielemann' Subject: Re: [Haskell-cafe]

RE: [Haskell-cafe] Dependency issues with GHC 6.12.2 installing parsec and others

2010-06-02 Thread Ralph Hodgson
This appeared to be the case - re-installing the Haskell Platform as opposed to the latest GHC got things working again. -Original Message- From: daniel.is.fisc...@web.de [mailto:daniel.is.fisc...@web.de] Sent: Tuesday, June 01, 2010 2:03 PM To: haskell-cafe@haskell.org;

[Haskell-cafe] ANN: threads-0.2

2010-06-02 Thread Bas van Dijk
Hello, I just released threads-0.2. The library which lets you fork threads and wait for their result. INSTALL: $ cabal update $ cabal install threads API DOCS: http://hackage.haskell.org/package/threads-0.2 DEVELOPMENT: darcs get http://code.haskell.org/~basvandijk/code/threads CHANGES: * I

Re: [Haskell-cafe] PDF generation?

2010-06-02 Thread Tom Poliquin
What is the easiest way to create PDF files from Haskell? It might depend on what you want to do .. I often create pdf reports from my Haskell programs (simulations) with text and graphs. I cheat a bit and use Haskell to automatically create latex documents, and use gnuplot (there's a

[Haskell-cafe] Happy GLR parser creation problem

2010-06-02 Thread Paul Jensen
[Apologies if this is the wrong place to ask -- there appears to be no Happy-specific list.] I'm interested in experimenting with using a GLR parser to parse some data that could be interpreted in different ways. I'm trying to use Happy's GLR mode but I am encountering an error building one of

[Haskell-cafe] Re: Problems with Haskell Platform

2010-06-02 Thread Pete Chown
Ivan Miljenovic wrote: Pete Chown 1...@234.cx wrote: ... This causes Cabal to install 'foo' (because it is a dependency) and it won't use the distribution's package manager. Why won't it? This, of course, depends on how the distribution ships `foo' in regards to static/shared libraries

Re: [Haskell-cafe] Re: Problems with Haskell Platform

2010-06-02 Thread Ivan Lazar Miljenovic
Pete Chown 1...@234.cx writes: Ivan Miljenovic wrote: Pete Chown 1...@234.cx wrote: ... This causes Cabal to install 'foo' (because it is a dependency) and it won't use the distribution's package manager. Why won't it? This, of course, depends on how the distribution ships `foo' in

[Haskell-cafe] Re: Language Shootout reverse-complement benchmark

2010-06-02 Thread Paul R
David I'm still trying to figure out what the point of the shootout David really is. It is a fun and largely flawed competition between languages and their users :) Fun, on its own, is enough to motivate this project I guess. -- Paul ___

Re: [Haskell-cafe] PDF generation?

2010-06-02 Thread Michael Lesniak
Hi Tom, I often create pdf reports from my Haskell programs (simulations) with text and graphs. I cheat a bit and use Haskell to automatically create latex documents, and use gnuplot (there's a helper app on Hackage) for the graphs. I'd really like to hear more. Do you have any extended

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Uwe Schmidt
Don wrote I see fairly regular complaints about too many Haskell libraries, bewildering choice of difficult-to-determine quality. I've tried to summarize the state of Hackage, and what projects are active to make it easier to find high quality libraries: http://tinyurl.com/2cqw9sb

Re: [Haskell-cafe] Resource module

2010-06-02 Thread Bas van Dijk
Before answering your questions I would like to make sure I understand your Resource type. When I want to create a memory Resource for example is the following what you have in mind? {-# LANGUAGE Rank2Types #-} -- from base: import Foreign.Ptr ( Ptr ) import Foreign.Marshal.Alloc ( mallocBytes,

Re: [Haskell-cafe] Resource module

2010-06-02 Thread Bas van Dijk
The previous can also be generalized using my Resource class: -- from regions: import qualified Control.Resource as C ( Resource(..) ) resource :: (MonadCatchIO m, C.Resource resource) = resource - Resource (C.Handle resource) m resource r = Resource $ bracket (liftIO $ C.open r)

Re: [Haskell-cafe] Resource module

2010-06-02 Thread Arie Peterson
On Wed, Jun 2, 2010 at 2:28 PM, Bas van Dijk v.dijk@gmail.com wrote: Before answering your questions I would like to make sure I understand your Resource type. When I want to create a memory Resource for example is the following what you have in mind? {-# LANGUAGE Rank2Types #-} --

Re: [Haskell-cafe] PDF generation?

2010-06-02 Thread John D. Ramsdell
Don't forget about generating MetaPost and using mpost to generate graphics. It's really nice to let MetaPost solve linear equations for you that determine the layout instead of doing it in Haskell. Linux users should install texlive-pictures and texlive-context to make it all work. A makefile

Re: [Haskell-cafe] Resource module

2010-06-02 Thread Bas van Dijk
On Wed, Jun 2, 2010 at 2:57 PM, Arie Peterson ar...@xs4all.nl wrote: On Wed, Jun 2, 2010 at 2:28 PM, Bas van Dijk v.dijk@gmail.com wrote: Before answering your questions I would like to make sure I understand your Resource type. When I want to create a memory Resource for example is the

[Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Maciej Piechotka
On Wed, 2010-06-02 at 14:01 +1200, Richard O'Keefe wrote: For what applications is it useful to use the same symbol for operations obeying (or in the case of floating point operations, *approximating* operations obeying) distinct laws? If the given operations do share something in common.

Re: [Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Henning Thielemann
On Wed, 2 Jun 2010, Maciej Piechotka wrote: On Wed, 2010-06-02 at 14:01 +1200, Richard O'Keefe wrote: For what applications is it useful to use the same symbol for operations obeying (or in the case of floating point operations, *approximating* operations obeying) distinct laws? If the

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Bas van Dijk
On Wed, Jun 2, 2010 at 2:20 PM, Uwe Schmidt s...@fh-wedel.de wrote: For ranking the results for a package search, a download statistic could be very useful and could easily be integrated. If such a statistic would be available in machine readable format (csv, xml, plain text, ...), we could

Re: [Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Henning Thielemann
Sorry, I missed this post. Maciej Piechotka schrieb: Well - i tried to write some package dealing with distributions etc. If you have something like that: instance ... = Distribution (Linear a) a where rand (Linear f s) g = let (gf, gt) = genRange g (v, g') =

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Uwe Schmidt
Bas wrote: Ordering by nr of direct/indirect reverse dependencies might also be useful. this is already done. After indexing the cabal pages, the dependencies are all known and a package rank is derived from that graph. That is also used in the (new) function search, functions in base (and

Re: [Haskell-cafe] Re: Problems with Haskell Platform

2010-06-02 Thread Ben Millwood
On Wed, Jun 2, 2010 at 12:37 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Is there a way of making Cabal install dependencies using the system package manager, then? For example, I might ask Cabal to install package A.  Package A depends on B and C.  A package for B can be

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Bas van Dijk
On Wed, Jun 2, 2010 at 4:35 PM, Uwe Schmidt s...@fh-wedel.de wrote: Bas wrote: Ordering by nr of direct/indirect reverse dependencies might also be useful. this is already done. Ok nice. For others who like to have a .csv file version of the reverse dependency page I quickly hacked

Re: [Haskell-cafe] PDF generation?

2010-06-02 Thread Andrew Coppin
Isn't there a problem with non-type 1 vectorial fonts being rasterized during this conversion ? No. PDF is just a simplified, compressed encoding of PostScript. Unless there is some special reason to do so, why would a conversion utility go to the trouble of rasterizing fonts instead of

[Haskell-cafe] Re: [web-devel] Google Summer of Code: BlazeHTML RFC

2010-06-02 Thread Jasper Van der Jeugt
On Sat, May 29, 2010 at 7:34 PM, Matt Parker moonmaster9...@gmail.com wrote: Q3: Which HTML version would you preferably use? HTML 5. google summer of code should be about pushing the new and exciting. I can say that HTML 5 will definitely be supported. We use some sort of metacode to

Re: [Haskell-cafe] Wire GUI

2010-06-02 Thread Andrew Coppin
Thanks to the people who replied about this. I would also like to thank my ISP for classifying the entire lot as spam and not showing it to me. *sigh* Blobs sounds interesting, but seems to require wxHaskell rather than Gtk2hs. I may be able to use some of the ideas from it though. I haven't

Re: [Haskell-cafe] Parselib sample

2010-06-02 Thread C K Kashyap
Thanks Stephen, I'll look at the Parsec documentation ... I'd certainly be interested in the article. But I thought Parsec was conceptually same as Parselib ... is that not the case? Regards, Kashyap On Wed, Jun 2, 2010 at 7:12 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On Jun 2, 2010, at

Re: [Haskell-cafe] Happy GLR parser creation problem

2010-06-02 Thread João Paulo
Hi Paul, During my internship I developed a GLR parser generator and a grammar interpreter fully in Haskell, in a tool called HaGLR; You'll find documentation on the tool at: http://wiki.di.uminho.pt/twiki/bin/view/Research/PURe/HaGLR The tool is available as part of the UMinho Haskell

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Andrew Coppin
Don Stewart wrote: http://tinyurl.com/2cqw9sb Thoughts? Firstly, it pleases me that somebody is taking this problem seriously and looking at it. Currently all the information displayed on a package page comes from the Cabal file. I think it would be useful to be able to

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread aditya siram
Tying the documentation to the source code achieves this (mostly), but it seems like there should be a Better Way(tm)... I'm not sure what though. Does Haddock support Literate Haskell files? This might be a nice way to keep tutorials and source code together. Also perhaps provide for each

Re: [Haskell-cafe] Parselib sample

2010-06-02 Thread Stephen Tetley
Hi Kashyap They are very close - Parsec has most of the parsers in ParseLib in either the Parsec.Char or Parsec.Combinator modules, if you import the Parsec top level, you will get them, e.g: import Text.ParserCombinators.Parsec ParseLib has - ident, nat, int - which have analogues in Parsec

Re: [Haskell-cafe] Parselib sample

2010-06-02 Thread S. Doaitse Swierstra
If you want to use the easier long-standing libraries from Utrecht, we can provide you with a parser for full Haskell, which you can find in the Utrecht Haskell Compiler (UHC) distribution.In 2002 Alexey Rodriguez produced a C fron-end, using the UUlibs combinators. I am attaching the file with

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Andrew Coppin
aditya siram wrote: Does Haddock support Literate Haskell files? I believe it does. This might be a nice way to keep tutorials and source code together. Plausibly. You could write some literate files which aren't part of the library sources, and tell Cabal to include them as extra

Re: [Haskell-cafe] Re: Problems with Haskell Platform

2010-06-02 Thread Ivan Miljenovic
On 3 June 2010 00:37, Ben Millwood hask...@benmachine.co.uk wrote: It's worth noting, though, that cabal-install doesn't track installed packages itself, GHC does. And this is why cabal-install can't tell you when there are new versions of executable-only packages (e.g. happy) available: it

Re: [Haskell-cafe] Re: Difference between div and /

2010-06-02 Thread Richard O'Keefe
On Jun 3, 2010, at 1:13 AM, Maciej Piechotka wrote: On Wed, 2010-06-02 at 14:01 +1200, Richard O'Keefe wrote: For what applications is it useful to use the same symbol for operations obeying (or in the case of floating point operations, *approximating* operations obeying) distinct laws?

[Haskell-cafe] Data.ByteString.Lazy.hPut and timeouts?

2010-06-02 Thread Jeremy Shaw
Hello, I am using Data.ByteString.Lazy.hPut to write data to a network socket. Is there any portable way to have hPut timeout if no data has been sent after some time period (say 120s?). I know that some OSes provide a per socket timeout that I can set in my application code (instead of

[Haskell-cafe] Sockets get bound to wrong port on Windows

2010-06-02 Thread Matthias Reisner
Hi, there's something wrong with port numbers in the Network.Socket module of package network. Printing values gives: *Main PortNum 47138 *Main PortNum 47138 So I thought it's just an error in the show instance of PortNumber, which shows the bytes flipped. But if I use

Re: [Haskell-cafe] Sockets get bound to wrong port on Windows

2010-06-02 Thread Ivan Miljenovic
Sorry for the double-reply Matthias, but I forgot to CC -cafe (GMail labs isn't working, so reply-to-all is no longer the default for me :( ). On 3 June 2010 13:10, Matthias Reisner matthias.reis...@googlemail.com wrote: there's something wrong with port numbers in the Network.Socket module of

Re: [Haskell-cafe] Sockets get bound to wrong port on Windows

2010-06-02 Thread Matthias Reisner
Am 03.06.2010 05:20 schrieb Ivan Miljenovic: So I thought it's just an error in the show instance of PortNumber, which shows the bytes flipped. But if I use the following code snippet sock - socket AF_INET Datagram 0 bindSocket sock $ SockAddrInet (PortNum ) iNADDR_ANY to bind a socket

Re: [Haskell-cafe] The state of Hackage: what are we doing about it?

2010-06-02 Thread Don Stewart
si: Don wrote I see fairly regular complaints about too many Haskell libraries, bewildering choice of difficult-to-determine quality. I've tried to summarize the state of Hackage, and what projects are active to make it easier to find high quality libraries:

[Haskell-cafe] Re: Sockets get bound to wrong port on Windows

2010-06-02 Thread Bardur Arantsson
On 2010-06-03 05:10, Matthias Reisner wrote: Hi, there's something wrong with port numbers in the Network.Socket module of package network. Printing values gives: *Main PortNum 47138 *Main PortNum 47138 Try (fromIntegral ) :: PortNumber (Yes, it's weird.) Cheers, Bardur

Re: [Haskell-cafe] Sockets get bound to wrong port on Windows

2010-06-02 Thread Antoine Latter
On Wed, Jun 2, 2010 at 10:10 PM, Matthias Reisner matthias.reis...@googlemail.com wrote: Hi, there's something wrong with port numbers in the Network.Socket module of package network. Printing values gives:   *Main PortNum   47138   *Main PortNum 47138   So I thought it's just