[Haskell-cafe] Guidance on using asynchronous exceptions

2007-11-15 Thread Yang
To follow up on my previous post ("Asynchronous Exceptions and the RealWorld"), I've decided to put together something more concrete in the hopes of eliciting response. I'm trying to write a library of higher-level concurrency abstractions, in particular for asynchronous systems programming. The

Re: [Haskell-cafe] Using Data.Binary for compression

2007-11-15 Thread David Roundy
On Thu, Nov 15, 2007 at 11:10:01AM -0800, Chad Scherrer wrote: > > > Almost all 'real users' just use Codec.Compression.GZip. It's very > > > fast, very compositional, and (perhaps suprisingly) almost as > > > effective as application-specific schemes. > > > > I was about to say the same thing. So

[Haskell-cafe] Haskellforge?

2007-11-15 Thread Maurí­cio
Hi, Is there a "Haskellforge" somewhere, i.e., something like a sourceforge for open source Haskell programs, with darcs, automatic cabalization etc.? Has anyone tried that already? Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:

Re: [Haskell-cafe] let vs. where

2007-11-15 Thread jeff p
Hello, > > taxRate = 0.06 > > total cart = subtotal + tax > where > subtotal = sum cart > taxable = filter isTaxable cart > tax = (sum taxable) * taxRate > > This example defines two functions, taxRate, which returns a constant > value, and total, which computes the total cost of t

RE: [Haskell-cafe] Erik Meijer's talk at Google?

2007-11-15 Thread Ghuloum, Anwar
I think google talks are often hosted at video.google.com, assuming the speaker agrees to this and it can be publicly disclosed. -- Anwar Ghuloum 葛安华 Microprocessor Technology Lab, Intel _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Galchin Vasili Sent: Thurs

Re: [Haskell-cafe] the "interact" function and Hugs/ghci on Windows ...

2007-11-15 Thread Justin Bailey
On Nov 15, 2007 6:25 PM, Galchin Vasili <[EMAIL PROTECTED]> wrote: > Hello, > > I have a Haskell script that contains several functions that are > implemented in terms on "interact". When I do a "function application", > Hugs/ghci is waiting for input from stdin. How do one denote EOF from std

[Haskell-cafe] the "interact" function and Hugs/ghci on Windows ...

2007-11-15 Thread Galchin Vasili
Hello, I have a Haskell script that contains several functions that are implemented in terms on "interact". When I do a "function application", Hugs/ghci is waiting for input from stdin. How do one denote EOF from stdin, so that the function evaluation can continue and do the IO () action , i

[Haskell-cafe] Performance problems with parallelizing QuickCheck using channels (Control.Concurrent.Chan)

2007-11-15 Thread Gwern Branwen
So I've been trying to get my QuickCheck tests to run in parallel. I did take a look at Don's Parallel QuickCheck library , but I didn't like how much code it had in it and I figured it'd be a good exercise to try to do myself. After quite a lot of hel

Re: [Haskell-cafe] let vs. where

2007-11-15 Thread Lennart Augustsson
No, Haskell functions take exactly one argument. On Nov 14, 2007 1:05 AM, Robin Green <[EMAIL PROTECTED]> wrote: > On Tue, 13 Nov 2007 13:51:13 -0800 > "Dan Piponi" <[EMAIL PROTECTED]> wrote: > > > Up until yesterday I had presumed that guards only applied to > > functions. But I was poking about

Re: [Haskell-cafe] Re: Flymake Haskell

2007-11-15 Thread Philip Armstrong
On Thu, Nov 15, 2007 at 09:19:10AM -0500, Denis Bueno wrote: On Nov 15, 2007 7:25 AM, Philip Armstrong <[EMAIL PROTECTED]> wrote: I can pass on patches if anyone cares. I care! Will dig them out asap then! Phil -- http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.t

Re: [Haskell-cafe] Chart plotting libraries

