Re: [Haskell-cafe] BLAS Solve Example

2008-07-23 Thread Alberto Ruiz
Darrin Thompson wrote: I'm stuck on something that I thought would be easy. I have a matrix and a vector. module Main where import Data.Vector.Dense import Data.Matrix.Dense import BLAS.Matrix.Solve m = listMatrix (2, 3) ([1, 2, 3, 4, 5, 6]::[Double]) v = listVector 2 ([1, 2]::[Double])

[Haskell-cafe] ANN: Hayoo! beta 0.2

2008-07-23 Thread Timo B. Hübel
Hello, we are pleased to announce the second beta release of Hayoo!, a Haskell API search engine providing advanced features like suggestions, find-as-you-type, fuzzy queries and much more. Visit Hayoo! here: http://holumbus.fh-wedel.de/hayoo The major change is the inclusion of all packages

[Haskell-cafe] Re: Optimizing 'sequence'

2008-07-23 Thread Gracjan Polak
Chaddaï Fouché chaddai.fouche at gmail.com writes: 2008/7/22 Luke Palmer lrpalmer at gmail.com: A little formal reasoning reveals that sequence1 = sequence2 exactly when (=) is strict in its left argument. There are four common monads which are _not_: Identity, Reader, Writer, State (and

Re: [Haskell-cafe] Re: Optimizing 'sequence'

2008-07-23 Thread Janis Voigtlaender
Gracjan Polak wrote: How do I reason if = for parsers is lazy in its first argument? Well, to quote from the abstract of the paper I already mentioned (http://citeseer.ist.psu.edu/704350.html): By testing before proving we avoid wasting time trying to prove statements that are not valid. I

Re: [Haskell-cafe] Newbie: Replacing substring?

2008-07-23 Thread Chaddaï Fouché
2008/7/22 Ronald Guida [EMAIL PROTECTED]: 2008/7/22 Dmitri O.Kondratiev [EMAIL PROTECTED]: On the side: The more I use Haskell - the more I like it ! It helps me think about the problem I solve much more clearly then when I use imperative language. If I want to replace a substring in a

Re: [Haskell-cafe] Newbie: Replacing substring?

2008-07-23 Thread Dmitri O.Kondratiev
Ronald, Your algoritm is more simple and so it is better, I agree. My algorithm is different and consists of two steps: 1) Split source string into a list of chunks not containing substring to be replaced. 2) Concatenate chunks inserting new substring in between chuncks. With this approach I get

Re: [Haskell-cafe] BLAS Solve Example

2008-07-23 Thread Darrin Thompson
On Wed, Jul 23, 2008 at 2:12 AM, Alberto Ruiz [EMAIL PROTECTED] wrote: $ ghci solve.hs *Main sol 3 | [-5.511e-2,0.3,0.2776] I was hoping for rational solutions. If I were a true jedi master I'd write my own solver, which might be the right thing to do.

Re: [Haskell-cafe] ANN: Hayoo! beta 0.2

2008-07-23 Thread Darrin Thompson
On Wed, Jul 23, 2008 at 5:04 AM, Timo B. Hübel [EMAIL PROTECTED] wrote: Unfortunately we had to drop the direct links to the source code, as the documentation on Hackage is currently generated without source code. But as soon as this changes, we will include these links again. Someone is

[Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-23 Thread Duncan Coutts
http://haskell.org/opensparc/ I am very pleased to announce a joint project between Sun Microsystems and the Haskell.org community to exploit the high performance capabilities of Sun's latest multi-core OpenSPARC systems via Haskell! http://opensparc.net/ Sun has

[Haskell-cafe] Re: BLAS Solve Example

2008-07-23 Thread apfelmus
Darrin Thompson wrote: On Wed, Jul 23, 2008 at 2:12 AM, Alberto Ruiz [EMAIL PROTECTED] wrote: $ ghci solve.hs *Main sol 3 | [-5.511e-2,0.3,0.2776] I was hoping for rational solutions. If I were a true jedi master I'd write my own solver, which might be

Re: [Haskell-cafe] Re: Optimizing 'sequence'

2008-07-23 Thread Don Stewart
gracjanpolak: Chaddaï Fouché chaddai.fouche at gmail.com writes: 2008/7/22 Luke Palmer lrpalmer at gmail.com: A little formal reasoning reveals that sequence1 = sequence2 exactly when (=) is strict in its left argument. There are four common monads which are _not_: Identity, Reader,

[Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Corey O'Connor
I have the need to regularly write tiny programs that analyze output logs. The output logs don't have a consistent formatting so I typically choose Perl for these tasks. The latest instance of having to write such a program was simple enough I figured I'd try my hand at using Haskell instead. The

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Don Stewart
coreyoconnor: I have the need to regularly write tiny programs that analyze output logs. The output logs don't have a consistent formatting so I typically choose Perl for these tasks. The latest instance of having to write such a program was simple enough I figured I'd try my hand at using

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Corey O'Connor
Sounds great! Thanks for the advice. :-) -Corey On Wed, Jul 23, 2008 at 1:18 PM, Don Stewart [EMAIL PROTECTED] wrote: coreyoconnor: I have the need to regularly write tiny programs that analyze output logs. The output logs don't have a consistent formatting so I typically choose Perl for

[Haskell-cafe] InterleavableIO

2008-07-23 Thread Marco Túlio Gontijo e Silva
Hello, I've done a package based on the Jules Bean's e-mail [1] to Haskell-Café, with a more generalized implementation. In the original version, you could use InterleavableIO with StateT Int IO (), but not with StateT Int (ReaderT Char IO) (). In this version, this is possible. The package,

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Don Stewart
coreyoconnor: I have the need to regularly write tiny programs that analyze output logs. The output logs don't have a consistent formatting so I typically choose Perl for these tasks. The latest instance of having to write such a program was simple enough I figured I'd try my hand at using

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Justin Bailey
On Wed, Jul 23, 2008 at 11:10 AM, Corey O'Connor [EMAIL PROTECTED] wrote: I still have two questions after all this: - Can I get a Haskell implementation as fast as the Perl? - What do I need to do to get GHC's profiler to provide me usable information? Telling me that 98% of the time was in

[Haskell-cafe] Libevent FFI problems

2008-07-23 Thread Levi Greenspan
Dear list members, This is my first attempt to create a FFI to libevent (http://monkey.org/~provos/libevent/) which is an event notification library. A simple usage example is for instance given here: http://unx.ca/log/libevent_echosrv1c/ . In C one basically creates struct event instances which

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Brad Larsen
And against gawk 3.1.5: $ time awk -F: '{sum += 1 / $2} END{print sum}' test.out 3155.63 real0m0.197s user0m0.184s sys 0m0.004s compared to Don's Haskell version: $ time ./fastSum test.out 3155.62664377 real0m0.072s user0m0.056s sys 0m0.004s compared to the

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Corey O'Connor
On Wed, Jul 23, 2008 at 2:23 PM, Justin Bailey [EMAIL PROTECTED] wrote: On Wed, Jul 23, 2008 at 11:10 AM, Corey O'Connor [EMAIL PROTECTED] wrote: I still have two questions after all this: - Can I get a Haskell implementation as fast as the Perl? - What do I need to do to get GHC's profiler

[Haskell-cafe] Literate program implementing text editor

2008-07-23 Thread Eric
Hi all, I wanted to embark on a Haskell program that implements a simple text editor. Before doing so, however, I thought that I should ask: Does anyone know of a literate Haskell program already in existence that does the job? Eric M. ___

[Haskell-cafe] Haskell Weekly News: Issue 78 - July 23, 2008

2008-07-23 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20080723 Issue 78 - July 23, 2008 --- Welcome to issue 78 of HWN, a newsletter covering

[Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread Andrew Coppin
A while back I found a page somewhere containing some rather amusing IRC quotes. Unfortunately it seems to have vanished. I can't remember where on earth I found it, but I've scoured the Internet trying to track it down. (In particular, it contained a quote of somebody impersonating a typical

Re: [Haskell-cafe] Re: Optimizing 'sequence'

2008-07-23 Thread Andrew Coppin
Janis Voigtlaender wrote: How about some QuickChecking in connection with the Chasing bottoms library (http://citeseer.ist.psu.edu/704350.html)? Ah, finally a reference to what this curios phrase is actually about...! ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread John Melesky
On Jul 23, 2008, at 1:45 PM, Andrew Coppin wrote: A while back I found a page somewhere containing some rather amusing IRC quotes. Are you perhaps thinking of the Quotes of the Week section in the Haskell Weekly News? Back issues seem to be at http://sequence.complete.org/hwn if you want

Re: [Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread Miguel Mitrofanov
Also... the current Humour page on the Haskell wiki contains a link to Lambdabot's quotes database, but on my system, clicking this link just displays a few hundred pages of gibberish. Is this normal? Of course it's not. But deciphering is very simple, it's named gunzip.

RE: [Haskell-cafe] Re: Profiling nested case

2008-07-23 Thread Simon Peyton-Jones
| I had similar experiences as you when attempting to write high | performance Haskell; the language makes you want to use high-level | abstracted functions but the optimizer (while amazing, to be honest) | seems to miss a few cases that it seems like it should hit. Ryan, if you find any of

RE: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-07-23 Thread Simon Peyton-Jones
Andrew writes | I have complete confidence that whoever wrote the GHC manual knew | exactly what they meant. I am also fairly confident that this was the | same person who implemented and even designed this particular feature. | And that they probably have an advanced degree in type system

Re: [Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread Andrew Coppin
Miguel Mitrofanov wrote: Also... the current Humour page on the Haskell wiki contains a link to Lambdabot's quotes database, but on my system, clicking this link just displays a few hundred pages of gibberish. Is this normal? Of course it's not. But deciphering is very simple, it's named

Re: [Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread Jeremy Shaw
At Wed, 23 Jul 2008 19:45:56 +0100, Andrew Coppin wrote: A while back I found a page somewhere containing some rather amusing IRC quotes. Unfortunately it seems to have vanished. I can't remember where on earth I found it, but I've scoured the Internet trying to track it down. (In

Re: [Haskell-cafe] More fun with micro-benchmarks and optimizations. (GHC vs Perl)

2008-07-23 Thread Don Stewart
brad.larsen: And against gawk 3.1.5: $ time awk -F: '{sum += 1 / $2} END{print sum}' test.out 3155.63 real0m0.197s user0m0.184s sys 0m0.004s compared to Don's Haskell version: $ time ./fastSum test.out 3155.62664377 real0m0.072s user0m0.056s sys

Re: [Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread Jefferson Heard
http://bash.org ? On Wed, Jul 23, 2008 at 2:45 PM, Andrew Coppin [EMAIL PROTECTED] wrote: A while back I found a page somewhere containing some rather amusing IRC quotes. Unfortunately it seems to have vanished. I can't remember where on earth I found it, but I've scoured the Internet trying

Re: [Haskell-cafe] [Off-topic] Loss of humour

2008-07-23 Thread Miguel Mitrofanov
On 24 Jul 2008, at 00:45, Andrew Coppin wrote: Miguel Mitrofanov wrote: Also... the current Humour page on the Haskell wiki contains a link to Lambdabot's quotes database, but on my system, clicking this link just displays a few hundred pages of gibberish. Is this normal? Of course

Re: [Haskell-cafe] BLAS Solve Example

2008-07-23 Thread Dan Weston
A jedi master might stick with the existing double precision solver, then convert the results to best rational approximation [1], then do a forward solve on the rational versions of matrices, adjusting numerator and denominator to eliminate the residual error (with a heuristic to favor common

Re: [Haskell-cafe] Literate program implementing text editor

2008-07-23 Thread Duncan Coutts
On Wed, 2008-07-23 at 21:05 +0100, Eric wrote: Hi all, I wanted to embark on a Haskell program that implements a simple text editor. Before doing so, however, I thought that I should ask: Does anyone know of a literate Haskell program already in existence that does the job? I don't

Re: [Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-23 Thread Richard A. O'Keefe
On 24 Jul 2008, at 3:52 am, Duncan Coutts wrote: [Sun have donated a T5120 server + USD10k to develop support for Haskell on the SPARC.] This is wonderful news. I have a 500MHz UltraSPARC II on my desktop running Solaris 2.10. Some time ago I tried to install GHC 6.6.1 on it, but ended up with

Re: [Haskell-cafe] ANNOUNCE: Sun Microsystems and Haskell.org joint project on OpenSPARC

2008-07-23 Thread Brandon S. Allbery KF8NH
On 2008 Jul 24, at 0:43, Richard A. O'Keefe wrote: So binary distributions for SPARC/Solaris and SPARC/Linux would be very very nice things for this new project to deliver early. (Or some kind of source distribution that doesn't need a working GHC to start with. I'm still working on