[Haskell-cafe] Chart plotting libraries

2007-11-14 Thread Jon Harrop
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 its stopped working and an upgrade is £2,000. Are there Haskell bindings to any free libraries o

Re: [Haskell-cafe] Chart plotting libraries

2007-11-14 Thread Don Stewart
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 its stopped working and an upgrade is £2,000. Are > there Haskell bindings to

Re: [Haskell-cafe] Chart plotting libraries

2007-11-14 Thread Tim Docker
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 just

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

2007-11-14 Thread Don Stewart
stefanor: > On Wed, Nov 14, 2007 at 10:03:52PM -0800, Chad Scherrer wrote: > > Hi, > > > > 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 comp

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

2007-11-14 Thread Stefan O'Rear
On Wed, Nov 14, 2007 at 10:03:52PM -0800, Chad Scherrer wrote: > Hi, > > 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 effici

[Haskell-cafe] Using Data.Binary for compression

2007-11-14 Thread Chad Scherrer
Hi, 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, commonly-used Symbols should have very short representations, while le

[Haskell-cafe] Re: Flymake Haskell

2007-11-14 Thread Daisuke IKEGAMI
Dear Stefan and Haskell-Cafe, Thanks to keeping your interest to the flymake-mode for Haskell. Stefan wrote: > Could you explain to me what flycheck_haskell.pl does, and give an > example of a problematic situation solved by the use of > flycheck_haskell.pl. Sure. The perl script flycheck_has

Re: [Haskell-cafe] why PArr slower than list ?

2007-11-14 Thread Manuel M T Chakravarty
Albert Lee: I read the GHC/Data Parallel Haskell/GHC.PArr page http://haskell.org/haskellwiki/Data_Parallel_Haskell/GHC.PArr and make a simple test to compare the speed of PArr against List: On the wiki page GHC.PArr is described under the heading "Convenience without the speed". You'd usua

Re: [Haskell-cafe] why PArr slower than list ?

2007-11-14 Thread Brandon S. Allbery KF8NH
On Nov 14, 2007, at 21:50 , Albert Lee wrote: dotp :: Num a => [:a:] -> [:a:] -> a You're forcing Num a => a here, whereas the list one probably specializes to Integer. Seems like a bad way to go to me; polymorphism is expensive. (Whether it's *that* expensive, I couldn't tell you.)

[Haskell-cafe] Re: Brazilian Haskellers ?

2007-11-14 Thread Maurí­cio
Ricardo, The idea is great. There's a lot of haskellers in Brazil and, if we want to make Haskell the brazilian language of choice, as we all do, it's time to get together. However, I think just a mail group isn't going to do much. We already have two communities in Orkut, and the volume of commu

[Haskell-cafe] why PArr slower than list ?

2007-11-14 Thread Albert Lee
I read the GHC/Data Parallel Haskell/GHC.PArr page http://haskell.org/haskellwiki/Data_Parallel_Haskell/GHC.PArr and make a simple test to compare the speed of PArr against List: {-# OPTIONS -fparr -fglasgow-exts #-} module Main where import GHC.PArr import System.CPUTime dotp :: Num a => [:a:]

Re: [Haskell-cafe] What is the role of $!?

2007-11-14 Thread Matthew Brecknell
Jonathan Cast: > Right. (f x) evaluates f and then applies it to x. (f $! x) > evaluates x, evaluates f, and then applies f to x. True, though I'd like to chip in a small refinement: When evaluated, (f x) evaluates f as far as its top-level lambda, then applies it to x, and then continues to

Re: [Haskell-cafe] Re: some links broken in 6.8.1 documentation

2007-11-14 Thread Ian Lynagh
Hi Daniil, On Mon, Nov 12, 2007 at 07:56:23PM +0300, Daniil Elovkov wrote: > > Do I understand it right that the idea of the split was letting all > packages (possibly apart from base) emerge more or less independently > from ghc releases? It's possible to install a newer version of a bootlib,