2007-11-15 Thread Tim Docker
droundy: > > Chart has rather a complicated API. I've written a simpler API (but > somewhat less flexible), if anyone's interested (Tim wasn't). My API is > closer in complexity (of use) to matlab's plotting. I'd describe the API as verbose rather than complicated. It takes 5-10 lines of haskell

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-15 Thread Don Stewart
olivier.boudry: >On 11/15/07, Don Stewart <[EMAIL PROTECTED]> wrote: > > Let me know if the rule fires. If it isn't, that's a bug, essentially. > > -- Don > >Don, > >As you can see the rule fires. > >C:\Temp>ghc --make -O2 -fasm -ddump-simpl-stats DropSpaceTest.hs >

[Haskell-cafe] Erik Meijer's talk at Google?

2007-11-15 Thread Galchin Vasili
Hello, Last week (?) Erik Meijer gave a talk at Google. Has a video been uploaded somewhere? Kind regards, Vasya ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A small question

2007-11-15 Thread J. Garrett Morris
http://msdn2.microsoft.com/en-us/library/1w45z383(vs.71).aspx I believe. /g On Nov 15, 2007 12:56 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: > I notice that in GHC 6.8.1, if I compile a runnably program, as well as > generating foo.exe, GHC now also generates a file foo.exe.manifest, > which

Re: [Haskell-cafe] Haskellforge?

2007-11-15 Thread Duncan Coutts
On Thu, 2007-11-15 at 15:56 -0200, Maurí­cio wrote: > Hi, > > Is there a "Haskellforge" somewhere, i.e., > something like a sourceforge for open source > Haskell programs, with darcs, automatic > cabalization etc.? Has anyone tried that > already? There is the Haskell Community server http://comm

Re: [Haskell-cafe] Chart plotting libraries

2007-11-15 Thread Graham Fawcett
On Nov 15, 2007 10:33 AM, David Roundy <[EMAIL PROTECTED]> wrote: > Chart has rather a complicated API. I've written a simpler API (but > somewhat less flexible), if anyone's interested (Tim wasn't). My API is > closer in complexity (of use) to matlab's plotting. I'd be interested, for one. Che

[Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread SevenThunders
The good news is that my code compiles without error and much faster under ghc 6.8.1. The bad news is that there appear to be subtle bugs that did not occur when I compiled things under 6.6.1. One issue is that my code is somewhat complex and links into a C library as well. The new behavior is

[Haskell-cafe] HTTP actions & proxy server

2007-11-15 Thread Jim Burton
How would I go about converting the little get program at http://darcs.haskell.org/http/test/get.hs to use a proxy server? I tried adding a call to setProxy like this but it doesn't work: get :: URI -> IO String get uri = do browse $ setProxy (Proxy "myproxy:80" Nothing) eresp <-

[Haskell-cafe] Asynchronous exceptions and the RealWorld

2007-11-15 Thread Yang
- I want to set timeouts on various IO operations in an existing library, ftphs. However, even if I wrap every call in `block`, it's unclear whether ftphs has been coded to deal with asynchronous exceptions, or whether state could be rendered inconsistent. Is there any solution for this aside f

Re: [Haskell-cafe] let vs. where

2007-11-15 Thread Arnar Birgisson
On Nov 16, 2007 12:35 AM, Arnar Birgisson <[EMAIL PROTECTED]> wrote: > [1] I'm terribly sorry, that was meant to be: [1] http://www.onlamp.com/pub/a/onlamp/2007/07/12/introduction-to-haskell-pure-functions.html sorry, Arnar ___ Haskell-Cafe mailing li

Re: [Haskell-cafe] (general question) Approaches for storing large amount of simple data structures

2007-11-15 Thread Don Stewart
bbrown: > I have a project where I want to store a data structure on a file, > binary or ascii. And I want to use haskell to read and write the > file. I will have about half a million records so it would be nice if > the format was able to load quickly. I guess I could, but I kind of > want to a

[Haskell-cafe] (general question) Approaches for storing large amount of simple data structures

2007-11-15 Thread bbrown
I have a project where I want to store a data structure on a file, binary or ascii. And I want to use haskell to read and write the file. I will have about half a million records so it would be nice if the format was able to load quickly. I guess I could, but I kind of want to avoid using XML. I

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-15 Thread Don Stewart
olivier.boudry: >Hi Don, > >In fact I'm not really looking at performance, I don't expect performance >to be a big issue in my application. > >I was just looking at using some simple functions found in the >documentation and avoid redefining them. > >In fact dropSpace and

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-15 Thread Olivier Boudry
Hi Don, In fact I'm not really looking at performance, I don't expect performance to be a big issue in my application. I was just looking at using some simple functions found in the documentation and avoid redefining them. In fact dropSpace and dropSpaceEnd are doing exactly what I'm looking for

Re: [Haskell-cafe] dropSpace not exported in ByteString

2007-11-15 Thread Don Stewart
olivier.boudry: >Hi all, > >I'm writing a Haskell program to do some address cleansing. The program >uses the ByteString library. > >Data.ByteString.Char8 documentations shows functions for removing >whitespace from start or end of a ByteString. Those functions are said to >

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread Alberto Ruiz
On Thursday 15 November 2007 19:58, SevenThunders wrote: > Alberto Ruiz-2 wrote: > > Hello, > > > > I have had exactly the same problem with my bindings to GSL, BLAS and > > LAPACK. > > The foreign functions (!) randomly (but very frequently) produced NaN > > with ghc-6.8.1 -O. As usual, I first th

Re: [Haskell-cafe] Chart plotting libraries

2007-11-15 Thread David Roundy
On Wed, Nov 14, 2007 at 10:36:06PM -0800, Don Stewart wrote: > jon: > > I'd like some free software to help me plot charts like the one from the > > ray > > tracer language comparison: > > > > http://www.ffconsultancy.com/languages/ray_tracer/results.html > > > > I was using Mathematica but i

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread SevenThunders
Alberto Ruiz-2 wrote: > > > Hmm, I' sorry... all seems to work well for me if I set -O -fvia-C for > building the library and for final program compilation. But I will also > try > to find a minimum test case. In the meantime I have sent to Ian > information > to expose the problem with my

Re: [Haskell-cafe] Haskellforge?

2007-11-15 Thread Don Stewart
duncan.coutts: > On Thu, 2007-11-15 at 15:56 -0200, Maurí­cio wrote: > > Hi, > > > > Is there a "Haskellforge" somewhere, i.e., > > something like a sourceforge for open source > > Haskell programs, with darcs, automatic > > cabalization etc.? Has anyone tried that > > already? > > There is the H

Re: [Haskell-cafe] Using Data.Binary for compression

2007-11-15 Thread Chad Scherrer
> > Almost all 'real users' just use Codec.Compression.GZip. It's very > > fast, very compositional, and (perhaps suprisingly) almost as effective > > as application-specific schemes. > > I was about to say the same thing. So so much simpler to use Duncan's > carefully written zlib binding, > >

Re: [Haskell-cafe] HTTP actions & proxy server

2007-11-15 Thread Justin Bailey
On Nov 15, 2007 9:01 AM, Jim Burton <[EMAIL PROTECTED]> wrote: > How would I go about converting the little get program at > http://darcs.haskell.org/http/test/get.hs to use a proxy server? I tried > adding a call to setProxy like this but it doesn't work: I think it needs to be a real URL: set

[Haskell-cafe] Vertigo / GHC / Memo

2007-11-15 Thread Peter Verswyvelen
Hi Haskell Lovers, I’m trying to compile Vertigo (http://conal.net/Vertigo), which seems to be a module from which I can really learn a lot of stuff.   However, it seems to use a Memo module, which does not seem to be part of GHC (anymore?) As far as I understand, it uses a memo function to make s

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread SevenThunders
Alberto Ruiz-2 wrote: > > Hello, > > I have had exactly the same problem with my bindings to GSL, BLAS and > LAPACK. > The foreign functions (!) randomly (but very frequently) produced NaN with > ghc-6.8.1 -O. As usual, I first thought that I had a subtle bug related to > the foreign pointe

Re: [Haskell-cafe] cabal Main-Is restriction

2007-11-15 Thread Duncan Coutts
On Thu, 2007-11-15 at 11:14 -0600, Nicolas Frisby wrote: > It seems the meaning of the -main-is switch for GHC and the Main-Is > build option for Cabal executables differ. With GHC, I can point to > any function "main" in any module, but in Cabal I must point to a > filename with precisely the modu

Re: [Haskell-cafe] Using Data.Binary for compression

2007-11-15 Thread David Roundy
On Wed, Nov 14, 2007 at 10:03:52PM -0800, Chad Scherrer wrote: > I'd like to be able to use Data.Binary (or similar) for compression. > Say I have an abstract type Symbol, and for each value of Symbol I > have a representation in terms of some number of bits. For compression > to be efficient, comm

[Haskell-cafe] Re: Weird ghci behaviour?

2007-11-15 Thread Simon Marlow
It's worth saying that right now, all you have to do to get the source file loaded is > :! touch M.hs > :reload Put this in a macro, if you want: > :def src \s -> return (":! touch "++s) I hear the arguments in this thread, and others have suggested changes before: http://hackage.has

Re: [Haskell-cafe] let vs. where

2007-11-15 Thread hjgtuyl
On Thu, 15 Nov 2007 12:31:07 +0100, Henning Thielemann <[EMAIL PROTECTED]> wrote: On Tue, 13 Nov 2007, Dan Piponi wrote: On Nov 13, 2007 1:24 PM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > I tend to prefer where, but I think that guards & function declarations are > more readable than giant if

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread Ian Lynagh
Can any of you give us a testcase for this, please? Thanks Ian ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell Job Opportunity

2007-11-15 Thread Tom Hawkins
Hello, Eaton (eaton.com, Eden Prairie, MN US) is seeking software engineers for design and verification of electro-hydraulic control systems for industrial, automotive, and aerospace applications. Though I am still trying to get Haskell on the official job description, here are a few of the poten

[Haskell-cafe] Re: Weird ghci behaviour?

2007-11-15 Thread Simon Marlow
Jonathan Cast wrote: On 13 Nov 2007, at 11:03 PM, Jules Bean wrote: Just to be clear: my proposal is that if you want it to go faster you do ghci foo.hi or ghci foo.o ... so you still have the option to run on compiled code. My suggestion is simply that "ghci foo.hs" is an instruction to lo

Re[2]: [Haskell-cafe] let vs. where

2007-11-15 Thread Henning Thielemann
On Thu, 15 Nov 2007, Bulat Ziganshin wrote: > Hello Henning, > > Thursday, November 15, 2007, 2:31:07 PM, you wrote: > > > Btw. I would write here > > min 1 (max (-1) x) > > or even better define a function for such clipping, since it is needed > > quite often. > > min 1 . max (-1) is pretty

Re: [Haskell-cafe] Re: Flymake Haskell

2007-11-15 Thread Denis Bueno
On Nov 15, 2007 7:25 AM, Philip Armstrong <[EMAIL PROTECTED]> wrote: > On Thu, Nov 15, 2007 at 02:56:32PM +0900, Daisuke IKEGAMI wrote: > >Dear Stefan and Haskell-Cafe, > > > >Thanks to keeping your interest to the flymake-mode for Haskell. > > > >Stefan wrote: > >> Could you explain to me what fly

Re[2]: [Haskell-cafe] let vs. where

2007-11-15 Thread Bulat Ziganshin
Hello Henning, Thursday, November 15, 2007, 2:31:07 PM, you wrote: > Btw. I would write here > min 1 (max (-1) x) > or even better define a function for such clipping, since it is needed > quite often. min 1 . max (-1) is pretty standard, although i renamed them: atMax 1 . atLeast (-1) --

Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-15 Thread Henning Thielemann
On Thu, 15 Nov 2007, Jules Bean wrote: > Anecdotes have little value, but for what it's worth: in around 5 years > of ghc use, I have never, not even once, wanted to load the module I was > working on in its compiled form. I've occasionally noticed that > dependent modules get loaded quickly from

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-15 Thread Ricardo Herrmann
I, for one, embrace that idea too (disguised Haskell evangelism) ... but in a global scale. However, as long as we're not able to compete in the web-CRUD arena, I think it will remain a niche. Hacking HAppS, Unify, HaskellDB now would be more useful in that respect. We need to hijack Java/C progra

[Haskell-cafe] Re: List of all powers

2007-11-15 Thread apfelmus
Brent Yorgey wrote: apfelmus, does someone pay you to write so many thorough, insightful and well-explained analyses on haskell-cafe? I'm guessing the answer is 'no', but clearly someone should! =) Depending on length, my prices for posts range between λ9.99 and λ29.99 ;) Regards, apfelmus

Re: [Haskell-cafe] Haskell and html input elements

2007-11-15 Thread PR Stanley
Hi What i have in mind is an interactive Haskell app which allows the user to enter text, push buttons, select radio buttons and so on. As I have already done a lot of xhtml coding I thought it might be easier to operate the program entirely via a web browser. However, I'm also interested in t

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread Joel Koerwer
I'm also seeing unusual behavior from GSL under ghc-6.8.1. I get a singular matrix error where there was none before, but if I prefix the function's rhs with "m `seq`", where m is the matrix in question, the error goes away. I'll try removing the seq and compiling with -fvia-C tomorrow to see if I

Re: [Haskell-cafe] Re: Weird ghci behaviour?

2007-11-15 Thread Jules Bean
Simon Marlow wrote: The only problem with this is that someone who isn't aware of this convention might accidentally be ignoring compiled code, or might wonder why their compiled code isn't being used. Well, perhaps this is less confusing than the current behaviour; personally I find the curre

Re: [Haskell-cafe] let vs. where

2007-11-15 Thread Henning Thielemann
On Tue, 13 Nov 2007, Dan Piponi wrote: > On Nov 13, 2007 1:24 PM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > > I tend to prefer where, but I think that guards & function declarations are > > more readable than giant if-thens and case constructs. > > Up until yesterday I had presumed that guards onl

Re: [Haskell-cafe] Chart plotting libraries

2007-11-15 Thread Jules Bean
Tim Docker wrote: don: jon: I'd like some free software to help me plot charts like the one from the ray tracer language comparison: A quick search of hackage.haskell.org, http://dockerz.net/twd/HaskellCharts I need to update the package to build under ghc-6.8.1, though I think it's ju

Re: [Haskell-cafe] Why are OCaml and Haskell being used at these companies?

2007-11-15 Thread Ketil Malde
Seth Gordon <[EMAIL PROTECTED]> writes: >> Bioinformaticians are among the first to adopt functional >> programming languages >From my experience, Bioinformatics use a mixture of langauges - C to implement various algorithms, a bit of Java for UI-oriented stuff, and Perl to tie it all together.

Re: [Haskell-cafe] Using Data.Binary for compression

2007-11-15 Thread Bulat Ziganshin
Hello Chad, Thursday, November 15, 2007, 9:03:52 AM, you wrote: > I'd like to be able to use Data.Binary (or similar) for compression. > Say I have an abstract type Symbol, and for each value of Symbol I > have a representation in terms of some number of bits. For compression > to be efficient, c

Re: [Haskell-cafe] ghc 6.8.1 bug?

2007-11-15 Thread Alberto Ruiz
Hello, I have had exactly the same problem with my bindings to GSL, BLAS and LAPACK. The foreign functions (!) randomly (but very frequently) produced NaN with ghc-6.8.1 -O. As usual, I first thought that I had a subtle bug related to the foreign pointers, but after a lot of refactoring, experi

[Haskell-cafe] Re: Using Data.Binary for compression

2007-11-15 Thread Dominic Steinitz
Don Stewart galois.com> writes: > > I was about to say the same thing. So so much simpler to use Duncan's > carefully written zlib binding, > > import Data.Binary > import Codec.Compression.GZip > import qualified Data.ByteString.Lazy as L > > main = L.writeFile "log.gz" . comp