[Haskell-cafe] Re: How do I avoid stack overflows?

2007-03-17 Thread DavidA
Hi, Thanks for the suggestions. A few more questions. The (*) function is just one of a number of lazy matrix arithmetic functions that I have. If I need them to be evaluated strictly, is it best to modify the matrix code, or the code that's calling it? In this case, it looks like I can fix

[Haskell-cafe] Haskell and SSL

2007-03-17 Thread Thomas David Baker
I'm writing an application that scrapes some data from some websites. I was using Network.Browser from http://haskell.org/http/. So far, so good. However, now I need to scrape some websites that use SSL. Network.Browserdoesn't seem to support this (although for some reason it does work on one

[Haskell-cafe] what I learnt from my first serious haskell programm

2007-03-17 Thread Fawzi Mohamed
Hi everybody, I came to haskell recently (one month) and I have now written my first serious program. I am still busy improving it, but here is a small report of what I learned and and my impressions of the language. I found no show stoppers, but a couple of things that I didn't like much. *

Re: [Haskell-cafe] what I learnt from my first serious haskell programm

2007-03-17 Thread Philippa Cowderoy
On Sat, 17 Mar 2007, Fawzi Mohamed wrote: So I am wondering how people cope with them, share your opinion, for me the best thing seem to be to try to use one module per big type, and then import qualified x as y, what are good coding practices? Do that and use hierarchical modules if

Re: [Haskell-cafe] Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

2007-03-17 Thread Ian Lynagh
On Fri, Mar 16, 2007 at 09:52:10PM -0700, Conal Elliott wrote: BTW, to get hs-plugins to build, I changed two lines in hs-plugins/configure. As it happens, I sent Don a similar patch last night, so hopefully it'll be fixed in darcs soon. First I tried tr -d '\n', but it didn't work, and I

[Haskell-cafe] Re: Lazy IO and closing of file handles

2007-03-17 Thread Pete Kazmier
Matthew Brecknell [EMAIL PROTECTED] writes: So here's a test. I don't have any big maildirs handy, so this is based on the simple exercise of printing the first line of each of a large number of files. First, the preamble. import Control.Exception (bracket) import System.Environment import

Re: [Haskell-cafe] Re: How do I avoid stack overflows?

2007-03-17 Thread Dan Piponi
You could always make the matrix type itself strict by marking its components with '!'. That way, any time a matrix is touched, all of its components will be evaluated. That, for example, is how the Complex type is implemented. -- Dan On 3/17/07, DavidA [EMAIL PROTECTED] wrote: Hi, Thanks for

Re: [Haskell-cafe] what I learnt from my first serious haskell programm

2007-03-17 Thread David House
On 17/03/07, Fawzi Mohamed [EMAIL PROTECTED] wrote: * namespaces * First off something that disturbed me but does not seem to be discussed much are namespaces, or rather the lack of them. I'm also in the middle of writing a medium-sized program in Haskell, but my experiences have been

[Haskell-cafe] Algorithms

2007-03-17 Thread P. R. Stanley
Hi When you write a general solution for a class of problems, as opposed to a specific solution to a single problem, you have written an algorithm. Discuss! Regards, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Algorithms

2007-03-17 Thread Albert Y. C. Lai
P. R. Stanley wrote: When you write a general solution for a class of problems, as opposed to a specific solution to a single problem, you have written an algorithm. Discuss! Follow this algorithm of three easy steps to solve any problem: A. understand the problem B. decompose or reduce it

[Haskell-cafe] Using external programs with Haskell in windows.

2007-03-17 Thread Christian Lean
I'm looking for a way to run an external program and get the results in haskell. Something similar to HSH but that will work in windows. I don't need anything too complex, just to provide the command to be run as a string and get the result as a string. Is this possible? One of the HSH

Re: [Haskell-cafe] Using external programs with Haskell in windows.

2007-03-17 Thread Donald Bruce Stewart
christian.lean2: I'm looking for a way to run an external program and get the results in haskell. Something similar to HSH but that will work in windows. I don't need anything too complex, just to provide the command to be run as a string and get the result as a string. Is this possible?

[Haskell-cafe] There can be only one fix? Pondering Bekic's lemma

2007-03-17 Thread Nicolas Frisby
Bekic's lemma [1], allows us to transform nested fixed points into a single fixed point, such as: fix (\x - fix (\y - f (x, y))) = fix f where f :: (a, a) - a This depends on having true products, though I'm not exactly sure what that means. Mutual recursion can also be described with

Re: [Haskell-cafe] Algorithms

2007-03-17 Thread Michael T. Richter
On Sat, 2007-17-03 at 19:08 -0400, Albert Y. C. Lai wrote: P. R. Stanley wrote: When you write a general solution for a class of problems, as opposed to a specific solution to a single problem, you have written an algorithm. Discuss! Follow this algorithm of three easy steps to solve

Re: [Haskell-cafe] Haskell and SSL

2007-03-17 Thread Bryan O'Sullivan
Thomas David Baker wrote: I know that darcs uses curl in a similar way for some stuff but it still feels like I'm doing the Wrong Thing. No, you're not. SSL is very complicated, which is why there are no Haskell libraries that implement or usefully wrap it. There's a proposal to write a