Re: [Haskell-cafe] What is the role of $!?

2007-11-14 Thread Jonathan Cast
On 14 Nov 2007, at 4:32 PM, Shachaf Ben-Kiki wrote: On Nov 14, 2007 4:27 PM, Justin Bailey <[EMAIL PROTECTED]> wrote: It's: f $! x = x `seq` f x That is, the argument to the right of $! is forced to evaluate, and then that value is passed to the function on the left. The function itself is

Re: [Haskell-cafe] What is the role of $!?

2007-11-14 Thread Shachaf Ben-Kiki
On Nov 14, 2007 4:27 PM, Justin Bailey <[EMAIL PROTECTED]> wrote: > It's: > > f $! x = x `seq` f x > > That is, the argument to the right of $! is forced to evaluate, and > then that value is passed to the function on the left. The function > itself is not strictly evaluated (i.e., f x) I don't b

Re: [Haskell-cafe] What is the role of $!?

2007-11-14 Thread Derek Elkins
On Wed, 2007-11-14 at 16:27 -0800, Justin Bailey wrote: > It's: > > f $! x = x `seq` f x > > That is, the argument to the right of $! is forced to evaluate, and > then that value is passed to the function on the left. The function > itself is not strictly evaluated (i.e., f x) I don't believe.

Re: [Haskell-cafe] What is the role of $!?

2007-11-14 Thread Justin Bailey
It's: f $! x = x `seq` f x That is, the argument to the right of $! is forced to evaluate, and then that value is passed to the function on the left. The function itself is not strictly evaluated (i.e., f x) I don't believe. Justin ___ Haskell-Cafe m

[Haskell-cafe] What is the role of $!?

2007-11-14 Thread PR Stanley
Hi What is the role of $! ? As far as I can gather it's something to do with strict application. Could someone explain what it is meant by the term strict application please? Thanks, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://w

Re: [Haskell-cafe] Re: List of all powers

2007-11-14 Thread Calvin Smith
On 11/14/2007 03:19 PM,, 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! =) Agreed. I really look forward to apfelmus' consistently outstanding

Re: [Haskell-cafe] Re: List of all powers

2007-11-14 Thread Don Stewart
byorgey: >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! =) Having met apfelmus last month in Freiburg I can inform the cafe that he is thorough and insigh

Re: [Haskell-cafe] Re: List of all powers

2007-11-14 Thread Brent Yorgey
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! =) thanks! -Brent ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Felipe Lessa
On Nov 14, 2007 4:38 PM, <[EMAIL PROTECTED]> wrote: > Nos somos todos Brasileiros. Ou quase... Falou e disse! =) I'm giving some "Haskell classes" based on the Wikibook to some of my friends at the university (I think I've said something about it before), and they're very very excited. I'll poin

[Haskell-cafe] Re: List of all powers

2007-11-14 Thread apfelmus
Brent Yorgey wrote: Kurt Hutchinson wrote: As part of a solution I'm working on for Project Euler problem 119, I wanted to create an ordered list of all powers of all positive integers (starting with squares). The merging can be done much more simply and efficiently (this is code I wrote when

Re: [Haskell-cafe] List of all powers

2007-11-14 Thread Brent Yorgey
On Nov 14, 2007 2:57 PM, Kurt Hutchinson <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 1:06 PM, Brent Yorgey <[EMAIL PROTECTED]> wrote: > > On Nov 14, 2007 12:32 PM, Kurt Hutchinson <[EMAIL PROTECTED]> wrote: > > The merging can be done much more simply and efficiently (this is code I > > wrote whe

Re: [Haskell-cafe] List of all powers

2007-11-14 Thread Kurt Hutchinson
On Nov 14, 2007 1:06 PM, Brent Yorgey <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 12:32 PM, Kurt Hutchinson <[EMAIL PROTECTED]> wrote: > The merging can be done much more simply and efficiently (this is code I > wrote when computing squarefree numbers in a blog post a few months ago): Wow, thanks

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Ricardo Herrmann
Thanks. I also put in that page a link pointing to the haskellers map in Frappr, in order to encourage new HUGs. I believe most of us are lazy enough (in the good Haskell way) to plot them in xearth ;-) Don Stewart-2 wrote: > > rherrmann: >> >> Hi brazilian haskellers, >> >> How about trying

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Don Stewart
rherrmann: > > Hi brazilian haskellers, > > How about trying to form a HUG-BR ? Maybe even something along the lines of > FringeDC (http://www.lisperati.com/fringedc.html). I only know about 4 > people that would join the cause, that's why I'm recruiting ;-) > > Feel free to contact me (I'm post

Re: [Haskell-cafe] List of all powers

2007-11-14 Thread Henning Thielemann
On Wed, 14 Nov 2007, Kurt Hutchinson wrote: > As part of a solution I'm working on for Project Euler problem 119, I > wanted to create an ordered list of all powers of all positive > integers (starting with squares). This is what I came up with: > > powers = ( uniq . map fst . iterate next ) ( 1,

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread PR Stanley
> Hi brazilian haskellers, Wow! I knew the Haskell community has been growing... but there's a brazillian of us? -- Rich A mini UN, that's us. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-c

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread jerzy . karczmarczuk
Alex Sandro Queiroz e Silva writes: Rich Neswold escreveu: On Nov 14, 2007 10:59 AM, Ricardo Herrmann <[EMAIL PROTECTED]> wrote: Hi brazilian haskellers, Wow! I knew the Haskell community has been growing... but there's a brazillian of us? Well, we are more than one. :-) Cheers,

Re: [Haskell-cafe] List of all powers

2007-11-14 Thread Brent Yorgey
On Nov 14, 2007 12:32 PM, Kurt Hutchinson <[EMAIL PROTECTED]> wrote: > As part of a solution I'm working on for Project Euler problem 119, I > wanted to create an ordered list of all powers of all positive > integers (starting with squares). This is what I came up with: > > powers = ( uniq . map f

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Alex Sandro Queiroz e Silva
Hallo, Rich Neswold escreveu: > On Nov 14, 2007 10:59 AM, Ricardo Herrmann <[EMAIL PROTECTED]> wrote: >> Hi brazilian haskellers, > > Wow! I knew the Haskell community has been growing... but there's a > brazillian of us? > Well, we are more than one. :-) Cheers, -alex ___

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Rich Neswold
On Nov 14, 2007 10:59 AM, Ricardo Herrmann <[EMAIL PROTECTED]> wrote: > Hi brazilian haskellers, Wow! I knew the Haskell community has been growing... but there's a brazillian of us? -- Rich JID: [EMAIL PROTECTED] AIM: rnezzy ___ Haskell-Cafe mailing

[Haskell-cafe] List of all powers

2007-11-14 Thread Kurt Hutchinson
As part of a solution I'm working on for Project Euler problem 119, I wanted to create an ordered list of all powers of all positive integers (starting with squares). This is what I came up with: powers = ( uniq . map fst . iterate next ) ( 1, ( 0, powertable ) ) powertable = map (\ n -> map (\ p

Re: [Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Ricardo Herrmann
Just created: http://groups.google.com/group/hug-br Ricardo Herrmann wrote: > > Hi brazilian haskellers, > > How about trying to form a HUG-BR ? Maybe even something along the lines > of FringeDC (http://www.lisperati.com/fringedc.html). I only know about 4 > people that would join the cause,

[Haskell-cafe] Brazilian Haskellers ?

2007-11-14 Thread Ricardo Herrmann
Hi brazilian haskellers, How about trying to form a HUG-BR ? Maybe even something along the lines of FringeDC (http://www.lisperati.com/fringedc.html). I only know about 4 people that would join the cause, that's why I'm recruiting ;-) Feel free to contact me (I'm posting this from the Nabble in

Re: [Haskell-cafe] cabal problem?

2007-11-14 Thread Duncan Coutts
On Wed, 2007-11-14 at 16:16 +, Jens Blanck wrote: > > sudo runghc Setup.hs install > root's password: > Setup.hs : Warning: Unknown field 'build-type' > Setup.hs: error reading ./.setup-config; run "setup configure" > command? I suspect your path is different for your root user, so it's picki

Re: [Haskell-cafe] cabal problem?

2007-11-14 Thread Don Stewart
jens.blanck: >I have problems building X11. I just installed ghc 6.8 but I got the same >behaviour when asking it to use the old compiler. > >Jens > >> runghc Setup.hs configure >Configuring X11-1.3.0.2007... >checking for gcc... gcc >checking for C compiler defaul

[Haskell-cafe] cabal problem?

2007-11-14 Thread Jens Blanck
I have problems building X11. I just installed ghc 6.8 but I got the same behaviour when asking it to use the old compiler. Jens > runghc Setup.hs configure Configuring X11-1.3.0.2007... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C c

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

2007-11-14 Thread Seth Gordon
Jon Harrop wrote: When functional languages achieve these goals I believe the total number of users will increase dramatically as scientists and engineers adopt them alongside their standard tools. Bioinformaticians are among the first to adopt functional programming languages but I believe m

Re: [Haskell-cafe] Renaming constructors for readability

2007-11-14 Thread Henning Thielemann
On Wed, 14 Nov 2007, Jules Bean wrote: > Henning Thielemann wrote: > > > > No problem, write a function like 'maybe' to inspect the data. > > > > Instead of 'f m' with > > f :: Maybe T -> S > > f (Just x) = g x > > f Nothing = h > > Yes. It is a problem. > > Do you write all your code using high

Re: [Haskell-cafe] Renaming constructors for readability

2007-11-14 Thread Jules Bean
Henning Thielemann wrote: On Tue, 13 Nov 2007, Dougal Stanton wrote: On 13/11/2007, Henning Thielemann <[EMAIL PROTECTED]> wrote: On Tue, 13 Nov 2007, Dougal Stanton wrote: -- int a = 3; -- int *pa = &a; ampersand :: t -> Pointer t ampersand a = Just a What's bad about using 'ampersand' fun

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

2007-11-14 Thread Brandon S. Allbery KF8NH
On Nov 14, 2007, at 3:28 , Simon Peyton-Jones wrote: I agree that an informative error message is worth 100 manual pages. The trouble is that at this stage GHCi doesn't even *know* that 'x' ever existed, because it's not mentioned in the interface file, so it's hard to do even give the er

Re: [Haskell-cafe] Screen scraping with an interactive process: Buffering problems?

2007-11-14 Thread Denis Bueno
On Nov 7, 2007 4:44 PM, David Benbennick <[EMAIL PROTECTED]> wrote: > And > once you do hGetContents, you have read all the data that will ever > exist on that handle, so there's nothing to read from it "later on". I completely misunderstood how hGetContents works. This now makes sense. I first

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

2007-11-14 Thread Yitzchak Gale
I was also bitten by this. I consider it to be a serious problem with the UI for ghci. My vote is: o The default should be to make all symbols available whenever possible. o It should be easy for experts, like Aaron Denney, to get the current behavior. (E.g., a flag, that can be turned on or off

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

2007-11-14 Thread Jon Harrop
On Wednesday 14 November 2007 10:55, luc.taesch wrote: > do not expect it to be a lead to mass expansion for tommorow... I think the functional programming market is far from saturated though: there are still many inroads to make into areas like technical computing that stand to benefit a lot fr

[Haskell-cafe] Re: Weird ghci behaviour?

2007-11-14 Thread ChrisK
Claim: The "ghci modulename" and ":load modulename" command are confusing because they have two behaviors. Short form of my proposal: Make two separate commands that each have a predictable behavior. Make "ghci modulename" default to source loading, and require a flag to load a binary. I don't g

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

2007-11-14 Thread luc.taesch
well, I generally read more than post on the list, but being in investment banking ( for 20 years), this one is too hard to resist... The kind of job these guys do is highly mathematical ( quantitative analysis) as opposed to traditional banking or Back Offices where th job is (not so clever) r

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

2007-11-14 Thread Laurent Deniau
Jon Harrop wrote: > On Tuesday 13 November 2007 16:03, Laurent Deniau wrote: >> OCaml was used to write a meta-program which applies heuristics to >> minimize the runtime of the critical C code (i.e. the butterflies). This >> has nothing to do with FFT computation > > No. The sole purpose of the O

Re: [Haskell-cafe] More good performance results for ghc 6.8

2007-11-14 Thread Jon Harrop
On Wednesday 14 November 2007 00:14, Don Stewart wrote: > Trying out some of the great language shootout programs with ghc 6.8 is > producing nice results. For example, our "classic" cache-hammering, > bitwise sieve benchmark is out of the box 10% faster with the new > compiler. The (already rather

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

2007-11-14 Thread Bulat Ziganshin
Hello Simon, Wednesday, November 14, 2007, 11:28:23 AM, you wrote: > I can think of some other possibilities: > (a) It would be possible to record in the .hi file the fact that > there originally *was* a top-level 'x', and so produce the message > you suggest. But it'd be one more thing to impl

Re: [Haskell-cafe] let vs. where

2007-11-14 Thread C.M.Brown
Hi Neil, > Why not: > > exp = let blah = g 1000 > in (fst blah, snd blah) Yes, fair enough. > Where's always get desugared to let's, so where's are never more efficient. Interesting. I'm thinking a where-to-let refactoring and its converse may make useful routine refactorings for HaRe.

Re: [Haskell-cafe] let vs. where

2007-11-14 Thread Neil Mitchell
Hi Chris, > this could be captured nicely in a where clause: > > exp = (fst blah, snd blah) where blah = gg 1000 > > But a let would have to be placed in both elements of the tuple > > exp = (let blah = g 1000 in fst blah, let blah = g 1000 in snd blah) Why not: exp = let blah = g 1000

Re: [Haskell-cafe] let vs. where

2007-11-14 Thread C.M.Brown
Hi David, > A let clause would work fine here: > > someFunction ls a b c = let listLen = length ls > someAuxFunction x y = ... listLen ... > someOtherFunction x y = ... listLen ... > in > ... li

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

2007-11-14 Thread Roel van Dijk
On Nov 13, 2007 5:03 PM, Laurent Deniau <[EMAIL PROTECTED]> wrote: > If your program is written in Java (resp. C) but the JIT is written in C > (resp. OCaml), in which language is your code? I'd say it's written in Java. If you have a bug where would you correct it? If someone would like to see th

[Haskell-cafe] Re: Renaming constructors for readability

2007-11-14 Thread apfelmus
Dougal Stanton wrote: I wonder, is there an equivalent of the 'type' keyword for constructors? An example: -- create a pseudo-C pointer type -- which can point to a value or a -- null. type Pointer a = Maybe a -- int a = 3; -- int *pa = &a; ampersand :: t -> Pointer t ampersand a = Just a --

[Haskell-cafe] Re: let vs. where

2007-11-14 Thread Christian Maeder
John Lato wrote: > Hello, > > I know there are several important differences between let-expressions > and where-clauses regarding scoping and the restriction of "where" to > a top-level definition. However, frequently I write code in which > either one would be allowed, and I was wondering if th

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

2007-11-14 Thread Simon Peyton-Jones
| > Dan, can you suggest any words we could add to the | > documentation that would have prevented you stumbling? | | I guess the thing that would have helped best would have been an error | message like "'x' not in scope, use -fforce-recomp to see all symbols" | when running intera